Food freshness evaluation method and system based on image processing

Through image processing-based methods, combined with deep convolutional neural network and variational autoencoder technology, food freshness evaluation is carried out, and the gradient enhancement tree algorithm is used for prediction modeling, which solves the problem of poor freshness evaluation effect in the existing technology, and achieves high-precision and efficient food freshness management.

CN119940701AActive Publication Date: 2025-05-06CSSC HAISHEN MEDICAL TECH CO LTD

Patent Information

Application Number
CN202411872707.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-05-06
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The existing food freshness assessment methods lack effective environmental factor correction mechanisms, which leads to changes in external conditions that affect the accuracy of the analysis results, and are inefficient when processing large-scale data sets, making it difficult to achieve high-precision freshness predictions, and lack dynamic adjustment capabilities.

Method used

Using an image-based processing method, by acquiring multi-view images of food, using a deep convolutional neural network model combined with a variational autoencoder technology, high-precision dynamic monitoring of the color and texture changes of food, and an environmental factor correction model is introduced to eliminate external environmental impact. Combining the gradient enhancement tree technology in the integrated learning algorithm, freshness prediction modeling is used using historical sales data, and the accuracy and generalization capabilities of the model are ensured through cross-validation and hyperparameter optimization.

Benefits of technology

It significantly improves the accuracy and reliability of food freshness evaluation, enhances the generalization ability and prediction accuracy of the model, can adjust inventory and distribution strategies in real time, reduce food waste, improve operational efficiency and customer satisfaction, and dynamically adjust the evaluation standards through market feedback to adapt to market demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940701A_ABST
    Figure CN119940701A_ABST
Patent Text Reader

Abstract

The invention provides a food freshness evaluation method and system based on image processing. The method comprises the following steps: acquiring a multi-view image of food, transmitting the image to a central processing center, setting personalized image acquisition parameters, and forming a food image database; based on the food image database, performing high-precision dynamic monitoring on color and texture changes of the food in different time periods, and generating a preliminary evaluation result; according to the preliminary evaluation result, combining food types, storage conditions and historical sales data, performing prediction modeling on the freshness of the food to obtain a final freshness evaluation report; and utilizing the freshness evaluation report to adjust an inventory strategy in real time, optimizing a food distribution plan, and generating an optimized management process. According to the technical scheme provided by the invention, the accuracy of food freshness evaluation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of food freshness assessment, and in particular, to a food freshness assessment method and system based on image processing. Background Art

[0002] In food retail and production, maintaining food freshness is critical to ensuring food safety, reducing waste and improving consumer satisfaction.

[0003] Currently, there are some methods on the market to assess food freshness based on visual inspection or simple image analysis technology. These methods usually rely on manual observation or use basic image processing algorithms, such as color space conversion and texture analysis, to identify changes on the surface of food. In addition, some solutions try to combine sensor data (such as temperature, humidity, etc.) with image information for comprehensive judgment.

[0004] Existing methods often lack effective correction mechanisms for environmental factors, resulting in changes in external conditions that may significantly affect the accuracy of image analysis results. In addition, these methods are inefficient when processing large-scale data sets and have difficulty in achieving high-precision freshness predictions. Finally, most existing systems do not have the ability to dynamically adjust and are unable to continuously optimize management processes based on market feedback and new discoveries in actual operations. Summary of the invention

[0005] The embodiments of the present application provide a method and system for evaluating food freshness based on image processing, so as to solve the problem of poor food freshness evaluation effect in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for evaluating food freshness based on image processing, comprising:

[0007] Acquire multi-view images of food, transmit the images to the central processing center through a secure and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database;

[0008] Based on the food image database, a pre-built deep convolutional neural network model is used in combination with variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, and an environmental factor correction model is introduced to eliminate the impact of external environmental changes on image analysis results, thereby generating preliminary evaluation results;

[0009] Based on the preliminary evaluation results, combined with the types, storage conditions and historical sales data of food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of food. The accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain the final freshness evaluation report;

[0010] By using the freshness assessment report, inventory strategies can be adjusted in real time, food distribution plans can be optimized, and freshness assessment standards can be dynamically adjusted based on market feedback to continuously optimize the food freshness management process and generate an optimized management process.

[0011] Optionally, based on the food image database, a pre-built deep convolutional neural network model is used in combination with variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, introduce an environmental factor correction model to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results, including:

[0012] Using the food image database, standardizing the image data to ensure that all images have the same resolution and color mode, and obtaining a standardized food image data set;

[0013] Based on the standardized food image dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction processing on the food images, and local and global features in the images are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information;

[0014] According to the multi-level feature information, the key area information in the image is compressed and decoded in combination with the variational autoencoder technology to generate a compact representation of the image and obtain an optimized feature representation;

[0015] An environmental factor correction model is introduced to correct the optimized feature representation based on environmental sensor data to obtain corrected feature information;

[0016] Based on the corrected feature information, dynamic monitoring rules are designed to perform high-precision dynamic monitoring of color and texture changes of food in different time periods to generate preliminary evaluation results.

[0017] Optionally, based on the standardized food image dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction processing on the food image, and local and global features in the image are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information, including:

[0018] In calculating the feature map F i Before processing, the original image is preprocessed by size normalization, color space conversion, noise reduction and edge enhancement to ensure the quality and applicability of the input data;

[0019] F i =σ(W conv *I+b conv +α·H i+λ·N i +η·P i +μ·D i +ρ·R i )

[0020] F i represents the feature map of the i-th layer, which represents the local features extracted from the image; W conv represents the convolution kernel weight matrix, which is used to perform convolution operations on the image to capture local features; I represents the standardized food image dataset to ensure that all images have the same resolution and color mode; b conv Represents the bias term of the convolution layer, which is used to adjust the result of the convolution operation; σ represents the activation function, which uses the ReLU function to introduce nonlinearity and enhance the expressiveness of the model; α represents the feature enhancement coefficient, which is used to adjust the historical feature map H i The degree of influence of H i represents the historical feature map of the i-th layer, indicating the cumulative effect of the feature map of the previous layer; λ represents the noise suppression coefficient, which is used to adjust the noise suppression term N i The degree of influence; N i represents the noise suppression item of the i-th layer, which is used to reduce the noise interference in the image; η represents the position weight coefficient, which is used to adjust the position information P i The degree of influence of P i represents the position information of the i-th layer, which is used to enhance the feature representation of the spatial position; μ represents the dynamic adjustment coefficient, which is used to adjust the dynamic feature item D i The degree of influence; D i represents the dynamic feature item of the i-th layer, which is used to capture the dynamic changes in the image; ρ represents the context correlation coefficient, which is used to adjust the context information R i The degree of influence of R i Represents the context information of the i-th layer, which is used to capture the contextual dependencies in the image;

[0021] After calculating F i Finally, a global feature vector G integrating multi-layer feature information is generated through weighted summation, introduction of additional information, pooling and full connection layer conversion.

[0022]

[0023] G represents the global feature vector, which represents the global features extracted from the multi-layer feature map; Pool represents the pooling operation, which uses maximum pooling or average pooling to reduce the dimension of the feature map and retain the most important information; Represents the multi-layer feature map F i Plus the environmental impact factor E i 、Attention MechanismA i , time information T iand visual context information V i The element-by-element summation after β is used to fuse the feature information at different levels; β represents the weight of the environmental influencing factor; E i represents the environmental influencing factor of the i-th layer, indicating the impact of environmental factors on the feature map; θ represents the attention weight coefficient, which is used to adjust the attention mechanism A i The degree of influence; i represents the attention mechanism of the i-th layer, which is used to highlight the key area and reduce background interference; κ represents the time weight coefficient, which is used to adjust the time information T i The degree of influence of T i represents the time information of the i-th layer, which is used to reflect the feature changes in different time periods; ω represents the visual context weight coefficient, which is used to adjust the visual context information V i The degree of influence; V i Represents the visual context information of the i-th layer, which is used to capture the visual context dependencies in the image; FC represents the fully connected layer operation, which is used to convert the pooled feature map into a fixed-length feature vector to capture global features; n represents the number of convolutional layers, which represents the depth of feature extraction; γ represents the correction coefficient, which is used to adjust the influence of the environmental factor correction model C; C represents the environmental factor correction model, which corrects the feature map based on the environmental sensor data to eliminate the influence of external environmental changes on the image analysis results; δ represents the spatial weight coefficient, which is used to adjust the influence of spatial information s; S represents spatial information, which is used to enhance the representation of spatial features; φ represents the multimodal fusion coefficient, which is used to adjust the influence of the multimodal feature fusion term M; M represents the multimodal feature fusion term, which is used to combine information from different modalities to improve the richness of features; ψ represents the quality assessment coefficient, which is used to adjust the influence of the quality assessment information Q; Q represents the quality assessment information, which is used to evaluate the quality of the feature map and ensure the reliability of the feature;

