Method for detecting isofenphos-methyl in vegetables and fruits based on colloidal gold immunochromatography

Through the detection method based on colloidal gold immunotomy chromatography, combined with chromogenic image processing and feature analysis algorithm, the problems of high cost, long time and low sensitivity of methyl isosalus in the prior art are solved, and fast and accurate detection results are achieved.

CN119738561AActive Publication Date: 2025-04-01JIANGSU GUANGHAI INSPECTION & TESTING CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411902930.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-01
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In the prior art, the detection of methyl isosalus is mainly relies on laboratory gas chromatography methods. Although the sensitivity is high, the detection cost is high, the time is long and limited by the site, and it is not convenient to capture slight changes in color, which affects the sensitivity and reliability of the detection.

Method used

The detection method based on colloidal gold immunochromatography is adopted, and the concentration of methyl isolate is obtained by preparing colloidal gold immunochromatography reagent strips, combining chromatogenesis image processing and image segmentation algorithms, accurately identifying and positioning detection lines and control lines, and using feature analysis and concentration analysis algorithms.

Benefits of technology

It realizes fast and convenient methyl isolose detection, improves the immediacy and response speed of detection, reduces detection costs, enhances the accuracy and reliability of detection, and is suitable for rapid on-site inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119738561A_ABST
    Figure CN119738561A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting isofenphos-methyl in vegetables and fruits based on colloidal gold immunochromatography, and relates to the technical field of pesticide residue detection.The method for detecting isofenphos-methyl in vegetables and fruits comprises the following steps that a colloidal gold immunochromatography reagent strip is prepared; acquiring a color developing image of the colloidal gold immunochromatography reagent strip; obtaining the color of the detection line and the color of the control line; obtaining color feature data of the detection line and color feature data of the control line; the concentration of the isofenphos-methyl in the vegetables and fruits is obtained. The colloidal gold immunochromatography reagent strip is used for detecting isofenphos-methyl, the whole detection process can be completed in a short time by combining color development image processing, and the colloidal gold immunochromatography method is easy to operate and low in cost, so that the colloidal gold immunochromatography reagent strip is convenient to popularize and apply in primary laboratories and even field rapid detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pesticide residue detection, and in particular to a method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography. Background Art

[0002] The sanitary inspection items of vegetables and fruits generally include sulfites, nitrites, heavy metals, pathogenic bacteria and pesticide residues. Among them, pesticide residues are listed as the primary inspection items and can most directly reflect the quality problems of vegetables. Methyl isofenphos, as a highly toxic soil insecticide, is widely used in the prevention and control of nematodes and underground pests on crops such as corn and wheat due to its wide insecticide spectrum and long residual effect. At present, methyl isofenphos has been listed as one of the banned pesticides in vegetable production, and it is listed as one of the pesticide varieties for quantitative monitoring of vegetable pesticide residues. Therefore, the accuracy of methyl isofenphos pesticide detection data is particularly important.

[0003] In the prior art, most of them are tested by laboratories such as gas chromatography. Testing in laboratories such as gas chromatography is a conventional method for detecting methyl isofenphos, which has the advantages of high sensitivity, accurate results, good repeatability, etc., and has become an indispensable conventional means for methyl isofenphos detection. However, laboratory testing is expensive, the detection time is long and is limited by the site, and it is not convenient to analyze the color of the test line and the control line, and it is not convenient to capture the slight change of color, which increases the influence of external interference factors and reduces the sensitivity and reliability of the detection. Compared with the laboratory detection method, the methyl isofenphos colloidal gold immunochromatography rapid detection method is a widely used and rapidly developed detection method in recent years, because food safety supervision of agricultural and sideline product wholesale markets and food retail outlets such as supermarkets, and even the management of the operators themselves, all need to be equipped with on-site sampling and rapid detection. On-site rapid detection, as the first step in discovering food safety problems, has an irreplaceable role.

[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0005] In view of the deficiencies of the prior art, the present invention proposes a method for detecting methyl isofenphos in fruits and vegetables based on colloidal gold immunochromatography, which solves the problem that most of the existing methods mentioned in the background art are detected by laboratories such as gas chromatography, which are conventional methods for detecting methyl isofenphos, and have the advantages of high sensitivity, accurate results, good repeatability, etc., and have become an indispensable conventional means for detecting methyl isofenphos. However, laboratory testing is expensive, takes a long time to detect and is limited by the site, and is not convenient for analyzing the color of the test line and the control line, and is not convenient for capturing slight changes in color, which increases the influence of external interference factors and reduces the sensitivity and reliability of detection.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography, the method comprising the following steps: S1. preparing a colloidal gold immunochromatographic reagent strip, and detecting isofosfo-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip; S2, obtaining a color image of the colloidal gold immunochromatography reagent strip, and processing the color image to obtain a color characteristic image; S3, segmenting the obtained color characteristic image based on an image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line; S4, analyzing the color of the detection line and the color of the control line based on a feature analysis algorithm to obtain color feature data of the detection line and the color feature data of the control line; S5. Compare and analyze the color characteristic data of the test line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfos-methyl in the fruits and vegetables; Segmenting the obtained color feature image based on an image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line comprises the following steps: S31, inputting a color feature image and initializing image segmentation algorithm parameters; S32, generating multiple candidate segmentation thresholds in the color feature image, calculating the fitness value of each candidate segmentation threshold, and recording the initial best candidate segmentation threshold; S33, performing boundary correction on the initial best candidate segmentation threshold, calculating the fitness of each candidate segmentation threshold, and recording the current best candidate segmentation threshold and fitness value; S34, based on the current best candidate segmentation threshold, generate a reverse candidate segmentation threshold using the lens imaging reverse learning strategy, and save the current best candidate segmentation threshold based on the greedy strategy; S35, based on the current optimal candidate segmentation threshold, segment the color development area, identify and determine the positions and boundaries of the detection line and the control line in the colloidal gold immunochromatography reagent strip; S36, extracting color information of the detection line and the control line according to the positions of the detection line and the control line in the segmented colloidal gold immunochromatography reagent strip; S37, determine whether the iteration termination condition is met, if so, output the final segmentation result, if not, return to step S33 to continue optimizing the segmentation process.

[0007] Furthermore, preparing a colloidal gold immunochromatographic reagent strip, and detecting isofosfo-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip comprises the following steps: S11, based on the reaction conditions, combining the prepared anti-isothiophene-methyl antibody with the gold nanoparticles to generate a colloidal gold-labeled antibody; S12, coating the colloidal gold labeled antibody on the sample pad portion of the reagent strip, and coating the fixed antigen and antibody on the detection line and control line of the reagent strip, respectively, to obtain a colloidal gold immunochromatography reagent strip; S13, extracting the fruit and vegetable samples with a preset solvent to obtain an extract of isofosfos-methyl, and dripping the extract into the sample addition hole of the colloidal gold immunochromatography reagent strip for detection.

