Fruit juice processing pesticide residue and residual quantity detection method and system

By using multiple mass spectrometry imaging equipment to collect and analyze the image and mass spectral information of juice processing raw materials in pesticide residue detection, the problems of environmental factors and complex manual operation in the prior art are solved, and efficient and accurate detection of pesticide residues is achieved.

CN119688815APending Publication Date: 2025-03-25SHANXI GUYUWANG AGRI CO LTD

Patent Information

Application Number
CN202411912439.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing environmental factors in the detection of pesticide residues affect the accuracy of the detection results. Multiple manual operations and pretreatment steps are required to increase the operation complexity and the possibility of human error. The detection sensitivity is low, so pesticides other than organophosphorus and urethanes cannot be detected.

Method used

Multiple mass spectrometry imaging equipment is used to collect image and mass spectral information of juice processing raw materials, combine spatial position information and mass spectrometry information to construct a mass spectrometry image set, and identify pesticide residues and calculate their quantity through image recognition and mass spectrometry feature extraction to achieve an automated and intelligent detection process.

Benefits of technology

It improves the accuracy and comprehensiveness of the detection, reduces artificial errors, realizes quantitative evaluation of pesticide residues, improves detection efficiency and accuracy, and supports scientific evaluation of food safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119688815A_ABST
    Figure CN119688815A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pesticide residue detection, provides a fruit juice processing pesticide residue and residual quantity detection method and system, and solves the problems that a test result is greatly influenced by environmental factors, the operation is complicated, the sensitivity is low and the like. The method comprises the following steps: arranging a mass spectrum imaging device to collect a raw material image, and screening to obtain an area image with pesticide residues; extracting mass spectrum characteristics of the image, and calculating to obtain pesticide residues; the detection result is judged, if pesticide residues exist, position information and an area image are displayed on visual equipment, and a qualified rate report of the pesticide residues is output; if the pesticide residue does not exist, the detection is continued. According to the invention, the monitoring comprehensiveness is improved, the visualization and integration of data are realized, the pesticide residue is quantitatively evaluated, the pesticide residue problem can be quickly responded and processed, and the product safety is guaranteed.
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 and system for detecting pesticide residues and residue amounts in fruit juice processing. Background Art

[0002] Pesticide residues refer to the general term for pesticide precursors, derivatives, metabolites, degradation products and impurities that remain in the environment, organisms and food after the use of pesticides; the main causes of excessive pesticide residues in vegetables are organophosphorus pesticides and carbamate pesticides that are banned from use in vegetable production in some countries, such as methyl parathion, omethoate, phorate, parathion, methyl parathion, etc.; eating food containing a large amount of highly toxic and extremely toxic pesticide residues can lead to acute poisoning accidents in humans and animals; long-term consumption of agricultural and sideline products with excessive pesticide residues, although will not lead to acute poisoning, may cause chronic poisoning in humans and animals, lead to the occurrence of diseases, induce cancer, and even affect the next generation; the development of agricultural industrialization has made the production of agricultural products increasingly dependent on exogenous substances such as pesticides, antibiotics and hormones, and limit standards have been set for pesticide residues in various agricultural and sideline products.

[0003] Prior art 1, Chinese patent, application number: 202111019470.9 discloses a pesticide residue detection device, including a spectrometer, two support frames are installed on the spectrometer, a substrate is installed between the two support frames, and a limit groove is provided on the side of the support frame close to the substrate, a liquid outlet is provided on the substrate, and a solenoid valve is installed on the side of the substrate close to the liquid outlet, a barrel is installed on the top of the substrate, and a rotatable shaft is installed inside the barrel; agricultural and sideline products and water are added through a feed pipe, and the shaft and blades are driven to rotate by a second motor, and the agricultural and sideline products are crushed by the blades, so that the agricultural and sideline products are mixed with the water to form a solution, so that the spectrometer is easy to detect pesticide residues in agricultural and sideline products. Although it allows users to avoid wasting a lot of time in pre-processing agricultural and sideline products, it greatly reduces the difficulty of detecting pesticide residues in agricultural and sideline products and improves the detection efficiency of pesticide residues in agricultural and sideline products. However, the test results of the spectrometer are greatly affected by environmental factors. If the environmental conditions are unstable or the instrument is improperly maintained, the accuracy of the test results may be reduced.

[0004] Prior art 2, Chinese patent, application number 202110935968.3 discloses a detection method for a pesticide residue detector and a pesticide residue detector, the method comprising: step A, selecting a sample; step B, selecting a control method, the control method including historical control and re-control; step C, testing the initial condition detection step, for detecting whether the current state of the pesticide residue detector meets the current sample cycle test requirements; step D, starting the current sample cycle test; step E, test result analysis. Although the automatic detection of pesticide residues in fruit and vegetable samples can be completed in a standardized, fast and efficient manner, the problem of non-standard detection operations by the detection personnel is avoided at the same time, the traceability of the fruit and vegetable samples to be tested is protected, the accuracy of the detection data is improved, the workload of the detection personnel is reduced, and the work efficiency is improved, especially in the rapid detection of food safety. However, more manual operations and pre-processing steps are required in the early stages of detection, which increases the complexity of the operation and the possibility of human error.

[0005] Prior art three, Chinese patent, application number 202311856142.3 discloses a pesticide residue rapid detection reagent card and a pesticide residue detection method, including: a test paper in which cholinesterase and a chromogenic substrate coexist and no catalytic reaction occurs on a matrix sheet, and the chromogenic substrate is 4-methylumbelliferyl ester and a molecule with an internal hydrophobic space dissolved in an anhydrous solvent, fully mixed and the 4-methylumbelliferyl ester developer in the solvent is removed. Although the invention has high detection accuracy, simple detection and high efficiency, it can also react and hydrolyze with cholinesterase as a developer, eliminating the interference of the background color of the sample solution, and has strong anti-interference ability. However, there are problems such as high false positive and false negative rates, low sensitivity, and it is impossible to detect pesticides other than organophosphorus and carbamates.

[0006] At present, the test results of the spectrum analyzer in the prior art 1, prior art 2 and prior art 3 are greatly affected by environmental factors. If the environmental conditions are unstable or the instrument is improperly maintained, the accuracy of the test results may be reduced. More manual operations and pre-processing steps are required in the early stage of detection, which increases the complexity of the operation and the possibility of human error. There are problems such as high false positive and false negative rates, low sensitivity, and the inability to detect pesticides other than organophosphorus and carbamate. Therefore, the present invention provides a method and system for detecting pesticide residues and residue amounts in juice processing. Summary of the invention

