AI vision-based coated peanut shelf life prediction system and method

By using an AI-based vision-based shelf-life prediction system for coated peanuts, the system identifies initial defects and simulates the diffusion of oxidative metabolites, thus solving the problem of inaccurate prediction of oxidative deterioration in existing technologies and achieving accurate dynamic shelf-life prediction and quality control for coated peanuts.

CN122134241APending Publication Date: 2026-06-02HENGSHUI UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENGSHUI UNIVERSITY
Filing Date
2026-02-06
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies in the food industry, especially in the storage management of nut products, cannot accurately assess the degree of oxidative deterioration of specific high-risk products caused by localized adverse environments, and lack simulation of the spatial diffusion behavior of secondary peanut oxidative metabolites, resulting in inaccurate prediction of the overall product quality degradation.

Method used

An AI-based vision-based shelf-life prediction system for coated peanuts was adopted. By collecting images of bagged coated peanuts to identify initial quality defects, combined with real-time monitoring by environmental sensors, the system simulates the release and diffusion paths of oxidative metabolites, analyzes the risk of cross-contamination and secondary oxidation, and dynamically predicts the shelf life.

Benefits of technology

It enables accurate dynamic shelf-life prediction for each bag of peanuts, improving the precision and efficiency of quality control and ensuring that product quality meets storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134241A_ABST
    Figure CN122134241A_ABST
Patent Text Reader

Abstract

This invention relates to the field of shelf-life prediction technology and discloses an AI vision-based system and method for predicting the shelf-life of coated peanuts. The invention identifies secondary coated peanuts with initial quality defects, collects environmental data from the shelf space in real time, analyzes the degree of oxidation and deterioration of the secondary coated peanuts due to environmental influences, simulates the release and diffusion paths of oxidative metabolites of the secondary coated peanuts within the packaging space based on the spatial location and degree of oxidation and deterioration of the secondary coated peanuts, analyzes the risk probability of cross-contamination and secondary oxidation of coated peanuts in adjacent areas, simulates the quality evolution trajectory of bagged coated peanuts, and predicts the actual shelf-life of the bagged coated peanuts. Based on the actual shelf-life of the bagged coated peanuts, it determines whether the storage requirements are met. This invention integrates defect spatial localization and packaging contamination diffusion simulation, thereby achieving accurate and dynamic prediction of the shelf-life of each bag of peanuts, improving the precision and efficiency of quality control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shelf-life prediction technology, and in particular to a system and method for predicting the shelf-life of coated peanuts based on AI vision. Background Technology

[0002] In the food industry, especially in the quality control and warehousing management of nut products, the identification of initial product defects, monitoring of the storage environment, and prediction of shelf life are crucial for ensuring quality and reducing losses. Currently, warehousing environment management widely uses temperature and humidity sensors for monitoring, treating the environment as uniform and static. This ignores the differences in the initial quality of different batches of products, the gradient differences in the microenvironment within the shelf space, and fails to correlate environmental data with defective products in specific locations. It cannot assess the accelerating effect of localized adverse environments on the oxidation and deterioration of specific high-risk products, resulting in a lack of targeted and accurate early warnings. Furthermore, existing technologies lack the ability to simulate the spatial diffusion behavior of pro-oxidative metabolites released from specific point sources at the scale of actual commercial packaging. This makes it impossible to quantify the risk of cross-contamination and catalytic oxidation of secondary coated peanuts on surrounding intact peanuts, leading to significant discrepancies between the prediction of the overall product quality degradation and the actual situation.

[0003] To address the aforementioned issues, this invention provides an AI-based vision-based system and method for predicting the shelf life of coated peanuts. Summary of the Invention

[0004] In view of this, the present invention provides a shelf life prediction system and method for coated peanuts based on AI vision. The present invention integrates defect spatial localization and packaging contamination diffusion simulation, thereby realizing accurate dynamic prediction of the shelf life of each bag of peanuts and improving the accuracy and efficiency of quality control.

[0005] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for predicting the shelf life of coated peanuts based on AI vision, comprising the following specific steps: Step 1: Collect images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information; Step 2: Deploy environmental sensing equipment to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment; Step 3: Based on the spatial location of the secondary coated peanuts and their degree of oxidation and deterioration, simulate the release and diffusion pathway of the oxidation metabolites of the secondary coated peanuts in the packaging space, and analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in the adjacent area. Step 4: Simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coated peanuts, and predict the actual shelf life of bagged coated peanuts. Step 5: Determine whether the packaged coated peanuts meet storage requirements based on their actual shelf life.

[0006] Preferably, step one includes the following specific steps: Step 11: Collect images of bagged peanuts, separate the peanuts from the background of the packaging bag, generate a binary mask, extract the outer contour of each peanut based on the connected components in the mask, and obtain the centroid of each peanut pixel. Step 12: Extract features from the segmented individual coated peanuts to obtain the texture roughness, color anomaly, and shape irregularity of each individual coated peanut. The texture roughness is obtained based on the contrast features of the gray-level co-occurrence matrix, the color anomaly is obtained based on the Euclidean distance in the CIELab color space, and the shape irregularity is obtained based on the complement of the circularity of the mask area and the perimeter of the outline. Step 13: Obtain the initial quality defect assessment value of a single coated peanut by weighted summation based on texture roughness, color anomaly, and shape irregularity; Step 14: Obtain the preset initial quality defect threshold, filter the initial quality defect evaluation values ​​that are lower than the initial quality defect threshold, obtain the corresponding coated peanuts and set them as secondary coated peanuts. Step 15: Convert the pixel centroid of the secondary coated peanut into spatial coordinates.