[0008] Further, based on the current best candidate segmentation threshold, the reverse candidate segmentation threshold is generated by using the lens imaging reverse learning strategy, and based on the greedy strategy, the current best candidate segmentation threshold is saved, including the following steps: S341, determining the upper and lower bounds of the search space of the current best candidate segmentation threshold, and initializing the current best candidate segmentation threshold; S342, based on the lens imaging reverse learning strategy, according to the current best candidate segmentation threshold and the upper and lower bounds of the search space, calculate the reverse candidate segmentation threshold; S343, based on the greedy strategy, comparing the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold; S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, the reverse candidate segmentation threshold is used as the current best candidate segmentation threshold. If the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, the current best candidate segmentation threshold is used as the current best candidate segmentation threshold and saved.

[0009] Furthermore, the formula for calculating the reverse candidate segmentation threshold is: ; In the formula, Denoted as the reverse candidate segmentation threshold; M Represents the current best candidate segmentation threshold; U R Represented as the upper bound of the search space; L R It is expressed as the lower bound of the search space; K Expressed as a scaling factor.

[0010] Further, based on the greedy strategy, comparing the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold includes the following steps: S3431, based on the cross entropy method, initializing the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination; S3432, optimizing each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, selecting one candidate segmentation threshold that has not been optimized each time, and keeping the current best candidate segmentation threshold unchanged for the other candidate segmentation thresholds; S3433, comparing the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculating their respective fitness values; S3434, if the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, then update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination, otherwise, keep the current best candidate segmentation threshold combination unchanged; S3435. If there are still unoptimized candidate segmentation thresholds, based on the greedy strategy, continue to repeat steps S3432 to S3434 until all candidate segmentation thresholds are optimized.

[0011] Further, analyzing the color of the detection line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the detection line and the color feature data of the control line includes the following steps: S41, evaluating the color features in the color feature image using a feature analysis algorithm, selecting the color features in the color feature image based on the evaluation results and feature screening rules, and using the color features as a preliminary feature subset; Among them, the color features include detection line color features and control line color features; S42, initializing the parameters of the feature analysis algorithm, calculating the color feature of each detection line and the color feature of the control line through the color feature extraction formula, and calculating the fitness value of each detection line color feature and the color feature of the control line according to the color similarity measurement; S43, respectively calculating the adjustment speed, optimization direction and random disturbance of each detection line color feature and control line color feature; S44, calculating the step size scaling factor according to the exponential nonlinear decrease, and updating the adjustment amplitude and color feature value of each detection line color feature and control line color feature; S45, performing genetic operation on each detection line color feature and control line color feature to increase the diversity of color features; S46, calculating the fitness value of each detection line color feature and control line color feature after iteration, selecting a number of optimal detection line color features and control line color features to form an elite feature, performing elite chaotic mutation on the elite feature, calculating the fitness of the mutated elite feature, and comparing it with the original elite feature, retaining the best elite feature; S47, judging whether the maximum number of iterations has been reached, if so, outputting the best elite features as the color feature data of the detection line and the color feature data of the control line; if not, returning to step S43 to continue the optimization.

[0012] Furthermore, performing elite chaotic mutation on elite features includes the following steps: S461. After each iteration, a number of optimal detection line color features and control line color features are selected to form an elite feature set, and an elite space is constructed according to the upper and lower limits of each dimension of the elite features; S462, mapping each dimension of the elite feature from the elite space to the chaotic space using a mapping formula to obtain a chaotic feature, and performing chaotic mapping on each dimension of the chaotic feature according to a preset chaotic mutation probability to generate a new chaotic feature; S463. Re-map the new chaotic feature back to the elite space through the inverse mapping formula to obtain a new elite feature, and compare the fitness values ​​of the original elite feature and the mutated elite feature, retain the elite feature with the highest fitness, and enter the next generation of optimization.

[0013] Furthermore, the mapping formula is: ; In the formula, H i,j Expressed as i Elite features in j Chaotic eigenvalues ​​of dimensions; B i,j Expressed as i Elite features in j The current color feature value of the dimension; D i,j Expressed as i Elite features in j The elite characteristic value of the dimension; D u,j Expressed as j The upper limit of the elitist eigenvalue of a dimension.

[0014] Further, comparing and analyzing the color characteristic data of the detection line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfo-methyl in fruits and vegetables includes the following steps: S51, randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature set, and perform fast non-dominated sorting on the color feature data to calculate its congestion degree to form a sorted preferred color feature set; S52, based on the tournament selection method, selecting the color feature with the highest fitness from the preferred color feature set, and duplicating it to form a new color feature set; S53, performing crossover and mutation operations on the new color feature set, eliminating color feature data that does not meet the constraint conditions, retaining color feature data that meets the concentration detection constraint conditions, and using an initialization function to regenerate color feature data that meets the concentration detection constraint conditions; S54, merging the parent color feature data set with the child color feature data set to form a new preferred color feature set, and removing duplicate color feature data, retaining unique color feature data, to form a feature set without duplicate color feature data; S55, performing fast non-dominated sorting on the feature set of non-repeated color feature data, and calculating its congestion degree to obtain a new feature set of non-repeated color feature data; S56, determine whether the current number of iterations has reached a preset maximum value, if not, return to step S52 to continue iterating, if reached, stop iterating and go to step S57; S57. Output the final optimal color feature data set as the result of color feature comparison analysis of the detection line and the control line, and obtain the concentration of methyl isothioate in fruits and vegetables.

[0015] Furthermore, based on the tournament selection method, the color feature with the highest fitness is selected from the preferred color feature set, and the color feature is copied to form a new color feature set, which includes the following steps: S521, defining a fitness function related to color features, and calculating a fitness value for each color feature data; S522, preset the tournament scale, randomly select a number of color feature data from the preferred color feature set, use them as participants of the current round of the tournament, calculate the fitness of the number of color feature data, and select the color feature data with the highest fitness as the winner of the current round of the tournament; S523, copying the color feature data with the highest fitness selected in the tournament and putting it into a new color feature data set, repeating the tournament selection and copying process multiple times until the new color feature set reaches a predetermined size; S524: Perform crossover and mutation operations on the new color feature set, and generate a final new color feature set.

[0016] The beneficial effects of the present invention are: 1. The present invention utilizes colloidal gold immunochromatography reagent strips to detect isofosfos-methyl, and combines color image processing to complete the entire detection process in a short time, avoiding complex pre-treatment steps, and is more convenient than traditional chromatography or mass spectrometry methods. Through the acquisition of color reaction and color image, the presence of the target substance can be quickly and intuitively reflected, thereby improving the immediacy and response speed of the detection. By preparing the reagent strips and the processing of the color image, combined with the concentration analysis algorithm, the entire detection process is simple, easy to standardize and automate. Since the colloidal gold immunochromatography method is simple to operate and has low cost, it is convenient to promote and apply it in grassroots laboratories or even on-site rapid detection.