[0024] After obtaining G, the feature quality is further optimized and the model performance is improved through normalization, feature selection, feature enhancement and multimodal learning techniques.

[0025] Optionally, the compressing and decoding the key area information in the image in combination with the variational autoencoder technology based on the multi-level feature information to generate a compact representation of the image and obtain an optimized feature representation includes:

[0026] Using the multi-level feature information, a variational autoencoder model including an encoder and a decoder is constructed to compress and decode key area information in the image to generate a low-dimensional compact representation;

[0027] According to the low-dimensional compact representation, KL divergence is introduced as a regularization term to ensure that the compact representation generated by the encoder conforms to the predefined prior distribution, while optimizing the reconstruction capability of the decoder, thereby obtaining an optimized variational autoencoder model;

[0028] Based on the optimized variational autoencoder model, further optimizing the model parameters by minimizing the weighted sum of the reconstruction error and the KL divergence to generate an optimized compact representation;

[0029] By using the optimized compact representation, through further feature selection and fusion processing, redundant information is removed, the most representative features are retained, and an optimized feature representation is generated.

[0030] Optionally, the introducing of the environmental factor correction model to correct the optimized feature representation based on environmental sensor data to obtain corrected feature information includes:

[0031] Collect environmental sensor data synchronized with food image acquisition to form an environmental factor dataset;

[0032] Based on the environmental factor data set, an environmental factor correction model is constructed, wherein the model uses regression analysis or machine learning methods to establish a relationship between environmental parameters and image features;

[0033] The environmental factor correction model is trained using the environmental factor data set, and the model parameters are optimized by minimizing the error between the predicted value and the actual value to ensure that the model can accurately predict the impact of environmental factors on image features;

[0034] The optimized environmental factor correction model is used to correct the optimized feature representation, calculate the impact of environmental factors on image features, and adjust the optimized feature representation to eliminate the interference of environmental factors and generate corrected feature information.

[0035] Optionally, based on the preliminary evaluation results, combined with the type, storage conditions and historical sales data of the food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of the food, and the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain a final freshness evaluation report, including:

[0036] Based on the preliminary assessment results, the food types, storage conditions and historical sales data are combined to form a comprehensive data set, and the comprehensive data set is preprocessed to ensure that the data quality meets the modeling requirements;

[0037] Performing feature engineering processing on the comprehensive data set to extract features related to food freshness, using a feature selection algorithm to screen out the features most influential on freshness prediction, reduce feature dimensions, and improve model training efficiency and generalization ability;

[0038] Using the gradient boosting tree technology in the ensemble learning algorithm, a food freshness prediction model is constructed, the gradient boosting tree model is trained using the comprehensive data set, the performance of the model is evaluated by the K-fold cross-validation technology to ensure the stability and consistency of the model on different data subsets, the hyperparameters of the model are adjusted by the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and an optimized gradient boosting tree model is generated;

[0039] Based on the optimized gradient boosting tree model, the freshness of food is predicted and the final freshness assessment report is generated.

[0040] Optionally, the method uses the gradient boosting tree technology in the ensemble learning algorithm to construct a food freshness prediction model, uses the comprehensive data set to train the gradient boosting tree model, evaluates the performance of the model through the K-fold cross validation technology to ensure the stability and consistency of the model on different data subsets, adjusts the hyperparameters of the model through the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and generates an optimized gradient boosting tree model, including:

[0041] Calculating the cross validation score CV score Before the test, data cleaning, standardization / normalization, feature extraction and feature selection are performed on the comprehensive data set to ensure data quality and applicability;

[0042]

[0043] CV score Represents the cross-validation score, which is used to evaluate the performance of the model; K represents the number of folds of K-fold cross-validation; represents the loss function of the k-fold data, using mean square error or logarithmic loss; y k Represents the true label of the k-th fold data; represents the predicted value of the k-fold data; λ represents the regularization coefficient, which is used to control the model complexity; Complexity(M,γ) represents the model complexity, which is a function of the number of trees M and the leaf node weight γ; β represents the diversity coefficient, which is used to adjust the diversity term Diversity(T k ) k ) represents the diversity term of the k-fold data, which is used to measure the differences between different trees and improve the robustness of the model; δ represents the stability coefficient, which is used to adjust the stability term Stability (S k) k ) represents the stability term of the k-fold data, which is used to evaluate the stability and consistency of the model on different data subsets;

[0044] After calculating CV score Finally, the optimal hyperparameter combination is selected, the gradient boosting tree model is trained, and each sample in the test set is predicted to generate a freshness prediction value.

[0045]

[0046] represents the freshness prediction value of the i-th sample; F0(x i ) represents the initial prediction value, which is a constant; M represents the number of gradient boosting trees; γ m represents the leaf node weight of the mth tree; h m (x i ) represents the predicted value of the mth tree for the i-th sample; α represents the regularization coefficient, which is used to adjust the regularization term R i The degree of influence of R i represents the regularization term of the i-th sample, which is used to reduce the overfitting risk of the model; β represents the environmental impact coefficient, which is used to adjust the environmental impact term E i The degree of influence of E i represents the environmental impact term of the i-th sample, which is used to consider the impact of the external environment on the freshness prediction; η represents the time impact coefficient, which is used to adjust the time impact term T i The degree of influence of T i represents the time influence term of the i-th sample, which is used to consider the influence of time on freshness prediction; μ represents the spatial influence coefficient, which is used to adjust the spatial influence term S i The degree of influence of S i represents the spatial influence term of the i-th sample, which is used to consider the impact of geographical location on freshness prediction; v represents the attention coefficient, which is used to adjust the attention mechanism term A i The degree of influence; i Represents the attention mechanism item of the i-th sample, which is used to highlight key features and reduce background interference;

[0047] In getting Finally, through further hyperparameter tuning, ensemble learning techniques and performance evaluation, an optimized gradient boosting tree model is generated to ensure the accuracy and generalization ability of the model.

[0048] Optionally, the comprehensive data set is subjected to feature engineering processing to extract features related to food freshness, and a feature selection algorithm is used to screen out the features most influential on freshness prediction, reduce feature dimensions, and improve the training efficiency and generalization ability of the model, including:

[0049] Using the comprehensive data set, extracting features related to food freshness, including the color change rate, texture degradation degree, food type, storage conditions, and historical sales data in the preliminary evaluation results, to obtain a preliminary feature set;

[0050] Based on the preliminary feature set, new features are created by feature generation technology to generate an extended feature set;

[0051] Using a feature selection algorithm, the most influential features for freshness prediction are selected from the extended feature set to obtain a selected feature set;

[0052] Performing dimensionality reduction processing on the selected feature set by using dimensionality reduction technology of principal component analysis or linear discriminant analysis, retaining the most important information, and generating a dimensionality reduction feature set;

[0053] The dimension reduction feature set is evaluated, and the performance of the model on different feature sets is evaluated through cross-validation technology, and the best feature subset is selected to generate the final feature set.

[0054] Optionally, the freshness assessment report is used to adjust inventory strategies in real time, optimize food distribution plans, and dynamically adjust freshness assessment standards based on market feedback, continuously optimize food freshness management processes, and generate optimized management processes, including:

[0055] Using the freshness assessment report, extracting key information of the food's freshness score, predicted shelf life, and potential risk points to form a structured data set, thereby obtaining a structured data set;

[0056] Based on the structured data set, the inventory strategy is adjusted in real time through the intelligent supply chain management system to generate an optimized inventory strategy;

[0057] Combined with the predicted shelf life in the freshness assessment report, the food distribution plan is optimized, the overall circulation efficiency of the food is improved, and an optimized distribution plan is generated;

[0058] Collect market feedback through various channels, evaluate the actual effect and user satisfaction of the freshness evaluation report, and generate market feedback data;

[0059] According to the market feedback data, the freshness evaluation standard is dynamically adjusted to improve the accuracy of the evaluation and generate an updated freshness evaluation standard;

[0060] Continuously optimize the food freshness management process, ensure the efficient operation of the entire supply chain system through regular evaluation and improvement, and generate optimized management processes.

[0061] In a second aspect, an embodiment of the present application provides a food freshness assessment system based on image processing, comprising:

[0062] The transmission module is used to obtain multi-view images of food, transmit the images to the central processing center through a safe and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database;

[0063] A monitoring module is used to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods based on the food image database by using a pre-built deep convolutional neural network model combined with variational autoencoder technology, introduce an environmental factor correction model to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results;

