A method and system for assessing food freshness based on image processing

By combining deep convolutional neural networks and variational autoencoders with an environmental factor correction model, and integrating gradient boosting tree technology with ensemble learning algorithms, the problem of environmental factors in food freshness assessment was solved, achieving high-precision freshness assessment and dynamic management optimization.

CN119940701BActive Publication Date: 2026-03-17CSSC HAISHEN MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing food freshness assessment methods lack environmental factor correction mechanisms, resulting in low accuracy of image analysis results due to changes in external conditions. Furthermore, they are difficult to achieve efficient and high-precision freshness prediction and cannot dynamically optimize management processes.

Method used

An image processing method based on deep convolutional neural networks and variational autoencoders is adopted, combined with an environmental factor correction model. Through multi-level feature extraction and correction, high-precision freshness assessment results are generated. Furthermore, gradient boosting tree technology of ensemble learning algorithms is used for predictive modeling to adjust inventory and delivery strategies in real time.

Benefits of technology

It significantly improves the accuracy and reliability of food freshness assessment, reduces food waste, enhances operational efficiency and customer satisfaction, and enables continuous optimization of management processes based on market feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940701B_ABST
    Figure CN119940701B_ABST
Patent Text Reader

Abstract

The application provides a food freshness evaluation method and system based on image processing. Wherein, multi-view images of food are acquired, the images are transmitted to a central processing center, personalized image acquisition parameters are set, and a food image database is formed; based on the food image database, high-precision dynamic monitoring is performed on the color and texture changes of food in different time periods to generate a preliminary evaluation result; according to the preliminary evaluation result, the freshness of food is predicted and modeled in combination with the type, storage condition and historical sales data of food, and a final freshness evaluation report is obtained; the inventory strategy is adjusted in real time, the food distribution plan is optimized, and an optimized management process is generated by using the freshness evaluation report. The technical scheme provided by the application improves the accuracy of food freshness evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of food freshness assessment technology, and in particular to a food freshness assessment method and system based on image processing. Background Technology

[0002] Maintaining food freshness is crucial for ensuring food safety, reducing waste, and improving consumer satisfaction in both food retail and production.

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

[0004] Existing methods often lack effective correction mechanisms for environmental factors, meaning that changes in external conditions can significantly impact the accuracy of image analysis results. Furthermore, these methods are inefficient when processing large-scale datasets and struggle to achieve high-precision freshness prediction. Finally, most existing systems lack dynamic adjustment capabilities, failing to continuously optimize management processes based on market feedback and new findings in practical operation. Summary of the Invention

[0005] This application provides a food freshness assessment method and system based on image processing to solve the problem of poor food freshness assessment results in the prior art.

[0006] In a first aspect, embodiments of this application provide a food freshness assessment method based on image processing, including:

[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 combined with variational autoencoder technology is used to perform high-precision dynamic monitoring of the color and texture changes of food in different time periods. An environmental factor correction model is introduced to eliminate the influence of external environmental changes on image analysis results and generate preliminary evaluation results.

[0009] Based on the preliminary assessment results, combined with the type of food, storage conditions and historical sales data, the gradient boosting tree technique in the ensemble learning algorithm is used to predict and model the freshness of the food. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, and the final freshness assessment report is obtained.

[0010] Using the freshness assessment report, inventory strategies can be adjusted in real time, food delivery 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 combined with variational autoencoder technology is used to perform high-precision dynamic monitoring of the color and texture changes of food over different time periods. An environmental factor correction model is introduced to eliminate the influence of external environmental changes on the image analysis results, generating preliminary evaluation results, including:

[0012] Using the food image database, the image data is standardized to ensure that all images have the same resolution and color mode, resulting in a standardized food image dataset.

[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. 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] Based on the multi-level feature information, the key region information in the image is compressed and decoded using variational autoencoder technology to generate a compact representation of the image, thus obtaining an optimized feature representation.

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

[0016] 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, and 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 images. Local and global features in the images are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information, including:

[0018] In calculating feature map F i Before that, 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 Let W represent the feature map of the i-th layer, and let W represent the local features extracted from the image. conv represents the convolution kernel weight matrix, used for convolution operations on images to capture local features; I represents the standardized food image dataset, ensuring all images have the same resolution and color mode; b conv σ represents the bias term of the convolutional layer, used to adjust the result of the convolution operation; σ represents the activation function, using the ReLU function to introduce non-linearity and enhance the expressive power of the model; α represents the feature enhancement coefficient, used to adjust the historical feature map H. i The degree of influence; H i Let N represent the historical feature map of the i-th layer, and let λ represent the cumulative effect of the feature map of the previous layer; λ represents the noise suppression coefficient, used to adjust the noise suppression term N. i The degree of influence; N i η represents the noise suppression term in the i-th layer, used to reduce noise interference in the image; η represents the position weight coefficient, used to adjust the position information P. i Degree of influence; P i μ represents the location information of the i-th layer, used to enhance the feature representation of spatial location; μ represents the dynamic adjustment coefficient, used to adjust the dynamic feature term D. i Degree of influence; D i R represents the dynamic feature term of the i-th layer, used to capture dynamic changes in the image; ρ represents the context correlation coefficient, used to adjust the context information R. i The degree of influence; R i This represents the context information of the i-th layer, used to capture contextual dependencies in the image;

[0021] After calculating F i Then, through steps of weighted summation, introducing additional information, pooling, and transformation by fully connected layers, a global feature vector G integrating multi-layer feature information is generated;

[0022]

[0023] G represents the global feature vector, which represents the global features extracted from multi-layer feature maps; Pool represents the pooling operation, using max pooling or average pooling to reduce the dimensionality of the feature map and retain the most important information. Represents multi-layer feature map F i Add environmental impact factor E i Attention mechanism A i Time information T iand visual context information V i The element-wise summation is then used to fuse feature information at different levels; β represents the weight of environmental impact factors; E i θ represents the environmental influence factor of the i-th layer, indicating the impact of environmental factors on the feature map; θ represents the attention weight coefficient, used to adjust the attention mechanism A. i The degree of influence; A i κ represents the attention mechanism of the i-th layer, used to highlight key regions and reduce background interference; κ represents the temporal weight coefficient, used to adjust the temporal information T. i The degree of influence; T i ω represents the temporal information of the i-th layer, used to reflect feature changes within different time periods; ω represents the visual context weight coefficient, used to adjust the visual context information V. i Degree of influence; V i δ represents the visual context information of the i-th layer, used to capture visual context dependencies in the image; FC represents the fully connected layer operation, used to convert the pooled feature map into a fixed-length feature vector to capture global features; n represents the number of convolutional layers, representing the depth of feature extraction; γ represents the correction coefficient, 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 environmental sensor data to eliminate the influence of external environmental changes on image analysis results; δ represents the spatial weight coefficient, used to adjust the influence of spatial information s; S represents spatial information, used to enhance the representation of spatial features; φ represents the multimodal fusion coefficient, used to adjust the influence of the multimodal feature fusion term M; M represents the multimodal feature fusion term, used to combine information from different modalities to improve feature richness; ψ represents the quality evaluation coefficient, used to adjust the influence of quality evaluation information Q; Q represents quality evaluation information, used to evaluate the quality of the feature map and ensure the reliability of the features.

[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 step of compressing and decoding key region information in the image based on the multi-level feature information and combining variational autoencoder technology 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 containing an encoder and a decoder is constructed to compress and decode key region information in the image, generating a low-dimensional compact representation.

[0027] Based on 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, resulting in an optimized variational autoencoder model.

[0028] Based on the optimized variational autoencoder model, the model parameters are further optimized by minimizing the weighted sum of reconstruction error and KL divergence, generating an optimized compact representation.

[0029] By utilizing the optimized compact representation, further feature selection and fusion processing are performed to remove redundant information, retain the most representative features, and generate an optimized feature representation.

[0030] Optionally, the introduction of an environmental factor correction model, which corrects 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 aforementioned environmental factor dataset, an environmental factor correction model is constructed. This model uses regression analysis or machine learning methods to establish the relationship between environmental parameters and image features.

[0033] The environmental factor correction model is trained using the environmental factor dataset. By minimizing the error between the predicted and actual values, the model parameters are optimized to ensure that the model can accurately predict the impact of environmental factors on image features.

[0034] The optimized feature representation is corrected using the optimized environmental factor correction model. The influence 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.

[0035] Optionally, based on the preliminary assessment results, and in conjunction with the type of food, storage conditions, and historical sales data, the gradient boosting tree technique in ensemble learning algorithms is used to predict and model the freshness of the food. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, resulting in a final freshness assessment report, including:

[0036] Based on the preliminary assessment results, combined with the types of food, storage conditions, and historical sales data, a comprehensive dataset was integrated, and the comprehensive dataset was preprocessed to ensure that the data quality met the modeling requirements.

[0037] Feature engineering is performed on the comprehensive dataset to extract features related to food freshness. Feature selection algorithms are then used to select the features that have the greatest impact on freshness prediction, thereby reducing feature dimensionality and improving the training efficiency and generalization ability of the model.

[0038] A food freshness prediction model is constructed using gradient boosting tree technology in ensemble learning algorithms. The gradient boosting tree model is trained using the comprehensive dataset. The performance of the model is evaluated using K-fold cross-validation to ensure the stability and consistency of the model on different data subsets. The hyperparameters of the model are adjusted using hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, generating an optimized gradient boosting tree model.

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

[0040] Optionally, the step of constructing a food freshness prediction model using gradient boosting tree technology in ensemble learning algorithms, training the gradient boosting tree model using the comprehensive dataset, evaluating the model's performance using K-fold cross-validation to ensure the model's stability and consistency across different data subsets, and adjusting the model's hyperparameters using hyperparameter optimization techniques to further improve the model's accuracy and generalization ability, thereby generating an optimized gradient boosting tree model, includes:

[0041] Calculate the cross-validation score (CV) score Beforehand, the comprehensive dataset undergoes data cleaning, standardization / normalization, feature extraction, and feature selection to ensure data quality and applicability;

[0042]

[0043] CV score The cross-validation score represents the score used to evaluate the model's performance; K represents the number of folds in the K-fold cross-validation. The loss function representing the k-th fold of data can be either mean squared error or logarithmic loss; y k This represents the true label of the k-th fold of data; Let represent the predicted value of the k-th fold data; λ represents the regularization coefficient, used to control model complexity; Complexity(M, γ) represents model complexity, a function of the number of trees M and the leaf node weights γ; β represents the diversity coefficient, used to adjust the diversity term Diversity(T). k The degree of influence of Diversity (T) k ) represents the diversity term of the k-th fold data, used to measure the differences between different trees and improve the robustness of the model; δ represents the stability coefficient, used to adjust the stability term Stability(S) kThe degree of influence of Stability (S) k ) represents the stability term of the k-th fold of data, used to evaluate the stability and consistency of the model across different subsets of data;

[0044] After calculating CV score Then, the optimal combination of hyperparameters is selected, the gradient boosting tree model is trained, and predictions are made for each sample in the test set to generate freshness prediction values.

[0045]

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

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

[0048] Optionally, the step of performing feature engineering on the comprehensive dataset to extract features related to food freshness, and using a feature selection algorithm to screen out the features most influential on freshness prediction, thereby reducing feature dimensionality and improving the training efficiency and generalization ability of the model, includes:

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

[0050] Based on the initial feature set, new features are created using feature generation techniques to generate an expanded feature set.

[0051] Using a feature selection algorithm, the features that have the greatest impact on freshness prediction are selected from the extended feature set to obtain a refined feature set;

[0052] The selected feature set is dimensionality reduced by principal component analysis or linear discriminant analysis, retaining the most important information and generating a dimensionality-reduced feature set.

[0053] The dimensionality-reduced feature set is evaluated. Cross-validation is used to assess the model's performance on different feature sets, and the optimal feature subset is selected to generate the final feature set.

[0054] Optionally, the process of using the freshness assessment report to adjust inventory strategies in real time, optimize food delivery plans, and dynamically adjust freshness assessment standards based on market feedback, continuously optimizing the food freshness management process, and generating an optimized management process, includes:

[0055] Using the aforementioned freshness assessment report, key information such as the food's freshness score, predicted shelf life, and potential risk points is extracted to form a structured dataset.

[0056] Based on the structured dataset, the intelligent supply chain management system adjusts the inventory strategy in real time to generate an optimized inventory strategy.

[0057] Based on the predicted shelf life in the freshness assessment report, optimize the food delivery plan, improve the overall circulation efficiency of the food, and generate an optimized delivery plan.

[0058] We collect market feedback through multiple channels, evaluate the actual effectiveness and user satisfaction of the freshness assessment report, and generate market feedback data.

[0059] Based on the market feedback data, the freshness assessment criteria are dynamically adjusted to improve the accuracy of the assessment and generate updated freshness assessment criteria.

[0060] We continuously optimize food freshness management processes, ensuring the efficient operation of the entire supply chain system through regular evaluation and improvement, and generating optimized management processes.

[0061] Secondly, embodiments of this application provide a food freshness assessment system based on image processing, including:

[0062] The transmission module is used to acquire multi-view images of food and transmit the images to the 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.

[0063] The 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, using a pre-built deep convolutional neural network model combined with variational autoencoder technology, and introduce an environmental factor correction model to eliminate the influence of external environmental changes on image analysis results and generate preliminary evaluation results.

[0064] The prediction module is used to predict the freshness of food based on the preliminary assessment results, combined with the type of food, storage conditions and historical sales data, using gradient boosting tree technology in ensemble learning algorithms. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, and the final freshness assessment report is obtained.

[0065] The optimization module is used to adjust inventory strategies in real time using the freshness assessment report, optimize food delivery plans, dynamically adjust freshness assessment standards based on market feedback, continuously optimize food freshness management processes, and generate optimized management processes.

[0066] In this embodiment, multi-view images of food are acquired and transmitted to a central processing center via 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 this database, a pre-built deep convolutional neural network model combined with variational autoencoder technology is used to perform high-precision dynamic monitoring of color and texture changes in food over different time periods. An environmental factor correction model is introduced to eliminate the influence of external environmental changes on image analysis results, generating preliminary evaluation results. Based on these preliminary evaluation results, combined with the food type, storage conditions, and historical sales data, gradient boosting tree technology from ensemble learning algorithms is used to predict and model the freshness of the food. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, resulting in a final freshness evaluation report. Using this freshness evaluation report, inventory strategies are adjusted in real time, food delivery plans are optimized, and freshness evaluation standards are dynamically adjusted based on market feedback, continuously optimizing the food freshness management process and generating an optimized management process.

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

[0068] By employing the image processing-based food freshness assessment method proposed in this invention, high-precision dynamic monitoring of color and texture changes in food over different time periods can be achieved. Furthermore, an environmental factor correction model effectively eliminates the impact of external environmental changes on the monitoring results, significantly improving the accuracy and reliability of freshness assessment. In addition, this method utilizes gradient boosting tree technology from ensemble learning algorithms combined with historical sales data for predictive modeling, further enhancing the model's generalization ability and prediction accuracy. Ultimately, real-time adjustments to inventory and distribution strategies based on accurate freshness assessment reports not only help reduce food waste but also significantly improve operational efficiency and customer satisfaction. Simultaneously, the practice of continuously optimizing management processes based on market feedback ensures that the entire system can adapt to ever-changing market demands, providing a more flexible and efficient solution for food supply chain management.

[0069] Furthermore, this invention proposes a method based on a food image database. After ensuring image consistency through standardization, a deep convolutional neural network model is used for multi-level feature extraction, combined with variational autoencoder technology to generate optimized feature representations. Subsequently, an environmental factor correction model is introduced to correct the feature representations based on environmental sensor data. Finally, dynamic monitoring rules are designed to accurately monitor color and texture changes in food over different time periods, generating preliminary assessment 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 and temperature) on image analysis results, enabling consistent and reliable assessment results even in complex and variable environments, thus providing more accurate data support for food supply chain management.

[0070] Furthermore, the method proposed in this invention, based on preliminary evaluation results and combined with food type, storage conditions, and historical sales data, forms a comprehensive dataset and performs preprocessing. Feature engineering is applied to the comprehensive dataset to extract features related to food freshness, and a feature selection algorithm is used to select the most influential features. Next, a prediction model is constructed using gradient boosting tree technology, and K-fold cross-validation and hyperparameter optimization are used to ensure the model's accuracy and generalization ability. Finally, an optimized gradient boosting tree model is generated for predicting food freshness and producing a final freshness assessment report. This method, by comprehensively considering multiple factors (such as food type, storage conditions, and historical sales data) and performing feature engineering, significantly improves the accuracy and generalization ability of the freshness prediction model. In particular, K-fold cross-validation and hyperparameter optimization ensure the model's stability and consistency across different data subsets, thus providing more reliable and accurate freshness predictions for food supply chain management, helping to reduce food waste, improve operational efficiency, and enhance overall food safety.

[0071] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

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

[0073] Figure 1 A flowchart illustrating a food freshness assessment method based on image processing, provided in this application embodiment;

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

[0075] Figure 3 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0076] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0077] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

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

