Food packaging gas component dynamic adjustment and fresh-keeping integrated system
By using data acquisition and intelligent analysis technology, the gas composition inside food packaging is dynamically adjusted, solving the problems of low intelligence and poor preservation effect in existing modified atmosphere packaging technology, and achieving precise preservation and extended shelf life of food.
Patent Information
- Application Number
- CN202511482092.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-01-02
AI Technical Summary
Existing modified atmosphere packaging technology cannot monitor food quality in real time, has a low level of intelligence, and cannot dynamically adjust according to the physiological changes and environmental conditions of food at different storage stages, resulting in a decline in preservation effect.
A data acquisition module is used to obtain gas composition and freshness data inside food packaging. PCA+machine learning algorithm is used to analyze gas composition factors and deep convolutional neural network is used to analyze food preservation factors. Fuzzy inference and multiple linear regression algorithms are combined to dynamically adjust gas composition.
It enables precise adjustment of gas composition based on the actual freshness of food, extending shelf life, improving preservation quality, and reducing food waste.
Smart Images

Figure CN121256348A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of food preservation, more particularly, the present application relates to a food packaging gas composition dynamic adjustment and preservation integrated system. BACKGROUND
[0002] With the development of science and technology, food packaging technology is also constantly progressing. Among them, modified atmosphere packaging technology is a common food preservation method, which can inhibit the respiration of food, the growth of microorganisms and the activity of enzymes by adjusting the gas composition inside the package, such as reducing oxygen concentration, increasing carbon dioxide concentration, etc., so as to prolong the shelf life of food. At present, the common modified atmosphere packaging technology on the market includes: disposable aeration modified atmosphere packaging, vacuum aeration modified atmosphere packaging and breathable film modified atmosphere packaging.
[0003] The prior art has the following disadvantages: Firstly, in the process of food storage, the gas composition in the package will gradually change due to the respiration of food and the metabolic activity of microorganisms, resulting in a gradual decline in preservation effect; secondly, the degree of intelligence is low, although the existing intelligent modified atmosphere packaging system can realize a certain degree of gas composition adjustment, but its adjustment mode is relatively single; finally, it cannot monitor the food quality in real time, the existing technology can only make simple gas supplement or discharge according to the preset program, and cannot make real-time dynamic adjustment according to the physiological changes of food in different storage stages and the changes of environmental conditions.
[0004] In view of the above problems, the present application provides a solution. SUMMARY
[0005] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present application provide a food packaging gas composition dynamic adjustment and preservation integrated system to solve the problems raised in the above background art.
[0006] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme: The food packaging gas composition dynamic adjustment and preservation integrated system comprises the following modules: a data acquisition module, a data detection module, an early warning module, a gas composition adjustment module, and the modules are connected: The data acquisition module is used for acquiring gas composition data and freshness data of food in the package, the gas composition data including oxygen data and preservation data, and the freshness data including image data and PH value data; The data detection module is used for analyzing the gas composition data by PCA+machine learning algorithm to obtain gas composition factors, and analyzing the freshness data by deep convolutional neural network and attention mechanism algorithm to obtain food preservation factors; The early warning module is used for judging whether the food is fresh according to the food preservation factor, if the food is fresh, waiting for the next round of detection, if the food is not fresh, judging whether the food is deteriorated according to the gas composition factor and the food preservation factor, if the food is not deteriorated, entering the gas composition adjusting module, if the food is deteriorated, issuing a warning to the food and carrying out a destruction treatment; The gas composition adjusting module is used for comprehensively analyzing the gas composition data and the food preservation factor by a machine learning algorithm to obtain an adjusting factor, dynamically adjusting the gas composition in the food packaging according to the adjusting factor, and realizing food preservation.
[0007] In a preferred embodiment, the specific acquisition process of oxygen data is as follows: Based on the principle of electrochemistry, the oxygen sensor converts the concentration of oxygen into an electrical signal; A standard oxygen gas with a known concentration is used to calibrate the sensor, a corresponding relationship between the current and the oxygen concentration is established, the current generated by the sensor is measured, and a calibration curve is drawn; A certain volume of gas sample is extracted from the food packaging to ensure that no external air is introduced during the sampling process; The collected gas sample is injected into the measuring pool containing the oxygen sensor, the electrodes in the sensor and the oxygen in the gas sample undergo oxidation-reduction reaction, generating a current proportional to the oxygen concentration; The current generated by the electrode is measured using an electrochemical workstation; According to the calibration curve, the measured current value is converted into the oxygen concentration value to obtain the oxygen data, and the specific calculation formula is as follows: ; In the formula, is the oxygen data, I is the measured current value, k is the slope of the oxygen calibration curve, and b is the intercept of the oxygen calibration curve.
[0008] In a preferred embodiment, the preservation data includes carbon dioxide data and nitrogen data; The specific acquisition steps of the carbon dioxide data are as follows: A standard carbon dioxide gas is used to calibrate the sensor, and the sensor is placed in the standard gas environment in sequence, and the response value of the sensor is measured; According to the measurement results, a calibration curve is drawn, that is, a corresponding relationship between the carbon dioxide concentration and the sensor response value is established; A gas-tight sampling device is used to extract a gas sample from the food packaging; The collected gas sample is injected into the measuring chamber of the gas analyzer, the carbon dioxide sensor fully contacts with the sample and reacts, and the sensor generates a corresponding chemical signal according to the concentration of carbon dioxide; The signal processing circuit inside the instrument amplifies and filters the signal generated by the sensor, converts it into a digital signal, and calculates the concentration value of carbon dioxide according to the calibration curve to obtain carbon dioxide data. The specific calculation formula is as follows: ; In the formula, is the carbon dioxide data, is the sensor response value, is the slope of the carbon dioxide calibration curve, is the intercept of the carbon dioxide calibration curve.
[0009] In a preferred embodiment, the specific calculation formula of the gas composition factor is as follows: ; In the formula, Q is the gas composition factor, is the weight of the i-th principal component, is the value of the i-th principal component after dimensionality reduction, k is the number of selected principal components, is the principal component standard value.
[0010] In a preferred embodiment, the food preservation factor acquisition process is as follows: The freshness data is normalized and a convolutional neural network composed of convolutional layers, pooling layers and fully connected layers is constructed; An attention mechanism module is added to the convolutional neural network to perform global average pooling on the feature maps output by the convolutional layer, compressing each channel's feature map into a scalar to obtain the global information of the channel; The importance weight of each channel is learned through two fully connected layers, and the learned channel weight is multiplied by the original feature map to enhance the features of important channels and suppress the features of unimportant channels; The preprocessed freshness data is divided into training set, validation set and test set; Define the loss function and optimizer, input the training set data into the model, get the prediction result through forward propagation, calculate the loss function value, and update the model parameters through back propagation; During the training process, the performance of the model is evaluated periodically using the validation set to prevent overfitting; The performance of the model is evaluated using the test set data, and the model performance is continuously optimized. The freshness data is input into the trained model, and the output result of the model is the food preservation factor.
[0011] In a preferred embodiment, the process of judging whether the food is fresh according to the food preservation factor is as follows: Set the food preservation threshold. If the food preservation quality factor is less than the food preservation threshold, the food is considered fresh and the next round of detection is continued. If the food preservation factor is greater than or equal to the food preservation threshold value, it is considered that the food is not fresh, and then whether the food is deteriorated is determined according to the gas factor and the food preservation factor by fuzzy reasoning.
[0012] In a preferred embodiment, the process of determining whether the food is deteriorated according to the gas composition factor and the food preservation factor by fuzzy reasoning is as follows: The gas composition factor and the food preservation factor are defined as input variables, which are divided into different fuzzy sets respectively; Whether the food is deteriorated is defined as an output variable, which is divided into a fuzzy set; Fuzzy rules are formulated to describe the influence of the gas composition factor and the food preservation factor on whether the food is deteriorated, According to the fuzzy rules, fuzzy reasoning is performed to determine the secondary environmental abnormal value detection scheme.
[0013] In a preferred embodiment, the process of obtaining the adjustment factor by comprehensive analysis of the gas composition data and the food preservation factor by machine learning algorithm is as follows: The gas composition data and the food preservation factor are standardized, and according to the multiple linear regression algorithm, the linear relationship between the gas composition factor, the food preservation factor and the adjustment factor is found to predict the adjustment factor.
[0014] In a preferred embodiment, the model of the multiple linear regression algorithm is: ; In the formula, H is the adjustment factor, is the nitrogen data, is the oxygen data, is the carbon dioxide data, is the intercept, , , , is the weight of each data corresponding to the food preservation factor S.
[0015] In a preferred embodiment, the process of dynamically adjusting the gas composition in the food packaging according to the adjustment factor is as follows: If the weight of the adjustment factor for the gas composition data is positive and the adjustment factor is positive, it means that the corresponding gas concentration needs to be appropriately increased to improve the food preservation effect; If the weight of the adjustment factor for the gas composition data is positive but the adjustment factor is negative, the corresponding gas concentration needs to be reduced; If the weight of the adjustment factor for the gas composition data is negative and the adjustment factor is positive, it indicates that the current preservation condition needs to be adjusted in the direction of reducing the adjustment factor, and the corresponding gas concentration needs to be reduced; If the weight of the adjustment factor for the gas composition data is negative and the adjustment factor is negative, in order to change the adjustment factor in the direction of increasing, the corresponding gas concentration needs to be increased.
[0016] The technical effects and advantages of the food packaging gas composition dynamic adjustment and preservation integrated system of the present application are as follows: 1. The freshness data is analyzed by the deep convolutional neural network and attention mechanism algorithm to obtain the food preservation factor, and then the machine learning algorithm is used to combine the gas composition factor and the food preservation factor to obtain the adjustment factor, which can accurately determine the gas composition and the adjustment amount that need to be adjusted according to the actual freshness condition of the food and the influence of the gas composition on preservation, realize accurate preservation, and prolong the shelf life of the food.
[0017] The gas composition adjustment module can dynamically adjust the gas composition in the food packaging according to the adjustment factor. Traditional food packaging gas adjustment is often static and cannot be adjusted in real time according to the changes of the food during storage. However, the system can monitor and analyze data in real time, dynamically change the gas composition, and better adapt to the preservation needs of the food in different storage stages.
[0018] 2. The present application comprehensively considers the influence of various factors on food preservation, and analyzes freshness data, gas composition factors, etc. to avoid the problem of poor preservation effect caused by incomplete consideration of a single factor. By scientifically and reasonably adjusting the gas composition, the deterioration process of the food can be effectively inhibited, the color, aroma, taste and nutritional ingredients of the food can be maintained, and the preservation quality of the food can be improved. Accurate preservation and dynamic gas composition adjustment can help to prolong the edible period of the food, reduce the probability of discarding the food due to deterioration, thereby reducing food waste to a certain extent, and having good economic and social benefits. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 The food packaging gas composition dynamic adjustment and preservation integrated system of the present application is shown in the structural schematic diagram. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0021] Embodiment 1, Figure 1 The food packaging gas composition dynamic adjustment and preservation integrated system of the present application is shown in the structural schematic diagram.
[0022] The data acquisition module is used for acquiring gas component data and freshness data of the food in the food package, the gas component data including oxygen data and preservation data, and the freshness data including image data and PH value data. The gas component data includes oxygen data and preservation data. The oxygen data (obtained by measuring the current generated by the redox reaction of oxygen on the electrode to determine the concentration of oxygen) indicates the percentage of oxygen content in the gas in the food package (oxygen is the main participant in the oxidation reaction of food and is also a necessary condition for the growth of aerobic microorganisms, and too high oxygen data will accelerate the oxidation and deterioration of food); The specific acquisition process of the oxygen data is as follows: Select a suitable oxygen sensor to ensure that the range and accuracy of the sensor are suitable for the measurement range of the oxygen content in the food package; Based on the principle of electrochemistry, the oxygen sensor converts the concentration of oxygen into an electrical signal; Calibrate the sensor using standard oxygen gas with known concentration to establish the corresponding relationship between current and oxygen concentration, measure the current generated by the sensor, and draw a calibration curve; Use a gas-tight syringe to extract a certain volume of gas sample from the food package, ensure that no external air is introduced during the sampling process to avoid affecting the measurement results; Inject the collected gas sample into the measurement cell containing the oxygen sensor, and the electrode in the sensor undergoes an oxidation-reduction reaction with the oxygen in the gas sample to generate a current proportional to the oxygen concentration; Usually use an electrochemical workstation to measure the current generated by the electrode; According to the calibration curve, convert the measured current value into the oxygen concentration value to obtain the oxygen data, and the specific calculation formula is as follows: ; In the formula, is the oxygen data, I is the measured current value, k is the slope of the oxygen calibration curve, and b is the intercept of the oxygen calibration curve.
[0023] The preservation data includes carbon dioxide data (obtained by extracting and detecting the gas in the package through the carbon dioxide sensor configured by the gas analyzer) and nitrogen data (obtained by indirectly calculating the nitrogen data through the oxygen data and the carbon dioxide data); The carbon dioxide data indicates the percentage of carbon dioxide content in the gas in the food package (carbon dioxide has the effect of inhibiting the growth and reproduction of most aerobic spoilage bacteria and molds, and is a commonly used preservation gas), and the nitrogen data indicates the percentage of nitrogen content in the gas in the food package (nitrogen is an inert gas that does not react with food and is not absorbed by food, used to fill the package to reduce the oxygen content in the package and prevent food oxidation and deterioration). The specific steps for obtaining carbon dioxide data are as follows: Select a gas analyzer with appropriate accuracy and range and a matching carbon dioxide sensor to ensure that the instrument can accurately measure the carbon dioxide content in the food packaging; Check whether each part of the instrument is working normally and whether the sensor is sensitive. If necessary, perform preheating and initialization operations to stabilize the performance of the instrument; Calibrate the sensor using standard carbon dioxide gas. Typically, a series of carbon dioxide standard gases with different concentrations will be prepared, and the sensor will be placed in these standard gas environments in turn to measure the response value of the sensor; Draw a calibration curve based on the measurement results, i.e., establish the corresponding relationship between carbon dioxide concentration and sensor response value; Use the calibrated airtight sampling device to extract gas samples from the food packaging. To ensure the representativeness of the samples, multiple sampling should be performed at different positions and different times of the packaging, especially for large packages or unevenly distributed food; Avoid the mixing of external air during sampling. First, perform emptying and cleaning operations on the sampling device to ensure that the real gas in the packaging is collected; Inject the collected gas sample into the measurement chamber of the gas analyzer. The carbon dioxide sensor fully contacts and reacts with the sample, and the sensor generates a corresponding chemical signal, such as a change in infrared absorption intensity or a change in electrode potential, according to the concentration of carbon dioxide.
[0024] The signal processing circuit inside the instrument amplifies and filters the signal generated by the sensor, converts it into a digital signal, and calculates the concentration value of carbon dioxide according to the calibration curve to obtain carbon dioxide data. The specific calculation formula is as follows: ; In the formula, is the carbon dioxide data, is the sensor response value, is the slope of the carbon dioxide calibration curve, is the intercept of the carbon dioxide calibration curve.
[0025] The nitrogen data acquisition process is as follows: Under the assumption that the gas in the food packaging is composed only of oxygen, carbon dioxide, and nitrogen (ignoring other trace gases), the nitrogen concentration is calculated based on the principle that the sum of the gas concentrations is 100%, and the nitrogen data is obtained. The specific calculation formula is as follows: ; In the formula, is the nitrogen data, is the oxygen data, is the carbon dioxide data.
[0026] Freshness data includes PH value data and image data; PH value data (determined by measuring the absorbance of the food solution at a specific wavelength) represents the negative logarithm of the concentration of hydrogen ions in the food solution (when the pH value is below a certain value, the growth of most pathogenic bacteria will be significantly inhibited. For example, in an acidic environment, the growth rate of bacteria, yeast and mold will slow down, thereby extending the shelf life of the food; for meat and dairy products, the alkaline substances produced by microbial metabolism will cause the pH value to rise, thereby discovering the deterioration of the food in time.) The process of obtaining PH value data is as follows: Grind an appropriate amount of food sample, then add a certain amount of deionized water, stir evenly, and prepare a food solution; Calibrate the pH meter with standard buffer solution to ensure the accuracy of the instrument measurement; usually two or more standard buffer solutions with different pH values are selected, such as pH 4.00, pH 7.00 and pH 9.00 buffer solutions. Immerse the electrode of the pH meter into the standard buffer solution, adjust the reading of the instrument to make it consistent with the pH value of the standard buffer solution; Use a spectrophotometer to select a specific wavelength to measure the absorbance of the food solution at that wavelength; different foods may require different wavelengths, which usually need to be determined through experiments; in general, for food solutions containing pigments or other light-absorbing substances, the maximum absorption wavelength is selected as the measurement wavelength; Prepare a series of food solution standard samples with known pH values, measure their absorbance at the specified wavelength according to the above steps, then plot the standard curve with absorbance as the vertical coordinate and pH value as the horizontal coordinate; the curve can be fitted by linear regression or other appropriate mathematical methods to obtain the relationship equation between absorbance and pH value; Measure the absorbance of the unknown sample solution, then substitute it into the equation of the standard curve to calculate the pH value of the food solution, and calculate the absolute error difference with the standard pH value to obtain the PH value data.
[0027] Image data includes defect data and deformation data; Defect data (obtained by calculating the area of food defects and the area of food in image data) is expressed as the ratio of the area of food defects to the area of food (defects on the surface of food, such as spots, cracks, and rotten areas, are important indicators for evaluating the quality of food. The presence of defects may indicate that the food has been contaminated by microorganisms or physically damaged); The process of obtaining defect data is as follows: The food is photographed or imaged using a high-resolution camera or image capture device, ensuring that the image is clear and evenly lit, accurately reflecting the surface condition of the food. In order to improve the quality and consistency of the image, image capture can be performed under fixed environmental conditions, such as using standard light sources and backgrounds. The collected image is pre-processed, including grayscale, noise reduction, and contrast enhancement operations. Grayscale conversion of color images to grayscale images is performed for subsequent processing and analysis. Noise reduction can remove noise interference in the image and improve image clarity. Contrast enhancement can highlight details in the image, making food defects more obvious. An image segmentation algorithm is used to separate the defect area from the normal area in the food image. Common image segmentation methods include threshold segmentation, region growing, and edge detection. For example, threshold segmentation is based on the gray value or color features of the image, and a threshold is set to divide the pixel points above or below the threshold into different regions, thereby achieving defect area segmentation. The food defect area and the total food area are calculated respectively. For the segmented defect area and food area, the number of pixel points can be counted to calculate the area. Since each pixel point in the image corresponds to a certain area of the actual food surface, the number of pixel points can be converted into actual area units according to the resolution and scale of the image. The food defect area is divided by the total food area to obtain the defect data, which is expressed as the ratio of the food defect area to the food area.
[0028] The deformation data (calculated by calculating the food area in the image data at different times) represents the change in the food area in the initial food area (combined with image processing technology, accurate measurement of food deformation is achieved, and by monitoring deformation data, the freshness change of food can be detected in time).
[0029] The deformation data acquisition process is as follows: At different times, the same image capture device and conditions are used to capture images of the food, ensuring that each captured image has the same perspective, lighting, and resolution, so that the area change of the food can be accurately compared. Similar to the image preprocessing step in the defect data acquisition process, the images collected at different times are processed by grayscale, noise reduction, and contrast enhancement to improve the quality and analyzability of the images. The position of the food in the image is accurately detected and located to facilitate subsequent area calculation of only the food region. Target detection algorithms such as deep learning-based target detection models or traditional feature-based target detection methods can be used to identify food objects in the image and determine their bounding boxes or contours. For each period of image, according to the contour or the boundary box of the food, the area of the food is calculated, and the number of pixel points in the food area in the image can also be counted, and combined with the resolution and scale of the image, the actual area value can be converted; Subtract the initial period food area from the current period food area to obtain the area change, and then divide the area change by the initial food area to obtain the deformation data, which represents the proportion of the change in the food area in the initial food area.
[0030] The data detection module is used to analyze the gas component data by a PCA+machine learning algorithm to obtain a gas component factor; Collect various gas component data, and each gas component data includes three characteristic values To ensure the comparability between different characteristics, the gas component data needs to be standardized to eliminate the dimensional difference; Calculate the covariance matrix of the standardized sample data, and perform eigenvalue decomposition on the covariance matrix to obtain its eigenvalues and corresponding eigenvectors. The eigenvalues measure the variance of the principal component, that is, the amount of information contained in the principal component; the eigenvectors represent the direction of the principal component; To simplify the data dimension, select the eigenvectors corresponding to the k=2 largest eigenvalues as the principal components; Project the standardized gas component data into the selected principal component space to obtain the dimension-reduced gas component data. The projection process can be realized by matrix multiplication, that is, the dimension-reduced gas component data is equal to the product of the gas component data matrix and the selected eigenvector matrix; Select support vector machine (SVM) as the classifier. SVM is a powerful machine learning algorithm that has good generalization ability when dealing with classification problems; Use the dimension-reduced gas component data to train the support vector machine model. During the training process, the model will automatically find the optimal classification hyperplane to accurately classify different categories of gas component data; Use the trained support vector machine model to classify and predict the gas component data. The prediction result can be used as an important basis for dynamically adjusting the gas component to optimize the food preservation environment; Determine the weight of each principal component by analyzing the weight of the machine learning model. Then combine the weight of the principal component with the dimension-reduced data to calculate the gas component factor by weighted summation. The specific calculation formula is: ; In the formula, Q is the gas component factor, is the weight of the i-th principal component, is the value of the i-th principal component after dimension reduction, k is the number of selected principal components, is the principal component standard value.
[0031] The freshness data is analyzed by a deep convolutional neural network and an attention mechanism algorithm to obtain a food preservation factor; First, the freshness data is normalized, and a convolutional neural network composed of a convolutional layer, a pooling layer, and a fully connected layer is constructed; The convolutional neural network includes: Convolutional layer: different size convolutional kernels are used to extract local features of the image, and an activation function (such as ReLU) is connected after each convolutional layer to increase the nonlinear expression ability of the model; Pooling layer: maximum pooling or average pooling is used to reduce the dimensionality of the feature map and reduce the amount of calculation; Fully connected layer: the convolution and pooling features are flattened and connected to the fully connected layer for feature fusion and classification or regression; An attention mechanism module is added at an appropriate position in the convolutional neural network to perform global average pooling on the feature map output by the convolutional layer, compressing the feature map of each channel into a scalar to obtain global information of the channel; The learned channel weight is multiplied by the original feature map to enhance the features of important channels and suppress the features of unimportant channels; The preprocessed freshness data is divided into a certain proportion (such as 70% training set, 15% validation set, and 15% test set); Define the loss function and optimizer, input the training set data into the model, get the prediction result through forward propagation, calculate the loss function value, and update the model parameters through back propagation. During the training process, the performance of the model is evaluated regularly using the validation set to prevent overfitting; The performance of the model is evaluated using the test set data, and the model performance is continuously optimized. The freshness data is input into the trained model, and the output of the model is the predicted food preservation factor.
[0032] The warning module is used to determine whether the food is fresh based on the food preservation factor. If the food is fresh, it waits for the next round of detection. If the food is not fresh, it determines whether the food has deteriorated based on the gas composition factor and the food preservation factor. If the food has not deteriorated, it enters the gas composition adjustment module. If the food has deteriorated, it alarms and destroys the food; Set the food preservation threshold. If the food preservation factor is less than the food preservation threshold, the food is considered fresh and the next round of detection is continued; If the food preservation factor is greater than or equal to the food preservation threshold, the food is considered not fresh, and the food is determined to be deteriorated based on the gas factor and the food preservation factor through fuzzy reasoning; The determination of whether the food is spoiled according to the gas composition factor and the food preservation factor by fuzzy inference is as follows: Step C1, the gas composition factor and the food preservation factor are defined as input variables, which are divided into different fuzzy sets respectively; For example, "Low", "Medium", "High" for the gas composition factor, "Low", "Medium", "High" for the food preservation factor; Step C2, whether the food is spoiled is defined as an output variable, which is divided into a fuzzy set, for example, "Yes", "No" for whether the food is spoiled; Step C3, a set of fuzzy rules is established to describe the influence of different input variables on the output variable, and the definition of the rule can be based on professional knowledge or obtained through data analysis and experiments; for example: Mark the gas composition factor as B, the food preservation factor as S, and whether the food is spoiled as P, which can be defined as: Rule 1: IF (Q is Low) AND (S is Low) THEN (P is No ) Rule 2: IF (Q is High) AND (S is High) THEN (P is Yes ) ... Step C4, fuzzy inference is performed according to the fuzzy rules to determine the secondary environmental abnormal value detection scheme.
[0033] It should be noted that the division of fuzzy sets can be adjusted according to actual conditions, for example, although three fuzzy sets are taken as examples in this embodiment, the gas composition factor, the food preservation factor, and whether the food is spoiled can be divided into more than three sets to facilitate better accurate identification.
[0034] Further, for the judgment of high, medium and low of the gas composition factor and the food preservation factor, threshold values can be set for judgment according to actual conditions; when the gas composition factor is higher than 80%, it is marked as "High", when the food preservation factor is higher than 0.7, it is marked as "High", and the like, which will not be repeated here.
[0035] If P is No, it means that the food is not spoiled, and the gas composition adjustment module is performed; If P is Yes, it means that the food is spoiled, and an alarm is given and the destruction process is performed.
[0036] The gas composition adjusting module is used for comprehensively analyzing the gas composition data and the food preservation factor by a machine learning algorithm to obtain an adjusting factor, dynamically adjusting the gas composition in the food package according to the adjusting factor, and realizing food preservation.
[0037] The process of obtaining the adjusting factor by comprehensively analyzing the gas composition data and the food preservation factor by the machine learning algorithm is as follows: The gas composition data and the food preservation factor are standardized, and a linear relationship between the gas composition factor, the food preservation factor and the adjusting factor is found according to a multiple linear regression algorithm to predict the adjusting factor; the multiple linear regression algorithm model is as follows: ; In the formula, H is the adjusting factor, is the nitrogen data, is the oxygen data, is the carbon dioxide data, is an intercept, , , , is a weight corresponding to each data, and S is the food preservation factor; The process of determining how to adjust the gas composition according to the positive and negative and size of the adjusting factor is as follows: If the weight of the adjusting factor for the gas composition data is positive and the adjusting factor is positive, it is indicated that the corresponding gas concentration needs to be appropriately increased to improve the food preservation effect; On the contrary, if the weight of the adjusting factor for the gas composition data is positive but the adjusting factor is negative, the corresponding gas concentration needs to be reduced; If the weight of the adjusting factor for the gas composition data is negative and the adjusting factor is positive, it is indicated that the gas concentration and the adjusting factor have a negative correlation relationship, that is, when the oxygen concentration increases, the adjusting factor tends to decrease; and now the adjusting factor is positive, which means that the current preservation condition needs to be adjusted in the direction of reducing the adjusting factor, that is, the corresponding gas concentration needs to be reduced; If the weight of the adjusting factor for the gas composition data is negative and the adjusting factor is negative, in order to improve the preservation effect, the adjusting factor needs to be changed in the direction of increasing, so the corresponding gas concentration needs to be increased at this time.
[0038] The above formulas are all dimensionless values, and the formulas are obtained by software simulation of a large amount of data to obtain a formula closest to the actual situation; and the preset parameters in the formula are set by a person skilled in the art according to the actual situation.
[0039] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product.
[0040] Those skilled in the art can realize that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized 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 realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0041] In addition, each functional module in each embodiment of the present application can be integrated in one processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[0042] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0043] Finally, the above is merely preferred embodiments of the present application, and is not intended to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. An integrated system for dynamic regulation and preservation of gas composition in food packaging, characterized in that, It includes the following modules: data acquisition module, data detection module, early warning module, and gas composition adjustment module. These modules are interconnected. The data acquisition module is used to acquire gas composition data and food freshness data inside food packaging. The gas composition data includes oxygen data and preservation data, and the freshness data includes image data and pH value data. The data detection module is used to analyze gas composition data using PCA+machine learning algorithm to obtain gas composition factors, and to analyze freshness data using deep convolutional neural network and attention mechanism algorithm to obtain food preservation factors. The early warning module is used to determine whether food is fresh based on food preservation factors. If the food is fresh, it waits for the next round of testing. If the food is not fresh, it determines whether the food has spoiled based on gas composition factors and food preservation factors. If the food has not spoiled, it enters the gas composition adjustment module. If the food has spoiled, an early warning is issued and the food is destroyed. The gas composition adjustment module is used to comprehensively analyze the gas composition data and food preservation factors through machine learning algorithms to obtain adjustment factors, and dynamically adjust the gas composition inside the food packaging according to the adjustment factors to achieve food preservation.
2. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 1, characterized in that, The specific process for acquiring oxygen data is as follows: Based on electrochemical principles, the oxygen sensor converts the oxygen concentration into an electrical signal; The sensor was calibrated using standard oxygen gas of known concentration to establish the correspondence between current and oxygen concentration, the current generated by the sensor was measured, and a calibration curve was plotted. A certain volume of gas sample is extracted from the food packaging, ensuring that no outside air is introduced during the sampling process; The collected gas sample is injected into a measuring cell containing an oxygen sensor. The electrodes in the sensor react with the oxygen in the gas sample to produce an oxidation-reduction reaction, generating a current proportional to the oxygen concentration. The current generated by the electrodes was measured using an electrochemical workstation; Based on the calibration curve, the measured current value is converted into an oxygen concentration value to obtain oxygen data. The specific calculation formula is as follows: ; In the formula, Here are the oxygen data, I is the measured current value, k is the slope of the oxygen calibration curve, and b is the intercept of the oxygen calibration curve.
3. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 2, characterized in that, The preservation data includes carbon dioxide data and nitrogen data; The specific steps for obtaining carbon dioxide data are as follows: The sensor was calibrated using standard carbon dioxide gas. The sensor was placed in the standard gas environment in sequence, and the sensor response value was measured. A calibration curve is plotted based on the measurement results, that is, the correspondence between carbon dioxide concentration and sensor response value is established; Gas samples were extracted from inside food packaging using a calibrated airtight sampling device. The collected gas sample is injected into the measuring chamber of the gas analyzer. The carbon dioxide sensor comes into full contact with the sample and reacts. The sensor generates a corresponding chemical signal based on the concentration of carbon dioxide. The instrument's internal signal processing circuit amplifies and filters the signal generated by the sensor, converting it into a digital signal. Based on the calibration curve, it calculates the carbon dioxide concentration, obtaining the carbon dioxide data. The specific calculation formula is as follows: ; In the formula, It's carbon dioxide data. It is the sensor response value. It is the slope of the carbon dioxide calibration curve. It is the intercept of the carbon dioxide calibration curve.
4. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 3, characterized in that, The specific formula for calculating the gas composition factor is as follows: ; In the formula, Q is the gas composition factor. It is the weight of the i-th principal component. is the value of the i-th principal component after dimensionality reduction, and k is the number of principal components selected. It is the standard value of the principal component.
5. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 4, characterized in that, The process of obtaining food preservation factors is as follows: The freshness data is normalized, and a convolutional neural network consisting of convolutional layers, pooling layers, and fully connected layers is constructed. Add an attention mechanism module to the convolutional neural network to perform global average pooling on the feature maps output by the convolutional layer, compressing the feature map of each channel into a scalar to obtain the global information of the channel; The importance weights of each channel are learned through two fully connected layers. The learned channel weights are multiplied with the original feature map to enhance the features of important channels and suppress the features of unimportant channels. The preprocessed freshness data is divided into training set, validation set, and test set; Define the loss function and optimizer, input the training set data into the model, obtain the prediction results through forward propagation, calculate the loss function value, and then update the model parameters through back propagation; During training, the model's performance is evaluated periodically using a validation set to prevent overfitting. The model's performance is evaluated using test set data, and its performance is continuously optimized. Freshness data is input into the trained model, and the model's output is the food preservation factor.
6. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 5, characterized in that, The process of determining the freshness of food based on food preservatives is as follows: A food preservation threshold is set. If the food preservation quality factor is less than the food preservation threshold, the food is considered fresh and will continue to wait for the next round of testing. If the food preservation factor is greater than or equal to the food preservation threshold, the food is considered not fresh. Fuzzy reasoning is then used to determine whether the food has spoiled based on the gas factor and the food preservation factor.
7. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 6, characterized in that, The process of determining whether food has spoiled using fuzzy reasoning based on gas composition factors and food preservation factors is as follows: Gas composition factor and food preservation factor are defined as input variables, and they are divided into different fuzzy sets respectively; Define whether the food has spoiled as an output variable and classify it into a fuzzy set; Establish fuzzy rules to describe the effects of gaseous components and food preservation factors on whether food spoils. Fuzzy reasoning is performed based on fuzzy rules to determine a secondary environmental outlier detection scheme.
8. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 7, characterized in that, The process of obtaining the adjustment factor by comprehensively analyzing the gas composition data and food preservation factors using machine learning algorithms is as follows: The gas composition data and food preservation factors are standardized. Based on the multiple linear regression algorithm, the linear relationship between the gas composition factors, food preservation factors and adjustment factors is found to predict the adjustment factors.
9. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 8, characterized in that, The model for the multiple linear regression algorithm is as follows: ; In the formula, H is the adjustment factor. These are nitrogen data. These are oxygen data. It's carbon dioxide data. It is the intercept. , , , These are the weights corresponding to each data point, and S is the food preservation factor.
10. The integrated system for dynamic adjustment and preservation of gas composition in food packaging according to claim 9, characterized in that, The gas composition inside food packaging is dynamically adjusted based on adjustment factors, as follows: If the adjustment factor has a positive weight for the gas composition data and the adjustment factor is a positive value, it means that the corresponding gas concentration needs to be increased appropriately to improve the food preservation effect. If the adjustment factor has a positive weight for the gas composition data but the adjustment factor itself is negative, then the corresponding gas concentration needs to be reduced. If the adjustment factor has a negative weight for the gas composition data and the adjustment factor is positive, it indicates that the current preservation status needs to be adjusted in the direction of reducing the adjustment factor, and the corresponding gas concentration needs to be reduced. If the adjustment factor has a negative weight for the gas composition data and the adjustment factor itself is negative, then the corresponding gas concentration needs to be increased in order to make the adjustment factor change in the direction of increasing.