[0064] A prediction module is used to predict the freshness of food based on the preliminary evaluation results, in combination with the type, storage conditions and historical sales data of the food, using the gradient boosting tree technology in the ensemble learning algorithm to model the freshness of the food, and to ensure the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization technology to obtain a final freshness evaluation report;

[0065] The optimization module is used to use the freshness evaluation report to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard according to market feedback, continuously optimize the food freshness management process, and generate an optimized management process.

[0066] In an embodiment of the present application, multi-view images of food are obtained, and the images are transmitted to a central processing center through a secure and efficient network protocol. Personalized image acquisition parameters are set according to different food types to form a food image database; based on the food image database, a pre-built deep convolutional neural network model is used in combination with variational autoencoder technology to perform high-precision dynamic monitoring of color and texture changes of food in different time periods, and an environmental factor correction model is introduced to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results; based on the preliminary evaluation results, combined with the type, storage conditions and historical sales data of the food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of the food. The accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain a final freshness evaluation report; using the freshness evaluation report, the inventory strategy is adjusted in real time, the food distribution plan is optimized, and the freshness evaluation standard is dynamically adjusted according to market feedback, the food freshness management process is continuously optimized, and the optimized management process is generated.

[0067] The technical solution of this application has the following beneficial effects:

[0068] By adopting the food freshness assessment method based on image processing proposed in the present invention, high-precision dynamic monitoring of the color and texture changes of food in different time periods can be achieved, and the impact of external environmental changes on the monitoring results can be effectively eliminated through the environmental factor correction model, thereby greatly improving the accuracy and reliability of freshness assessment. In addition, this method uses the gradient boosting tree technology in the ensemble learning algorithm combined with historical sales data for predictive modeling, further enhancing the generalization ability and prediction accuracy of the model. Ultimately, real-time adjustment of inventory and distribution strategies based on accurate freshness assessment reports not only helps to reduce food waste, but also significantly improves operational efficiency and customer satisfaction. At the same time, the practice of continuously optimizing management processes based on market feedback ensures that the entire system can adapt to changing market demands and provides a more flexible and efficient solution for food supply chain management.

[0069] Furthermore, the present invention proposes a method based on a food image database. After ensuring image consistency through standardization, a deep convolutional neural network model is used to perform multi-level feature extraction, and an optimized feature representation is generated in combination with variational autoencoder technology. Subsequently, an environmental factor correction model is introduced to correct the feature representation according to environmental sensor data, and finally a dynamic monitoring rule is designed to monitor the color and texture changes of food in different time periods with high precision to generate preliminary evaluation results. This method significantly improves the accuracy and reliability of food freshness assessment through standardization, multi-level feature extraction and environmental factor correction. In particular, the application of the environmental factor correction model effectively eliminates the influence of external environmental changes (such as light, temperature, etc.) on image analysis results, so that consistent and reliable evaluation results can be obtained even in complex and changeable environments, thereby providing more accurate data support for food supply chain management.

[0070] Furthermore, the method proposed in the present invention is based on the preliminary evaluation results, combined with food types, storage conditions and historical sales data, to form a comprehensive data set and perform preprocessing. By performing feature engineering on the comprehensive data set, features related to food freshness are extracted, and the most influential features are screened out using a feature selection algorithm. Next, a prediction model is constructed using the gradient boosting tree technology, and the accuracy and generalization ability of the model are ensured through K-fold cross validation and hyperparameter optimization, and finally an optimized gradient boosting tree model is generated for the prediction of food freshness and the generation of a final freshness assessment report. This method significantly improves the accuracy and generalization ability of the freshness prediction model by comprehensively considering multiple factors (such as food types, storage conditions and historical sales data) and performing feature engineering. In particular, through K-fold cross validation and hyperparameter optimization, the stability and consistency of the model on different data subsets are ensured, thereby providing a more reliable and accurate freshness prediction for food supply chain management, which helps to reduce food waste, improve operational efficiency, and improve the overall food safety level.

[0071] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 A flowchart of a food freshness assessment method based on image processing provided in an embodiment of the present application;

[0074] Figure 2 A schematic diagram of the structure of a food freshness assessment system based on image processing provided in an embodiment of the present application;

[0075] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0077] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0078] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0079] Figure 1 A flowchart of a method for evaluating food freshness based on image processing is provided for an embodiment of the present application. Figure 1 As shown, the method includes:

[0080] 101. Obtain multi-view images of food, transmit the images to the central processing center through a secure and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database;

[0081] Multi-view images refer to a series of images of the same object taken from different angles; secure and efficient network protocols refer to technical standards that ensure that data transmission is both safe and fast; personalized image acquisition parameters refer to image acquisition settings adjusted according to specific food types, such as resolution, exposure time, etc., to obtain images of optimal quality; food image database is a data collection that stores food images and related information (such as timestamps, locations) to support subsequent analysis.

[0082] In this step, image acquisition equipment (such as cameras) is first deployed at the retail or production site, and the corresponding image acquisition parameters are configured according to the food type. Then, the collected image data is transmitted to the central processing center through a secure and efficient network protocol. In the central processing center, these images are sorted and stored to form a structured food image database in preparation for subsequent image processing and freshness assessment.

[0083] Suppose a supermarket wants to monitor the freshness of its fruit section. It can install multiple high-definition cameras on the fruit shelves, each responsible for shooting at different angles. For apples, set a higher resolution and appropriate exposure time to capture surface details; for bananas, adjust the shooting angle and exposure time to better show color changes. All images are transmitted to the central server in real time via the HTTP protocol and stored in a dedicated database, marked with time and location information for subsequent analysis.

[0084] 102. Based on the food image database, a pre-built deep convolutional neural network model is used in combination with variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, and an environmental factor correction model is introduced to eliminate the impact of external environmental changes on image analysis results, thereby generating preliminary evaluation results;

[0085] A deep convolutional neural network is an artificial intelligence model that mimics the way the human brain processes visual information and is good at image recognition and feature extraction. A variational autoencoder is a generative model that compresses raw data by learning data distribution and can reconstruct similar new data. An environmental factor correction model uses data collected by environmental sensors (such as temperature and light intensity) to correct image features and reduce the impact of external conditions on image analysis results.

[0086] In this step, the images in the food image database are first standardized to ensure that all images have consistent resolution and color patterns. Next, a pre-trained deep convolutional neural network model is used to perform multi-level feature extraction on the images to capture local and global features. Then, the variational autoencoder technology is combined to compress and decode the key area information to generate a compact feature representation. Finally, the environmental factor correction model is used to correct the feature representation to eliminate the influence of the external environment and generate preliminary freshness assessment results.

[0087] Optionally, in step 102, based on the food image database, a pre-built deep convolutional neural network model is used in combination with a variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, and an environmental factor correction model is introduced to eliminate the influence of external environmental changes on the image analysis results, and generate preliminary evaluation results, including:

[0088] The food image database is used to standardize the image data to ensure that all images have the same resolution and color mode, so as to obtain a standardized food image data set; based on the standardized food image data set, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction on the food images, and local and global features in the image are captured through convolutional layers, pooling layers and fully connected layers to obtain multi-level feature information; based on the multi-level feature information, the key area information in the image is compressed and decoded in combination with the variational autoencoder technology to generate a compact representation of the image and obtain an optimized feature representation; an environmental factor correction model is introduced to correct the optimized feature representation based on environmental sensor data to obtain corrected feature information; based on the corrected feature information, dynamic monitoring rules are designed to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods to generate preliminary evaluation results.

[0089] The method of compressing and decoding the key area information in the image based on the multi-level feature information and combining the variational autoencoder technology to generate a compact representation of the image and obtain an optimized feature representation includes:

[0090] The multi-level feature information is used to construct a variational autoencoder model including an encoder and a decoder, and the key area information in the image is compressed and decoded to generate a low-dimensional compact representation; based on the low-dimensional compact representation, the KL divergence is introduced as a regularization term to ensure that the compact representation generated by the encoder conforms to the predefined prior distribution, and the reconstruction capability of the decoder is optimized to obtain an optimized variational autoencoder model; based on the optimized variational autoencoder model, the model parameters are further optimized by minimizing the weighted sum of the reconstruction error and the KL divergence to generate an optimized compact representation; using the optimized compact representation, through further feature selection and fusion processing, redundant information is removed, the most representative features are retained, and an optimized feature representation is generated.

[0091] The introduction of the environmental factor correction model to correct the optimized feature representation based on the environmental sensor data to obtain the corrected feature information includes:

[0092] Environmental sensor data synchronized with food image acquisition are collected to form an environmental factor data set; based on the environmental factor data set, an environmental factor correction model is constructed, which uses regression analysis or machine learning methods to establish the relationship between environmental parameters and image features; the environmental factor correction model is trained using the environmental factor data set, and the model parameters are optimized by minimizing the error between the predicted value and the actual value to ensure that the model can accurately predict the impact of environmental factors on image features; using the optimized environmental factor correction model, the optimized feature representation is corrected, the impact of environmental factors on image features is calculated, and the optimized feature representation is adjusted to eliminate the interference of environmental factors and generate corrected feature information.

[0093] In this step, KL divergence (Kullback-Leibler Divergence), also known as relative entropy, is a method used in information theory to measure the difference between two probability distributions P and Q.

[0094] In an embodiment of the present application, first, the images in the food image database are standardized to ensure that all images have consistent resolution and color mode; second, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction on the standardized images to capture local and global features; third, the variational autoencoder technology is combined to compress and decode the key area information to generate a low-dimensional compact representation, and the model is optimized by introducing KL divergence as a regularization term; finally, an environmental factor correction model is constructed based on environmental sensor data to correct the optimized feature representation, eliminate the impact of the external environment, and generate preliminary evaluation results.

[0095] Suppose a supermarket wants to monitor the freshness of its fruit section. First, multiple high-definition cameras are installed on the fruit shelves, each camera is responsible for shooting at a different angle; then, the collected images are transmitted to the central server in real time through the HTTPS protocol and stored in a dedicated database, with the time and location information marked; then, these images are standardized to ensure that all images have the same resolution and color mode; then, a pre-trained deep convolutional neural network model is used to perform multi-level feature extraction on the standardized images to capture the color and texture changes on the apple surface; next, the variational autoencoder technology is combined to compress and decode the key area information to generate a low-dimensional compact representation, and then the image is processed by the kernel. The KL divergence is introduced as a regularization term to optimize the model parameters and ensure that the compact representation conforms to the predefined prior distribution. At the same time, environmental sensor data (such as temperature and light intensity) synchronized with image acquisition are collected to form an environmental factor data set. Based on this data set, a regression analysis method is used to construct an environmental factor correction model to establish the relationship between environmental parameters and image features. The environmental factor data set is used to train the correction model and optimize the model parameters by minimizing the error between the predicted value and the actual value. Finally, the compact representation is corrected using the optimized environmental factor correction model to calculate the impact of environmental factors on image features, adjust the feature representation, eliminate environmental interference, and generate preliminary freshness evaluation results.

[0096] Through the above steps, supermarkets can monitor and evaluate the freshness of fruits in real time, adjust inventory strategies and distribution plans in a timely manner, reduce waste and improve customer satisfaction.

[0097] This application takes into account that in the assessment of food freshness, multi-level feature extraction of food images through a deep convolutional neural network model is a key step. These feature extraction processes include preprocessing steps of size normalization, color space conversion, noise reduction, and edge enhancement to ensure the quality and applicability of the input data. Subsequently, local and global features in the image are captured through convolutional layers, pooling layers, and fully connected layers to generate multi-level feature information. Finally, a global feature vector G that integrates multi-layer feature information is generated through the steps of weighted summation, introduction of additional information, pooling, and fully connected layer conversion.

[0098] Optionally, based on the standardized food image dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction processing on the food image, and local and global features in the image are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information, including:

[0099] In calculating the feature map F i Before processing, the original image is preprocessed by size normalization, color space conversion, noise reduction and edge enhancement to ensure the quality and applicability of the input data;

[0100] F i =σ(W conv *I+b conv +α·H i +λ·N i +η·P i +μ·D i +ρ·R i )

[0101] F i represents the feature map of the i-th layer, which represents the local features extracted from the image; W conv represents the convolution kernel weight matrix, which is used to perform convolution operations on the image to capture local features; I represents the standardized food image dataset to ensure that all images have the same resolution and color mode; b conv Represents the bias term of the convolution layer, which is used to adjust the result of the convolution operation; σ represents the activation function, which uses the ReLU function to introduce nonlinearity and enhance the expressiveness of the model; α represents the feature enhancement coefficient, which is used to adjust the historical feature map H i The degree of influence of H i represents the historical feature map of the i-th layer, indicating the cumulative effect of the feature map of the previous layer; λ represents the noise suppression coefficient, which is used to adjust the noise suppression term N i The degree of influence; N i represents the noise suppression item of the i-th layer, which is used to reduce the noise interference in the image; η represents the position weight coefficient, which is used to adjust the position information P i The degree of influence of P i represents the position information of the i-th layer, which is used to enhance the feature representation of the spatial position; μ represents the dynamic adjustment coefficient, which is used to adjust the dynamic feature item D i The degree of influence; D i represents the dynamic feature item of the i-th layer, which is used to capture the dynamic changes in the image; ρ represents the context correlation coefficient, which is used to adjust the context information R i The degree of influence of R i Represents the context information of the i-th layer, which is used to capture the contextual dependencies in the image;

[0102] After calculating F i Finally, a global feature vector G integrating multi-layer feature information is generated through weighted summation, introduction of additional information, pooling and full connection layer conversion.

[0103]

[0104] G represents the global feature vector, which represents the global features extracted from the multi-layer feature map; Pool represents the pooling operation, which uses maximum pooling or average pooling to reduce the dimension of the feature map and retain the most important information; Represents the multi-layer feature map Fi Plus the environmental impact factor E i 、Attention MechanismA i , time information T i and visual context information V i The element-by-element summation after β is used to fuse the feature information at different levels; β represents the weight of the environmental influencing factor; E i represents the environmental influencing factor of the i-th layer, indicating the impact of environmental factors on the feature map; θ represents the attention weight coefficient, which is used to adjust the attention mechanism A i The degree of influence; i represents the attention mechanism of the i-th layer, which is used to highlight the key area and reduce background interference; κ represents the time weight coefficient, which is used to adjust the time information T i The degree of influence of T i represents the time information of the i-th layer, which is used to reflect the feature changes in different time periods; ω represents the visual context weight coefficient, which is used to adjust the visual context information V i The degree of influence; V i Represents the visual context information of the i-th layer, which is used to capture the visual context dependencies in the image; FC represents the fully connected layer operation, which is used to convert the pooled feature map into a fixed-length feature vector to capture global features; n represents the number of convolutional layers, which represents the depth of feature extraction; γ represents the correction coefficient, which is used to adjust the influence of the environmental factor correction model C; C represents the environmental factor correction model, which corrects the feature map based on the environmental sensor data to eliminate the influence of external environmental changes on the image analysis results; δ represents the spatial weight coefficient, which is used to adjust the influence of spatial information S; S represents spatial information, which is used to enhance the representation of spatial features; φ represents the multimodal fusion coefficient, which is used to adjust the influence of the multimodal feature fusion term M; M represents the multimodal feature fusion term, which is used to combine information from different modalities to improve the richness of features; ψ represents the quality assessment coefficient, which is used to adjust the influence of the quality assessment information Q; Q represents the quality assessment information, which is used to evaluate the quality of the feature map and ensure the reliability of the feature;

[0105] After obtaining G, the feature quality is further optimized and the model performance is improved through normalization, feature selection, feature enhancement and multimodal learning techniques.

[0106] The formula aims to improve the accuracy and robustness of food freshness assessment through multi-level feature extraction and comprehensive information fusion, ensuring that the freshness of food can be reliably detected under different environmental conditions.

[0107] The following is a brief introduction to the design reasons of each sub-item of the formula:

[0108] F i =σ(W conv *I+bconv +α·H i +λ·N i +η·P i +μ·D i +ρ·R i ):

[0109] W conv *I is the convolution operation between the convolution kernel and the image to capture local features; b conv is the result of bias adjustment; σ is the nonlinearity introduced by the activation function; α·H i is the influence of enhancing the historical feature map; λ·N i is the noise suppression; η·P i is to strengthen the position information; μ·D i is a dynamic feature term capturing changes; ρ·R i It is the contextual information that improves dependency understanding;

[0110] The following is a brief introduction to how to obtain the parameters of the formula:

[0111] W conv , b conv It is obtained through the back propagation algorithm optimization during the model training process; α, λ, η, μ, ρ are used as hyperparameters, and the optimal value is usually determined by cross-validation method; H i , N i , P i , D i , R i They represent the historical feature map, noise suppression item, location information, dynamic feature item and context information of the previous layer, which are calculated based on the output of the previous layer or specific rules;

[0112] The following is a brief introduction to the design reasons of each sub-item of the formula:

[0113]

[0114] It is a fusion of multi-layer feature maps plus environmental factors, attention mechanisms, temporal information, and visual context information; Pool is a pooling operation to reduce dimensions and retain key information; FC is the conversion of the fully connected layer into a fixed-length vector; γ·C is to correct the external environmental influence; δ·S is to enhance spatial features; φ·M is multimodal information fusion; ψ·Q is to ensure feature quality;