[0079] Figure 1 A flowchart of an image processing-based food freshness assessment method is provided as an embodiment of this application, such as... Figure 1 As shown, the method includes:

[0080] 101. 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;

[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 both security and speed during data transmission; personalized image acquisition parameters refer to image acquisition settings adjusted according to specific food types, such as resolution and exposure time, to obtain images of the best quality; a food image database is a collection of data that stores food images and related information (such as timestamps and locations) to support subsequent analysis.

[0082] In this step, image acquisition devices (such as cameras) are first deployed at the retail or production site, and corresponding image acquisition parameters are configured according to the food type. Then, the acquired image data is transmitted to a central processing center via a secure and efficient network protocol. At the central processing center, these images are organized and stored to form a structured food image database, preparing 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 capturing images from a different angle. For apples, a higher resolution and appropriate exposure time are set to capture surface details; for bananas, the shooting angle and exposure time are adjusted to better showcase color changes. All images are transmitted in real-time to a central server via HTTP and stored in a dedicated database, tagged with time and location information for subsequent analysis.

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

[0085] Deep convolutional neural networks are artificial intelligence models that mimic how the human brain processes visual information, excelling at image recognition and feature extraction; variational autoencoders are generative models that learn data distributions to compress raw data and reconstruct similar new data; environmental factor correction models use 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, images in the food image database are first standardized to ensure consistent resolution and color mode. Next, a pre-trained deep convolutional neural network model is used to extract multi-level features from the images, capturing both local and global features. Then, variational autoencoder technology is used to compress and decode key region information, generating compact feature representations. Finally, an environmental factor correction model is used to correct the feature representations, eliminating the influence of external environments and generating preliminary freshness assessment results.

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

[0088] Using the aforementioned food image database, image data is standardized to ensure all images have the same resolution and color mode, resulting in a standardized food image dataset. Based on this standardized dataset, a pre-built deep convolutional neural network model is used to perform multi-level feature extraction on the food images. Local and global features in the images are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information. Based on this multi-level feature information, variational autoencoder technology is used to compress and decode key region information in the images, generating a compact representation of the images, resulting in an optimized feature representation. An environmental factor correction model is introduced to correct the optimized feature representation based on environmental sensor data, resulting in 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 in food over different time periods, generating preliminary evaluation results.

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

[0090] Using the multi-level feature information, a variational autoencoder model including an encoder and a decoder is constructed to compress and decode key region information in the image, generating a low-dimensional compact representation. Based on 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 a predefined prior distribution, while simultaneously optimizing the reconstruction capability of the decoder, resulting in an optimized variational autoencoder model. Based on the optimized variational autoencoder model, the model parameters are further optimized by minimizing the weighted sum of reconstruction error and KL divergence, generating an optimized compact representation. Using the optimized compact representation, redundant information is removed and the most representative features are retained through further feature selection and fusion processing, generating an optimized feature representation.

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

[0092] Environmental sensor data collected synchronously with food image acquisition is used to form an environmental factor dataset. Based on the environmental factor dataset, an environmental factor correction model is constructed. This model 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 dataset. By minimizing the error between predicted and actual values, the model parameters are optimized 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 to calculate the impact of environmental factors on image features. The optimized feature representation is then 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 in information theory used to measure the difference between two probability distributions P and Q.

[0094] In this embodiment, firstly, the images in the food image database are standardized to ensure that all images have consistent resolution and color mode; secondly, a pre-built deep convolutional neural network model is used to extract multi-level features from the standardized images to capture local and global features; thirdly, variational autoencoder technology is used to compress and decode key region information to generate a low-dimensional compact representation, and KL divergence is introduced as a regularization term to optimize the model; finally, an environmental factor correction model is constructed based on environmental sensor data to correct the optimized feature representation, eliminate the influence 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 capturing images from a different angle. Then, the captured images are transmitted in real-time to a central server via HTTPS and stored in a dedicated database, tagged with time and location information. Next, these images are standardized to ensure 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, capturing color and texture variations on the apple surface. Finally, variational autoencoder technology is used to compress and decode key region information, generating a low-dimensional, compact representation. By introducing KL divergence as a regularization term to optimize model parameters, the compact representation is ensured to conform to a predefined prior distribution. Simultaneously, environmental sensor data (such as temperature and light intensity) synchronized with image acquisition are collected to form an environmental factor dataset. Based on this dataset, a regression analysis method is used to construct an environmental factor correction model, establishing the relationship between environmental parameters and image features. The correction model is trained using the environmental factor dataset, and the model parameters are optimized by minimizing the error between predicted and actual values. Finally, the optimized environmental factor correction model is used to correct the compact representation, calculate the impact of environmental factors on image features, adjust the feature representation, eliminate environmental interference, and generate preliminary freshness assessment results.

[0096] By following these steps, supermarkets can monitor and assess the freshness of fruit in real time, adjust inventory strategies and delivery plans accordingly, reduce waste, and improve customer satisfaction.

[0097] This application recognizes that multi-level feature extraction from food images using deep convolutional neural network models is a crucial step in food freshness assessment. These feature extraction processes include preprocessing steps such as size normalization, color space conversion, noise reduction, and edge enhancement to ensure the quality and applicability of the input data. Subsequently, convolutional layers, pooling layers, and fully connected layers capture local and global features in the image, generating multi-level feature information. Finally, through weighted summation, incorporating additional information, pooling, and fully connected layer transformations, a global feature vector G integrating multi-level feature information is generated.

[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 images. Local and global features in the images are captured through convolutional layers, pooling layers, and fully connected layers to obtain multi-level feature information, including:

[0099] In calculating feature map F i Before that, 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 Let W represent the feature map of the i-th layer, and let W represent the local features extracted from the image. conv represents the convolution kernel weight matrix, used for convolution operations on images to capture local features; I represents the standardized food image dataset, ensuring all images have the same resolution and color mode; b conv σ represents the bias term of the convolutional layer, used to adjust the result of the convolution operation; σ represents the activation function, using the ReLU function to introduce non-linearity and enhance the expressive power of the model; α represents the feature enhancement coefficient, used to adjust the historical feature map H. i The degree of influence; H i Let N represent the historical feature map of the i-th layer, and let λ represent the cumulative effect of the feature map of the previous layer; λ represents the noise suppression coefficient, used to adjust the noise suppression term N. i The degree of influence; N i η represents the noise suppression term in the i-th layer, used to reduce noise interference in the image; η represents the position weight coefficient, used to adjust the position information P. i Degree of influence; P i μ represents the location information of the i-th layer, used to enhance the feature representation of spatial location; μ represents the dynamic adjustment coefficient, used to adjust the dynamic feature term D. i Degree of influence; D i R represents the dynamic feature term of the i-th layer, used to capture dynamic changes in the image; ρ represents the context correlation coefficient, used to adjust the context information R. i The degree of influence; R i This represents the context information of the i-th layer, used to capture contextual dependencies in the image;

[0102] After calculating F i Then, through steps of weighted summation, introducing additional information, pooling, and transformation by fully connected layers, a global feature vector G integrating multi-layer feature information is generated;

[0103]

[0104] G represents the global feature vector, which represents the global features extracted from multi-layer feature maps; Pool represents the pooling operation, using max pooling or average pooling to reduce the dimensionality of the feature map and retain the most important information. Represents multi-layer feature map Fi Add environmental impact factor E i Attention mechanism A i Time information T i and visual context information V i The element-wise summation is then used to fuse feature information at different levels; β represents the weight of environmental impact factors; E i θ represents the environmental influence factor of the i-th layer, indicating the impact of environmental factors on the feature map; θ represents the attention weight coefficient, used to adjust the attention mechanism A. i The degree of influence; A i κ represents the attention mechanism of the i-th layer, used to highlight key regions and reduce background interference; κ represents the temporal weight coefficient, used to adjust the temporal information T. i The degree of influence; T i ω represents the temporal information of the i-th layer, used to reflect feature changes within different time periods; ω represents the visual context weight coefficient, used to adjust the visual context information V. i Degree of influence; V i δ represents the visual context information of the i-th layer, used to capture visual context dependencies in the image; FC represents the fully connected layer operation, used to convert the pooled feature map into a fixed-length feature vector to capture global features; n represents the number of convolutional layers, representing the depth of feature extraction; γ represents the correction coefficient, 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 environmental sensor data to eliminate the influence of external environmental changes on image analysis results; δ represents the spatial weight coefficient, used to adjust the influence of spatial information S; S represents spatial information, used to enhance the representation of spatial features; φ represents the multimodal fusion coefficient, used to adjust the influence of the multimodal feature fusion term M; M represents the multimodal feature fusion term, used to combine information from different modalities to improve feature richness; ψ represents the quality evaluation coefficient, used to adjust the influence of the quality evaluation information Q; Q represents quality evaluation information, used to evaluate the quality of the feature map and ensure the reliability of the features.

[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] This 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 rationale behind each term of the formula:

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

[0109] W conv *I represents the convolution operation between the convolution kernel and the image to capture local features; b conv It is the result of bias term adjustment; σ is the nonlinearity introduced by the activation function; α·H i It enhances the effect of historical feature maps; λ·N i It is to suppress noise; η·P i It enhances location information; μ·D i It is a dynamic feature term that captures changes; ρ·R i Contextual information enhances the understanding of dependencies;

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

[0111] W conv b conv The parameters α, λ, η, μ, and ρ are obtained through backpropagation optimization during model training; their optimal values ​​are typically determined using cross-validation. i N i P i D i R i These represent the historical feature map, noise suppression term, location information, dynamic feature term, and context information of the previous layer, respectively. These are calculated based on the output of the previous layer or specific rules.

[0112] The following is a brief introduction to the design rationale behind each term of the formula:

[0113]

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

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

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

[0117] Suppose we are using the above formula to process a standardized food image dataset in a food freshness detection system. First, we preprocess the original images 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 obtained, representing the historical feature map, noise suppression term, location information, dynamic feature term, and context information extracted from the previous layer, respectively. Then, the feature maps F2 and F3 of the second and third layers are calculated using similar parameter settings. Next, the multi-layer feature maps are weighted and summed, incorporating additional information. Where E i A i T i V i These are environmental influencing factors, attention mechanisms, temporal information, and visual contextual information, which are constructed using sensor data and domain knowledge. Subsequently, the dimensionality is reduced through max pooling, and then transformed into a fixed-length global feature vector through a fully connected layer. C, S, M, and Q represent the environmental factor correction model, spatial information, multimodal fusion term, and quality assessment information, respectively, which are constructed using specific methods. Ultimately, 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, being greater than the threshold indicates that the food is very fresh, as high positive values ​​typically indicate more positive attributes. Conversely, if an element's value is below the threshold, such as -0.12, it may indicate that the food is not very fresh or has other problems. By comparing the values ​​in the feature vector with the preset threshold, the freshness of the food can be quickly determined.

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

[0119] 103. Based on the preliminary assessment results, combined with the type of food, storage conditions and historical sales data, the gradient boosting tree technique in the ensemble learning algorithm is used to predict and model the freshness of the food. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, and the final freshness assessment report is obtained.

[0120] Gradient boosting tree technology in ensemble learning algorithms is a machine learning method that improves prediction performance by constructing multiple decision trees and combining them; cross-validation is a technique for evaluating model performance, which typically involves splitting the dataset into training and validation sets and performing the cross-validation 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 in order to find the optimal configuration to maximize model performance.

[0121] In this step, the preliminary assessment results are first integrated with data on food type, storage conditions, and historical sales to form a comprehensive dataset. Next, the comprehensive dataset undergoes preprocessing and feature engineering to extract features related to freshness, and a feature selection algorithm is used to filter out key features. Then, a predictive model is built using gradient boosting tree technology, and its performance is evaluated through K-fold cross-validation. Hyperparameter optimization further improves the model's accuracy and generalization ability. Finally, a food freshness assessment report is generated based on the optimized model.

[0122] Optionally, in step 103, based on the preliminary assessment results and in conjunction with the type of food, storage conditions, and historical sales data, the gradient boosting tree technique in the ensemble learning algorithm is used to predict and model the freshness of the food. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, resulting in a final freshness assessment report, including:

[0123] Based on the preliminary assessment results, and combining the types of food, storage conditions, and historical sales data, a comprehensive dataset is integrated. This dataset is preprocessed to ensure data quality meets modeling requirements. Feature engineering is then performed on the comprehensive dataset to extract features related to food freshness. A feature selection algorithm is used to select the features most influential on freshness prediction, reducing feature dimensionality and improving model training efficiency and generalization ability. Gradient boosting tree technology from ensemble learning algorithms is used to construct a food freshness prediction model. This model is trained using the comprehensive dataset, and its performance is evaluated using K-fold cross-validation to ensure stability and consistency across different data subsets. Hyperparameter optimization techniques are used to adjust the model's hyperparameters, further improving accuracy and generalization ability, resulting in an optimized gradient boosting tree model. Based on this optimized model, food freshness is predicted, generating a final freshness assessment report.

[0124] The step of performing feature engineering on the comprehensive dataset to extract features related to food freshness, and using a feature selection algorithm to screen out the features most influential on freshness prediction, thereby reducing feature dimensionality and improving the model's training efficiency and generalization ability, includes:

[0125] Using the comprehensive dataset, features related to food freshness are extracted, including color change rate and texture degradation from the preliminary assessment results, food type, storage conditions, and historical sales data, to obtain a preliminary feature set. Based on the preliminary feature set, new features are created using feature generation techniques to generate an expanded feature set. Using a feature selection algorithm, the features most influential on freshness prediction are selected from the expanded feature set to obtain a refined feature set. Dimensionality reduction techniques such as principal component analysis or linear discriminant analysis are used to reduce the dimensionality of the refined feature set, retaining the most important information to generate a dimensionality-reduced feature set. The dimensionality-reduced feature set is evaluated using cross-validation techniques to assess the model's performance on different feature sets, and the best feature subset is selected to generate the final feature set.

[0126] In this step, firstly, based on the preliminary evaluation results and other food-related information, a comprehensive dataset containing multiple data types is formed and preprocessed. Secondly, feature engineering is performed on the comprehensive dataset to extract key features affecting freshness and reduce dimensionality through feature selection. Thirdly, a prediction model is built based on the selected feature set using the gradient boosting tree algorithm, and the stability of the model is tested using K-fold cross-validation. 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 accuracy of predicting the freshness of its inventory of fruits and vegetables to reduce spoilage. First, it collects recent image analysis results, variety names, storage environment temperature and humidity records, and past sales data to form a comprehensive dataset, which undergoes preprocessing operations such as missing value imputation and outlier handling. Next, it extracts a series of features that may affect freshness from this comprehensive dataset, such as color change rate, texture degradation degree, specific variety, storage time, and average daily sales. New features are created using feature generation techniques, such as "color change rate / storage days" as an indicator of accelerated spoilage. Then, the most important features are selected using a random forest feature importance scoring method, and dimensionality is reduced to the optimal dimension using principal component analysis. Subsequently, a gradient boosting tree model is trained using these selected features, and 5-fold cross-validation is used to ensure good performance across different samples. Key hyperparameters such as maximum depth and learning rate are adjusted using a grid search method. Finally, based on the optimized model, the supermarket can accurately predict the freshness status of each batch of fruits and vegetables, allowing it to take timely action, such as adjusting shelf placement or promoting sales in advance, to maximize product value.

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

[0129] This application recognizes that Gradient Boosting Trees (GBT) is a powerful ensemble learning method for predicting food freshness, optimizing model performance by progressively building multiple decision trees. To ensure the model's accuracy and generalization ability, K-fold cross-validation is used to evaluate the model's stability and consistency across different data subsets, and hyperparameters are adjusted using hyperparameter optimization techniques. Finally, an optimized Gradient Boosting Tree model is generated for predicting food freshness.

[0130] Optionally, the step of constructing a food freshness prediction model using gradient boosting tree technology in ensemble learning algorithms, training the gradient boosting tree model using the comprehensive dataset, evaluating the model's performance using K-fold cross-validation to ensure the model's stability and consistency across different data subsets, and adjusting the model's hyperparameters using hyperparameter optimization techniques to further improve the model's accuracy and generalization ability, thereby generating an optimized gradient boosting tree model, includes:

[0131] Calculate the cross-validation score (CV) score Beforehand, the comprehensive dataset undergoes data cleaning, standardization / normalization, feature extraction, and feature selection to ensure data quality and applicability;

[0132]

[0133] CV score The cross-validation score represents the score used to evaluate the model's performance; K represents the number of folds in the K-fold cross-validation. The loss function representing the k-th fold of data can be either mean squared error or logarithmic loss; y k This represents the true label of the k-th fold of data; Let represent the predicted value of the k-th fold data; λ represents the regularization coefficient, used to control model complexity; Complexity(M, γ) represents model complexity, a function of the number of trees M and the leaf node weights γ; β represents the diversity coefficient, used to adjust the diversity term Diversity(T). k The degree of influence of Diversity (T) k ) represents the diversity term of the k-th fold data, used to measure the differences between different trees and improve the robustness of the model; δ represents the stability coefficient, used to adjust the stability term Stability(S) k The degree of influence of Stability (S) k ) represents the stability term of the k-th fold of data, used to evaluate the stability and consistency of the model across different subsets of data;

[0134] After calculating CV score Then, the optimal combination of hyperparameters is selected, the gradient boosting tree model is trained, and predictions are made for each sample in the test set to generate freshness prediction values.

[0135]

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

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

[0138] This formula aims to optimize the performance of gradient boosting tree models by comprehensively considering multiple factors such as model complexity, diversity, stability, and external influences, ensuring their stability and consistency across different subsets of data, while improving prediction accuracy and generalization ability.

[0139] The following is a brief introduction to the design rationale behind each term of the formula:

[0140]

[0141] λ is the loss function, used to measure the difference between the model's predicted values ​​and the true values; λ·Complexity(M, γ) is the regularization term, which controls the model complexity and prevents overfitting; β·Diversity(T) ... k ) is the diversity term, which improves the robustness of the model; δ·Stability(S) k () is a stability term that ensures the consistency of the model across different subsets of data;

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

[0143] Mean squared error or log loss is typically chosen; λ, β, and δ are hyperparameters determined through cross-validation; Complexity(M, γ) is calculated using the number of trees M and the leaf node weights γ; Diversity(T) k Stability (S) is obtained by calculating the differences between different trees; k This is obtained by evaluating the model's performance on different subsets of data;

[0144] The following is a brief introduction to the design rationale behind each term of the formula:

[0145]

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

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

[0148] F0(x i ) represents the initial predicted value, typically the average of the training data; γ m and h m (x i The values ​​are obtained through the training process of the gradient boosting tree; α, β, η, μ, and v are hyperparameters, determined through cross-validation; R i E i T i S i A i These are regularization terms, environmental impact terms, temporal impact terms, spatial impact terms, and attention mechanism terms, which are constructed based on domain-specific knowledge or sensor data.

[0149] Suppose we are using the above formula to construct a gradient boosting tree model in a food freshness prediction system. First, we perform data cleaning, standardization / normalization, feature extraction, and feature selection on the comprehensive dataset to ensure data quality and applicability. Next, we set K=5 for 5-fold cross-validation, calculate the cross-validation score, and train the gradient boosting tree model. Assuming M=100, γ... m and h m (x i Through training, we obtain α = 0.1, β = 0.2, η = 0.3, μ = 0.4, v = 0.5, and R i E i T i S i A i The system is constructed using a specific method; finally, predictions are made for each sample in the test set to generate a freshness prediction value. For example, for a sample x i After calculation, Because the threshold is set to This indicates that the food is very fresh, as a high positive value usually indicates a more positive attribute; conversely, if... This may indicate that the food is not very fresh or that there is another problem.

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

[0151] 104. Using the aforementioned freshness assessment report, adjust inventory strategies in real time, optimize food delivery 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 for deciding how and when to replenish inventory; distribution plan is the arrangement for transporting products from the warehouse to the customer; market feedback includes consumer opinions, sales data, etc., used to evaluate the performance of a product or service; freshness assessment criteria are a set of specific indicators used to measure whether food quality meets requirements.

[0153] This step begins by utilizing information from the freshness assessment report to adjust inventory strategies in real time through an intelligent supply chain management system, preventing the accumulation of expired food. Next, food delivery plans are optimized to improve logistics efficiency. Furthermore, market feedback is collected through various channels to evaluate the actual effectiveness of the freshness assessment report and user satisfaction, and freshness assessment standards are dynamically adjusted based on this feedback. Finally, the food freshness management process is continuously optimized to ensure the efficient operation of the entire supply chain system.

[0154] Optionally, step 104 involves using the freshness assessment report to adjust inventory strategies in real time, optimize food delivery plans, and dynamically adjust freshness assessment standards based on market feedback to continuously optimize the food freshness management process and generate an optimized management process, including:

[0155] Using the freshness assessment report, key information such as the food's freshness score, predicted shelf life, and potential risk points is extracted to form a structured dataset. Based on this structured dataset, an intelligent supply chain management system adjusts inventory strategies in real time to generate an optimized inventory strategy. Combining the predicted shelf life from the freshness assessment report, the food delivery plan is optimized to improve overall food circulation efficiency, generating an optimized delivery plan. Market feedback is collected through multiple channels to evaluate the actual effectiveness of the freshness assessment report and user satisfaction, generating market feedback data. Based on this market feedback data, the freshness assessment standards are dynamically adjusted to improve accuracy, generating updated freshness assessment standards. The food freshness management process is continuously optimized through regular evaluation and improvement to ensure the efficient operation of the entire supply chain system, generating an optimized management process.

[0156] In this process, firstly, key information is extracted from the freshness assessment report to form a structured dataset; secondly, based on this structured data, an intelligent supply chain management system is used to adjust inventory strategies in real time, generating an optimized inventory strategy; thirdly, the food delivery plan is optimized in conjunction with the predicted shelf life to improve overall distribution efficiency; then, market feedback is collected through multiple channels to evaluate the actual effectiveness of the freshness assessment report and user satisfaction; finally, the freshness assessment standards are dynamically adjusted based on market feedback data, and the entire food freshness management process is continuously optimized 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 potential risk points for each food item from the freshness assessment report, forming a structured dataset. Next, based on this dataset, the supermarket uses an intelligent supply chain management system to adjust its inventory strategy in real time, such as promoting or reducing the price of foods nearing their expiration date, while increasing the replenishment frequency of fresh foods, thus generating an optimized inventory strategy. Subsequently, combined with the predicted shelf life, the supermarket optimizes its delivery plan, prioritizing the delivery of foods nearing their expiration date, reducing waste and improving overall distribution efficiency. Furthermore, the supermarket collects market feedback through customer surveys and online review analysis, discovering that the freshness assessment standards for some foods need adjustment because the actual shelf life is longer than predicted. Therefore, the supermarket dynamically adjusts the freshness assessment standards based on this feedback data, improving 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 its inventory and distribution management, but also enhanced its adaptability to market changes and improved its overall operational efficiency.

[0159] Figure 2 This application provides a schematic diagram of the structure of a food freshness assessment system based on image processing, as shown in the embodiment of the present application. Figure 2 As shown, the device includes:

[0160] Transmission module 21 is used to acquire multi-view images of food and transmit the images to the 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.

[0161] 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, using a pre-built deep convolutional neural network model combined with variational autoencoder technology, introducing an environmental factor correction model to eliminate the influence of external environmental changes on image analysis results, and generating preliminary evaluation results.

[0162] The prediction module 23 is used to predict and model the freshness of food based on the preliminary assessment results, combined with the type of food, storage conditions and historical sales data, using gradient boosting tree technology in the ensemble learning algorithm. The accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization techniques, and the final freshness assessment report is obtained.

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

[0164] Figure 2 The image processing-based food freshness assessment system described above can perform... Figure 1 The implementation principle and technical effects of the image processing-based food freshness assessment method described in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the image processing-based food freshness assessment system in the above embodiments are performed have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0165] In one possible design, Figure 2 The image processing-based food freshness assessment system of 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 invoked and executed by the processing component 32.

[0167] The processing component 32 is used for: acquiring multi-view images of food; transmitting the images to a central processing center via a secure and efficient network protocol; setting personalized image acquisition parameters according to different food types to form a food image database; based on the food image database, using 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 over different time periods; introducing an environmental factor correction model to eliminate the influence of external environmental changes on image analysis results and generating preliminary evaluation results; based on the preliminary evaluation results, combined with the type of food, storage conditions, and historical sales data, using gradient boosting tree technology in ensemble learning algorithms to predict and model the freshness of food; ensuring the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization techniques to obtain a final freshness evaluation report; using the freshness evaluation report, adjusting inventory strategies in real time, optimizing food delivery plans, and dynamically adjusting freshness evaluation standards based on market feedback to 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-described method. Alternatively, the processing component may be implemented as 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-described method.

[0169] 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 storage, flash memory, magnetic disk, or optical disk.

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

[0171] Input / output interfaces provide interfaces between processing components and peripheral interface modules, which can be output devices, input devices, etc.

[0172] The communication components are configured to facilitate wired or wireless communication between computing devices and other devices.

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

[0174] This application also provides a computer storage medium storing a computer program, which, when executed by a computer, can perform the above-described functions. Figure 1 The illustrated embodiment presents a food freshness assessment method based on image processing.

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

[0176] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments 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 this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An image processing-based food freshness evaluation method, characterized by, The method comprises the following steps: acquiring multi-view images of food, transmitting the images to a central processing center through a safe and efficient network protocol, setting personalized image acquisition parameters according to different food types, and forming a food image database; based on the food image database, using a pre-constructed deep convolutional neural network model combined with a variational autoencoder technique to perform high-precision dynamic monitoring of the color and texture changes of food over different time periods, introducing an environmental factor correction model to eliminate the influence of external environmental changes on image analysis results, and generating preliminary evaluation results; based on the preliminary evaluation results, combining the type, storage conditions and historical sales data of the food, using gradient boosting tree technology in ensemble learning algorithm to model the freshness of the food, ensuring the accuracy and generalization ability of the model through cross-validation and hyperparameter optimization techniques, and obtaining the final freshness evaluation report; using the freshness evaluation report, adjusting the inventory strategy in real time, optimizing the food distribution plan, and dynamically adjusting the freshness evaluation standard according to market feedback to continuously optimize the food freshness management process, and generating the optimized management process; the introduction of the environmental factor correction model eliminates the influence of external environmental changes on the image analysis results and generates the preliminary evaluation results, which includes: collecting environmental sensor data synchronized with food image acquisition to form an environmental factor dataset; based on the environmental factor dataset, 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; using the environmental factor dataset to train the environmental factor correction model, and optimizing the model parameters by minimizing the error between the predicted value and the actual value; using the optimized environmental factor correction model to correct the optimized feature representation, calculating the influence of environmental factors on image features, and adjusting the optimized feature representation to generate corrected feature information; based on the corrected feature information, designing dynamic monitoring rules to perform high-precision dynamic monitoring of the color and texture changes of food over different time periods, and generating preliminary evaluation results.

2. The method of claim 1, wherein, based on the food image database, using a pre-constructed deep convolutional neural network model combined with a variational autoencoder technique to perform high-precision dynamic monitoring of the color and texture changes of food over different time periods, which includes: using the food image database to standardize the image data and obtain a standardized food image dataset; based on the standardized food image dataset, using a pre-constructed deep convolutional neural network model to perform multi-level feature extraction processing on food images, capturing local and global features in images through convolutional layers, pooling layers and fully connected layers, and obtaining multi-level feature information; based on the multi-level feature information, combining variational autoencoder technology to compress and decode key region information in images to generate compact representations of images, and obtaining optimized feature representations.

3. The method of claim 2, wherein, The standardized food image dataset is used to perform multi-level feature extraction on food images by using a pre-constructed deep convolutional neural network model, local and global features in the images are captured through convolutional layers, pooling layers and fully connected layers, and multi-level feature information is obtained, including: In calculating the feature map Previously, the original image is pre-processed by size normalization, color space conversion, noise reduction and edge enhancement to ensure the quality and applicability of the input data; ; represents the first layer of feature maps, representing local features extracted from images; represents the convolution kernel weight matrix, used for convolution operation on images, capturing local features; represents the standardized food image dataset, ensuring that all images have the same resolution and color mode; represents the bias term of the convolution layer, used to adjust the results of the convolution operation; represents the activation function, using the ReLU function, used to introduce nonlinearity and enhance the expression ability of the model; represents the feature enhancement coefficient, used to adjust the influence degree of historical feature maps ; represents the first layer of historical feature maps, representing the cumulative effect of the previous layer of feature maps; represents the noise suppression coefficient, used to adjust the influence degree of the noise suppression term ; represents the first layer of noise suppression terms, used to reduce noise interference in images; represents the position weight coefficient, used to adjust the influence degree of position information ; represents the first layer of position information, used to enhance the feature representation of spatial position; represents the dynamic adjustment coefficient, used to adjust the influence degree of the dynamic feature term ; represents the first layer of dynamic feature terms, used to capture dynamic changes in images; represents the context-related coefficient, used to adjust the influence degree of context information ; represents the first layer of context information, used to capture context-dependent relationships in images; After the calculation is completed , the global feature vector of the comprehensive multi-layer feature information is generated through the steps of weighted summation, introduction of additional information, pooling, and full connection layer conversion ; ; represents the global feature vector, and represents the global features extracted from the multi-level feature maps; Pool represents the pooling operation, using max pooling or average pooling, to reduce the dimension of the feature maps and preserve the most important information; represents the multi-level feature maps plus the environmental impact factor , attention mechanism , temporal information and visual context information element-wise sum after represents the weight of the environmental impact factor; represents the environmental impact factor of the layer, representing the impact of environmental factors on the feature map; represents the attention weight coefficient, used to adjust the influence degree of the attention mechanism ; represents the attention mechanism of the layer, used to highlight key areas and reduce background interference; represents the temporal weight coefficient, used to adjust the influence degree of the temporal information ; represents the temporal information of the layer, used to reflect the feature changes in different time periods; represents the visual context weight coefficient, used to adjust the influence degree of the visual context information ; represents the visual context information of the layer, used to capture the visual context dependency relationship in the image; FC represents the fully connected layer operation, used to convert the pooled feature map into a fixed length feature vector, capturing the global features; represents the number of convolution layers, representing the depth of feature extraction; represents the correction coefficient, used to adjust the influence degree of the environmental factor correction model ; represents the environmental factor correction model, based on environmental sensor data to correct the feature map, eliminating the influence of external environmental changes on image analysis results; represents the spatial weight coefficient, used to adjust the influence degree of the spatial information ; represents the spatial information, used to enhance the representation of spatial features; represents the multi-modal fusion coefficient, used to adjust the influence degree of the multi-modal feature fusion term ; represents the multi-modal feature fusion term, used to combine information from different modalities to improve the richness of the features; denotes a quality evaluation coefficient for adjusting the influence degree of the quality evaluation information denotes quality evaluation information for evaluating the quality of the feature map to ensure the reliability of the feature​ After obtaining the feature quality and improve the model performance by normalization, feature selection, feature enhancement and multi-modal learning techniques.

4. The method of claim 2, wherein, The multi-level feature information is used to compress and decode the key region information in the image by combining a variational autoencoder technique to generate a compact representation of the image and obtain an optimized feature representation, including: A variational autoencoder model containing an encoder and a decoder is constructed using the multi-level feature information to compress and decode the key region information in the image to generate a low-dimensional compact representation; According to 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, while optimizing the reconstruction ability of the decoder, and an optimized variational autoencoder model is obtained; 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; The optimized compact representation is used for further feature selection and fusion processing to remove redundant information and retain the most representative features to generate an optimized feature representation.

5. The method of claim 1, wherein, According to the preliminary evaluation results, the freshness of the food is predicted and modeled by using gradient boosting tree technology in the ensemble learning algorithm, combined with the type, storage condition and historical sales data of the food, the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization techniques, and the final freshness evaluation report is obtained, including: According to the preliminary evaluation results, the freshness of the food is predicted and modeled by using gradient boosting tree technology in the ensemble learning algorithm, combined with the type, storage condition and historical sales data of the food, the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization techniques, and the final freshness evaluation report is obtained, including: According to the preliminary evaluation results, the freshness of the food is predicted and modeled by using gradient boosting tree technology in the ensemble learning algorithm, combined with the type, storage condition and historical sales data of the food, the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization techniques, and the final freshness evaluation report is obtained, including: According to the preliminary evaluation results, the freshness of the food is predicted and modeled by using gradient boosting tree technology in the ensemble learning algorithm, combined with the type, storage condition and historical sales data of the food, the accuracy and generalization ability of the model are ensured through cross-validation and hyperparameter optimization techniques, and the final freshness evaluation report is obtained, including: 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 through 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 through hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and an optimized gradient boosting tree model is generated, including:

6. The method of claim 5, wherein, 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 through 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 through hyperparameter optimization technology to further improve the accuracy and generalization ability of the model, and an optimized gradient boosting tree model is generated, including: In computing the cross-validation score Previously, data cleaning, standardization / normalization, feature extraction, and feature selection were performed on the integrated dataset to ensure data quality and suitability. ; represents the cross-validation score, used to evaluate the performance of the model; represents the fold number of K-fold cross-validation; Loss represents the loss function of the th fold data, using mean squared error or log loss; represents the true labels of the th fold data; represents the predicted values of the th fold data; represents the regularization coefficient, used to control the model complexity; Complexity represents the model complexity, the number of trees and leaf node weights ; represents the diversity coefficient, used to adjust the influence degree of the diversity term Diversity ; Diversity represents the diversity term of the th fold data, used to measure the difference between different trees, improve the robustness of the model; represents the stability coefficient, used to adjust the influence degree of the stability term Stability ; Stability represents the stability term of the th fold data, used to evaluate the stability and consistency of the model on different data subsets; After the calculation is completed Then, the optimal hyperparameter combination is selected, the gradient boosting tree model is trained, and the freshness prediction value is generated by predicting each sample in the test set ; ; Indicates the first Predicted freshness values ​​for each sample; This represents the initial predicted value, which is a constant. Indicates the number of gradient boosting trees; Indicates the first The weights of the leaf nodes of each tree; Indicates the first tree to the first Predicted values ​​for each sample; Represents the regularization coefficient, used to adjust the regularization term. The degree of impact; Indicates the first The regularization term for each sample is used to reduce the risk of overfitting in the model; This represents the environmental impact factor, used to adjust the environmental impact item. The degree of impact; Indicates the first The environmental impact item for each sample is used to consider the impact of the external environment on freshness prediction. This represents the time effect coefficient, used to adjust for the time effect item. The degree of impact; Indicates the first The time effect term for each sample is used to consider the impact of time on freshness prediction. This represents the spatial influence coefficient, used to adjust the spatial influence term. The degree of impact; Indicates the first The spatial influence term for each sample is used to consider the impact of geographical location on freshness prediction. This represents the attention coefficient, used to adjust the attention mechanism term. The degree of impact; Indicates the first An attention mechanism term for each sample is used to highlight key features and reduce background interference; After obtaining the optimized gradient boosting tree model is generated through further hyperparameter tuning, ensemble learning techniques, and performance evaluation.

7. The method of claim 6, wherein, The feature engineering of the comprehensive data set is performed, the features related to food freshness are extracted, the feature selection algorithm is used to screen out the most influential features for freshness prediction, the feature dimension is reduced, and the training efficiency and generalization ability of the model are improved, including: Using the comprehensive data set, features related to food freshness are extracted, including color change rate, texture degradation degree in the preliminary evaluation results, food category, storage conditions, and historical sales data, to obtain a preliminary feature set; Based on the preliminary feature set, new features are created through feature generation technology to generate an expanded feature set; Using feature selection algorithms, the most influential features for freshness prediction are selected from the expanded feature set to obtain a selected feature set; Through principal component analysis or linear discriminant analysis dimension reduction technology, the selected feature set is reduced in dimension to retain the most important information, generating a reduced feature set; The reduced feature set is evaluated, and the performance of the model on different feature sets is evaluated through cross-validation technology to select the best feature subset and generate the final feature set.

8. The method of claim 1, wherein, The freshness evaluation report is used to adjust the inventory strategy in real time, optimize the food distribution plan, and dynamically adjust the freshness evaluation standard based on market feedback to continuously optimize the food freshness management process, generating an optimized management process, including: Using the freshness evaluation report, the freshness score of the food, the predicted shelf life, and the key information of potential risk points are extracted to form a structured data set; Based on the structured data set, the intelligent supply chain management system is used to adjust the inventory strategy in real time to generate an optimized inventory strategy; Combined with the predicted shelf life in the freshness evaluation report, the food distribution plan is optimized to generate an optimized distribution plan; Through various channels, market feedback is collected to evaluate the actual effect of the freshness evaluation report and user satisfaction to generate market feedback data; According to the market feedback data, the freshness evaluation standard is dynamically adjusted to generate an updated freshness evaluation standard; Continuously optimize the food freshness management process through regular evaluation and improvement to generate an optimized management process.

9. An image processing-based food freshness assessment system, characterized by, Including: The transmission module is used to obtain multiple-angle images of food and transmit the images to the central processing center through a safe and efficient network protocol. Individualized image acquisition parameters are set according to different food types to form a food image database. The monitoring module is used to monitor the color and texture changes of food at different time periods based on the food image database using a pre-constructed deep convolutional neural network model combined with a variational autoencoder technique. An environmental factor correction model is introduced to eliminate the influence of external environmental changes on image analysis results, generating preliminary evaluation results. The prediction module is used to predict the freshness of food based on the preliminary evaluation results, combined with the food category, storage conditions, and historical sales data, using gradient boosting tree technology in ensemble learning algorithms to build a model for predicting food freshness. Cross-validation and hyperparameter optimization techniques are used to ensure the accuracy and generalization ability of the model, resulting in a final freshness evaluation report. An optimization module is configured to utilize the freshness evaluation report to adjust inventory strategies in real time, optimize food delivery plans, and dynamically adjust freshness evaluation standards based on market feedback to continuously optimize food freshness management processes and generate optimized management processes. The introduction of the environmental factor correction model eliminates the influence of external environmental changes on the image analysis results and generates preliminary evaluation results, including: Collecting environmental sensor data synchronized with food image collection to form an environmental factor dataset; Based on the environmental factor dataset, 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 dataset, and the model parameters are optimized by minimizing the error between the predicted value and the actual value; Using the optimized environmental factor correction model, the optimized feature representation is corrected, the influence of environmental factors on image features is calculated, and the optimized feature representation is adjusted to generate corrected feature information; According to the corrected feature information, dynamic monitoring rules are designed to monitor the color and texture changes of food at different time periods with high precision to generate preliminary evaluation results.

Citation Information

Patent Citations

  • Fresh degree evaluation method and device and storage medium

    CN110503314A

  • Electrical impedance imaging method based on deep learning

    CN112200306A