[0017] 2. The present invention uses an image segmentation algorithm to accurately identify and locate the positions of the detection line and the control line, which can reduce the errors caused by manual judgment, make the position confirmation more accurate, and improve the accuracy and repeatability of the detection.

[0018] 3. The present invention analyzes the colors of the detection line and the control line through a feature analysis algorithm to obtain color feature data, which can more keenly capture slight changes in color, reduce the influence of external interference factors, and enhance the sensitivity and reliability of detection.

[0019] 4. The present invention compares and analyzes the color feature data of the test line and the control line through a concentration analysis algorithm. Compared with the traditional subjective visual comparison method, it can more accurately quantify the concentration change of isofosfos-methyl and ensure the objectivity of the test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 The present invention is a flow chart of a method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0023] In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0024] According to an embodiment of the present invention, a method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography is provided.

[0025] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to an embodiment of the present invention, the method for detecting isofenphos-methyl in fruits and vegetables comprises the following steps: S1. preparing a colloidal gold immunochromatographic reagent strip, and detecting isofosfo-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip; S2, obtaining a color image of the colloidal gold immunochromatography reagent strip, and processing the color image to obtain a color characteristic image; Specifically, the color image of the colloidal gold immunochromatography reagent strip is obtained by an image acquisition device, for example: Digital camera: can be used to photograph the color-developing part of the colloidal gold immunochromatography reagent strip.

[0026] Smartphone cameras: Modern mobile phone cameras have high enough resolution to be used to obtain chromogenic images for on-site or portable inspection.

[0027] Dedicated chromogenic scanners: Some professional laboratories or testing equipment may be equipped with dedicated scanners or imaging devices specifically for capturing chromogenic images, which can provide higher image accuracy and consistency.

[0028] Specifically, the color image refers to the image of the color development area on the colloidal gold immunochromatographic reagent strip. When the test line and control line on the reagent strip are colored, the area is photographed by an image acquisition device, and the digital image formed is the color development image, including: Test line (T line): This is the color development area used to detect the target substance (such as isofosfos-methyl). When the target substance is present, a color change will appear on the test line.

[0029] Control line (C line): This is a reference line used to verify whether the test strip is working properly. It is usually always colored, indicating that the test system is effective.

[0030] Background Area: In addition to the test and control lines, the chromogenic image may also include background areas on the reagent strip where there is no color change.

[0031] S3, segmenting the obtained color characteristic image based on an image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line; S4, analyzing the color of the detection line and the color of the control line based on a feature analysis algorithm to obtain color feature data of the detection line and the color feature data of the control line; S5. Compare and analyze the color characteristic data of the test line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfos-methyl in the fruits and vegetables; Segmenting the obtained color feature image based on an image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line comprises the following steps: S31, inputting a color feature image and initializing image segmentation algorithm parameters; S32, generating multiple candidate segmentation thresholds in the color feature image, calculating the fitness value of each candidate segmentation threshold, and recording the initial best candidate segmentation threshold; S33, performing boundary correction on the initial best candidate segmentation threshold, calculating the fitness of each candidate segmentation threshold, and recording the current best candidate segmentation threshold and fitness value; S34, based on the current best candidate segmentation threshold, generate a reverse candidate segmentation threshold using the lens imaging reverse learning strategy, and save the current best candidate segmentation threshold based on the greedy strategy; S35, based on the current optimal candidate segmentation threshold, segment the color development area, identify and determine the positions and boundaries of the detection line and the control line in the colloidal gold immunochromatography reagent strip; S36, extracting color information of the detection line and the control line according to the positions of the detection line and the control line in the segmented colloidal gold immunochromatography reagent strip; S37, determine whether the iteration termination condition is met, if so, output the final segmentation result, if not, return to step S33 to continue optimizing the segmentation process.

[0032] In order to facilitate understanding of the above technical scheme of the present invention, the present invention will be described in detail below in the actual process, in which the obtained color characteristic image is segmented based on the image segmentation algorithm, the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip are determined, and the color of the detection line and the color of the control line are obtained.

[0033] Step 1: 1) Input the color characteristic image: Input the color characteristic image taken from the colloidal gold immunochromatography reagent strip into the system. Image size: 640×480 pixels. Color mode: RGB (red, green, blue) mode.

[0034] 2) Initialize the segmentation algorithm parameters: Population size: 50. Maximum number of iterations: 100. Predator behavior weight: 1.5. Clustering behavior weight: 1.2. Entropy measurement parameters: Use the maximum inter-class variance method (Otsu method) as the fitness function and define the segmentation threshold optimization target.

[0035] Step 2: 1) Generate candidate segmentation thresholds: Generate several candidate thresholds on the grayscale histogram of the color feature image. Threshold generation range: grayscale value 0-255. Number of initial candidate segmentation thresholds: 10 candidate thresholds, respectively [50, 75, 100, 125, 150, 175, 200, 225, 250].

[0036] 2) Fitness calculation: Based on the entropy measure, the fitness of each candidate threshold is calculated. The higher the fitness, the more suitable the threshold is for segmentation.

[0037] Calculation formula: The inter-class variance formula in the maximum inter-class variance method (Otsu) can be used, and the goal is to maximize the inter-class variance.

[0038] Record the initial optimal threshold: the fitness corresponding to the threshold of 125 is 0.89, and the initial optimal threshold is 125.

[0039] Step 3, 1) Boundary correction: perform boundary correction on the initial optimal threshold (125), and use the range of ±5 around it as the new candidate threshold. The new candidate segmentation threshold is [120, 122, 124, 126, 128, 130].

[0040] 2) Recalculate fitness: Calculate the fitness of these revised thresholds. The new optimal threshold is 126, and the corresponding fitness is 0.91.

[0041] Step 4: 1) Lens imaging reverse learning strategy: Generate the reverse threshold for the current optimal threshold 126: reverse threshold = 255-126 = 129. Then the reverse candidate segmentation threshold is

[129] .

[0042] 2) Greedy strategy: Compare the fitness of the current candidate threshold (126) and the reverse candidate threshold (129). Fitness calculation: The fitness of threshold 126 is 0.91, and the fitness of threshold 129 is 0.88. Keep the current optimal threshold 126.

[0043] Step 5, 1) Segmentation of color development area: Use the current optimal candidate threshold value 126 to perform grayscale segmentation on the color development feature image and extract the color development area of ​​the colloidal gold immunochromatography reagent strip.

[0044] 2) Identification of detection lines and control lines: By analyzing the morphological features in the segmentation results, the positions and boundaries of the detection lines and control lines are determined. The boundary positions of the detection lines and control lines: The detection lines are located at 300-340 pixels of the image, and the control lines are located at 400-440 pixels.