[0007] To achieve the above-mentioned purpose, the present invention adopts the following technical scheme: In one aspect of the present invention, a method for detecting pesticide residues and residue amounts in fruit juice processing is provided, comprising the following steps: obtaining a target area for pesticide residue monitoring, and arranging a plurality of mass spectrometry imaging devices in the target area to collect images of fruit juice processing raw materials in the target area, wherein the images contain spatial position information and mass spectrum information of each fruit juice processing raw material; combining the spatial position information and the mass spectrum information to form a mass spectrum image set; preprocessing the images in the mass spectrum image set to obtain preprocessed images; identifying the preprocessed images and screening to obtain regional images with pesticide residues; extracting mass spectrum features from the regional images, identifying the pesticide residues and calculating the pesticide residue amounts; judging the detection results, and if pesticide residues exist, displaying the position information and regional images of the pesticide residues on the visualization device, and outputting a qualified rate report of the pesticide residue amount of the batch of products; if pesticide residues do not exist, continuing the detection.

[0008] In an optional embodiment, the process of deploying the mass spectrometry imaging device includes the following steps: installing a high-definition camera above the sample to be tested, irradiating the target area for pesticide residue monitoring to collect images of the juice processing raw materials in the target area, and outputting the collected image data to process the image; deploying the mass spectrometry imaging device on both sides of the target area for pesticide residue monitoring to collect mass spectrometry information images of the juice processing raw materials, and connecting the mass spectrometry imaging device to a computer running a mass spectrometry data system; after the installation is completed, insert the cable into the cable port, open the corresponding software on the computer to configure the instrument, exhaust and stabilize the instrument, select the electrospray ion source, wait for the instrument to perform self-check and display the standby state, the solvent valve switching sound appears and the mechanical pump starts working.

[0009] In an optional embodiment, the process of combining spatial position information and mass spectrum information includes the following steps: after the juice processing raw materials to be tested enter the detection range of the mass spectrometry detection equipment, the mass spectrometry detection equipment scans the juice processing raw material sample, records the mass-to-charge ratio information of each pixel position, and generates a mass spectrum of the juice processing raw materials; performs data analysis on the collected mass spectrum, identifies the pesticide residue components, and compares them with a reference database, and identifies the locations containing the pesticide residue components; compares the image of the juice processing raw materials to be tested collected by a high-definition camera with the mass spectrum of each pixel position of the juice processing raw materials scanned by the mass spectrometry detection equipment, and marks the locations containing the pesticide residue components in the juice processing raw material image.

[0010] In an optional embodiment, the process of preprocessing images in a mass spectrometry image set includes the following steps: importing the original mass spectrometry data file of the raw material for juice processing into MATLAB software, converting it into a standard data format, and performing baseline correction using an asymmetric least squares algorithm; removing noise from the image through operations such as filtering, applying contrast adjustment and sharpening operations to enhance image quality, using a library matching method to identify and select significant mass spectrometry peaks, and eliminating the influence of non-target substances; calibrating the mass spectrometry lines with the help of a reference database, using a normalization method to standardize the mass spectrometry image, and outputting the processed mass spectrometry image for further processing.

[0011] In an optional embodiment, the baseline correction process includes the following steps: loading the original mass spectrometry data to be corrected into the system, setting a smoothing parameter to control the degree of smoothing in the fitting process; using the initial weight matrix and the original spectral data to calculate the initial baseline, and then performing an iterative solution, recalculating the weights according to the current estimated baseline in each iteration, and updating the baseline estimate; if the change is less than a preset threshold, stopping the iteration, otherwise continuing to the next iteration; after each iteration, judging the correction accuracy by the root mean square error between the ideal baseline and the estimated baseline, adjusting the smoothing parameter according to the correction effect, and outputting the corrected data after completing all iterations.

[0012] In an optional embodiment, the process of referencing the database includes the following steps: selecting a mass spectrometer to collect data from a standard sample, preprocessing the raw mass spectrometry data, including peak detection, peak identification and peak extraction, and converting the raw data into a public mzML format; in LC-MS data analysis, extracting characteristic information from the mass spectrometry data and matching it with the characteristics of known compounds, using software tools to process, analyze and build a database for the data; entering the processed data into a database, including the compound name, molecular formula, CAS ID, retention time, and secondary mass spectrometry information, maintaining the database, and verifying and evaluating the data in the database.

[0013] In an optional embodiment, the process of identifying pesticide residues and calculating the amount of pesticide residues includes the following steps: calculating the local threshold of each pixel point according to the local grayscale distribution of the regional image, marking the pixel points in the image with grayscale values ​​higher than the local threshold as potential pesticide residue areas; performing dilation operations at different scales to expand the boundaries of the potential area, and performing corrosion operations to remove isolated noise points; constructing a multi-scale image pyramid, extracting regional image features at different scales, calculating the Harris response function at each scale, detecting corner points, and screening out significant corner point features; converting the extracted corner point features into feature vectors; matching the feature vectors with a known pesticide residue mass spectrum library, and using cosine similarity to screen out the types of pesticide residues through confidence scores of the matching results; analyzing the intensity distribution of the matched pesticide residue mass spectrum in the regional image, and extracting the multidimensional features of the mass spectrum intensity distribution, including the mean, variance and peak value; establishing a multivariate regression model between mass spectrum intensity and residue amount through standard samples of known concentration, training the multivariate regression model using random forest, and inputting the mass spectrum intensity features of the actual sample into the multivariate regression model to predict the amount of pesticide residue.

[0014] In an optional embodiment, the process of screening out the types of pesticide residues includes the following steps: analyzing the sample through a mass spectrometer, the mass spectrometer can separate the compounds in the sample according to their mass-to-charge ratio and generate a mass spectrum; integrating the extracted features into a feature vector to calculate the cosine similarity between the sample feature vector and the feature vector of each pesticide residue in the database; based on the cosine similarity score, evaluating whether the sample contains specific pesticide residues and the degree of confidence of the match; setting a confidence score threshold, and using the confidence score to screen the types of pesticide residues in the database; for each pesticide residue, if the cosine similarity with the sample feature vector exceeds a preset confidence score threshold, then the type of pesticide residue is marked as present in the sample.

[0015] In an optional embodiment, the process of training a multivariate regression model using random forest includes the following steps: collecting a large number of data sets by preparing standard samples of known concentration using mass spectrometry analysis; denoising, baseline correcting and normalizing the data sets; extracting features from the mass spectrometry data sets, the features reflecting the complex distribution and changing trends of pesticide residues in the samples, and screening out the feature subsets that are most valuable for residue prediction; constructing a multivariate regression model to capture the complex nonlinear relationship between the features and the pesticide residues; using the collected standard sample data to train the constructed multivariate regression model; using the mean square error indicator to evaluate the predictive performance of the multivariate regression model; applying the trained multivariate regression model to the mass spectrometry data of actual samples, and predicting the pesticide residues.