[0007] Preferably, step two includes the following specific steps: Step 21: Deploy environmental sensing devices to collect environmental data of the shelf space in real time. The environmental data includes temperature, humidity, light intensity and oxygen concentration. Step 22: Obtain temperature anomalies by dividing the absolute value of the difference between temperature and optimal storage temperature by the optimal storage temperature; obtain humidity anomalies by dividing the absolute value of the difference between humidity and optimal storage humidity by the optimal storage humidity; obtain light anomalies by dividing the absolute value of the difference between light intensity and optimal storage light intensity by the optimal storage light intensity; obtain oxygen concentration anomalies by dividing the absolute value of the difference between oxygen concentration and optimal storage oxygen concentration by the optimal storage oxygen concentration. Step 23: Obtain environmental anomalies by weighted summation of temperature anomalies, humidity anomalies, light anomalies, and oxygen concentration anomalies; Step 24: Obtain the basic oxidation reaction rate. The oxidation reaction rate under environmental influence is obtained by multiplying the sum of the environmental anomaly value and the value 1 by the basic oxidation reaction rate. Step 25: Obtain the oxidative deterioration increment based on the accumulated amount of oxidation reaction rate under environmental influence during storage, and obtain the oxidative deterioration assessment value of secondary coated peanuts based on the sum of the initial quality defect assessment value and the oxidative deterioration increment.

[0008] Preferably, step three includes the following specific steps: Step 31: Substitute the oxidative deterioration assessment value of the secondary coated peanuts into the pollution release rate calculation formula to obtain the pollution release rate of the secondary coated peanuts; Step 32: Construct a pollutant attenuation model to obtain the pollutant concentration of coated peanuts in the vicinity; Step 33: Construct a pollution risk probability model to obtain the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas.

[0009] Preferably, step four includes the following specific steps: Step 41: Obtain the oxidation rate induced by secondary peanut based on the formula for calculating the oxidation rate induced by secondary peanut, obtain the oxidation rate driven by the environment based on the formula for calculating the oxidation rate driven by the environment, and obtain the total oxidation rate based on the sum of the oxidation rate induced by secondary peanut and the oxidation rate driven by the environment. Step 42: Obtain the final peroxide value of the coated peanuts by adding the product of the total oxidation rate and the storage time to the initial peroxide value; Step 43: When the final peroxide value of the coated peanuts reaches the preset failure threshold, the corresponding storage time is the actual shelf life of the bagged coated peanuts.

[0010] Preferably, step five includes the following specific steps: The actual shelf life of the bagged coated peanuts is compared with the set target shelf life. If the actual shelf life of the bagged coated peanuts is greater than or equal to the set target shelf life, the bagged coated peanuts are judged to meet the storage requirements. If the actual shelf life of the bagged coated peanuts is less than the set target shelf life, the bagged coated peanuts are judged to not meet the storage requirements.

[0011] Secondly, the present invention provides an AI vision-based system for predicting the shelf life of coated peanuts, comprising: The secondary peanut screening module is used to acquire images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information. The oxidation and deterioration analysis module is used to deploy environmental sensing devices to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment. The pollution risk analysis module is used to simulate the release and diffusion path of oxidation metabolites of secondary coated peanuts in the packaging space based on the spatial location and degree of oxidation and deterioration of secondary coated peanuts, and to analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas. The shelf life prediction module is used to simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coating peanuts, and to predict the actual shelf life of bagged coated peanuts. The storage quality analysis module is used to determine whether bagged, coated peanuts meet storage requirements based on their actual shelf life.

[0012] Thirdly, the present invention provides a storage medium comprising stored instructions, wherein, when the instructions are executed, the device in which the storage medium is located executes the above-described AI vision-based method for predicting the shelf life of coated peanuts.

[0013] Fourthly, the present invention provides an electronic device including a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described above for predicting the shelf life of coated peanuts based on AI vision.

[0014] The beneficial effects of this invention are as follows: This invention acquires images of bagged coated peanuts, identifies secondary coated peanuts with initial quality defects based on surface damage, extracts their spatial coordinate information, deploys environmental sensing devices to collect environmental data of the shelf space in real time, analyzes the degree of oxidation and deterioration of secondary coated peanuts under environmental influence, simulates the release and diffusion path of oxidation metabolites of secondary coated peanuts in the packaging space based on the spatial location and degree of oxidation and deterioration of secondary coated peanuts, analyzes the risk probability of cross-contamination and secondary oxidation of coated peanuts in adjacent areas, simulates the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coated peanuts, and predicts the actual shelf life of bagged coated peanuts. Based on the actual shelf life of bagged coated peanuts, it determines whether they meet storage requirements. This invention integrates defect spatial localization and packaging contamination diffusion simulation, thereby achieving accurate dynamic prediction of the shelf life of each bag of peanuts, improving the accuracy and efficiency of quality control. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A schematic diagram of the AI ​​vision-based method for predicting the shelf life of coated peanuts provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating step one of the AI ​​vision-based method for predicting the shelf life of coated peanuts provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of step two of the AI ​​vision-based method for predicting the shelf life of coated peanuts provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of an AI vision-based peanut shelf-life prediction system provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0018] In this invention, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or apparatus. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element.