[0045] Step 6: Extract color features: Use the average value of RGB channels to extract the color features of the detection line and control line. Color features of the detection line: R=140, G=100, B=60. Color features of the control line: R=160, G=110, B=70.

[0046] Step 7: Termination condition judgment: Check whether the maximum number of iterations or the threshold convergence condition is reached. The current number of iterations is 5, and the fitness is stable at 0.91. The termination condition is met.

[0047] Output segmentation results: Output the final detection line and control line segmentation results and their boundary positions, and save the color feature data of the detection line and control line.

[0048] Specifically, the image segmentation algorithm is an improved remora optimization algorithm combined with a cross entropy image multi-threshold segmentation method. First, a lens reflection learning strategy is introduced to generate a lens reverse solution in the search space, and the best solution is selected according to the greedy strategy to improve the algorithm's population diversity and ability to escape local optimality, thereby improving the convergence speed. Secondly, an adaptive weight factor is proposed to provide adaptive perturbations to remora individuals to improve exploration performance.

[0049] Preferably, preparing a colloidal gold immunochromatographic reagent strip, and detecting isofosfo-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip comprises the following steps: S11, based on the reaction conditions, combining the prepared anti-isothiophene-methyl antibody with the gold nanoparticles to generate a colloidal gold-labeled antibody; S12, coating the colloidal gold labeled antibody on the sample pad portion of the reagent strip, and coating the fixed antigen and antibody on the detection line and control line of the reagent strip, respectively, to obtain a colloidal gold immunochromatography reagent strip; S13, extracting the fruit and vegetable samples with a preset solvent to obtain an extract of isofosfos-methyl, and dripping the extract into the sample addition hole of the colloidal gold immunochromatography reagent strip for detection.

[0050] It should be explained that the extraction of methyl isoflavone from fruits and vegetables includes: 1) Wash the fruit and vegetable samples to be tested with deionized water to remove dust and impurities attached to the surface.

[0051] 2) Use scissors or a knife to cut the sample into small pieces and place a certain weight (e.g. 10 g) of the sample in a mortar.

[0052] 3) Add a certain volume of extraction solution (such as acetonitrile or methanol solution, usually 5-10 times the weight of the sample) to thoroughly homogenize the sample.

[0053] 4) After homogenization, the mixture is passed through filter paper or centrifuged (e.g., 4000 rpm, 10 minutes) to remove solid residues to obtain a clear extract.

[0054] It should be explained that the colloidal gold immunochromatographic reagent strip prepared for detection includes: 1) Preparation of colloidal gold-labeled antibodies: Under reaction conditions, the prepared anti-isothiophene-methyl antibodies are combined with gold nanoparticles to generate colloidal gold-labeled antibodies. According to the project content, the particle size of the gold nanoparticles is adjusted (by changing the ratio of chloroauric acid and trisodium citrate) and the stability (by adding glutathione and other templates for regulation).

[0055] 2) Assemble the test strip: Apply the colloidal gold-labeled antibody to the sample pad of the test strip, apply the fixed antigen (simulating the methyl isoflavone antigen) to the test line of the test strip, and apply the antibody (usually an antibody used to verify whether the reaction is successful, such as anti-mouse antibody) to the control line.

[0056] It should be explained that the rapid detection of methyl isoflavone using colloidal gold immunochromatographic reagent strips includes: 1) Take an appropriate amount of extract (e.g. 100 µL) and add it to the predetermined dilution buffer and mix well.

[0057] 2) Add the mixed extract dropwise to the sample well of the reagent strip and let it sit for several minutes (usually 5-10 minutes).

[0058] 3) Wait for the capillary action of the test strip to make the liquid migrate upward along the test strip, and the colloidal gold labeled antibody will bind to methyl isoflavone in the extract. If methyl isoflavone is present, it will inhibit the binding of the antibody to the antigen on the test line, causing the color of the test line to become lighter or disappear.

[0059] Preferably, based on the current best candidate segmentation threshold, the reverse candidate segmentation threshold is generated by using the lens imaging reverse learning strategy, and based on the greedy strategy, the current best candidate segmentation threshold is saved, which includes the following steps: S341, determining the upper and lower bounds of the search space of the current best candidate segmentation threshold, and initializing the current best candidate segmentation threshold; S342, based on the lens imaging reverse learning strategy, according to the current best candidate segmentation threshold and the upper and lower bounds of the search space, calculate the reverse candidate segmentation threshold; S343, based on the greedy strategy, comparing the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold; S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, the reverse candidate segmentation threshold is used as the current best candidate segmentation threshold. If the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, the current best candidate segmentation threshold is used as the current best candidate segmentation threshold and saved.

[0060] Specifically, the greedy strategy is a greedy algorithm, which is an algorithm strategy based on local optimal selection and is suitable for solving optimization problems. The algorithm selects the solution that currently appears to be the best at each step, hoping to eventually obtain the global optimal solution through the accumulation of local optimal solutions.

[0061] Preferably, the formula for calculating the reverse candidate segmentation threshold is: ; In the formula, Denoted as the reverse candidate segmentation threshold; M Represents the current best candidate segmentation threshold; U R Represented as the upper bound of the search space; L R It is expressed as the lower bound of the search space; K Expressed as a scaling factor.

[0062] Preferably, based on the greedy strategy, comparing the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold comprises the following steps: S3431, based on the cross entropy method, initializing the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination; S3432, optimizing each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, selecting one candidate segmentation threshold that has not been optimized each time, and keeping the current best candidate segmentation threshold unchanged for the other candidate segmentation thresholds; S3433, comparing the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculating their respective fitness values; S3434, if the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, then update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination, otherwise, keep the current best candidate segmentation threshold combination unchanged; S3435. If there are still unoptimized candidate segmentation thresholds, based on the greedy strategy, continue to repeat steps S3432 to S3434 until all candidate segmentation thresholds are optimized.

[0063] In order to facilitate understanding of the above technical solution of the present invention, the present invention is described in detail below based on the greedy strategy in the actual process to compare the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold.

[0064] Step 1: 1) Initialize the current best candidate segmentation threshold combination: Assume that the current best segmentation threshold combination obtained after preliminary calculation is [125, 140, 200], where each value represents the best segmentation threshold of the image in three different areas.

[0065] 2) Generate reverse candidate segmentation threshold combination: Use the lens imaging reverse learning strategy to generate the reverse segmentation threshold combination. Assume that the reverse candidate segmentation threshold combination is [130, 145, 180], that is, each candidate segmentation threshold is generated by taking 255 minus the current segmentation threshold.

[0066] Step 2: 1) In each iteration, use the cross entropy method to optimize each candidate segmentation threshold in the current best segmentation threshold combination and the reverse candidate segmentation threshold combination. During the optimization, one candidate segmentation threshold that has not been optimized is selected each time, and the other thresholds remain unchanged.