[0016] Another aspect of the present invention provides a system for detecting pesticide residues and residues in juice processing, which is used to implement the method for detecting pesticide residues and residues in juice processing. The system for detecting pesticide residues and residues in juice processing comprises: an image acquisition component, which comprises a plurality of mass spectrometry imaging devices, and acquires a target area for monitoring pesticide residues, and is used to acquire images of juice processing raw materials in the target area, wherein the images contain spatial position information and mass spectrum information of each juice processing raw material; the spatial position information and the mass spectrum information are combined to form a mass spectrum image set; a data processing component, which is used to preprocess the images in the mass spectrum image set to obtain preprocessed images; identify the preprocessed images, and filter out regional images with pesticide residues; extract mass spectrum features from the regional images, identify the pesticide residues, and calculate the pesticide residues; a report output component, which is used to judge the test results. If pesticide residues exist, the position information and regional images of the pesticide residues are displayed on the visualization device, and a qualified rate report of the pesticide residues of the batch of products is output; if pesticide residues do not exist, the test is continued.

[0017] The present invention provides an important reference for product quality control and market supervision; improves the accuracy and comprehensiveness of monitoring, realizes data visualization and integration, and the automated and intelligent detection process improves detection efficiency and accuracy, reduces human errors, and quantitatively evaluates pesticide residues, providing a scientific basis for product safety assessment. The timely feedback mechanism helps to quickly respond to and deal with pesticide residue problems and ensure product safety. The qualified rate report provides strong support for corporate decision-making and market supervision, and promotes the healthy development of the industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of the method for detecting pesticide residues and residue amounts in fruit juice processing provided in Example 1 of the present invention; Figure 2 This is a flow chart of deploying a mass spectrometry imaging device provided in Example 2 of the present invention; Figure 3 This is a flow chart of combining spatial position information and mass spectrum information provided in Example 3 of the present invention; Figure 4 A flowchart of preprocessing an image in a mass spectrometry image set provided in Example 4 of the present invention; Figure 5 This is a flowchart of the baseline correction provided in Example 5 of the present invention; Figure 6 A flowchart of a reference database provided in Example 6 of the present invention; Figure 7 A process diagram for identifying pesticide residues and calculating the pesticide residue amount provided in Example 7 of the present invention; Figure 8This is a block diagram of a system for detecting pesticide residues and residual amounts in juice processing provided in Example 8 of the present invention; Fig. 9 A block diagram of an electronic device provided in Embodiment 9 of the present invention; Fig.10 This is a block diagram of a computer-readable storage medium provided in Embodiment 10 of the present invention. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present invention will be described 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.

[0020] In the following, the terms "first", "second", etc. are used only for convenience of description and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0021] In the present invention, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, "connection" can be a fixed mechanical connection, or a detachable mechanical connection, or integrated; or, "connection" can be a direct connection, or an indirect connection through an intermediate medium. In addition, unless otherwise clearly specified and limited, the term "coupling" should be understood in a broad sense, for example, "coupling" can be a direct electrical connection, such as physical contact and electrical conduction between two components, and can also be understood as electrical connection between different components in a circuit structure through physical lines such as copper foil or wires on a printed circuit board (PCB) that can transmit electrical signals to transmit electrical signals; or, "coupling" can be an indirect electrical connection between two components through an intermediate medium; or, "coupling" can be an electrical connection between two components in an air-spaced / non-contact manner, for example, two components are electrically connected by capacitive coupling to transmit electrical signals.

[0022] In the embodiments of the present invention, directional terms such as "up", "down", "left" and "right" may be defined including but not limited to the orientation relative to the schematic placement of the components in the drawings. It should be understood that these directional terms may be relative concepts, which are used for relative description and clarification, and may change accordingly according to the change of the orientation of the components in the drawings.

[0023] Embodiment 1: as Figure 1As shown, an embodiment of the present invention provides a method for detecting pesticide residues and residue amounts in fruit juice processing, comprising the following steps: Step S100: acquiring a target area for pesticide residue monitoring, and deploying a plurality of mass spectrometry imaging devices in the target area to collect images of fruit juice processing raw materials in the target area, wherein the images contain spatial position information and mass spectrum information of each fruit juice processing raw material; combining the spatial position information and the mass spectrum information to form a mass spectrum image set; Step S200: preprocessing the images in the mass spectrum image set to obtain preprocessed images; identifying the preprocessed images, and screening to obtain regional images with pesticide residues; extracting mass spectrum features from the regional images, identifying the pesticide residues and calculating the pesticide residues; Step S300: judging the detection results, and if there are pesticide residues, displaying the position information and regional images of the pesticide residues on the visualization device, and outputting a qualified rate report of the pesticide residue amount of the batch of products; if there are no pesticide residues, continuing the detection.

[0024] In the above embodiment, step S100 clarifies and obtains the target area to be detected, ensures the pertinence and effectiveness of the monitoring work, and achieves extensive coverage of the juice processing raw materials in the target area by deploying multiple mass spectrometry imaging devices, reduces the possibility of omissions, combines spatial position information with mass spectrometry information, constructs a mass spectrometry image set, and provides a rich and multi-dimensional data source for subsequent data analysis and processing; step S200 improves the image quality and improves the accuracy and efficiency of recognition by preprocessing means such as denoising and contrast enhancement, and automatically screens out regional images with pesticide residues by using image recognition technology, reduces manual intervention, improves detection efficiency, extracts quality features from regional images, and calculates pesticide residues, thereby achieving the detection of pesticide residues. Quantitative evaluation of the residue; step S300 makes an instant judgment on the test results, and displays the location information and regional images of the pesticide residues on the visualization device, so that the test results are intuitively visible, and outputs the qualified rate report of the pesticide residues in this batch of products, which provides an important reference for product quality control and market supervision; improves the accuracy and comprehensiveness of monitoring, realizes data visualization and integration, and the automated and intelligent detection process improves the detection efficiency and accuracy, reduces human errors, and quantitatively evaluates the pesticide residues, providing a scientific basis for product safety assessment. The timely feedback mechanism helps to quickly respond to and deal with pesticide residue problems and ensure product safety. The qualified rate report provides strong support for corporate decision-making and market supervision, and promotes the healthy development of the industry.

[0025] Example 2: Figure 2As shown, on the basis of Example 1, the process of deploying the mass spectrometry imaging device in step S100 provided in the embodiment of the present invention includes the following steps: Step S101: Install a high-definition camera above the sample to be detected, illuminate the target area for pesticide residue monitoring, so as to collect images of the raw materials for juice processing in the target area, and output the collected image data to process the image; Step S102: Deploy mass spectrometry imaging devices on both sides of the target area for pesticide residue monitoring to collect mass spectrum information images of the raw materials for juice processing, and the mass spectrometry imaging devices are connected to a computer running a mass spectrometry data system; Step S103: After the installation is completed, insert the cable into the cable port, open the corresponding software on the computer to configure the instrument, exhaust and stabilize the instrument, select the electrospray ion source (ESI), wait for the instrument to perform self-check and display the standby state, the solvent valve switching sound appears and the mechanical pump starts working.