[0019] Please see Figure 1 This invention provides a method for predicting the shelf life of coated peanuts based on AI vision, including the following specific steps: Step 1: Collect images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information; Please see Figure 2 In this embodiment, step one includes the following specific steps: Step 11: Image the bagged peanuts using an industrial area array camera. Because the transparent packaging bags of the coated peanuts have reflective properties, a polarizing filter is added in front of the lens, and a polarizing film is added at the light source. Orthogonal polarization is used to eliminate highlights on the transparent packaging film surface, obtaining clear texture and color information of the coated peanuts. Images of the bagged coated peanuts are acquired, separating the coated peanuts from the packaging bag background. In this embodiment, a deep learning semantic segmentation network is used to process the images. First, a large number of images of bagged peanuts from different batches, under different lighting conditions, and with different packaging bag types are collected. LabelMe is used to accurately label the boundaries of each visible peanut, distinguishing the peanut body from the surface coating particles. Interference areas such as packaging bag wrinkles, text, and reflections are labeled in the training set. Data augmentation methods such as random rotation (±30°), scaling (0.7-1.3 times), color jitter (brightness ±30%, contrast ±20%), and adding Gaussian noise (σ=0.01) are used to improve the model's generalization ability. The model selected is the U-Net++ architecture, with an input size of 512×5. The encoder uses a pre-trained ResNet50 on ImageNet, and the decoder uses a feature pyramid structure to fuse multi-scale information. The loss function uses a combination of Dice loss (0.6) and FocalLoss (0.4) to solve the class imbalance problem. The optimizer is AdamW (learning rate 0.0001, weight decay 0.0005). Cosine annealing learning rate and adversarial training strategy are used to improve the robustness of the model to changes in packaging bag texture. A binary mask is generated. In this embodiment, after obtaining the probability map output of the semantic segmentation network, it is converted into an accurate binary mask. First, the Softmax function is applied to convert the network output into a probability map. Then, Conditional Random Field (CRF) is used for post-processing. The boundary smoothness is optimized through 5 iterations. The spatial distance weight is set to 0.4 and the color distance weight to 3.0. Then, Otsu's method is used to automatically determine the optimal threshold. For different lighting conditions, local adaptive threshold (Sauvola algorithm) can be used. Its calculation formula is: ,in, This is the dynamic threshold at pixel (x, y). Let (x,y) be the average gray value of the pixels within a local window centered at (x,y). The standard deviation of the pixel grayscale values ​​within this local window is used. A threshold is applied during binarization, and the comparison formula is as follows: ,in, This represents the pixel value at coordinates (x, y) in the binarized mask image, used to identify the region category to which the pixel belongs. The value selection rule is: when the probability map output by the semantic segmentation network... (Indicating the probability that a pixel belongs to the peanut) is greater than or equal to the adaptive threshold. hour, A value of 255 indicates that the pixel belongs to the peanut region; otherwise, a value of 0 indicates a different region. A value of 0 indicates that the pixel belongs to the packaging bag background. Morphological opening operations (erosion followed by dilation) are performed to remove noise. A 3×3 rectangular kernel is used repeatedly three times, and internal holes are filled to ensure the integrity of the peanut area. Finally, a clean binary mask is obtained by filtering the connected component area (retaining areas between 200-5000 pixels). Based on the connected components in the mask, the outer contour of each wrapped peanut is extracted. In this specific implementation, for the generated binary mask, connected component analysis is first performed to label independent regions. The image is scanned using a Two-Pass algorithm. In the first pass, temporary labels are assigned to each connected component. In the second pass, equivalent labels are merged to generate the final label map. A minimum region area threshold of 300 pixels is set to filter noise, and a maximum region area threshold of 300 pixels is set to filter noise. A domain area threshold of 5000 pixels is used to filter out clusters of peanuts that are stuck together. For connected regions with an area exceeding the threshold, a watershed algorithm is used for segmentation. The shape features (circularity) of each region are calculated to determine whether it is a single peanut. Unsegmentable stuck regions are marked for manual inspection. Contour extraction uses the Suzuki85 algorithm to obtain the circumscribed contour of each connected region, and the contour is approximated using the Douglas-Peucker algorithm, retaining key points (precision parameter epsilon=2.0). The contour should also include surface particle features to ensure complete contour extraction of the coated peanuts. The centroid of each coated peanut is obtained. In this embodiment, based on the extracted contour, the geometric moments of the contour are calculated. Let the contour pixel set be... First, calculate the zeroth moment. This represents the total number of pixels in the region enclosed by the outline, and then the first horizontal moment is calculated. and the first perpendicular moment The formula for calculating the centroid coordinates of a pixel is:

[0020] The result is a floating-point coordinate, representing the precise position of the centroid in the image (the origin of the coordinate system is the upper left corner of the image, the x-axis is to the right, and the y-axis is down). The circularity of the contour is calculated for quality verification, and areas with a circularity of less than 0.3 (which may be noise or non-peanut objects) are filtered out. Points are used to test within the polygon to ensure that the centroid is located inside the contour. Step 12: Extract features from the segmented individual coated peanuts to obtain their texture roughness, color anomaly, and shape irregularity. The texture roughness is obtained based on the contrast features of the gray-level co-occurrence matrix (GLCM). Texture roughness is used to quantify the uniformity and particle size of the coating on the peanut surface. The core principle is to reflect the surface unevenness by statistically analyzing the spatial distribution differences of pixel gray levels. In this embodiment, the segmented individual coated peanut regions are converted into grayscale images using a weighted average method, and a gray-level co-occurrence matrix is ​​constructed. The gray-level co-occurrence matrix is ​​a matrix that statistically analyzes the frequency of pixel pairs in the image, used to describe the spatial structure of the texture. The step distance d=1 (i.e., adjacent pixels) is set, and the directions are 0°, 45°, 90°, and 135° (covering horizontal and diagonal textures). For each direction, the gray levels are statistically analyzed. and pixel pairs The number of times it appears in the image, and normalized to a probability. , grayscale pairs The ratio of the number of occurrences of a pixel to the total number of pixel pairs is used to calculate the contrast feature of the gray-level co-occurrence matrix, reflecting the degree of difference in local gray-level values. The calculation formula is as follows: ,in, This represents the number of gray levels, typically 256, corresponding to an 8-bit grayscale image. The larger the peanut skin particles, the more pronounced the surface unevenness, and the greater the grayscale difference between adjacent pixels. The higher the weighting value, the greater the contrast value. Since the texture may differ in different directions, the average contrast of the four directions (0°, 45°, 90°, and 135°) is taken as the final texture roughness value. The color anomaly is obtained based on the Euclidean distance in the CIELab color space. The color anomaly is used to detect anomalies such as scorching (too dark), missing coating (too peanut flesh color), or mold (too grayish-white / yellow). In this embodiment, the segmented single-coated peanut region is converted from the RGB color space to the CIELab space. In the Lab space, the L channel represents luminance, the a channel represents chromaticity in the red-green direction, and the b channel represents chromaticity in the yellow-blue direction. This can effectively separate luminance and chromaticity information and avoid interference from luminance changes on color analysis. The conversion formula is implemented through a standard color space conversion matrix. For example, based on the standard conversion of the CIE1931 color space, the average values ​​of the L, a, and b channels of all pixels in the single-coated peanut region are calculated to obtain the color feature vector of the coated peanut. The calculation formula is as follows: ,in, The color feature vector is obtained by calculating the average values ​​of the L, a, and b channels of all pixels within a single coated peanut region. This represents the total number of pixels within the area of ​​a single peanut shell. , , For the Lab value of the nth pixel, the average chromaticity vector is calculated beforehand by statistically analyzing the Lab values ​​of a large number of qualified coated peanuts. As a standard chromaticity, the color deviation between the current coated peanut and the standard coated peanut is quantified by the Euclidean distance in Lab color space. The larger the distance, the more severe the color anomaly. The formula for calculating the Euclidean distance is: ,in, For color anomaly, the shape irregularity is obtained by taking the complement of the circularity of the mask area and the contour perimeter. In this embodiment, the mask area is the total number of pixels in the peanut region of the binary mask, and the contour perimeter is the total pixel length of the peanut's outer contour extracted by the Suzuki85 algorithm (calculated by the sum of the Euclidean distances of adjacent contour points). The circularity is calculated using the following formula: ,in, For roundness, For the mask area, The circularity of an ideal circle is 1, representing its perimeter. The more irregular the shape (elongated, with broken edges), the closer the circularity is to 0. The irregularity of the shape is... The greater the irregularity of the shape, the more irregular it is; Step 13: Obtain the initial quality defect assessment value of a single coated peanut by weighted summation based on texture roughness, color anomaly, and shape irregularity; Step 14: Obtain the preset initial quality defect threshold, filter the initial quality defect evaluation values ​​that are lower than the initial quality defect threshold, obtain the corresponding coated peanuts and set them as secondary coated peanuts. Step 15: Convert the pixel centroid of the secondary coated peanut into spatial coordinates. In this specific implementation, the pixel centroid is the pixel coordinate in the image coordinate system. The coordinates of the bagged peanuts need to be converted into physical spatial coordinates through camera calibration and spatial projection. For example, with the top left corner of the bag as the origin, the x-axis is to the right, the y-axis is downward, and the z-axis is perpendicular to the bag and outward. The camera calibration obtains parameters including intrinsic and extrinsic matrices. The intrinsic matrix includes the focal length. and Main point (Image center coordinates) and distortion coefficients are used to correct lens distortion. The extrinsic parameter matrix represents the rotation matrix between the camera coordinate system and the peanut-shaped coordinate system. Translation vector Rotation matrix Describes the camera's orientation and translation vector. Describe the position of the camera origin in the bagged coordinate system, image coordinates First, the distortion is converted to normalized coordinates after distortion correction using a distortion correction formula to eliminate the influence of lens distortion on the coordinates. For example, the OpenCV `undistortPoints` function can be used to obtain the distortion-corrected coordinates. Convert to normalized coordinates The normalized coordinate transformation formula is: ,in, , The focal length is the projection of the distance from the image plane to the camera's optical center in the x and y directions, reflecting the lens's magnification. Since the bagged peanuts are three-dimensional, the depth corresponding to the pixel centroid should be obtained. That is, the z-axis coordinate of the pixel in the camera coordinate system, which is obtained through monocular depth estimation. The normalized coordinates are then converted into 3D coordinates in the camera coordinate system. The camera coordinate conversion formula is: The coordinates in the camera coordinate system are obtained through the extrinsic parameter matrix. Convert to the coordinate system of the bagged peanuts The conversion formula is: ,in, The rotation matrix (3×3) represents the rotation relationship between the camera coordinate system and the peanut bag coordinate system. This is a translation vector (3×1 vector), representing the offset of the camera coordinate system origin in the peanut bag coordinate system. For matrix multiplication, the final result is This refers to the specific spatial coordinates of the coated peanut within the bag, which will be used for subsequent analysis of contaminated areas.