[0067] 2) Example: Current optimization threshold: 125 (i.e., the first threshold of the current best segmentation threshold combination). During optimization, keep the other segmentation thresholds of the current best segmentation threshold combination [125, 140, 200] unchanged, and only optimize threshold 125. Suppose in this optimization, the threshold 125 is changed to 127 through local search, so that the fitness value is improved. The updated current best segmentation threshold combination is [127, 140, 200].

[0068] Step 3: 1) Use the cross entropy method to calculate the fitness values ​​of the current best segmentation threshold combination [125, 140, 200] and the reverse candidate segmentation threshold combination [130, 145, 180]. Assume that the cross entropy calculation results are as follows: The fitness value of the current best candidate segmentation threshold combination is: 0.88.

[0069] Fitness value of the reverse candidate segmentation threshold combination: 0.85.

[0070] 2) Comparison results: Because 0.88>0.850.88>0.85, the current best segmentation threshold combination is better than the reverse segmentation threshold combination, so the current combination is temporarily kept unchanged.

[0071] Step 4: Processing of fitness comparison results: According to the greedy strategy, if the fitness value of the reverse segmentation threshold combination is greater than the current combination, it is updated to the reverse combination, otherwise the current combination is maintained. At this time, the fitness value of the current combination is better than the reverse combination, so no update is made, and the current combination is maintained as [127, 140, 200].

[0072] Step 5. 1) Continue to optimize the unoptimized candidate thresholds: Perform similar optimization on the remaining candidate segmentation thresholds. For example, optimize the threshold 140 next, keep other thresholds unchanged, and assume that the value is updated to 142 after optimization.

[0073] 2) Update the current best candidate segmentation threshold combination: the updated combination may be [127, 142, 200].

[0074] 3) Repeat steps S3432 to S3434 until all candidate segmentation thresholds are optimized. Assume that the final segmentation threshold combination is [127, 142, 198], and the fitness value reaches 0.90.

[0075] By gradually optimizing each candidate segmentation threshold through a greedy strategy and using the cross entropy method to calculate the fitness value, the optimization efficiency of the segmentation threshold can be effectively improved. The final optimal segmentation threshold combination [127, 142, 198] showed the highest fitness value in actual segmentation, ensuring the accuracy and stability of image segmentation.

[0076] Specifically, cross entropy is used to measure the difference information between two probability distributions. The minimum cross entropy method determines the segmentation threshold by minimizing the cross entropy between the original image and its segmented image. The lower the cross entropy value, the higher the certainty and the greater the homogeneity.

[0077] Preferably, analyzing the color of the detection line and the color of the control line based on a feature analysis algorithm to obtain color feature data of the detection line and the color feature data of the control line comprises the following steps: S41, evaluating the color features in the color feature image using a feature analysis algorithm, selecting the color features in the color feature image based on the evaluation results and feature screening rules, and using the color features as a preliminary feature subset; Among them, the color features include detection line color features and control line color features; S42, initializing the parameters of the feature analysis algorithm, calculating the color feature of each detection line and the color feature of the control line through the color feature extraction formula, and calculating the fitness value of each detection line color feature and the color feature of the control line according to the color similarity measurement; S43, respectively calculating the adjustment speed, optimization direction and random disturbance of each detection line color feature and control line color feature; S44, calculating the step size scaling factor according to the exponential nonlinear decrease, and updating the adjustment amplitude and color feature value of each detection line color feature and control line color feature; S45, performing genetic operation on each detection line color feature and control line color feature to increase the diversity of color features; S46, calculating the fitness value of each detection line color feature and control line color feature after iteration, selecting a number of optimal detection line color features and control line color features to form an elite feature, performing elite chaotic mutation on the elite feature, calculating the fitness of the mutated elite feature, and comparing it with the original elite feature, retaining the best elite feature; S47, judging whether the maximum number of iterations has been reached, if so, outputting the best elite features as the color feature data of the detection line and the color feature data of the control line; if not, returning to step S43 to continue the optimization.

[0078] In order to facilitate understanding of the above technical solution of the present invention, the following describes in detail how the feature analysis algorithm of the present invention analyzes the color of the detection line and the color of the control line in the actual process to obtain the color feature data of the detection line and the color feature data of the control line.

[0079] Step 1: 1) Color feature image input: Input color feature image, assuming the image size is 1024×768 pixels and uses RGB color mode.

[0080] 2) Feature analysis algorithm selection: The color feature evaluation of the color feature image is performed using the minimum redundancy maximum correlation. The minimum redundancy maximum correlation aims to find the features that are most relevant to the label (detection line or control line) and have the least redundancy. Specifically, it selects features by maximizing correlation and minimizing redundancy.

[0081] 3) Feature screening rules: According to the minimum redundancy maximum correlation algorithm, the mutual information between each color feature (such as the mean and standard deviation of the R, G, and B color channels) and the label is first calculated, and the features with maximum correlation and minimum redundancy are screened out as the preliminary feature subset.

[0082] 4) Preliminary feature subset: Assume that the preliminarily screened detection line features are [ R detect =150, G detect =120, B detect =80].

[0083] The control line features are [ R control =160, Gcontrol =130, B control =90].

[0084] Step 2, 1) Initialization parameters: group size of krill swarm algorithm: 50; maximum number of iterations: 100; initial step size: 0.1.

[0085] 2) Color feature extraction formula: Use the RGB average value to calculate the color features of each detection line and control line.

[0086] 3) Color similarity measurement: Use Euclidean distance to measure the color feature similarity between the detection line and the control line.

[0087] ; In the formula, Sim ( C detect , C control ) represents the distance value between the color features of the detection line and the color features of the control line. The larger the value, the greater the color difference between the two.

[0088] R detect Represents the intensity value of the red channel in the detection line color feature.

[0089] R control Represents the intensity value of the red channel in the control line color feature.

[0090] G detect Represents the intensity value of the green channel in the detection line color feature.

[0091] G control Represents the intensity value of the green channel in the control line color feature.

[0092] B detect Represents the intensity value of the blue channel in the detection line color feature.

[0093] B control Represents the intensity value of the blue channel in the control line color feature.

[0094] 4) Fitness value calculation: The fitness value is inversely proportional to the color similarity. The fitness value formula is: ; In the formula, Fitness Represents the fitness value.

[0095] Sim (C detect , C control ) represents the distance value between the color features of the detection line and the color features of the control line. The larger the value, the greater the color difference between the two.

[0096] Assume that the calculation results show that the initial fitness of the detection line is 0.75, and the initial fitness of the control line is 0.78.

[0097] Step 3, 1) Adjustment speed: Use the current color feature value and step size to calculate the adjustment speed of each color feature.

[0098] ; Where v represents the adjustment speed of color features. α Indicates the current iteration step size, that is, the step size used in the current iteration. Δ C Indicates the amount of change in color features.