[0026] In the above embodiment, the high-definition camera in step S101 can capture the subtle texture and color changes of the juice processing raw materials in the target area, provide high-quality image data for subsequent image processing, and observe the target area in real time through the camera, so that possible pesticide residues or other abnormal conditions can be discovered in time, and image data can be automatically collected to reduce manual intervention and improve detection efficiency and accuracy; the mass spectrometry imaging device in step S102 can capture the mass spectrum information of the juice processing raw materials. This information reflects the chemical properties of the molecules of the substance and is the key to detecting pesticide residues. The mass spectrometry imaging technology also has spatial resolution capabilities and can locate the specific location of pesticide residues to achieve more accurate monitoring. The equipment is controlled by a computer to facilitate rapid data processing and analysis; step S103 ensures that the mass spectrometry imaging device operates in the best state by configuring, exhausting and stabilizing the instrument. , reduce errors caused by instrument instability, ESI is suitable for the analysis of a variety of compounds, especially for the detection of organic molecules such as pesticides, which improves the versatility and accuracy of detection. The instrument self-check can promptly discover and solve potential problems to ensure the smooth progress of subsequent detection; provide basic data for subsequent image analysis, facilitate rapid identification of potential problems, improve the level of automation of detection, reduce human errors, and provide visual reference for comprehensive detection; provide detailed information at the chemical level, support the exact identification and quantification of pesticide residues, improve the sensitivity and specificity of detection, reduce false alarms and omissions, and combine image data to form a multi-dimensional and comprehensive monitoring system; provide reliable guarantee for subsequent mass spectrometry analysis, ensure the accuracy and reliability of data, reduce detection delays and cost increases caused by instrument failures, and improve detection efficiency and quality control through standardized operating procedures.

[0027] Example 3: Figure 3As shown, on the basis of Example 1, the process of combining spatial position information and mass spectrum information in step S100 provided in the embodiment of the present invention includes the following steps: Step S104: After the juice processing raw materials to be detected enter the detection range of the mass spectrometry detection equipment, the mass spectrometry detection equipment scans the juice processing raw material sample, records the mass-to-charge ratio information of each pixel position, and thus generates a mass spectrum of the juice processing raw materials; Step S105: Performing data analysis on the collected mass spectrum, identifying the pesticide residue components, and comparing them with the reference database, and identifying the positions containing the pesticide residue components; Step S106: Comparing the image of the juice processing raw materials to be detected collected by the high-definition camera with the mass spectrum of each pixel position of the juice processing raw materials scanned by the mass spectrometry detection equipment, and marking the parts containing the pesticide residue components in the juice processing raw material image.

[0028] In the above embodiment, the mass spectrometry detection device in step S104 can comprehensively and meticulously capture the geological charge ratio of each pixel position in the juice processing raw material sample through high-sensitivity and high-precision scanning technology. Based on the mass-to-charge ratio information obtained by scanning, the device can automatically generate a geological spectrum of the juice processing raw material, showing the distribution of various components in the raw material; step S105 can accurately identify the pesticide residue components in the juice processing raw material by performing data analysis on the mass spectrum, and compare the identified pesticide residue components with the reference database to further verify its accuracy and reliability. After confirming the pesticide residue components, the system can also identify the specific locations of these components in the raw materials to provide support for subsequent processing and decision-making; step S106 compares the mass spectrum obtained by scanning the mass spectrometry detection device with the image of the juice processing raw material collected by the high-definition camera, and uses image processing technology to identify the parts containing pesticide residue components. Annotation is performed in the image, and the annotated image can intuitively show the distribution of pesticide residues in the raw materials, making the test results easier to understand and accept; it provides a reliable data source for the detection of pesticide residues and ensures the accuracy and comprehensiveness of the test. The generation of mass spectrometry is the prerequisite for subsequent data analysis, laying the foundation for the rapid and accurate identification of pesticide residue components, realizing rapid and accurate identification of pesticide residues, and improving detection efficiency and accuracy. Through comparative verification, the reliability and authority of the test results are guaranteed, and false alarms and missed alarms are avoided. The annotation function improves the intuitiveness and readability of the test results, allowing non-professionals to quickly understand the quality status of raw materials, providing clear guidance for subsequent raw material processing, and helping to achieve the goal of accurately removing pesticide residues and improving the quality of fruit juice, promoting the integrated application of multi-source data, and demonstrating the huge potential of modern detection technology in the field of food safety.

[0029] Example 4: Figure 4As shown, on the basis of Example 1, the process of preprocessing the images in the mass spectrum image set in step S200 provided in the embodiment of the present invention includes the following steps: Step S201: importing the original mass spectrum data file of the raw material for juice processing into the MATLAB software, and converting it into a standard data format, using an asymmetric least squares algorithm to perform baseline correction to eliminate the influence of background noise and non-target signals; Step S202: removing noise in the image by filtering and other operations, applying contrast adjustment, sharpening and other operations to enhance the image quality, using a library matching method to identify and select significant mass spectrum peaks, and eliminating the influence of non-target substances; Step S203: calibrating the mass spectrum line with the help of a reference database, using a normalization method to standardize the mass spectrum image, and outputting the processed mass spectrum image for further processing.

[0030] In the above embodiment, step S201 imports the original mass spectrum data file into MATLAB so that it can be subsequently processed in the MATLAB environment, and the baseline is corrected by asymmetric least squares method or other algorithms to effectively eliminate background noise and non-target signals. The baseline correction ensures the stability of the baseline of the mass spectrum, making the signal peak clearer and more identifiable; step S202 removes noise in the image by filtering and other technologies to improve the signal-to-noise ratio, and enhances the image quality by contrast adjustment, sharpening and other operations to make the mass spectrum peak more prominent and easy to identify, and uses the mass spectrum library of known compounds for matching to identify and select significant mass spectrum peaks while excluding the influence of non-target substances; step S203 performs mass spectrum analysis with the help of external standards or reference databases. Calibration ensures data consistency and accuracy. Normalization methods are used to standardize mass spectrometry images to eliminate deviations caused by environmental conditions. Data import provides a starting point for the processing process, ensuring data accessibility and processability. Baseline correction is essential for accurately identifying and quantifying compounds in mass spectra because it reduces errors caused by instrument noise or environmental interference. Denoising and image enhancement significantly improve data clarity and interpretability. Library matching technology can quickly and accurately identify and classify compounds in mass spectra, improving the efficiency and accuracy of analysis. Calibration ensures comparability of data between different batches or instruments. Standardization further improves data accuracy and reliability, making the results more objective and repeatable.

[0031] Example 5: Figure 5As shown, on the basis of Example 4, the baseline correction process in step S201 provided in the embodiment of the present invention includes the following steps: Step S2011: Load the original mass spectrometry data to be corrected into the system to ensure that all data points are correctly read and processed, and set a smoothing parameter to control the degree of smoothness in the fitting process; Step S2012: Calculate the initial baseline using the initial weight matrix and the original spectral data, and then perform iterative solution. In each iteration, the weight is recalculated according to the current estimated baseline, and the baseline estimate is updated; Step S2013: If the change is less than a preset threshold, the iteration is stopped, otherwise, the next iteration is continued; after each iteration, the correction accuracy is judged by the root mean square error between the ideal baseline and the estimated value baseline, the smoothing parameter is adjusted according to the correction effect, and the corrected data is output after all iterations are completed.