[0115] The following is a brief introduction to how to obtain the parameters of the formula:

[0116] β, θ, κ, ω, γ, δ, φ, ψ are hyperparameters obtained by tuning; E i , A i , Ti , V i ,C, S, M, Q are constructed based on domain knowledge or sensor data, such as data provided by environmental sensors are used to generate C, and multimodal information sources are used for M, etc.;

[0117] Assume that in a food freshness detection system, we use the above formula to process a standardized food image dataset. First, the original image is preprocessed by size normalization, color space conversion, noise reduction, and edge enhancement to ensure the quality and applicability of the input data; then, for the first layer feature map F1 = σ(W conv *I+b conv +0.2·H1+0.1·N1+0.3·P1+0.4·D1+0.5·R1), where W conv and b conv Through training, H1, N1, P1, D1, and R1 are the historical feature map, noise suppression item, position information, dynamic feature item, and context information extracted from the previous layer, respectively. Then, the second and third layer feature maps F2 and F3 are calculated with similar parameter settings. Next, the multi-layer feature maps are weighted summed and additional information is introduced: Where E i , A i , T i , V i They are environmental factors, attention mechanisms, time information, and visual context information, which are constructed through sensor data and domain knowledge; then, the dimension is reduced through the maximum pooling operation and converted into a global feature vector of fixed length through a fully connected layer. Among them, C, S, M, and Q are the environmental factor correction model, spatial information, multimodal fusion items, and quality assessment information, respectively, which are also constructed through specific methods. Finally, the global feature vector G = [0.87, -0.12, 0.45, 0.65, 0.23] is obtained. Since the threshold is set to 0.7, the first element 0.87 is greater than the threshold, indicating that the food is very fresh, because high positive values ​​usually indicate more positive attributes. On the contrary, if an element value is lower than the threshold, such as -0.12, it may indicate that the food is not so fresh or there are other problems. By comparing the numerical value in the feature vector with the preset threshold, the freshness of the food can be quickly judged.

[0118] The complex image processing and feature fusion methods in the above embodiments can effectively improve the accuracy and reliability of food freshness detection and ensure food safety and quality.

[0119] 103. Based on the preliminary evaluation results, combined with the types, storage conditions and historical sales data of the food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of the food, and the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain the final freshness evaluation report;

[0120] The gradient boosting tree technology in the ensemble learning algorithm is a machine learning method that builds multiple decision trees and combines them to improve prediction performance; cross-validation is a technique for evaluating model performance, which usually divides the data set into training sets and validation sets for multiple times to ensure the stability and reliability of the model; hyperparameter optimization refers to the process of adjusting the non-learning parameters of the model, with the aim of finding the best configuration to maximize model performance.

[0121] In this step, the preliminary evaluation results are first integrated with food types, storage conditions, and historical sales data to form a comprehensive data set. Next, the comprehensive data set is preprocessed and feature engineered to extract features related to freshness, and the key features are screened out using a feature selection algorithm. Then, a prediction model is constructed using the gradient boosting tree technique, and the model performance is evaluated through K-fold cross validation. The accuracy and generalization ability of the model are further improved through hyperparameter optimization. Finally, a food freshness assessment report is generated based on the optimized model.

[0122] Optionally, in step 103, based on the preliminary evaluation results, combined with the type, storage conditions and historical sales data of the food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of the food, and the accuracy and generalization ability of the model are ensured by cross-validation and hyperparameter optimization technology to obtain a final freshness evaluation report, including:

[0123] According to the preliminary evaluation results, the food types, storage conditions and historical sales data are combined into a comprehensive data set, and the comprehensive data set is preprocessed to ensure that the data quality meets the modeling requirements; the comprehensive data set is subjected to feature engineering processing to extract features related to food freshness, and the feature selection algorithm is used to screen out the features that have the greatest influence on freshness prediction, reduce feature dimensions, and improve the training efficiency and generalization ability of the model; the gradient boosting tree technology in the ensemble learning algorithm is used to construct a food freshness prediction model, the gradient boosting tree model is trained using the comprehensive data set, the performance of the model is evaluated using the K-fold cross-validation technology to ensure the stability and consistency of the model on different data subsets, the hyperparameters of the model are adjusted using the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and an optimized gradient boosting tree model is generated; based on the optimized gradient boosting tree model, the freshness of the food is predicted to generate a final freshness evaluation report.

[0124] The process of performing feature engineering on the comprehensive data set, extracting features related to food freshness, applying feature selection algorithms, screening out the features most influential in freshness prediction, reducing feature dimensions, and improving model training efficiency and generalization capabilities includes:

[0125] The comprehensive data set is used to extract features related to food freshness, including the color change rate, texture degradation degree, food type, storage conditions, and historical sales data in the preliminary evaluation results, to obtain a preliminary feature set; based on the preliminary feature set, new features are created through feature generation technology to generate an extended feature set; a feature selection algorithm is used to screen out the most influential features for freshness prediction from the extended feature set to obtain a selected feature set; the selected feature set is reduced in dimension through the dimensionality reduction technology of principal component analysis or linear discriminant analysis, the most important information is retained, and a reduced dimensionality feature set is generated; the reduced dimensionality feature set is evaluated, and the performance of the model on different feature sets is evaluated through cross-validation technology, the best feature subset is selected, and a final feature set is generated.

[0126] In this step, first, based on the preliminary evaluation results and other food-related information, a comprehensive data set containing multiple data types is formed and preprocessed; secondly, feature engineering is performed on the comprehensive data set to extract key features that affect freshness and reduce dimensions through feature selection; thirdly, a prediction model is established based on the screened feature set using the gradient boosting tree algorithm, and the K-fold cross-validation technique is used to test the model stability; finally, after further enhancing the model performance through hyperparameter tuning, the model is applied to predict the freshness of food and generate a detailed evaluation report.

[0127] Suppose a supermarket chain wants to improve the prediction accuracy of the freshness of its inventory of fruits and vegetables to reduce losses. First, the image analysis results, variety names, storage environment temperature and humidity records, and past sales of recent fruits and vegetables are collected to form a comprehensive data set, and preprocessing operations such as missing value filling and outlier processing are performed; then, a series of features that may affect freshness are extracted from this comprehensive data set, such as color change rate, texture degradation degree, specific variety, storage time, average daily sales, etc., and some new features are created through feature generation technology, such as "color change rate / storage days" as an accelerated deterioration indicator; then, the random forest feature importance scoring method is used to select the most important features, and the principal component analysis is used to reduce the dimension to the optimal dimension; then, a gradient boosting tree model is trained using these selected features, and 5-fold cross validation is used to ensure that the model can maintain good performance on different samples, and key hyperparameters such as maximum depth and learning rate are adjusted through grid search method; finally, based on the optimized model, the supermarket can accurately predict the freshness of each batch of fruits and vegetables, so as to take timely actions, such as adjusting shelf positions or promoting in advance, to maximize the value of goods.

[0128] Through the above steps, the supermarket not only improved its inventory management efficiency, but also significantly reduced product losses due to expiration.

[0129] This application considers that in the prediction of food freshness, Gradient Boosting Trees (GBT) is a powerful ensemble learning method that optimizes model performance by gradually building multiple decision trees. In order to ensure the accuracy and generalization ability of the model, the K-fold cross-validation technique is used to evaluate the stability and consistency of the model on different data subsets, and the hyperparameters of the model are adjusted by hyperparameter optimization techniques. Finally, the optimized gradient boosting tree model is generated for predicting the freshness of food.

[0130] Optionally, the method uses the gradient boosting tree technology in the ensemble learning algorithm to construct a food freshness prediction model, uses the comprehensive data set to train the gradient boosting tree model, evaluates the performance of the model through the K-fold cross validation technology to ensure the stability and consistency of the model on different data subsets, adjusts the hyperparameters of the model through the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and generates an optimized gradient boosting tree model, including:

[0131] Calculating the cross validation score CV score Before the test, data cleaning, standardization / normalization, feature extraction and feature selection are performed on the comprehensive data set to ensure data quality and applicability;

[0132]

[0133] CV score Represents the cross-validation score, which is used to evaluate the performance of the model; K represents the number of folds of K-fold cross-validation; represents the loss function of the k-fold data, using mean square error or logarithmic loss; y k Represents the true label of the k-th fold data; represents the predicted value of the k-fold data; λ represents the regularization coefficient, which is used to control the model complexity; Complexity(M,γ) represents the model complexity, which is a function of the number of trees M and the leaf node weight γ; β represents the diversity coefficient, which is used to adjust the diversity term Diversity(T k ) k ) represents the diversity term of the k-fold data, which is used to measure the differences between different trees and improve the robustness of the model; δ represents the stability coefficient, which is used to adjust the stability term Stability (S k ) k ) represents the stability term of the k-fold data, which is used to evaluate the stability and consistency of the model on different data subsets;