[0021] Step 2: Deploy environmental sensing equipment to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment; Please see Figure 3 In this embodiment, step two includes the following specific steps: Step 21: Deploy environmental sensing equipment to collect environmental data of the shelf space in real time. The environmental data includes temperature, humidity, light intensity and oxygen concentration. Select composite sensors that integrate temperature, relative humidity, oxygen concentration and light intensity. Based on the three-dimensional spatial dimensions of the shelf, establish grid-like monitoring points at the front, middle and rear and upper, middle and lower levels of the shelf to ensure the uniformity of data coverage. Step 22: Obtain temperature anomalies by dividing the absolute value of the difference between temperature and the optimal storage temperature by the optimal storage temperature; obtain humidity anomalies by dividing the absolute value of the difference between humidity and the optimal storage humidity by the optimal storage humidity; obtain light anomalies by dividing the absolute value of the difference between light intensity and the optimal storage light intensity by the optimal storage light intensity; obtain oxygen concentration anomalies by dividing the absolute value of the difference between oxygen concentration and the optimal storage oxygen concentration by the optimal storage oxygen concentration. In this embodiment, the steps for obtaining the optimal storage temperature are as follows: Under constant humidity (50%), light intensity (300 lux), and oxygen concentration (18%), different temperatures (10, 15, 20, 25, 30, 35, 40℃) are set, and coated peanuts are stored at each temperature. The peroxide value is tested periodically, the deterioration rate is calculated, and the temperature corresponding to the lowest deterioration rate is taken as the optimal storage temperature; the steps for obtaining the optimal storage humidity are as follows: Under constant temperature (20℃), light intensity (300 lux), and oxygen concentration (18%), the following steps are taken... Peanuts were stored at different humidity levels (30%, 50%, 70%, 90%), with the peroxide value measured periodically and the deterioration rate calculated. The humidity level corresponding to the lowest deterioration rate was taken as the optimal storage humidity. The optimal storage light intensity was determined as follows: at constant temperature (20℃), humidity (50%), and oxygen concentration (18%), different light intensities (0, 100, 300, 500, 800 lux) were set, and peanuts were stored at each light level. The peroxide value was measured periodically, and the deterioration rate was calculated. The light intensity corresponding to the lowest deterioration rate was taken as the optimal storage light intensity. The optimal storage oxygen concentration was determined as follows: at constant temperature (20℃), humidity (50%), and light intensity (300 lux), different oxygen concentrations (10%, 15%, 18%, 25%, 30%) were set, and peanuts were stored at each oxygen concentration. The peroxide value was measured periodically, and the deterioration rate was calculated. The oxygen concentration corresponding to the lowest deterioration rate was taken as the optimal storage oxygen concentration. Step 23: Obtain environmental anomalies by weighted summation of temperature anomalies, humidity anomalies, light anomalies, and oxygen concentration anomalies; Step 24: Obtain the basic oxidation reaction rate. The basic reaction rate is obtained through the Arrhenius equation, which is as follows: ,in, The basic oxidation reaction rate indicates how fast the deterioration reaction proceeds, and is expressed in time. -1 , The pre-exponential factor is used because secondary coated peanuts have increased oxidative contact area due to quality defects, resulting in a pre-exponential factor that is typically higher than that of normal peanuts. This is determined by linear fitting of the Arrhenius equation (intercept). Direct calculation or reference to empirical values ​​of similar products can be used to reflect the oxidation sensitivity of peanuts themselves, with dimensions consistent with... same, The activation energy, i.e., the minimum energy required for a reaction to occur, is obtained by: experimentally determining the rate constant of the reaction at different temperatures and calculating the natural logarithm corresponding to each temperature. and the reciprocal of temperature ,by The vertical axis is , Plot the line on the x-axis and find the slope of the line. , is the ideal gas constant, with a value of approximately 8.314. The oxidation reaction rate under environmental influence is obtained by multiplying the sum of environmental anomalies and the value 1 by the basic oxidation reaction rate, where temperature is the factor. Step 25: Obtain the oxidative degradation increment based on the cumulative amount of oxidation reaction rate under environmental influences during storage. The formula for calculating the oxidative degradation increment is: ,in, For the increase of oxidative deterioration, This represents the oxidation reaction rate under environmental influences, expressed as the reciprocal of time. The time element is used to obtain the oxidative deterioration assessment value of the secondary coated peanut based on the sum of the initial quality defect assessment value and the oxidative deterioration increment.

[0022] Step 3: Based on the spatial location of the secondary coated peanuts and their degree of oxidation and deterioration, simulate the release and diffusion pathway of the oxidation metabolites of the secondary coated peanuts in the packaging space, and analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in the adjacent area. In this embodiment, step three includes the following specific steps: Step 31: Substitute the oxidative deterioration assessment value of the secondary coated peanuts into the pollution release rate calculation formula to obtain the pollution release rate of the secondary coated peanuts. The pollution release rate calculation formula is as follows:

[0023] ,in, The pollutant release rate of the d-th secondary coated peanut is expressed in mg / h. The release coefficient is expressed in mg / (h·cm). 2The value represents the volatility characteristics of the peanut coating material and oxidation products. The steps for obtaining the release coefficient are as follows: 50 secondary coated peanuts are screened, and the oxidation deterioration assessment value and effective release surface area of ​​the 50 secondary coated peanuts are obtained. The coated peanuts are placed in a sealed sampling bag, and the temperature (25°C) and humidity (50%RH) are controlled. The released pollutants are collected using a gas sampling device (Tenax-TA), and the sampling time is recorded. The pollutant concentration in the adsorption tube is analyzed using a gas chromatograph (GC). First, the release rate is calculated by dividing the product of the pollutant concentration and the volume of the sampling bag by the sampling time. Then, the release rate is divided by the product of the oxidation deterioration assessment value and the effective release surface area to obtain the release coefficient of a single secondary coated peanut. The average value is then taken as the release coefficient of this embodiment. The value for oxidative deterioration assessment of the d-th secondary coated peanut is given. The effective release surface area of ​​the d-th secondary coated peanut is obtained by multiplying the texture roughness with the surface area of ​​the d-th secondary coated peanut. The steps for obtaining the surface area of ​​the coated peanut are as follows: acquire multi-angle images of the coated peanut, process the images with image analysis software, measure the orthographic projection area of ​​the coated peanut, and then calculate the sphericity of the coated peanut. The closer the sphericity is to 1, the closer the shape is to a sphere. Finally, the surface area of ​​the coated peanut is obtained by the ratio of the orthographic projection area to the sphericity. Step 32: Construct a pollutant attenuation model to obtain the pollutant concentration of coated peanuts in the adjacent area. In this embodiment, if the entire bag of coated peanuts is uniformly mixed, the adjacent area can be simplified to the proportion of secondary coated peanuts to the total coated peanuts. For example, if secondary coated peanuts account for 10%, then the adjacent area is the 10% of normal peanuts surrounding the secondary coated peanuts. The pollutant attenuation model includes a pollutant concentration calculation formula, which is: ,in, The pollutant concentration at the target peanut coating site is the sum of contributions from multiple pollution sources. This refers to the total number of pollution sources, specifically the number of secondary coated peanuts affecting the target coated peanut. The air diffusion coefficient is expressed in meters (m). 2 The steps to obtain the air diffusion coefficient are as follows: Through a diffusion cell experiment, pollutants are placed in the diffusion cell, and their diffusion rate in the air is measured. Alternatively, typical values ​​for pollutants can be found; for example, the air diffusion coefficient of volatile organic compounds is approximately 10. −5 ~10 −4 m 2 / s, in this embodiment, when using the air diffusion coefficient, the unit is m 2 / s converted to m 2 / h, Let be the Euclidean distance from the d-th secondary coated peanut to the target coated peanut. The characteristic dissipation length is used to correct for the effect of packaging on the decay of contaminant concentration, and is related to... The characteristic dissipation length, which reflects the ability of packaging to absorb or retain pollutants, is obtained using the same packaging material as the bagged coated peanuts in this example. Ten secondary coated peanuts are placed in the bag and sealed. Four monitoring points are marked inside the bag (1cm, 3cm, 5cm, and 7cm from the surface of the coated peanuts, using a marker). The bag is placed in a constant temperature and humidity chamber (25℃, 50%RH). Every hour, air is drawn from each monitoring point using a low-flow sampling pump (1L / min). Pollutants are collected using Tenax-TA adsorption tubes, and the pollutant concentration in the adsorption tubes is analyzed using gas chromatography-mass spectrometry (GC-MS). Record time and distance For each time point, the concentration variation with distance is fitted using an exponential decay model, which is: ,in, The concentration on the peanut surface is obtained by extrapolation. The feature dissipation length is obtained by fitting the data using the least squares method with a value of 0. It is an exponential function with base e; Step 33: Construct a pollution risk probability model to obtain the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas. The pollution risk probability model includes a pollution risk probability calculation formula, which is as follows: ,in, The probability of cross-contamination and secondary oxidation of the target coated peanuts. The sensitivity coefficient reflects the resistance of normal peanuts. The steps for obtaining the sensitivity coefficient are as follows: Select 60 normal peanuts (defect-free, with intact skin), divide them into 6 groups (10 peanuts per group), and place each group of coated peanuts in an environment with different concentrations of pollutants. The concentration is determined by... A gradient was used, with gradient values ​​including 0.5, 0.8, 1.0, 1.2, 1.5, and 2.0. A gas diffusion cell (a closed container containing a pollutant source, such as a volatile organic compound solution) was used. The airflow rate was adjusted using a mass flow controller to stabilize the outlet concentration at the target value (monitored in real time using a gas chromatograph with an error <5%). After each group of coated peanuts was exposed to the set concentration of pollutants for 24 hours, the peroxide value of each coated peanut was measured. The peroxide value threshold for normal peanuts was obtained as follows: through preliminary experiments, the average and standard deviation of the peroxide value of normal peanuts were measured, and a threshold with a 95% confidence level was taken. The number of coated peanuts in each group whose peroxide value exceeded the peroxide value threshold was counted. This number was divided by the total number of peanuts in the group to obtain the average pollution risk probability of the group. Then, the corresponding values ​​for each group were calculated. As the independent variable, the average pollution risk probability is used as the dependent variable. The data is presented in a table. For example, when the concentration ratios are 0.5, 0.8, 1.0, 1.2, 1.5, and 2.0, the corresponding average risk probabilities are 0.1, 0.2, 0.5, 0.8, 0.95, and 1.0, respectively. Then, a nonlinear regression method is used to fit the pollution risk probability calculation formula. By adjusting the value of the sensitivity coefficient, the sum of squared deviations between the fitted curve and the experimental data points is minimized, ultimately yielding the sensitivity coefficient. The critical threshold concentration is the highest concentration of pollutants that normal peanuts can tolerate. Exceeding this value will significantly accelerate the oxidation reaction. The steps to obtain the critical threshold concentration are as follows: Select 60 normal peanuts (defect-free, with intact skin), divide them into 6 groups (10 peanuts per group), and place them in environments with different concentrations of pollutants (0.1, 0.5, 1, 2, 5, 10 mg / m³). Use a gas generator (to evaporate the pollutant solution) to control the concentration. After 0, 12, 24, 36, and 48 hours, measure the peroxide value of each peanut using the iodometric method (weigh 5g of peanut sample, add glacial acetic acid-chloroform solution (component ratio 3:2), shake to extract lipids, add potassium iodide solution, react in the dark for 10 minutes, titrate with sodium thiosulfate standard solution, and calculate the peroxide value). Calculate the average peroxide value of each group, plot the peroxide value change curve over time, calculate the oxidation rate, and use ANOVA to analyze the oxidation rate at different concentrations. Obtain the concentration at which the oxidation rate increases significantly; this concentration is the critical threshold concentration.