[0032] In this embodiment, the original mass spectrum data to be corrected is loaded into the system, and the smoothing parameters are set; , represents the i-th original mass spectrum data point, Represents the smoothing parameter, which is used to control the degree of smoothing during the fitting process. Represents the noise standard deviation, which is used to estimate the noise level in the data. The initial baseline is calculated using the initial weight matrix and the original spectral data, and then it is solved iteratively.

[0033] = initial baseline, = Initial weight matrix , , , where represents the initial baseline estimate, represents the initial weight matrix, represents the baseline estimate after the kth iteration, represents the weight matrix after the kth iteration, represents the original mass spectrometry data, Represents the noise standard deviation, which is used to estimate the noise level in the data.

[0034] Determine whether the change is less than the preset threshold, determine the correction accuracy based on the root mean square error, adjust the smoothing parameter, and output the corrected data; , , , , where represents the change in the baseline after the kth iteration, represents the root mean square error after the kth iteration, represents the ideal baseline, represents the baseline estimate of the ith data point after the kth iteration, N represents the total number of data points, represents the sliding parameter, which is adjusted according to the root mean square error. Represents the adjustment factor, which is used to control the adjustment speed of the smoothing parameters.

[0035] In the above embodiment, step S2011 loads the original mass spectrometry data to be corrected into the system to ensure that all data points are correctly read and processed, and sets a smoothing parameter λ to control the degree of smoothing in the fitting process. The selection of the smoothing parameter directly affects the precision of the baseline correction and the risk of overfitting; step S2012 uses the initial weight matrix W and the original spectral data y to calculate the initial baseline z0 through a specific formula. In each iteration, the weight is recalculated according to the current estimated baseline, and the baseline estimate is updated. The iterative process gradually approaches the real baseline; step S2013 determines whether the change is less than a preset threshold. If it is satisfied, the iteration is stopped to avoid unnecessary calculations and possible overfitting. After each iteration, the correction accuracy is evaluated by calculating the root mean square error between the ideal baseline and the estimated baseline, which helps to understand the current correction accuracy. The method is to adjust the smoothing parameter λ according to the correction effect and output the corrected data after all iterations are completed. By setting the smoothing parameter, the smoothness and accuracy of the correction result are balanced, providing reliable data support for subsequent analysis. By iterative solution, the non-baseline signals in the original data are gradually eliminated to improve the accuracy of baseline estimation. The update of the weight matrix reflects the change in the contribution of data points to the baseline estimation at different iteration stages, which is helpful to adjust the baseline more finely. The baseline correction process is stopped when sufficient accuracy is achieved to avoid the waste of computing resources. By evaluating the correction accuracy and adjusting the smoothing parameter, the baseline correction process is finely controlled, the reliability and accuracy of the correction effect are improved, and the output of the corrected data provides a more accurate and reliable basis for subsequent mass spectrometry data analysis.

[0036] Example 6: Figure 6 As shown, on the basis of Example 3, the process of referring to the database in step S203 provided in the embodiment of the present invention includes the following steps: Step S2031: Select a high-quality standard mass spectrometer to collect data from the standard sample, pre-process the original mass spectrometry data, including peak detection, peak identification and peak extraction, and convert the original data into a public mzML format; Step S2032: In LC-MS data analysis, extract feature information from the mass spectrometry data, match it with the features of known compounds, and use software tools to process, analyze and build a library for the data; Step S2033: Enter the processed data into a database, including the compound name, molecular formula, CAS ID, retention time, secondary mass spectrometry information, etc., maintain the database, and verify and evaluate the data in the database.

[0037] In the above embodiment, step S2031 uses a high-quality standard mass spectrometer to ensure the accuracy and reliability of the data, providing a solid foundation for subsequent analysis. Through preprocessing steps such as peak detection, peak identification and peak extraction, noise and impurity signals can be effectively removed, data quality can be improved, and clear and accurate mass spectrometry data can be provided for subsequent feature extraction and data analysis. The original number is converted into a public mzML format, which is convenient for data sharing and analysis between different software and platforms, and improves the versatility and accessibility of the data; step S2032 extracts meaningful feature information from complex mass spectrometry data, such as mass-to-charge ratio, retention time, etc., which provides key parameters for subsequent data analysis and matching. The extracted feature information is matched with the features of known compounds, which can quickly identify the compound components in the sample and improve the analysis efficiency and accuracy; step S2033 enters the processed data into the database comprehensively and accurately, which is convenient for data storage, retrieval and management, and regularly updates and maintains the database to ensure the timeliness and accuracy of the data. The data in the database is verified and evaluated to ensure the reliability and accuracy of the data, providing strong support for subsequent data analysis and application.

[0038] Example 7: Figure 7 As shown, on the basis of Example 1, the process of identifying pesticide residues and calculating the pesticide residue amount in step S200 provided in the embodiment of the present invention includes the following steps: Step S204: Calculate the local threshold of each pixel point according to the local grayscale distribution of the regional image, and mark the pixel points in the image whose grayscale value is higher than the local threshold as potential pesticide residue areas; perform dilation operations at different scales to expand the boundary of the potential area, and perform corrosion operations to remove isolated noise points; Step S205: Construct a multi-scale image pyramid, extract regional image features at different scales, calculate the Harris response function at each scale, and detect corner points , filter out significant corner features; convert the extracted corner features into feature vectors; match the feature vectors with a known pesticide residue mass spectrum library, and use cosine similarity to score the confidence of the matching results to filter out the types of pesticide residues; step S206: analyze the intensity distribution of the matched pesticide residue mass spectrum in the regional image, and extract the multidimensional features of the mass spectrum intensity distribution, including the mean, variance, and peak value; establish a multivariate regression model between mass spectrum intensity and residue through standard samples of known concentration, use random forest to train the multivariate regression model, input the mass spectrum intensity features of the actual samples into the multivariate regression model, and predict the pesticide residue.