[0134] After calculating CV score Finally, the optimal hyperparameter combination is selected, the gradient boosting tree model is trained, and each sample in the test set is predicted to generate a freshness prediction value.

[0135]

[0136] represents the freshness prediction value of the i-th sample; F0(x i ) represents the initial prediction value, which is a constant; M represents the number of gradient boosting trees; γ m represents the leaf node weight of the mth tree; h m (x i ) represents the predicted value of the mth tree for the i-th sample; α represents the regularization coefficient, which is used to adjust the regularization term R i The degree of influence of R i represents the regularization term of the i-th sample, which is used to reduce the overfitting risk of the model; β represents the environmental impact coefficient, which is used to adjust the environmental impact term E i The degree of influence of E i represents the environmental impact term of the i-th sample, which is used to consider the impact of the external environment on the freshness prediction; η represents the time impact coefficient, which is used to adjust the time impact term T i The degree of influence of T i represents the time influence term of the i-th sample, which is used to consider the influence of time on freshness prediction; μ represents the spatial influence coefficient, which is used to adjust the spatial influence term Si The degree of influence of S i represents the spatial influence term of the i-th sample, which is used to consider the impact of geographical location on freshness prediction; v represents the attention coefficient, which is used to adjust the attention mechanism term A i The degree of influence; i Represents the attention mechanism item of the i-th sample, which is used to highlight key features and reduce background interference;

[0137] In getting Finally, through further hyperparameter tuning, ensemble learning techniques and performance evaluation, an optimized gradient boosting tree model is generated to ensure the accuracy and generalization ability of the model.

[0138] The formula aims to optimize the performance of the gradient boosting tree model by comprehensively considering multiple factors (such as model complexity, diversity, stability, and external influences), ensuring its stability and consistency on different data subsets while improving the accuracy and generalization of predictions.

[0139] The following is a brief introduction to the design reasons of each sub-item of the formula:

[0140]

[0141] is a loss function that measures the difference between the model prediction value and the true value; λ·Complexity(M,γ) is a regularization term that controls the model complexity and prevents overfitting; β·Diversity(T k ) is a diversity term that improves the robustness of the model; δ·Stability(S k ) is a stability term that ensures the consistency of the model on different data subsets;

[0142] The following is a brief introduction to how to obtain the parameters of the formula:

[0143] The mean square error or logarithmic loss is usually chosen; λ, β, δ are hyperparameters determined by cross-validation; Complexity (M, γ) is calculated by the number of trees M and the leaf node weight γ; Diversity (T k ) is obtained by calculating the differences between different trees; Stability (S k ) is obtained by evaluating the performance of the model on different subsets of the data;

[0144] The following is a brief introduction to the design reasons of each sub-item of the formula:

[0145]

[0146] F0(x i) is the initial prediction value, which is a constant; is the predicted value of the gradient boosted tree model, where the leaf node weight of each tree is γ m and the predicted value h m (x i ) is obtained through training; α·R i is a regularization term that reduces the risk of overfitting; β·E i is the environmental impact term, considering the impact of the external environment on freshness prediction; η·T i is the time influence term, considering the influence of time on freshness prediction; μ·S i is the spatial influence term, considering the impact of geographical location on freshness prediction; v·A i It is an attention mechanism item, which highlights key features and reduces background interference;

[0147] The following is a brief introduction to how to obtain the parameters of the formula:

[0148] F0(x i ) is the initial prediction value, usually the average value of the training data; γ m and h m (x i ) is obtained through the training process of gradient boosting tree; α, β, η, μ, v are hyperparameters determined by cross-validation; R i , E i , T i , S i , A i They are regularization term, environmental influence term, time influence term, spatial influence term and attention mechanism term, which are constructed based on domain-specific knowledge or sensor data;

[0149] Suppose that in a food freshness prediction system, we use the above formula to build a gradient boosting tree model. First, we perform data cleaning, standardization / normalization, feature extraction and feature selection on the comprehensive data set to ensure data quality and applicability; then, we set K = 5 to perform 5-fold cross validation and calculate the cross validation score to train the gradient boosting tree model. Assuming M = 100, γ m and h m (x i ) is obtained through training, α = 0.1, β = 0.2, η = 0.3, μ = 0.4, v = 0.5, and R i , E i , T i , S i , A i Constructed by a specific method; finally, predict each sample in the test set to generate a freshness prediction value For example, for a sample x i , after calculation, we get Since the threshold is set to indicates that the food is very fresh, as high positive values ​​generally indicate more positive attributes; conversely, It may mean that the food is not as fresh or there is another problem.

[0150] Through the above steps, the freshness of the food can be quickly determined by comparing the predicted value with the preset threshold.

[0151] 104. Utilize the freshness assessment report to adjust inventory strategies in real time, optimize food distribution plans, dynamically adjust freshness assessment standards based on market feedback, continuously optimize food freshness management processes, and generate optimized management processes.

[0152] Inventory strategy refers to the rules or plans that determine how and when to replenish inventory; distribution plan is the arrangement of how to transport products from warehouses to customers; market feedback includes consumer opinions, sales data, etc., which are used to evaluate the performance of products or services; freshness evaluation standards are a set of specific indicators used to measure whether food quality meets the requirements.

[0153] In this step, we first use the information in the freshness assessment report to adjust the inventory strategy in real time through the intelligent supply chain management system to avoid the backlog of expired food. Then, we optimize the food distribution plan to improve logistics efficiency. In addition, we collect market feedback through various channels, evaluate the actual effect and user satisfaction of the freshness assessment report, and dynamically adjust the freshness assessment standards based on the feedback. Finally, we continuously optimize the food freshness management process to ensure the efficient operation of the entire supply chain system.

[0154] Optionally, the freshness evaluation report described in step 104 is used to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard according to market feedback, continuously optimize the food freshness management process, and generate an optimized management process, including:

[0155] Utilize the freshness assessment report to extract key information such as the freshness score, predicted shelf life, and potential risk points of the food to form a structured data set, thereby obtaining a structured data set; based on the structured data set, adjust the inventory strategy in real time through the intelligent supply chain management system to generate an optimized inventory strategy; combine the predicted shelf life in the freshness assessment report to optimize the food distribution plan, improve the overall circulation efficiency of the food, and generate an optimized distribution plan; collect market feedback through multiple channels, evaluate the actual effect and user satisfaction of the freshness assessment report, and generate market feedback data; dynamically adjust the freshness assessment standard based on the market feedback data, improve the accuracy of the assessment, and generate an updated freshness assessment standard; continuously optimize the food freshness management process, ensure the efficient operation of the entire supply chain system through regular evaluation and improvement, and generate an optimized management process.

[0156] In this step, first, extract key information from the freshness assessment report to form a structured data set; second, based on these structured data, use the intelligent supply chain management system to adjust the inventory strategy in real time and generate an optimized inventory strategy; third, optimize the food distribution plan in combination with the predicted shelf life to improve the overall circulation efficiency; then, collect market feedback through multiple channels to evaluate the actual effect and user satisfaction of the freshness assessment report; finally, dynamically adjust the freshness assessment standards based on market feedback data, and continuously optimize the entire food freshness management process to ensure the efficient operation of the supply chain system.

[0157] Suppose a large supermarket chain wants to improve the freshness management of its fresh food. First, the supermarket extracts the freshness score, predicted shelf life, and possible risk points of each food from the freshness assessment report to form a structured data set; then, based on this data set, the supermarket uses the intelligent supply chain management system to adjust the inventory strategy in real time, such as promoting or reducing the price of food that is about to expire, and increasing the replenishment frequency of fresh food, thereby generating an optimized inventory strategy; then, combined with the predicted shelf life, the supermarket optimizes the distribution plan, giving priority to the distribution of food that is about to expire, reducing losses and improving overall circulation efficiency; in addition, the supermarket collects market feedback through customer questionnaires, online review analysis, etc., and finds that the freshness assessment standards of some foods need to be adjusted because the actual storage time is longer than predicted; therefore, the supermarket dynamically adjusts the freshness assessment standards based on these feedback data to improve the accuracy of the assessment; finally, the supermarket regularly evaluates and improves the entire freshness management process to ensure the efficient operation of the supply chain system, reduce food waste, and improve customer satisfaction.