[0099] 2) Optimization direction: Determine the optimization direction of each feature based on the gradient of the fitness value. If the red channel of the detection line needs to be increased, the corresponding optimization direction is positive.

[0100] 3) Random perturbation: Introduce 3% random perturbation to make the feature optimization process random and increase the exploration space.

[0101] Step 4. 1) Step scaling factor: Based on the exponential nonlinear decreasing strategy, the step scaling formula is: ; In the formula, α Indicates the current iteration step. α 0 represents the initial step size, which is the initial step size value at the beginning of the iteration. The initial step size is set to 0.1, that is, the step size used at the beginning of the iteration is 0.1. e Represents the base of natural logarithms, that is, e≈2.718, which is the basic constant of the exponential function. t Indicates the number of iterations. k Represents the scaling factor, which is used to control the rate at which the step size decreases. The scaling factor is k =0.05.

[0102] 2) Color feature value update: According to the scaled step size, update the color feature values ​​of the detection line and the control line. Assume that after 10 iterations, the feature of the detection line becomes [ R detect =148, G detect =118, B detect =78].

[0103] Step 5. 1) Crossover operation: Randomly select two features (such as red and blue channels), perform gene crossover, and generate new candidate features.

[0104] 2) Mutation operation: Mutate some color features, and set the mutation rate to 5% to ensure that the features are diverse during the optimization process.

[0105] Step 6. 1) Elite feature selection: Select the 5 features with the highest fitness values ​​as elite features.

[0106] 2) Elite Chaos Mutation: Use the mapping formula to perform elite chaos mutation. Assume that the red channel of the detection line undergoes mutation, changing from 150 to 149. This mutation value is obtained through formula adjustment or random perturbation.

[0107] Step 7: 1) Determine whether the maximum number of iterations has been reached: When the current number of iterations reaches 100, stop iterating.

[0108] 2) Output the best elite features: The final detection line color feature is [ R detect =149, G detect =119, B detect =79].

[0109] The final control line color feature is [ R control =158, G control =127, B control =88].

[0110] Specifically, the feature analysis algorithm is a two-stage hybrid feature selection algorithm based on minimum redundancy maximum correlation and improved krill swarm algorithm, that is, the minimum redundancy maximum correlation algorithm is used to evaluate the feature The importance is used to screen out a highly correlated and low-redundant gene subset, and then the improved krill swarm algorithm is combined to iteratively optimize the features. The krill swarm algorithm is a meta-heuristic swarm intelligence algorithm. The algorithm simulates, in order to enable the krill swarm algorithm to handle feature selection problems, the encoding conversion principle is used to discretize it, and in order to further improve the global search capability of the krill swarm algorithm, the step size is nonlinearly reduced and the elite particle local search is used to improve it.

[0111] Preferably, performing elite chaotic mutation on elite features comprises the following steps: S461. After each iteration, a number of optimal detection line color features and control line color features are selected to form an elite feature set, and an elite space is constructed according to the upper and lower limits of each dimension of the elite features; It should be explained that in each round of algorithm iteration, the performance of a set of color feature combinations is evaluated to measure their fitness values ​​in the detection task. For example, the fitness value may depend on the contrast, clarity, and classification accuracy of the color features. Based on these fitness values, several color combinations with the best performance are selected, called the elite feature set. This elite feature set contains the optimal color combination of the detection line and the control line. The elite space can be regarded as a multidimensional space of the value range of the elite features in each dimension. For example: Assuming that each color feature is represented by RGB values, the elite features may be different RGB color combinations.

[0112] In the elite space, each dimension (R, G, B) has an upper and lower limit (such as the R value range, G value range, and B value range in the optimal color combination).

[0113] S462, using a mapping formula (i.e., Fuch chaotic mapping, which is more chaotic than Logistic mapping and Tent chaotic mapping, and any small initial difference will lead to a large difference in the result) to map each dimension of the elite feature from the elite space to the chaotic space to obtain a chaotic feature, and according to a preset chaotic mutation probability, perform chaotic mapping on each dimension of the chaotic feature to generate a new chaotic feature; It should be explained that in order to further explore more possible feature combinations, chaos mapping is used to break the limitation of local optimal solutions. Chaotic mapping is a property of nonlinear systems that exhibits highly irregular, quasi-random behavior over a period of time.

[0114] S463. Re-map the new chaotic feature back to the elite space through the inverse mapping formula to obtain a new elite feature, and compare the fitness values ​​of the original elite feature and the mutated elite feature, retain the elite feature with the highest fitness, and enter the next generation of optimization.

[0115] It should be explained that the newly generated chaotic features need to be remapped back to the elite space through the inverse mapping formula. For example, the RGB combination after chaotic mutation can be mapped back to the standard color feature value range through the inverse formula. After the new elite features are generated, the fitness values ​​of these features will be evaluated again and compared with the original elite features. If the new chaotic feature has a higher fitness, it will replace the original elite feature and be retained in the next round of iterations.

[0116] Preferably, the mapping formula is: ; In the formula, H i,j Expressed as i Elite features in j Chaotic eigenvalues ​​of dimensions; B i,j Expressed as i Elite features in j The current color feature value of the dimension; D i,j Expressed as i Elite features in j The elite characteristic value of the dimension; D u,j Expressed as j The upper limit of the elitist eigenvalue of a dimension.

[0117] It should be explained that after each iteration, the top several optimal color features are selected to form an elite group, and the upper and lower limits of each dimension of the elite group form an elite space, that is, the elite space = ([ D l1,u1 ], …[ D l2,u2 ], …[ D lj,uj ]).

[0118] Preferably, comparing and analyzing the color characteristic data of the detection line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfos-methyl in fruits and vegetables comprises the following steps: S51, randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature set, and perform fast non-dominated sorting on the color feature data to calculate its congestion degree to form a sorted preferred color feature set; It should be explained that the initial data set is constructed starting from a set of random color features. For example, these color features can be represented by RGB values ​​or other color models (such as HSV). Each data point represents a color feature combination. Each color feature combination will have a corresponding objective function value, which can be defined according to its detection effect (such as detection accuracy, signal-to-noise ratio, contrast, etc.). These values ​​will be used as fitness values. The color feature combinations are divided into different priorities (Pareto frontiers) using a fast non-dominated sorting algorithm. Non-dominated sorting is used to find the optimal solution under multiple objective functions (a solution that is not dominated by other solutions on all objectives). Crowding is used to further distinguish decompositions at the same sorting level to ensure that those solutions with a wider distribution are retained to increase diversity.

[0119] S52, based on the tournament selection method, selecting the color feature with the highest fitness from the preferred color feature set, and duplicating it to form a new color feature set; Specifically, Tournament Selection is a commonly used individual selection method in genetic algorithms (GA) and evolutionary algorithms, which is used to select individuals with higher fitness from the current population to enter the next generation. It selects winners from a small group of individuals by simulating a "tournament".