[0039] In the above embodiment, the local threshold calculation and morphological operation in step S204 of this embodiment calculates the local threshold of each pixel by analyzing the local grayscale distribution of the regional image; it can effectively distinguish the background and potential pesticide residue areas in the image, especially in the case of complex background or uneven illumination, the local threshold can better adapt to the local characteristics of the image; dilation and corrosion operations are performed at different scales, which helps to expand the boundary of the potential pesticide residue area and remove isolated noise points; the dilation operation can fill the holes in the area to make the area more continuous; the corrosion operation can remove small noise points and improve the accuracy of detection. Through the local threshold and morphological operation, the potential pesticide residue area can be marked more accurately, and false detection and missed detection can be reduced, laying the foundation for subsequent accurate analysis; the morphological operation can effectively process the noise and discontinuous areas in the image, making the detection results more stable, which is suitable for image analysis in different environments. Step S205: Multiscale image pyramid and feature matching, constructing a multiscale image pyramid, which can extract regional image features at different scales, can capture pesticide residues of different sizes, and adapt to detection requirements of different sizes; calculate the Harris response function at each scale, detect corners and screen out significant corner features; Harris corner detection can effectively identify key points in the image, which are characteristic points of pesticide residues; convert the extracted corner features into feature vectors and match them with known pesticide residue material spectra; calculate the confidence score of the matching results by cosine similarity, and screen out the types of pesticide residues; and can quickly and accurately identify specific pesticide residues. The multiscale image pyramid can comprehensively capture pesticide residues of different sizes, improve the comprehensiveness and accuracy of detection; through feature vector matching, it can quickly identify specific types of pesticide residues, providing a basis for subsequent quantitative analysis. Step S206 mass spectrum intensity distribution analysis, analyze the intensity distribution of the matched pesticide residue mass spectrum in the regional image, extract the multidimensional features of the mass spectrum intensity distribution, such as mean, variance and peak value, etc., the features can reflect the concentration and distribution of pesticide residues. By analyzing the mass spectrum intensity distribution, the concentration of pesticide residues can be quantitatively calculated, providing a scientific basis for food safety assessment; the extracted multidimensional features can fully reflect the distribution and concentration changes of pesticide residues, which is helpful for comprehensive assessment of food safety.

[0040] In summary, this embodiment constructs an efficient and accurate pesticide residue detection system through local threshold calculation, morphological operation, multi-scale image pyramid, feature matching and mass spectrum intensity distribution analysis. Each step together improves the accuracy, robustness and comprehensiveness of the detection, providing strong technical support for safety.

[0041] Furthermore, the process of screening out the types of pesticide residues in step S205 specifically includes the following steps: step S2051: analyzing the sample by a mass spectrometer, the mass spectrometer can separate the compounds in the sample according to their mass-to-charge ratio and generate a mass spectrum; integrating the extracted features into a feature vector to calculate the cosine similarity between the sample feature vector and the feature vector of each pesticide residue in the database; step S2052: evaluating whether the sample contains specific pesticide residues and the degree of credibility of the match based on the cosine similarity score; setting a confidence score threshold, and using the confidence score to screen the types of pesticide residues in the database; step S2053: for each pesticide residue, if the cosine similarity with the sample feature vector exceeds a preset confidence score threshold, then the type of pesticide residue is marked as present in the sample.

[0042] Preferably, the mass spectrometry analysis in step S2051 of this embodiment can accurately identify and quantify various compounds in the sample. The extracted features are integrated into a feature vector, which contains the mass spectrum information of all compounds in the sample; by calculating the cosine similarity between this feature vector and the feature vector of each pesticide residue in the database, the similarity between the sample and the known pesticide residue can be quantitatively evaluated; the compounds in the sample are accurately identified and quantified; the feature vector of the compound is obtained through the mass spectrum, which provides a data basis for subsequent comparison and identification. Step S2052 evaluation and screening, using the cosine similarity score to evaluate whether the sample contains specific pesticide residues and the credibility of its match, setting a confidence score threshold, only when the cosine similarity between the feature vector of the pesticide residue and the sample feature vector exceeds this threshold, can the pesticide residue be considered to exist in the sample; equivalent to a screening mechanism, ensuring that only results with high matching are considered; quantitatively evaluate the possibility of the existence of pesticide residues in the sample and its accuracy; by setting a threshold, the possibility of false alarms is reduced, and the reliability of detection is improved. Step S2053 marks the types of pesticide residues. For those pesticide residues whose cosine similarity with the sample feature vector exceeds the preset confidence score threshold, they are marked as existing in the sample, marking the completion of the detection process and giving a clear test result; confirming the types of pesticide residues existing in the sample; and providing clear results that can be used for further analysis and taking corresponding measures. The significance of the entire detection process is to provide an efficient and accurate method for food safety detection; it can quickly screen out pesticide residues in food samples, which is of great significance to ensuring food quality and consumer health. In addition, the method has a high degree of automation, which can save a lot of manpower and time and improve detection efficiency; by setting the confidence score threshold, it can also ensure the reliability of the test results, reduce false positives and false negatives, and thus play an important role in food safety supervision.

[0043] Furthermore, the process of training the multivariate regression model using random forest in step S206 specifically includes the following steps: Step S2061: Collect a large number of data sets by mass spectrometry analysis through the prepared standard samples of known concentration; De-noise, baseline correction and normalization of the data sets; Extract features from the mass spectrometry data set, the features reflect the complex distribution and change trend of pesticide residues in the sample, and screen out the most valuable feature subset for residue prediction; Step S2062: Construct a multivariate regression model to capture the complex nonlinear relationship between features and pesticide residues; Use the collected standard sample data to train the constructed multivariate regression model; Use the mean square error index to evaluate the prediction performance of the multivariate regression model; Wherein, the expression of the multivariate regression model is expressed as: , where represents the predicted target variable (pesticide residue), is an input matrix containing multiple features, each of which corresponds to a feature extracted from the mass spectrometry dataset. is a regression model that captures the complex nonlinear relationship between features and target variables; in the random forest regression model, It is an integrated model composed of multiple decision trees. Each decision tree divides the input features and outputs a prediction value. The final prediction value is the average of all decision tree predictions.

[0044] Specifically, the expression of the random forest regression model can be further refined as follows: , where is the number of decision trees in the random forest, is the prediction function of the tth decision tree; the random forest model effectively captures the complex nonlinear relationship between features and pesticide residues and provides accurate prediction results; Step S2063: Apply the trained multivariate regression model to the mass spectrometry data of the actual sample and predict the pesticide residue.

[0045] Preferably, in step S2061 of this embodiment, data collection and feature extraction, a large number of data sets are collected by mass spectrometry analysis through the preparation of known concentration standard samples; the accuracy and reliability of the data are ensured; the data sets are denoised, baseline corrected and normalized, which improves the quality of the data and reduces the impact of noise and baseline drift on the analysis results; features reflecting the complex distribution and change trend of pesticide residues are extracted from the mass spectrometry data set, and the most valuable feature subsets for residue prediction are screened out, which helps to reduce the dimension of the feature space and improve the training efficiency and prediction accuracy of the model. The significance achieved: through data preprocessing, the high quality of the input data is guaranteed, providing a reliable foundation for model training; by screening the most valuable features, the complexity of the model is reduced, and the generalization ability and prediction accuracy of the model are improved. Step S2062: Model construction and training. A multivariate regression model is constructed to capture the complex nonlinear relationship between features and pesticide residues. The random forest model can handle high-dimensional data and nonlinear relationships and has strong generalization capabilities. The constructed multivariate regression model is trained using the collected standard sample data, and the stability and prediction performance of the model are improved by integrating multiple decision trees. The prediction performance of the multivariate regression model is evaluated using the mean square error index to ensure that the performance of the model on the training set meets expectations and provides a basis for subsequent model optimization. Significance achieved: The random forest model can effectively capture the complex nonlinear relationship between features and pesticide residues and provide accurate prediction results. By integrating multiple decision trees, the random forest model has a strong ability to resist overfitting and improves the stability and generalization ability of the model. The evaluation of indicators such as the mean square error ensures that the performance of the model on the training set meets expectations, providing a guarantee for the prediction accuracy in practical applications. Step S2063: Model application and prediction: Apply the trained multivariate regression model to the mass spectrometry data of the actual sample to predict the pesticide residue, thus realizing the transition from laboratory to actual application and improving the practicality and application value of the model; output the pesticide residue in the actual sample through model prediction, thus providing a scientific basis for food safety testing. Applying the trained model to the actual sample realizes the transformation from theory to practice, thus improving the practicality and application value of the model; through accurate prediction of pesticide residue, a scientific basis is provided for food safety testing, thus protecting the public health and food safety.