[0024] Step 4: Simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coated peanuts, and predict the actual shelf life of bagged coated peanuts. In this embodiment, step four includes the following specific steps: Step 41: Obtain the secondary peanut-induced oxidation rate based on the formula for calculating the secondary peanut-induced oxidation rate. The formula for calculating the secondary peanut-induced oxidation rate is as follows: ,in, For the secondary peanut-induced oxidation rate, The induced oxidation coefficient is the factor by which a pollutant enhances the oxidation rate. The steps for obtaining the induced oxidation coefficient are as follows: Divide the same batch of intact coated peanuts into several groups, each sealed in an independent experimental container, and place them in a constant temperature and humidity chamber to maintain baseline conditions (25℃, 50%RH). Set up a pollutant concentration gradient: Using a standard gas mixing method, inject and maintain a series of known concentrations of pollutants into different experimental containers to establish multiple fixed pollutant concentration levels (0, 5, 10, 20 mg / m³). At fixed time points after the start of the experiment (days 0, 5, 10, and 30), take a portion of peanuts from each concentration group and measure their peroxide value. The oxidation rate of the blank control group (concentration 0) is the baseline rate. Calculate the average daily growth rate of peanut peroxide value over time in each concentration group and compare it with the baseline rate to obtain the oxidation acceleration factor. Fit these acceleration factors to the corresponding pollutant concentration data points using a curve; the slope is the induced oxidation coefficient. Obtain the environment-driven oxidation rate based on the environment-driven oxidation rate calculation formula. The environment-driven oxidation rate calculation formula is: ,in, Environmentally driven oxidation rate, The baseline oxidation rate, i.e., the peanut oxidation rate in a constant-temperature, light-free, and humidity-controlled environment at a reference temperature, is expressed in meq / (kg·day). The steps for obtaining the baseline oxidation rate are as follows: place the peanut sample in a constant-temperature and humidity chamber at 25℃, light-free, and 50% humidity; measure the peroxide value periodically (daily); and calculate the increment per unit time. For reference temperature, this example uses 25°C. The light sensitivity coefficient is obtained by setting different light intensities (e.g., 0, 500, 1000 Lux) at a fixed temperature (25℃) and humidity (50%), converting these values ​​to relative light intensities of 0, 0.5, and 1.0, and measuring the corresponding oxidation rates. Linear regression is then used to fit the values. The slope is the light sensitivity coefficient. Light intensity, To determine the maximum light intensity in the shelving environment, the steps for obtaining the maximum light intensity are as follows: Use a lux meter to measure the light intensity at key locations on the shelving (the top of the shelving near the light source or window, the middle shelves, the bottom of the shelving, and the edges of the shelving near the aisle or window) at different time periods, and select the maximum value. It is a temperature coefficient, representing the factor by which the reaction rate changes when the temperature increases by 10°C (the general empirical value for oily foods is 2~3). The 10 in the figure is a constant in °C. The total oxidation rate is obtained by summing the oxidation rate induced by secondary peanuts and the oxidation rate driven by the environment. Step 42: Obtain the final peroxide value of the coated peanuts by adding the product of the total oxidation rate and the storage time to the initial peroxide value. In this embodiment, the initial peroxide value is obtained by establishing a near-infrared spectroscopy (NIR) non-destructive testing model: peanut samples with different peroxide value levels are collected, each sample is scanned with a near-infrared spectrometer (Fourier transform near-infrared spectrometer) to obtain spectral data, a mathematical model of spectral characteristics and peroxide value is established using a multivariate correction method (partial least squares regression, PLS), the bagged peanuts are placed in the detection area of ​​the near-infrared spectrometer to obtain the spectral data of the bagged peanuts, and the spectral data is substituted into the correction model to obtain the initial peroxide value. Step 43: When the final peroxide value of the coated peanuts reaches the preset failure threshold, the corresponding storage time is the actual shelf life of the bagged coated peanuts.

[0025] In this embodiment, the steps for obtaining the weights and thresholds are as follows: 500 bags of test samples containing secondary coated peanuts are selected; images of the bagged coated peanuts and environmental data of the shelf space are collected; the time points of spoilage of the bagged coated peanuts are monitored in real time; the actual shelf life of the bagged coated peanuts is predicted based on the images of the bagged coated peanuts and the environmental data of the shelf space; the time points of spoilage of the bagged coated peanuts and the actual shelf life of the bagged coated peanuts are imported into a pre-trained fitting software (MATLAB) to obtain the set of weights and thresholds with the highest judgment accuracy as the values ​​for this embodiment.

[0026] Step 5: Determine whether the packaged coated peanuts meet storage requirements based on their actual shelf life.

[0027] In this embodiment, step five includes the following specific steps: The actual shelf life of the bagged coated peanuts is compared with the set target shelf life. If the actual shelf life of the bagged coated peanuts is greater than or equal to the set target shelf life, it is determined that the bagged coated peanuts meet the storage requirements. If the actual shelf life of the bagged coated peanuts is less than the set target shelf life, it is determined that the bagged coated peanuts do not meet the storage requirements. In this embodiment, the set target shelf life is the shelf life marked on the bag.

[0028] Please see Figure 4 This invention also provides an AI vision-based system for predicting the shelf life of coated peanuts, comprising: The secondary peanut screening module is used to acquire images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information. The oxidation and deterioration analysis module is used to deploy environmental sensing devices to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment. The pollution risk analysis module is used to simulate the release and diffusion path of oxidation metabolites of secondary coated peanuts in the packaging space based on the spatial location and degree of oxidation and deterioration of secondary coated peanuts, and to analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas. The shelf life prediction module is used to simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coating peanuts, and to predict the actual shelf life of bagged coated peanuts. The storage quality analysis module is used to determine whether bagged, coated peanuts meet storage requirements based on their actual shelf life.

[0029] This invention also provides a storage medium that includes stored instructions, wherein when the instructions are executed, the device containing the storage medium is controlled to perform the AI ​​vision-based method for predicting the shelf life of coated peanuts as described above.

[0030] This invention also provides an electronic device, specifically including a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described above for predicting the shelf life of coated peanuts based on AI vision.

[0031] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the description of the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0032] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0033] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting the shelf life of coated peanuts based on AI vision, characterized in that, The specific steps include the following: Step 1: Collect images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information; Step 2: Deploy environmental sensing equipment to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment; Step 3: Based on the spatial location of the secondary coated peanuts and their degree of oxidation and deterioration, simulate the release and diffusion pathway of the oxidation metabolites of the secondary coated peanuts in the packaging space, and analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in the adjacent area. Step 4: Simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coated peanuts, and predict the actual shelf life of bagged coated peanuts. Step 5: Determine whether the packaged coated peanuts meet storage requirements based on their actual shelf life.