[0120] It should be explained that from the sorted set of preferred color features, the tournament selection method is used to select the individuals with the highest fitness for replication. In each selection process, several color features are randomly selected, and the features with the highest fitness are selected for retention and replication. The purpose of this is to retain the optimal solution while maintaining the diversity of the population and avoiding premature convergence.

[0121] S53, performing crossover and mutation operations on the new color feature set, eliminating color feature data that does not meet the constraint conditions, retaining color feature data that meets the concentration detection constraint conditions, and using an initialization function to regenerate color feature data that meets the concentration detection constraint conditions; It should be explained that the crossover operation simulates gene recombination and combines two color features to generate a new combination. For example, we can take part of the RGB values ​​of one color feature and exchange them with part of the RGB values ​​of another color feature to generate a new color feature. The mutation operation is a small random change to the color feature, such as slightly adjusting the RGB value or the saturation of the color. The mutation operation increases the diversity of solutions and prevents the algorithm from falling into a local optimal solution. In the detection of fruit and vegetable concentration, specific constraints (for example, the contrast of the color feature cannot be lower than a certain threshold). It is necessary to eliminate the color features that do not meet these constraints and regenerate new features that meet the conditions.

[0122] S54, merging the parent color feature data set with the child color feature data set to form a new preferred color feature set, and removing duplicate color feature data, retaining unique color feature data, to form a feature set without duplicate color feature data; It should be explained that the offspring color feature set generated by mutation and crossover operations is merged with the parent color feature set to form a new preferred color feature set. In order to avoid redundancy and waste of computing resources, it is necessary to remove duplicate color feature data and retain unique color features to form a set without duplicate data.

[0123] S55, performing fast non-dominated sorting on the feature set of non-repeated color feature data, and calculating its congestion degree to obtain a new feature set of non-repeated color feature data; It is necessary to explain that the non-repeated color feature set is again sorted quickly to determine the hierarchy of the new preferred solution. The crowding degree of each feature point is calculated to ensure that those color feature combinations that are evenly distributed in the search space are retained, which helps to conduct more comprehensive exploration in the next round of iterations.

[0124] S56, determine whether the current number of iterations has reached a preset maximum value, if not, return to step S52 to continue iterating, if reached, stop iterating and go to step S57; S57. Output the final optimal color feature data set as the result of color feature comparison analysis of the detection line and the control line, and obtain the concentration of methyl isothioate in fruits and vegetables.

[0125] Specifically, the concentration analysis algorithm is changed to the NSGA-II algorithm. NSGA-II (Non-dominated Sorting Genetic Algorithm II) is a classic multi-objective optimization algorithm that can effectively find a solution set that meets the multi-objective requirements when used to deal with multi-objective optimization problems. The present invention improves the basic NSGA-II algorithm, designs an effective integer encoding method, and introduces a deduplication operation.

[0126] Preferably, based on the tournament selection method, selecting the color feature with the highest fitness from the preferred color feature set and duplicating it to form a new color feature set includes the following steps: S521, defining a fitness function related to color features, and calculating a fitness value for each color feature data; S522, preset the tournament scale, randomly select a number of color feature data from the preferred color feature set, use them as participants of the current round of the tournament, calculate the fitness of the number of color feature data, and select the color feature data with the highest fitness as the winner of the current round of the tournament; S523, copying the color feature data with the highest fitness selected in the tournament and putting it into a new color feature data set, repeating the tournament selection and copying process multiple times until the new color feature set reaches a predetermined size; S524: Perform crossover and mutation operations on the new color feature set, and generate a final new color feature set.

[0127] In summary, by means of the above technical solution of the present invention, the present invention accurately identifies and locates the positions of the detection line and the control line through an image segmentation algorithm, which can reduce the error caused by manual judgment, make the confirmation of the position more accurate, and improve the accuracy and repeatability of the detection. The present invention analyzes the color of the detection line and the control line through a feature analysis algorithm to obtain color feature data. It can more keenly capture the slight changes in color, reduce the influence of external interference factors, and enhance the sensitivity and reliability of detection. The present invention compares and analyzes the color feature data of the detection line and the control line through a concentration analysis algorithm. Compared with the traditional subjective visual comparison method, the concentration change of methyl isothioate can be more accurately quantified to ensure the objectivity of the test results.

[0128] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography, characterized in that: The method for detecting isofosfos-methyl in fruits and vegetables comprises the following steps: S1. preparing a colloidal gold immunochromatographic reagent strip, and detecting isofosfo-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip; S2, obtaining a color image of the colloidal gold immunochromatography reagent strip, and processing the color image to obtain a color characteristic image; S3, segmenting the obtained color characteristic image based on an image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line; S4, analyzing the color of the detection line and the color of the control line based on a feature analysis algorithm to obtain color feature data of the detection line and the color feature data of the control line; S5. Compare and analyze the color characteristic data of the test line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfos-methyl in the fruits and vegetables; The method of segmenting the obtained color characteristic image based on the image segmentation algorithm, determining the positions of the detection line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the detection line and the color of the control line comprises the following steps: S31, inputting a color feature image and initializing image segmentation algorithm parameters; S32, generating multiple candidate segmentation thresholds in the color feature image, calculating the fitness value of each candidate segmentation threshold, and recording the initial best candidate segmentation threshold; S33, performing boundary correction on the initial best candidate segmentation threshold, calculating the fitness of each candidate segmentation threshold, and recording the current best candidate segmentation threshold and fitness value; S34, based on the current best candidate segmentation threshold, generate a reverse candidate segmentation threshold using the lens imaging reverse learning strategy, and save the current best candidate segmentation threshold based on the greedy strategy; S35, based on the current optimal candidate segmentation threshold, segment the color development area, identify and determine the positions and boundaries of the detection line and the control line in the colloidal gold immunochromatography reagent strip; S36, extracting color information of the detection line and the control line according to the positions of the detection line and the control line in the segmented colloidal gold immunochromatography reagent strip; S37, determine whether the iteration termination condition is met, if so, output the final segmentation result, if not, return to step S33 to continue optimizing the segmentation process.

2. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, characterized in that: The method of preparing the colloidal gold immunochromatographic reagent strip and detecting isofosfos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic reagent strip comprises the following steps: S11, based on the reaction conditions, combining the prepared anti-isothiophene-methyl antibody with the gold nanoparticles to generate a colloidal gold-labeled antibody; S12, coating the colloidal gold labeled antibody on the sample pad portion of the reagent strip, and coating the fixed antigen and antibody on the detection line and control line of the reagent strip, respectively, to obtain a colloidal gold immunochromatography reagent strip; S13, extracting the fruit and vegetable samples with a preset solvent to obtain an extract of isofosfos-methyl, and dripping the extract into the sample addition hole of the colloidal gold immunochromatography reagent strip for detection.

3. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, characterized in that: The method of generating a reverse candidate segmentation threshold based on the current best candidate segmentation threshold by using a lens imaging reverse learning strategy, and saving the current best candidate segmentation threshold based on a greedy strategy includes the following steps: S341, determining the upper and lower bounds of the search space of the current best candidate segmentation threshold, and initializing the current best candidate segmentation threshold; S342, based on the lens imaging reverse learning strategy, according to the current best candidate segmentation threshold and the upper and lower bounds of the search space, calculate the reverse candidate segmentation threshold; S343, based on the greedy strategy, comparing the fitness values ​​of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold; S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, the reverse candidate segmentation threshold is used as the current best candidate segmentation threshold. If the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, the current best candidate segmentation threshold is used as the current best candidate segmentation threshold and saved.

4. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 3, characterized in that: The formula for calculating the reverse candidate segmentation threshold is: ; In the formula, Denoted as the reverse candidate segmentation threshold; M Represents the current best candidate segmentation threshold; U R Represented as the upper bound of the search space; L R It is expressed as the lower bound of the search space; K Expressed as a scaling factor.

5. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 4, characterized in that: The method of comparing the fitness value of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold based on the greedy strategy includes the following steps: S3431, based on the cross entropy method, initialize the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination; S3432, optimizing each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, selecting one candidate segmentation threshold that has not been optimized each time, and keeping the current best candidate segmentation threshold unchanged for the other candidate segmentation thresholds; S3433, comparing the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculating their respective fitness values; S3434, if the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, then update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination, otherwise, keep the current best candidate segmentation threshold combination unchanged; S3435. If there are still unoptimized candidate segmentation thresholds, based on the greedy strategy, continue to repeat steps S3432 to S3434 until all candidate segmentation thresholds are optimized.

6. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, characterized in that: Analyzing the color of the detection line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the detection line and the color feature data of the control line includes the following steps: S41, evaluating the color features in the color feature image using a feature analysis algorithm, selecting the color features in the color feature image based on the evaluation results and feature screening rules, and using the color features as a preliminary feature subset; Wherein, the color features include detection line color features and control line color features; S42, initializing the parameters of the feature analysis algorithm, calculating the color feature of each detection line and the color feature of the control line through the color feature extraction formula, and calculating the fitness value of each detection line color feature and the color feature of the control line according to the color similarity measurement; S43, respectively calculating the adjustment speed, optimization direction and random disturbance of each detection line color feature and control line color feature; S44, calculating the step size scaling factor according to the exponential nonlinear decrease, and updating the adjustment amplitude and color feature value of each detection line color feature and control line color feature; S45, performing genetic operation on each detection line color feature and control line color feature to increase the diversity of color features; S46, calculating the fitness value of each detection line color feature and control line color feature after iteration, selecting a number of optimal detection line color features and control line color features to form an elite feature, performing elite chaotic mutation on the elite feature, calculating the fitness of the mutated elite feature, and comparing it with the original elite feature, retaining the best elite feature; S47, judging whether the maximum number of iterations has been reached, if so, outputting the best elite features as the color feature data of the detection line and the color feature data of the control line; if not, returning to step S43 to continue the optimization.

7. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 6, characterized in that: The elite chaotic mutation of elite characteristics comprises the following steps: S461. After each iteration, a number of optimal detection line color features and control line color features are selected to form an elite feature set, and an elite space is constructed according to the upper and lower limits of each dimension of the elite features; S462, mapping each dimension of the elite feature from the elite space to the chaotic space using a mapping formula to obtain a chaotic feature, and performing chaotic mapping on each dimension of the chaotic feature according to a preset chaotic mutation probability to generate a new chaotic feature; S463. Re-map the new chaotic feature back to the elite space through the inverse mapping formula to obtain a new elite feature, and compare the fitness values ​​of the original elite feature and the mutated elite feature, retain the elite feature with the highest fitness, and enter the next generation of optimization.

8. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 7, characterized in that: The mapping formula is: ; In the formula, H i,j Expressed as i Elite features in j Chaotic eigenvalues ​​of dimensions; B i,j Expressed as i Elite features in j The current color feature value of the dimension; D i,j Expressed as i Elite features in j The elite characteristic value of the dimension; D u,j Expressed as j The upper limit of the elitist eigenvalue of a dimension.

9. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, characterized in that: The method of comparing and analyzing the color characteristic data of the detection line and the color characteristic data of the control line based on the concentration analysis algorithm to obtain the concentration of isofosfo-methyl in fruits and vegetables comprises the following steps: S51, randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature set, and perform fast non-dominated sorting on the color feature data to calculate its congestion degree to form a sorted preferred color feature set; S52, based on the tournament selection method, selecting the color feature with the highest fitness from the preferred color feature set, and duplicating it to form a new color feature set; S53, performing crossover and mutation operations on the new color feature set, eliminating color feature data that does not meet the constraint conditions, retaining color feature data that meets the concentration detection constraint conditions, and using an initialization function to regenerate color feature data that meets the concentration detection constraint conditions; S54, merging the parent color feature data set with the child color feature data set to form a new preferred color feature set, and removing duplicate color feature data, retaining unique color feature data, to form a feature set without duplicate color feature data; S55, performing fast non-dominated sorting on the feature set of non-repeated color feature data, and calculating its congestion degree to obtain a new feature set of non-repeated color feature data; S56, determine whether the current number of iterations has reached a preset maximum value, if not, return to step S52 to continue iterating, if reached, stop iterating and go to step S57; S57. Output the final optimal color feature data set as the result of color feature comparison analysis of the detection line and the control line, and obtain the concentration of methyl isothioate in fruits and vegetables.

10. The method for detecting isofosfos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 9, characterized in that: The method of selecting the color feature with the highest fitness from the preferred color feature set based on the tournament selection method and duplicating it to form a new color feature set includes the following steps: S521, defining a fitness function related to color features, and calculating a fitness value for each color feature data; S522, preset the tournament scale, randomly select a number of color feature data from the preferred color feature set, use them as participants of the current round of the tournament, calculate the fitness of the number of color feature data, and select the color feature data with the highest fitness as the winner of the current round of the tournament; S523, copying the color feature data with the highest fitness selected in the tournament and putting it into a new color feature data set, repeating the tournament selection and copying process multiple times until the new color feature set reaches a predetermined size; S524: Perform crossover and mutation operations on the new color feature set, and generate a final new color feature set.

Citation Information

Patent Citations

  • Dynamic and quantitative immunochromatographic test strip test method

    CN104142395A

  • Fast image signal segmentation method based on immunochromatography test paper card

    CN109035273A

  • Immunochromatography concentration detection method and system based on machine learning

    CN112071423A

  • Immunochromatography test paper quantitative analysis method and device, equipment and medium

    CN113450383A

  • Histopathological image segmentation method based on deep reinforcement learning

    CN114897922A