[0046] In summary, this embodiment can construct an efficient and accurate pesticide residue prediction model through the above-mentioned hierarchical and progressive process, providing strong technical support for food safety testing.

[0047] Example 8: Figure 8As shown, on the basis of Example 1 to Example 7, the fruit juice processing pesticide residue and residue detection system provided by the embodiment of the present invention comprises: an image acquisition component 1, a data processing component 2 and a report output component 3; wherein the image acquisition component 1 comprises a plurality of mass spectrometry imaging devices, which acquire the target area for monitoring pesticide residues, and are used to acquire images of fruit juice processing raw materials in the target area, wherein the images comprise spatial position information and mass spectrum information of each fruit juice processing raw material; the spatial position information and the mass spectrum information are combined to form a mass spectrum image set; the data processing component 2 pre-processes the images in the mass spectrum image set to obtain pre-processed images; the pre-processed images are identified, and regional images with pesticide residues are obtained by screening; the mass spectrum features of the regional images are extracted, the pesticide residues are identified and the pesticide residues are calculated; the report output component 3 judges the detection result, and if there are pesticide residues, the position information and regional images of the pesticide residues are displayed on the visualization device, and a qualified rate report of the pesticide residues of the batch of products is output; if there are no pesticide residues, the detection is continued.

[0048] In the above embodiment, the image acquisition component obtains the target area for pesticide residue monitoring through multiple mass spectrometry imaging devices, which can fully cover and carefully capture the image of the juice processing raw materials in the target area. The image not only contains the spatial position information of the raw materials, but also integrates the mass spectrum information to form a mass spectrum image set, which provides rich multi-dimensional data support for subsequent data processing; the data processing component pre-processes the mass spectrum image to improve the image quality, facilitates subsequent analysis, and realizes the preliminary positioning of the pesticide residue by screening out the regional images with pesticide residues, extracts the mass spectrum features of the screened regional images, and calculates the pesticide residue using methods such as standard curves; the report output component 3 judges the output result of the data processing component to determine whether there are pesticide residues. If there are pesticide residues, it can be displayed on the visualization device. It has the location information and regional images of pesticide residues, intuitively displays the test results, and outputs a qualified rate report on the pesticide residues in this batch of products, providing a reference for production management and quality control; it improves the comprehensiveness and accuracy of image acquisition, provides a high-quality data basis for the detection of pesticide residues, and realizes the simultaneous recording of spatial position and chemical properties, which helps to more accurately locate and analyze pesticide residues; it improves the automation and intelligence level of data analysis, reduces human intervention and errors, realizes the precise positioning and quantitative analysis of pesticide residues, and provides a scientific basis for food safety supervision; it improves the readability and comprehensibility of test results, making it easier for production management personnel to quickly understand the product quality status. The output of the qualified rate report helps companies take corresponding measures in a timely manner to ensure that products meet safety standards and maintain brand image and consumer trust.

[0049] Fig. 9A block diagram of an exemplary electronic device suitable for implementing embodiments of the present invention is shown.

[0050] The electronic device may include a central processing unit / microprocessor / main control chip, etc. (H1); a storage medium (H2), coupled to the central processing unit / microprocessor / main control chip, etc. (H1), and storing computer executable instructions therein, for performing the steps of each method of an embodiment of the present invention when executed by the processor.

[0051] The central processing unit / microprocessor / main control chip etc. (H1) may include but is not limited to, for example, one or more processors or microprocessors etc.

[0052] The storage medium (H2) may include, but is not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (such as hard disk, floppy disk, solid state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).

[0053] In addition, the electronic device may also include (but not limited to) a data bus (H3), an input / output bus / external bus / device bus, etc. (H4), a display (H5) and input / output devices (H6) (for example, a keyboard, a mouse, a speaker, etc.), etc.

[0054] The central processing unit / microprocessor / main control chip etc. (H1) can communicate with external devices (H5, H6, etc.) through an I / O bus (H4) via a wired or wireless network (not shown).

[0055] The storage medium (H2) may also store at least one computer executable instruction for executing the various functions and / or method steps in the embodiments described in the present technology when executed by a central processing unit / microprocessor / main control chip, etc. (H1).

[0056] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a software product, wherein one or more computer executable instructions are executed by a processor to perform the various functions and / or method steps in the embodiments described in the present technology.

[0057] Fig.10 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is shown.

[0058] like Fig.10As shown, instructions are stored on the non-transitory computer-readable storage medium 920, and the instructions are, for example, computer-readable instructions 910. When the computer-readable instructions 910 are executed by the processor, the various methods described above can be executed. The non-transitory computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-transitory non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, the non-transitory computer-readable storage medium 920 can be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions 910 stored on the computer-readable storage medium 920, the various methods described above can be performed.

[0059] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0060] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0061] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0062] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for executing all or part of the steps of the various embodiments of the present invention through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk, etc. Various media that can store program codes.

[0063] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting pesticide residues and residual amounts in fruit juice processing, characterized in that: The method comprises the following steps: obtaining a target area for monitoring pesticide residues, arranging a plurality of mass spectrometry imaging devices in the target area to collect images of juice processing raw materials in the target area, wherein the images contain spatial position information and mass spectrum information of each juice processing raw material; combining the spatial position information and the mass spectrum information to form a mass spectrum image set; preprocessing the images in the mass spectrum image set to obtain preprocessed images; The pre-processed images are identified and the regional images with pesticide residues are obtained by screening; The mass spectrum features of the regional image are extracted to identify the pesticide residues and calculate the pesticide residue amount; the test results are judged. If there are pesticide residues, the location information and regional image of the pesticide residues are displayed on the visualization device, and a pesticide residue pass rate report is output; if there are no pesticide residues, the test continues.

2. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 1, characterized in that: The process of deploying mass spectrometry imaging equipment includes the following steps: installing a high-definition camera above a sample to be tested, irradiating a target area for pesticide residue monitoring to collect images of juice processing raw materials in the target area, and outputting the collected image data to process the image; deploying mass spectrometry imaging equipment on both sides of the target area for pesticide residue monitoring to collect mass spectrometry information images of juice processing raw materials, and connecting the mass spectrometry imaging equipment to a computer running a mass spectrometry data system; after the installation is completed, inserting a cable into a cable port, opening corresponding software on the computer to configure the instrument, exhaust and stabilize the instrument, selecting an electrospray ion source, waiting for the instrument to perform a self-check and display a standby state, a solvent valve switching sound appears, and a mechanical pump starts working.

3. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 1, characterized in that: The process of combining spatial position information and mass spectrum information includes the following steps: after the juice processing raw materials to be tested enter the detection range of the mass spectrum detection equipment, the mass spectrum detection equipment scans the juice processing raw material sample, records the mass-to-charge ratio information of each pixel position, and generates a mass spectrum of the juice processing raw materials; performs data analysis on the collected mass spectrum, identifies the pesticide residue components, and compares them with a reference database, and identifies the positions containing the pesticide residue components; compares the image of the juice processing raw materials to be tested collected by a high-definition camera with the mass spectrum of each pixel position of the juice processing raw materials scanned by the mass spectrum detection equipment, and marks the parts containing the pesticide residue components in the juice processing raw material image.

4. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 1, characterized in that: The process of preprocessing images in the mass spectrometry image set includes the following steps: importing the original mass spectrometry data file of the raw material of juice processing into MATLAB software, converting it into a standard data format, and using an asymmetric least squares algorithm for baseline correction; removing noise in the image through filtering operations, applying contrast adjustment and sharpening operations to enhance image quality, and using library matching methods to identify and select significant mass spectrometry peaks to exclude the influence of non-target substances; calibrating the mass spectrometry lines with the help of a reference database, using a normalization method to standardize the mass spectrometry image, and outputting the processed mass spectrometry image for further processing.

5. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 4, characterized in that: The baseline correction process includes the following steps: loading the original mass spectrometry data to be corrected into the system, setting a smoothing parameter to control the degree of smoothing in the fitting process; using the initial weight matrix and the original spectrum data to calculate the initial baseline, and then iterating the solution. In each iteration, the weight is recalculated according to the current estimated baseline, and the baseline estimate is updated; If the change is less than the preset threshold, the iteration is stopped, otherwise the next iteration is continued; After each iteration, the correction accuracy is judged by the root mean square error between the ideal baseline and the estimated value baseline, and the smoothing parameter is adjusted according to the correction effect. After all iterations are completed, the corrected data is output.

6. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 3, characterized in that: The process of reference database includes the following steps: using mass spectrometer to collect data of standard samples, preprocessing the raw mass spectrometry data, including peak detection, peak identification and peak extraction, and converting the raw data into the public mzML format; in LC-MS data analysis, extracting characteristic information from the mass spectrometry data and matching it with the characteristics of known compounds, using software tools to process, analyze and build a database; entering the processed data into the database, including compound name, molecular formula, CASID, retention time, secondary mass spectrometry information, maintaining the database, and verifying and evaluating the data in the database.

7. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 1, characterized in that: The process of identifying pesticide residues and calculating the amount of pesticide residues includes the following steps: according to the local grayscale distribution of the regional image, the local threshold of each pixel is calculated, and the pixel points in the image with grayscale values ​​higher than the local threshold are marked as potential pesticide residue areas; dilation operations are performed at different scales to expand the boundaries of the potential area, and erosion operations are performed to remove isolated noise points; a multi-scale image pyramid is constructed to extract regional image features at different scales, and the Harris response function is calculated at each scale to detect corner points and screen out significant corner point features; the extracted corner point features are converted into feature vectors; The feature vector is matched with the known pesticide residue material spectrum library, and the cosine similarity is used to screen out the types of pesticide residues through the confidence score of the matching results; the intensity distribution of the matched pesticide residue mass spectrum in the regional image is analyzed, and the multidimensional features of the mass spectrum intensity distribution, including the mean, variance and peak value, are extracted; a multivariate regression model between mass spectrum intensity and residue is established through standard samples of known concentration, and the multivariate regression model is trained using random forest. The mass spectrum intensity characteristics of the actual samples are input into the multivariate regression model to predict the pesticide residue.

8. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 7, characterized in that: The process of screening out the types of pesticide residues includes the following steps: analyzing the sample through a mass spectrometer, which can separate the compounds in the sample according to their mass-to-charge ratio and generate a mass spectrum; integrating the extracted features into a feature vector to calculate the cosine similarity between the sample feature vector and the feature vector of each pesticide residue in the database; evaluating whether the sample contains specific pesticide residues and the reliability of the match based on the cosine similarity score; setting a confidence score threshold and using the confidence score to screen the types of pesticide residues in the database; for each pesticide residue, if the cosine similarity with the sample feature vector exceeds the preset confidence score threshold, then the pesticide residue type is marked as present in the sample.

9. The method for detecting pesticide residues and residual amounts in fruit juice processing according to claim 7, characterized in that: The process of training a multivariate regression model using random forests includes the following steps: collecting a large number of data sets by preparing standard samples of known concentration using mass spectrometry analysis; denoising, baseline correction and normalization of the data sets; extracting features from the mass spectrometry data sets, the features reflecting the complex distribution and changing trends of pesticide residues in the samples, and screening out the most valuable feature subsets for residue prediction; constructing a multivariate regression model to capture the complex nonlinear relationship between features and pesticide residues; using the collected standard sample data to train the constructed multivariate regression model; using the mean square error indicator to evaluate the predictive performance of the multivariate regression model; applying the trained multivariate regression model to the mass spectrometry data of actual samples, and predicting the pesticide residues.

10. A system for detecting pesticide residues and residual amounts in juice processing, used to implement the method for detecting pesticide residues and residual amounts in juice processing as claimed in any one of claims 1 to 9, characterized in that: The fruit juice processing pesticide residue and residue detection system comprises: an image acquisition component, comprising a plurality of mass spectrometry imaging devices, for acquiring a target area for monitoring pesticide residues, for acquiring images of fruit juice processing raw materials in the target area, wherein the images contain spatial position information and mass spectrum information of each fruit juice processing raw material; combining the spatial position information and the mass spectrum information to form a mass spectrum image set; a data processing component, for preprocessing images in the mass spectrum image set to obtain preprocessed images; The pre-processed images are identified and the regional images with pesticide residues are obtained by screening; The mass spectrum features of the regional image are extracted to identify the pesticide residues and calculate the pesticide residue amount. The report output component is used to judge the test results. If there are pesticide residues, the location information and regional image of the pesticide residues are displayed on the visualization device, and a qualified rate report of the pesticide residue amount of the batch of products is output; if there are no pesticide residues, the test continues.

Citation Information

Patent Citations

  • Detection method for pesticide residue detector and pesticide residue detector

    CN113447478A

  • Pesticide residue detection equipment and pesticide residue detection method

    CN113702300A

  • Rapid pesticide residue detection reagent card and pesticide residue detection method

    CN117871508A

Cited By

  • Method for determining bactericide residues in fruit juice

    CN122361392A

  • A method for determining the residue of a bactericide in fruit juice

    CN122361392B