[0158] Through the above steps, the supermarket not only optimized inventory and distribution management, but also enhanced its ability to adapt to market changes and improved overall operational efficiency.

[0159] Figure 2 The present invention provides a structural diagram of a food freshness assessment system based on image processing, such as Figure 2 As shown, the device comprises:

[0160] The transmission module 21 is used to obtain multi-view images of food, transmit the images to the central processing center through a safe and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database;

[0161] The monitoring module 22 is used to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods based on the food image database by using a pre-built deep convolutional neural network model combined with variational autoencoder technology, introduce an environmental factor correction model to eliminate the influence of external environmental changes on the image analysis results, and generate preliminary evaluation results;

[0162] Prediction module 23, used to predict the freshness of food based on the preliminary evaluation results, combined with the type, storage conditions and historical sales data of food, using the gradient boosting tree technology in the ensemble learning algorithm to model the freshness of food, and ensure the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization technology to obtain the final freshness evaluation report;

[0163] The optimization module 24 is used to use the freshness evaluation report to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard according to market feedback, continuously optimize the food freshness management process, and generate an optimized management process.

[0164] Figure 2 The food freshness evaluation system based on image processing can be performed Figure 1 The implementation principle and technical effect of the food freshness assessment method based on image processing described in the embodiment are not described in detail. The specific manner in which each module and unit performs operations in the food freshness assessment system based on image processing in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

[0165] In one possible design, Figure 2 A food freshness assessment system based on image processing in the illustrated embodiment can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;

[0166] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .

[0167] The processing component 32 is used to: obtain multi-view images of food, transmit the images to the central processing center through a safe and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database; based on the food image database, use a pre-built deep convolutional neural network model combined with variational autoencoder technology to perform high-precision dynamic monitoring of color and texture changes of food in different time periods, introduce an environmental factor correction model to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results; based on the preliminary evaluation results, combined with the type, storage conditions and historical sales data of the food, use the gradient boosting tree technology in the ensemble learning algorithm to predict and model the freshness of the food, ensure the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization technology, and obtain the final freshness evaluation report; use the freshness evaluation report to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard according to market feedback, continuously optimize the food freshness management process, and generate an optimized management process.

[0168] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0169] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0170] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0171] The input / output interface provides an interface between the processing component and the peripheral interface module, and the above-mentioned peripheral interface module can be an output device, an input device, etc.

[0172] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0173] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0174] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The illustrated embodiment is a method for evaluating food freshness based on image processing.

[0175] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0176] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for evaluating food freshness based on image processing, characterized in that: include: Acquire multi-view images of food, transmit the images to the central processing center through a secure and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database; Based on the food image database, a pre-built deep convolutional neural network model is used in combination with variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, and an environmental factor correction model is introduced to eliminate the impact of external environmental changes on image analysis results, thereby generating preliminary evaluation results; Based on the preliminary evaluation results, combined with the types, storage conditions and historical sales data of food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of food. The accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain the final freshness evaluation report; By using the freshness assessment report, inventory strategies can be adjusted in real time, food distribution plans can be optimized, and freshness assessment standards can be dynamically adjusted based on market feedback to continuously optimize the food freshness management process and generate an optimized management process.

2. The method according to claim 1, characterized in that Based on the food image database, the pre-built deep convolutional neural network model is combined with the variational autoencoder technology to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods, introduce an environmental factor correction model to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results, including: Using the food image database, standardizing the image data to ensure that all images have the same resolution and color mode, and obtaining a standardized food image data set; Based on the standardized food image dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction processing on the food images, and local and global features in the images are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information; According to the multi-level feature information, the key area information in the image is compressed and decoded in combination with the variational autoencoder technology to generate a compact representation of the image and obtain an optimized feature representation; An environmental factor correction model is introduced to correct the optimized feature representation based on environmental sensor data to obtain corrected feature information; Based on the corrected feature information, dynamic monitoring rules are designed to perform high-precision dynamic monitoring of color and texture changes of food in different time periods to generate preliminary evaluation results.

3. The method according to claim 2, characterized in that Based on the standardized food image dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction processing on the food image, and local and global features in the image are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information, including: In calculating the feature map F i Before processing, the original image is preprocessed by size normalization, color space conversion, noise reduction and edge enhancement to ensure the quality and applicability of the input data; F i =σ(W conv *I+b conv +α·H i +λ·N i +η·P i +μ·D i +ρ·R i ) F i represents the feature map of the i-th layer, which represents the local features extracted from the image; W conv represents the convolution kernel weight matrix, which is used to perform convolution operations on images to capture local features; I represents the standardized food image dataset to ensure that all images have the same resolution and color mode; b conv Represents the bias term of the convolution layer, which is used to adjust the result of the convolution operation; σ represents the activation function, which uses the ReLU function to introduce nonlinearity and enhance the expressiveness of the model; α represents the feature enhancement coefficient, which is used to adjust the historical feature map H i The degree of influence of H i represents the historical feature map of the i-th layer, indicating the cumulative effect of the feature map of the previous layer; λ represents the noise suppression coefficient, which is used to adjust the noise suppression term N i The degree of influence; N i represents the noise suppression item of the i-th layer, which is used to reduce the noise interference in the image; η represents the position weight coefficient, which is used to adjust the position information P i The degree of influence of P i represents the position information of the i-th layer, which is used to enhance the feature representation of the spatial position; μ represents the dynamic adjustment coefficient, which is used to adjust the dynamic feature item D i The degree of influence; D i represents the dynamic feature item of the i-th layer, which is used to capture the dynamic changes in the image; ρ represents the context correlation coefficient, which is used to adjust the context information R i The degree of influence of R i Represents the context information of the i-th layer, which is used to capture the contextual dependencies in the image; After calculating F i Finally, a global feature vector G integrating multi-layer feature information is generated through weighted summation, introduction of additional information, pooling and full connection layer conversion. G represents the global feature vector, which represents the global features extracted from the multi-layer feature map; Pool represents the pooling operation, which uses maximum pooling or average pooling to reduce the dimension of the feature map and retain the most important information; Represents the multi-layer feature map F i Plus the environmental impact factor E i 、Attention MechanismA i , time information T i and visual context information V i The element-by-element summation after β is used to fuse the feature information at different levels; β represents the weight of the environmental influencing factor; E i represents the environmental influencing factor of the i-th layer, indicating the impact of environmental factors on the feature map; θ represents the attention weight coefficient, which is used to adjust the attention mechanism A i The degree of influence; i represents the attention mechanism of the i-th layer, which is used to highlight the key area and reduce background interference; κ represents the time weight coefficient, which is used to adjust the time information Ti 的 The degree of influence; T represents the time information of the i-th layer, which is used to reflect the feature changes in different time periods; ω represents the visual context weight coefficient, which is used to adjust the visual context information V i The degree of influence; V i Represents the visual context information of the i-th layer, which is used to capture the visual context dependencies in the image; FC represents the fully connected layer operation, which is used to convert the pooled feature map into a fixed-length feature vector to capture global features; n represents the number of convolutional layers, which represents the depth of feature extraction; γ represents the correction coefficient, which is used to adjust the influence of the environmental factor correction model C; C represents the environmental factor correction model, which corrects the feature map based on the environmental sensor data to eliminate the influence of external environmental changes on the image analysis results; δ represents the spatial weight coefficient, which is used to adjust the influence of spatial information S; S represents spatial information, which is used to enhance the representation of spatial features; φ represents the multimodal fusion coefficient, which is used to adjust the influence of the multimodal feature fusion term M; M represents the multimodal feature fusion term, which is used to combine information from different modalities to improve the richness of features; ψ represents the quality assessment coefficient, which is used to adjust the influence of the quality assessment information Q; Q represents the quality assessment information, which is used to evaluate the quality of the feature map and ensure the reliability of the feature; After obtaining G, the feature quality is further optimized and the model performance is improved through normalization, feature selection, feature enhancement and multimodal learning techniques.

4. The method according to claim 2, characterized in that: The method of compressing and decoding the key area information in the image based on the multi-level feature information and combining the variational autoencoder technology to generate a compact representation of the image and obtain an optimized feature representation includes: Using the multi-level feature information, a variational autoencoder model including an encoder and a decoder is constructed to compress and decode key area information in the image to generate a low-dimensional compact representation; According to the low-dimensional compact representation, KL divergence is introduced as a regularization term to ensure that the compact representation generated by the encoder conforms to the predefined prior distribution, while optimizing the reconstruction capability of the decoder, thereby obtaining an optimized variational autoencoder model; Based on the optimized variational autoencoder model, further optimizing the model parameters by minimizing the weighted sum of the reconstruction error and the KL divergence to generate an optimized compact representation; By using the optimized compact representation, through further feature selection and fusion processing, redundant information is removed, the most representative features are retained, and an optimized feature representation is generated.