2. The method for predicting the shelf life of coated peanuts based on AI vision according to claim 1, characterized in that, Step one includes the following specific steps: Step 11: Collect images of bagged peanuts, separate the peanuts from the background of the packaging bag, generate a binary mask, extract the outer contour of each peanut based on the connected components in the mask, and obtain the centroid of each peanut pixel. Step 12: Extract features from the segmented individual coated peanuts to obtain the texture roughness, color anomaly, and shape irregularity of each individual coated peanut. The texture roughness is obtained based on the contrast features of the gray-level co-occurrence matrix, the color anomaly is obtained based on the Euclidean distance in the CIELab color space, and the shape irregularity is obtained based on the complement of the circularity of the mask area and the perimeter of the outline. Step 13: Obtain the initial quality defect assessment value of a single coated peanut by weighted summation based on texture roughness, color anomaly, and shape irregularity; Step 14: Obtain the preset initial quality defect threshold, filter the initial quality defect evaluation values ​​that are lower than the initial quality defect threshold, obtain the corresponding coated peanuts and set them as secondary coated peanuts. Step 15: Convert the pixel centroid of the secondary coated peanut into spatial coordinates.

3. The method for predicting the shelf life of coated peanuts based on AI vision according to claim 2, characterized in that, Step two includes the following specific steps: Step 21: Deploy environmental sensing devices to collect environmental data of the shelf space in real time. The environmental data includes temperature, humidity, light intensity and oxygen concentration. Step 22: Obtain temperature anomalies by dividing the absolute value of the difference between temperature and optimal storage temperature by the optimal storage temperature; obtain humidity anomalies by dividing the absolute value of the difference between humidity and optimal storage humidity by the optimal storage humidity; obtain light anomalies by dividing the absolute value of the difference between light intensity and optimal storage light intensity by the optimal storage light intensity; obtain oxygen concentration anomalies by dividing the absolute value of the difference between oxygen concentration and optimal storage oxygen concentration by the optimal storage oxygen concentration. Step 23: Obtain environmental anomalies by weighted summation of temperature anomalies, humidity anomalies, light anomalies, and oxygen concentration anomalies; Step 24: Obtain the basic oxidation reaction rate. The oxidation reaction rate under environmental influence is obtained by multiplying the sum of the environmental anomaly value and the value 1 by the basic oxidation reaction rate. Step 25: Obtain the oxidative deterioration increment based on the accumulated amount of oxidation reaction rate under environmental influence during storage, and obtain the oxidative deterioration assessment value of secondary coated peanuts based on the sum of the initial quality defect assessment value and the oxidative deterioration increment.

4. The method for predicting the shelf life of coated peanuts based on AI vision according to claim 3, characterized in that, Step three includes the following specific steps: Step 31: Substitute the oxidative deterioration assessment value of the secondary coated peanuts into the pollution release rate calculation formula to obtain the pollution release rate of the secondary coated peanuts; Step 32: Construct a pollutant attenuation model to obtain the pollutant concentration of coated peanuts in the vicinity; Step 33: Construct a pollution risk probability model to obtain the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas.

5. The method for predicting the shelf life of coated peanuts based on AI vision according to claim 4, characterized in that, Step four includes the following specific steps: Step 41: Obtain the oxidation rate induced by secondary peanut based on the formula for calculating the oxidation rate induced by secondary peanut, obtain the oxidation rate driven by the environment based on the formula for calculating the oxidation rate driven by the environment, and obtain the total oxidation rate based on the sum of the oxidation rate induced by secondary peanut and the oxidation rate driven by the environment. Step 42: Obtain the final peroxide value of the coated peanuts by adding the product of the total oxidation rate and the storage time to the initial peroxide value; Step 43: When the final peroxide value of the coated peanuts reaches the preset failure threshold, the corresponding storage time is the actual shelf life of the bagged coated peanuts.

6. The method for predicting the shelf life of coated peanuts based on AI vision according to claim 5, characterized in that, Step five includes the following specific steps: The actual shelf life of the bagged coated peanuts is compared with the set target shelf life. If the actual shelf life of the bagged coated peanuts is greater than or equal to the set target shelf life, the bagged coated peanuts are judged to meet the storage requirements. If the actual shelf life of the bagged coated peanuts is less than the set target shelf life, the bagged coated peanuts are judged to not meet the storage requirements.

7. A shelf-life prediction system for coated peanuts based on AI vision, used to implement the shelf-life prediction method for coated peanuts based on AI vision as described in any one of claims 1-6, characterized in that, include: The secondary peanut screening module is used to acquire images of bagged coated peanuts, identify secondary coated peanuts with initial quality defects based on surface damage, and extract their spatial coordinate information. The oxidation and deterioration analysis module is used to deploy environmental sensing devices to collect environmental data of the shelf space in real time and analyze the degree of oxidation and deterioration of the secondary coated peanuts under the influence of the environment. The pollution risk analysis module is used to simulate the release and diffusion path of oxidation metabolites of secondary coated peanuts in the packaging space based on the spatial location and degree of oxidation and deterioration of secondary coated peanuts, and to analyze the risk probability of cross-contamination and secondary oxidation of coated peanuts in neighboring areas. The shelf life prediction module is used to simulate the quality evolution trajectory of bagged coated peanuts under the influence of environmental factors and secondary coating peanuts, and to predict the actual shelf life of bagged coated peanuts. The storage quality analysis module is used to determine whether bagged, coated peanuts meet storage requirements based on their actual shelf life.

8. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the AI ​​vision-based method for predicting the shelf life of coated peanuts as described in any one of claims 1-6.

9. An electronic device, characterized in that, It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described in any one of claims 1-6.