5. The method according to claim 2, characterized in that: The introducing of the environmental factor correction model and correcting the optimized feature representation based on the environmental sensor data to obtain corrected feature information includes: Collect environmental sensor data synchronized with food image acquisition to form an environmental factor dataset; Based on the environmental factor data set, an environmental factor correction model is constructed, wherein the model uses regression analysis or machine learning methods to establish a relationship between environmental parameters and image features; The environmental factor correction model is trained using the environmental factor data set, and the model parameters are optimized by minimizing the error between the predicted value and the actual value to ensure that the model can accurately predict the impact of environmental factors on image features; The optimized environmental factor correction model is used to correct the optimized feature representation, calculate the impact of environmental factors on image features, and adjust the optimized feature representation to eliminate the interference of environmental factors and generate corrected feature information.

6. The method according to claim 1, characterized in that Based on the preliminary evaluation results, combined with the types, storage conditions and historical sales data of food, the gradient boosting tree technology in the ensemble learning algorithm is used to predict the freshness of food. The accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization technology to obtain the final freshness evaluation report, including: Based on the preliminary assessment results, the food types, storage conditions and historical sales data are combined to form a comprehensive data set, and the comprehensive data set is preprocessed to ensure that the data quality meets the modeling requirements; Performing feature engineering processing on the comprehensive data set to extract features related to food freshness, using a feature selection algorithm to screen out the features most influential on freshness prediction, reduce feature dimensions, and improve model training efficiency and generalization ability; Using the gradient boosting tree technology in the ensemble learning algorithm, a food freshness prediction model is constructed, the gradient boosting tree model is trained using the comprehensive data set, the performance of the model is evaluated by the K-fold cross-validation technology to ensure the stability and consistency of the model on different data subsets, the hyperparameters of the model are adjusted by the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and an optimized gradient boosting tree model is generated; Based on the optimized gradient boosting tree model, the freshness of food is predicted and the final freshness assessment report is generated.

7. The method according to claim 6, characterized in that The method uses the gradient boosting tree technology in the ensemble learning algorithm to construct a food freshness prediction model, uses the comprehensive data set to train the gradient boosting tree model, evaluates the performance of the model through the K-fold cross validation technology to ensure the stability and consistency of the model on different data subsets, adjusts the hyperparameters of the model through the hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and generates an optimized gradient boosting tree model, including: Calculating the cross validation score CV score Before the test, data cleaning, standardization / normalization, feature extraction and feature selection are performed on the comprehensive data set to ensure data quality and applicability; CV score Represents the cross-validation score, which is used to evaluate the performance of the model; K represents the number of folds of K-fold cross-validation; represents the loss function of the k-th fold data, using mean square error or logarithmic loss; yk represents the true label of the k-th fold data; represents the predicted value of the k-fold data; λ represents the regularization coefficient, which is used to control the model complexity; Complexity(M,γ) represents the model complexity, which is a function of the number of trees M and the leaf node weight γ; β represents the diversity coefficient, which is used to adjust the diversity term Diversity(T k ) k ) represents the diversity term of the k-fold data, which is used to measure the differences between different trees and improve the robustness of the model; δ represents the stability coefficient, which is used to adjust the stability term Stability (S k ) k ) represents the stability term of the k-fold data, which is used to evaluate the stability and consistency of the model on different data subsets; After calculating CV score Finally, the optimal hyperparameter combination is selected, the gradient boosting tree model is trained, and each sample in the test set is predicted to generate a freshness prediction value. represents the freshness prediction value of the i-th sample; F0(x i ) represents the initial prediction value, which is a constant; M represents the number of gradient boosting trees; γ m represents the leaf node weight of the mth tree; h m (x i ) represents the predicted value of the mth tree for the i-th sample; α represents the regularization coefficient, which is used to adjust the regularization term R i The degree of influence of R i represents the regularization term of the i-th sample, which is used to reduce the overfitting risk of the model; β represents the environmental impact coefficient, which is used to adjust the environmental impact term E i The degree of influence of E i represents the environmental impact term of the i-th sample, which is used to consider the impact of the external environment on the freshness prediction; η represents the time impact coefficient, which is used to adjust the time impact term T i The degree of influence of T i represents the time influence term of the i-th sample, which is used to consider the influence of time on freshness prediction; μ represents the spatial influence coefficient, which is used to adjust the spatial influence term S i The degree of influence of S i represents the spatial influence term of the i-th sample, which is used to consider the impact of geographical location on freshness prediction; v represents the attention coefficient, which is used to adjust the attention mechanism term A i The degree of influence; i Represents the attention mechanism item of the i-th sample, which is used to highlight key features and reduce background interference; In getting Finally, through further hyperparameter tuning, ensemble learning techniques and performance evaluation, an optimized gradient boosting tree model is generated to ensure the accuracy and generalization ability of the model.

8. The method according to claim 7, characterized in that The feature engineering process is performed on the comprehensive data set to extract features related to food freshness, and the feature selection algorithm is used to screen out the features that have the greatest impact on freshness prediction, thereby reducing feature dimensions and improving the training efficiency and generalization ability of the model, including: Using the comprehensive data set, extracting features related to food freshness, including color change rate, texture degradation degree, food type, storage conditions, and historical sales data in the preliminary evaluation results, to obtain a preliminary feature set; Based on the preliminary feature set, new features are created by feature generation technology to generate an extended feature set; Using a feature selection algorithm, the most influential features for freshness prediction are selected from the extended feature set to obtain a selected feature set; Performing dimensionality reduction processing on the selected feature set by using dimensionality reduction technology such as principal component analysis or linear discriminant analysis, retaining the most important information, and generating a dimensionality reduction feature set; The reduced dimension feature set is evaluated, and the performance of the model on different feature sets is evaluated through cross-validation technology, and the best feature subset is selected to generate the final feature set.

9. The method according to claim 1, characterized in that: The freshness assessment report is used to adjust inventory strategies in real time, optimize food distribution plans, and dynamically adjust freshness assessment standards based on market feedback, continuously optimize food freshness management processes, and generate optimized management processes, including: Using the freshness assessment report, extracting key information of the food's freshness score, predicted shelf life, and potential risk points to form a structured data set, thereby obtaining a structured data set; Based on the structured data set, the inventory strategy is adjusted in real time through the intelligent supply chain management system to generate an optimized inventory strategy; Combined with the predicted shelf life in the freshness assessment report, the food distribution plan is optimized, the overall circulation efficiency of the food is improved, and an optimized distribution plan is generated; Collect market feedback through various channels, evaluate the actual effect and user satisfaction of the freshness evaluation report, and generate market feedback data; According to the market feedback data, the freshness evaluation standard is dynamically adjusted to improve the accuracy of the evaluation and generate an updated freshness evaluation standard; Continuously optimize the food freshness management process, ensure the efficient operation of the entire supply chain system through regular evaluation and improvement, and generate optimized management processes.

10. A food freshness assessment system based on image processing, characterized in that: include: The transmission module is used to obtain multi-view images of food, transmit the images to the central processing center through a safe and efficient network protocol, set personalized image acquisition parameters according to different food types, and form a food image database; A monitoring module is used to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods based on the food image database by using a pre-built deep convolutional neural network model combined with variational autoencoder technology, introduce an environmental factor correction model to eliminate the impact of external environmental changes on image analysis results, and generate preliminary evaluation results; A prediction module is used to predict the freshness of food based on the preliminary evaluation results, in combination with the type, storage conditions and historical sales data of the food, using the gradient boosting tree technology in the ensemble learning algorithm to model the freshness of the food, and to ensure the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization technology to obtain a final freshness evaluation report; The optimization module is used to use the freshness evaluation report to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard according to market feedback, continuously optimize the food freshness management process, and generate an optimized management process.

Citation Information

Patent Citations

  • Fresh degree evaluation method and device and storage medium

    CN110503314A

  • Electrical impedance imaging method based on deep learning

    CN112200306A

  • Cigar harvesting maturity identification method and system based on ensemble learning

    CN114862858A

  • Preformed food storage replenishment management method and system based on big data

    CN117057719A

  • Orchard fruit maturity evaluation and picking planning system based on intelligent image analysis

    CN118628847A

Cited By

  • Water chestnut multistage screening method and system based on machine vision

    CN120325553A

  • A multi-stage horse hoof screening method and system based on machine vision

    CN120325553B

  • Intelligent active package optimization method and system based on machine learning

    CN120893631A

  • An intelligent active packaging optimization method and system based on machine learning

    CN120893631B

  • Food detection method and system based on image recognition

    CN120953690A