Food detection information processing method based on cloud computing

By adopting cloud computing-based methods in food detection information processing, a nonlinear time-varying state space model is constructed and Kalman filtering is used, the problem of insufficient accuracy and adaptability of food quality prediction in the prior art is solved, and a more efficient and stable food production process is achieved.

CN120163490APending Publication Date: 2025-06-17INSPECTION & QUARANTINE TECH CENT SHANDONG ENTRY EXIT INSPECTION & QUARANTINE BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510234860.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

Existing food detection information processing methods rely on a single sensor or static quality prediction model, cannot provide sufficient accuracy, ignore the complex nonlinear relationship between multiple factors in the food production process, resulting in large prediction errors and difficulty in adapting to environmental changes.

Method used

The food detection information processing method based on cloud computing is adopted, multi-dimensional data is collected through sensors, a nonlinear time-varying state space model is constructed, Kalman filtering is used for real-time estimation, and stream processing and prediction are performed through the cloud computing platform to generate quality prediction results, and control parameters in the production process are adjusted according to the prediction results.

Benefits of technology

It improves the accuracy of food quality prediction and the stability of the production process, reduces the lagging response problem of quality fluctuations, significantly improves the adaptability and accuracy of the model, and ensures the efficiency and consistency of food production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120163490A_ABST
    Figure CN120163490A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of food detection information processing, and discloses a food detection information processing method based on cloud computing, comprising the following steps: acquiring multi-dimensional data of food quality through a sensor, the acquired multi-dimensional data including temperature, humidity, pH value, illumination intensity and production speed; the collected multi-dimensional data are preprocessed; on the basis of collected multi-dimensional data, a nonlinear time-varying state space model is constructed, the dynamic process of food quality change is described, and a food detection information processing system based on cloud computing is further provided and comprises the following modules: a data collection module used for collecting multi-dimensional data related to food quality in real time; according to the food detection information processing system based on cloud computing, a food detection information processing method based on cloud computing is adopted, real-time data acquisition and stream processing technologies are combined, the technical effect of monitoring food quality in real time is achieved, and timely intervention and adjustment in the production process are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of food detection information processing, and specifically to a food detection information processing method based on cloud computing. Background Art

[0002] The safety and stability of food quality are the core issues concerned by the global food production industry. With the increasing requirements of consumers for food safety, how to ensure quality control during the production process has become a key challenge for major food production enterprises. Food detection usually involves multi-dimensional quality indicators such as temperature, humidity, pH value, light intensity, etc., and these indicators have a crucial impact on the final quality of the product. In modern food industry, quality detection no longer relies solely on manual inspection and traditional laboratory analysis methods, but is gradually turning towards automated, real-time monitoring and data-driven intelligent detection systems. An effective food quality monitoring system can collect data in real time during the production process, predict quality changes and automatically adjust production parameters, thereby ensuring product consistency and quality stability.

[0003] Food detection information processing methods mainly rely on sensor technology and data acquisition systems, which can monitor various quality parameters on the production line in real time. Common food detection methods include sensor technologies based on infrared, ultraviolet and chemical reactions. Through these methods, key data such as temperature, humidity, pH value of food can be collected in real time. With the development of Internet of Things (IoT) technology, many food production enterprises have begun to connect sensors to cloud computing platforms and use the data processing capabilities of the cloud platform to analyze and predict real-time data.

[0004] However, existing food detection information processing methods rely on a single sensor or static quality prediction models, which makes them unable to provide sufficient accuracy when dealing with complex and dynamically changing production environments. Existing models are often built based on linear assumptions, ignoring the complex non-linear relationships between various factors in the food production process, resulting in large prediction errors and difficulty in adapting to environmental changes. Moreover, most existing data processing systems still rely on local computing and lack sufficient computing resources to process a large amount of real-time data, leading to quality fluctuations or delayed feedback in production. Therefore, the present invention provides a food detection information processing method based on cloud computing to solve the deficiencies existing in the prior art. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present invention provides a food detection information processing method based on cloud computing, which solves the problems that existing food detection information processing methods rely on a single sensor or static quality prediction models, cannot provide sufficient accuracy, ignore the complex non-linear relationships between various factors in the food production process, resulting in large prediction errors and difficulty in adapting to environmental changes.

[0006] To achieve the above object, the present invention is realized by the following technical solutions: A food detection information processing method based on cloud computing, comprising the following steps:

[0007] Collect multi-dimensional data of food quality through sensors, and the collected multi-dimensional data includes temperature, humidity, pH value, light intensity, and production speed;

[0008] Preprocess the collected multi-dimensional data;

[0009] Based on the collected multi-dimensional data, construct a non-linear time-varying state space model to describe the dynamic process of food quality change;

[0010] The constructed state space model is optimized through an objective function, and the objective function includes a prediction error and a regularization term of the production process control input;

[0011] Use Kalman filtering to perform real-time estimation on the dynamic state of food quality change to eliminate noise and errors;

[0012] Perform stream processing and prediction on the real-time collected data through a cloud computing platform to generate a quality prediction result;

[0013] Adjust the control parameters in the production process according to the prediction result and the optimization target.

[0014] Preferably, the objective function optimization step includes:

[0015] According to the dynamic model and the real-time prediction result, use the gradient descent method, genetic algorithm, and particle swarm optimization algorithm to optimize the objective function;

[0016] The objective function includes a penalty term for food quality prediction error and a regularization term for production parameter control input;

[0017] Update the production process control parameters according to each optimization and adjust the system to achieve optimal food quality control.

[0018] Preferably, the non-linear time-varying is modeled using a state space model, and the state space model includes the following equations:

[0019] x(t + 1) = A(t)x(t) + B(t)u(t) + w(t);

[0020] y(t) = C(t)x(t) + v(t);

[0021] Among them, \(x(t)\) is the state vector of the system, \(A(t)\) is the state transition matrix, \(B(t)\) is the control input matrix, \(u(t)\) is the control input, \(y(t)\) is the observation result, \(w(t)\) and \(v(t)\) respectively represent the process noise and the observation noise, and \(C(t)\) is the observation matrix.

[0022] Preferably, the optimization of the objective function is carried out by minimizing the prediction error and the regularization term of the production process control input. The objective function includes the following formula:

[0023]

[0024] Among them, is the overall optimization objective function, \(T\) is the total number of time steps, is the predicted food quality, \(y(t)\) is the actually measured food quality, is the sum of squares of the prediction error, \(\|\cdot\|_2\) is the Euclidean norm, \(\lambda\) is the regularization parameter, and \(u(t)\|_1\) represents the total sum of the control input magnitude.

[0025] Preferably, the dynamic state of the food quality change is estimated in real time through Kalman filtering. The extended steps of the Kalman filtering include:

[0026] Prediction step: Predict the state at the current time point based on the system model and the control input;

[0027] Update step: When a new observation value arrives, the Kalman filter adjusts and updates the predicted state according to this observation value.

[0028] Preferably, the real-time collected data is subjected to stream processing. The stream processing step uses a cloud computing platform for real-time prediction. The cloud computing platform supports real-time data stream processing in the following ways:

[0029] Use a big data processing framework to perform real-time analysis and processing of the data stream;

[0030] Run a real-time prediction model on the cloud platform and adjust the temperature, humidity, and production speed parameters in the production process according to the real-time prediction results.

[0031] Preferably, a dynamic adjustment plan for the production process is generated through real-time feedback according to the prediction results and the optimization objectives. The dynamic adjustment includes:

[0032] Adjust the temperature, humidity, and production speed parameters according to the real-time predicted quality data;

[0033] Provide real-time quality feedback to the operator for intervention and adjustment.

[0034] Preferably, the non-linear time-varying modeling steps include:

[0035] Based on the collected data, a non-linear model is used to model the dynamic changes in food quality;

[0036] According to the historical data of food quality and relevant environmental factors, the parameters of the model are dynamically updated to more accurately describe the changes in food quality;

[0037] Based on the combination of the non-linear modeling results and the control parameters of the production process, quality prediction is carried out, and the parameters in the production process are adjusted through this model.

[0038] Preferably, the collected multi-dimensional data is preprocessed, and the steps of the preprocessing include:

[0039] Clean the collected multi-dimensional data to remove invalid and duplicate data points;

[0040] Denoise the data, and use the moving average and low-pass filtering methods to remove the noise in the sensor data;

[0041] Use the interpolation method to fill in the missing values.

[0042] A food detection information processing system based on cloud computing is also provided, including the following modules:

[0043] Data acquisition module: used to collect multi-dimensional data related to food quality in real time;

[0044] Data processing module: used to preprocess the collected data;

[0045] Modeling and optimization module: used to build a dynamic model of food quality based on the collected data, and optimize the model through objective function optimization;

[0046] Real-time prediction module: used to process the data stream in real time based on the cloud computing platform, generate food quality prediction results, and perform production process prediction;

[0047] Decision support module: used to generate a production adjustment plan based on the prediction results, adjust the production parameters in real time, and provide feedback through the operator interface;

[0048] Execution module: used to perform real-time adjustment operations of production equipment according to the adjustment plan generated by the decision support module.

[0049] The present invention provides a food detection information processing method based on cloud computing. It has the following beneficial effects:

[0050] 1. The present invention adopts a food detection information processing method based on cloud computing, combines real-time data collection and stream processing technologies, and achieves the technical effect of real-time monitoring of food quality. Compared with the traditional data processing methods in the prior art, this technical solution can greatly improve the speed and accuracy of data processing, thus solving the problem of lagged response to quality fluctuations in the past food production process and ensuring timely intervention and adjustment during the production process.

[0051] 2. The present invention conducts dynamic modeling by constructing a non-linear time-varying state space model, and achieves the technical effect of improving the prediction accuracy of food quality. Compared with the solutions using simple linear models in the prior art, the present invention can capture the complex trends of food quality changes more accurately, overcome the prediction errors of traditional methods in dealing with the complexity of the food production environment, and significantly improve the adaptability and accuracy of the model.

[0052] 3. The present invention uses Kalman filtering for real-time estimation, and achieves the technical effect of reducing measurement noise and improving prediction accuracy. Compared with the solutions relying on single-sensor data in the prior art, Kalman filtering can estimate the food quality state more accurately in a noisy environment, effectively solve the problems brought by dealing with uncertainty and system noise in the past, and thus make the quality prediction more reliable.

[0053] 4. The present invention regularizes the control input of the production process through an optimized algorithm, and achieves the technical effect of balancing production efficiency and food quality. Compared with the solutions in the prior art that do not fully consider the changes in control input, the present invention can avoid excessive adjustment of production parameters on the premise of ensuring food quality, improve the stability of the production line, reduce abnormal fluctuations during the production process, and ensure continuous and stable high-efficiency production. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is the flowchart of the method of the present invention;

[0055] Figure 2 is the system architecture diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0057] Please refer to the attached Figure 1, embodiments of the present invention provide a food detection information processing method based on cloud computing. By combining real-time data collection, data preprocessing, dynamic model construction, optimization algorithms, and the real-time processing capabilities of the cloud computing platform, the problems of monitoring and controlling quality fluctuations in the food production process are solved, and the accuracy of food quality prediction and the stability of the production process are further improved. This method not only achieves precise control of food quality through real-time stream processing and prediction optimization, but also effectively reduces the fluctuations of control inputs in the production process, ensuring the efficiency and consistency of food production. The method includes the following steps:

[0058] S1. Collect multi-dimensional data of food quality through sensors. The collected multi-dimensional data includes temperature, humidity, pH value, light intensity, and production speed;

[0059] S2. Preprocess the collected multi-dimensional data;

[0060] S3. Based on the collected multi-dimensional data, construct a non-linear time-varying state space model to describe the dynamic process of food quality change;

[0061] S4. Optimize the constructed state space model through an objective function, and the objective function includes a prediction error and a regularization term of the production process control input;

[0062] S5. Use Kalman filtering to perform real-time estimation of the dynamic state of food quality change, eliminating noise and errors;

[0063] S6. Through the cloud computing platform, perform stream processing and prediction on the real-time collected data to generate a quality prediction result;

[0064] S7. Adjust the control parameters in the production process according to the prediction result and the optimization goal.

[0065] For step S1, multi-dimensional data affecting food quality is collected through sensors. These data mainly include temperature, humidity, pH value, light intensity, production speed, etc. Through these sensors, key quality indicators can be monitored in real time at all links of food production. The data collected by the sensors will be uploaded to the cloud computing platform in real time through Internet of Things technology for centralized analysis and real-time adjustment.

[0066] Generally, the change of food quality is multi-factor and multi-dimensional. Therefore, in the food production process, the monitoring of various factors is particularly important. The role of each sensor is to capture specific types of changes. For example, temperature and humidity are important factors affecting food preservation conditions. The change of pH value is directly related to the safety and taste of food, while light intensity is related to the degradation of nutritional components of some foods. Production speed is the key factor controlling production efficiency and quality.

[0067] As an option, the sensors can be deployed at various stages of the food production line, including but not limited to raw material processing areas, production and processing areas, storage areas, etc. The sensors in each area are responsible for monitoring specific quality parameters to ensure comprehensive monitoring of quality fluctuations throughout the production process. In some embodiments, the sensors can also be equipped with additional functions such as self-calibration and remote diagnosis to ensure the accuracy and stability of the collected data.

[0068] Specifically, temperature sensors can be used to monitor the heating or cooling steps during the production process to ensure that the temperature during production always remains within the specified range. Humidity sensors can be used to monitor the humidity of the production environment, especially in some humidity-sensitive foods (such as baked goods, dried fruit products, etc.), where changes in humidity can directly affect the quality of the product.

[0069] For the monitoring of pH value, pH sensors can provide real-time feedback on the acidity and alkalinity of the product. Especially in the production of fermented foods, changes in pH value are key parameters for controlling product quality. Monitoring of light intensity is particularly important for components in food that are susceptible to light (such as vitamin A, vitamin C, etc.), as they are easily decomposed under strong light, thus affecting the nutritional value of the food.

[0070] In terms of production speed, speed sensors installed on the production line are used to monitor the speed of the production line in real time to ensure production efficiency and the consistency of the final product.

[0071] In a possible implementation, the sensors are connected to the central data processing system via a wireless network, and the data is transmitted to the cloud computing platform in real time. The cloud platform can centrally store, process, and analyze this data. Through the real-time upload of data, the cloud platform can not only obtain various quality data of food production in real time but also adjust the control parameters during the production process according to the prediction results and optimization goals to further optimize the production process.

[0072] For step S2, in this embodiment, the data preprocessing process mainly includes three key links: missing value filling, denoising processing, and outlier detection. The raw data collected through these steps will be cleaned and corrected to provide high-quality input for subsequent modeling and analysis.

[0073] Generally, problems such as missing data, noise, and outliers in sensor data during food production are common. If these problems are not addressed, they will directly affect the accuracy and reliability of the food quality prediction model. Effective data preprocessing is a key step to ensure data quality and improve model prediction accuracy.

[0074] For the missing values in the data, interpolation method is used for filling. Generally, linear interpolation method can well fill the missing numerical values. Specifically, in time series data, if the sensor data at a certain time point is missing, the estimated value at that moment can be calculated through linear interpolation. The linear interpolation method fills through the linear relationship of known data points, and the formula is as follows:

[0075]

[0076] Among them, x(tθ is the state vector of the system, x(t - 1) represents the state of the system at time t - 1, and x(t + 1) represents the state of the system at time t + 1.

[0077] As an option, if there are many missing values or the data changes are relatively complex, polynomial interpolation or spline interpolation can also be used. They can provide higher-order fitting and reduce the error caused by linear interpolation. For some special cases, more complex algorithms (such as machine learning methods) may need to be introduced to handle the missing values.

[0078] The original data collected by the sensor is usually disturbed by the changes of the external environment, resulting in noise in the data. In order to remove these irrelevant high-frequency noises, the moving average method or low-pass filter is usually used for denoising processing.

[0079] In a specific implementation, the moving average method smooths the original data by calculating the average value within the data window. Set a window size N. For each time point t, the formula for its processed data value x′(t) is as follows:

[0080]

[0081] Among them, x′(t) represents the system state value obtained by the weighted average method at time t, x(i) represents the system state at time i, N is the window size, used to control the smoothing time range, t is the current time, and define the start and end times of the smoothing window, represents from time to time (a total of N time points) the sum of all x(i) state values collected, represents the average processing of the above summation result.

[0082] By using the moving average method, data can be effectively smoothed, reducing errors caused by short-term fluctuations. In addition, for cases with high-frequency noise, a low-pass filter can also be used to filter out noise outside the frequency range by setting the cut-off frequency. In some embodiments, a method based on Kalman filtering can be selected. This method can estimate noise and signals in real time according to the dynamic characteristics of the data, improving the filtering accuracy.

[0083] For outliers that appear during the acquisition process, effective elimination is required. Common outlier detection methods include the box plot method (IQR method) and the z-score method. In certain embodiments, the box plot method is used for outlier detection. By calculating the interquartile range (IQR) of the data, outliers outside the specified range are identified and removed. The specific calculation method is as follows:

[0084] IQR = Q3 - Q1;

[0085] Where Q3 is the third quartile of the data set and Q1 is the first quartile. If a data point is less than Q1 - 1.5×IQR or greater than Q3 + 1.5×IQR, it is considered an outlier.

[0086] For outliers in some extreme cases, the z-score method may be used. Whether a data point is an outlier is judged according to the standard deviation of the data point. If the z-score of a certain data point exceeds the set threshold, the data point is considered an outlier and removed.

[0087] Through the above data preprocessing steps, noise, missing values, and outliers in the original collected data are effectively cleaned and corrected. The processed data will have higher quality and can provide more reliable input for subsequent modeling and analysis. The effects of the preprocessing steps are reflected in two aspects:

[0088] The quality of the data is improved, avoiding interference from noise and outliers on subsequent modeling;

[0089] The prediction accuracy of the model is improved. Especially when predicting food quality based on a non-linear time-varying model, accurate input data is a prerequisite for ensuring the model accuracy.

[0090] In some embodiments, in order to further improve the efficiency and quality of data processing, it may be necessary to combine multiple preprocessing methods. For example, in the case of a large amount of data or strong diversity, in addition to basic interpolation, denoising, and outlier processing, more advanced data augmentation techniques or automated processing algorithms can be combined to optimize the data preprocessing process.

[0091] For step S3, in this embodiment, the state space model adopts a non-linear time-varying form, which can accurately capture the quality changes in the food production process. Since the changes in food quality are affected by multiple factors, and these influencing factors usually present complex non-linear relationships, using a linear model may not be able to accurately reflect the changing trend of quality, while a non-linear time-varying model can better handle this complexity.

[0092] Generally, the state space model is a mathematical tool for describing the changes in a dynamic system, which consists of two main parts: the state equation and the observation equation of the system. In the present invention, the state space model reflects the changes in food quality by describing the evolution process of the system state and the observation of the system state. Specifically, the non-linear time-varying state space model includes the following two key equations:

[0093] State equation:

[0094] x(t + 1) = A(t)x(t) + B(t)u(t) + w(t);

[0095] Where, x(t) is the state vector of the system, A(t) is the state transition matrix, B(t) is the control input matrix, u(t) is the control input, y(t) is the observation result, w(t) represents the process noise, which is used to describe the unpredictable external disturbances or unmodeled factors in the system. Usually, the process noise is assumed to be Gaussian noise, with zero mean and known covariance.

[0096] Observation equation:

[0097] y(t) = C(t)x(t) + v(t);

[0098] Where, y(t) is the observation result, which represents the food quality (such as pH value, temperature, etc.) measured by our sensor, C(t) is the observation matrix, x(t) is the state vector of the system, and v(t) is the observation noise, which is usually also assumed to be Gaussian noise, describing the errors existing in the measurement process.

[0099] In some embodiments, the matrices A(t), B(t), and C(t) are time-varying matrices that change with time, so that the behavior and prediction results of the system can be dynamically adjusted according to the changing environmental factors and production conditions in the actual production process.

[0100] Different from the traditional linear state space model, the non-linear time-varying model can capture the complex non-linear relationships in the food quality changes. In the embodiments of the present invention, the model not only considers the linear relationships between various variables, but also introduces non-linear functions to describe the mutual influences between variables. For example, the interaction between temperature and humidity may affect the preservation effect of food, and this kind of influence usually cannot be described by a simple linear relationship.

[0101] Specifically, the non-linear part of the model can be expressed in the form of polynomial functions, piecewise linear functions, neural networks, etc. The effects of temperature and humidity on food quality can be modeled by the following non-linear function:

[0102] x(t + 1) = f(x(t), u(t), θ);

[0103] Where x(t) is the state vector of the system, u(t) is the control input, f(x(t), u(t), θ) represents the state transition function of the system, and θ is the parameter of the model, representing the complex effects of factors such as temperature and humidity on food quality.

[0104] The state space model of the present invention has time-varying properties, that is, the parameters of the model (such as A(t), B(t), and C(t)) change with time. This time-varying property can better reflect the changes in environmental conditions during the production process. For example, with the change of seasons, temperature and humidity may change, thus affecting the quality of food. By introducing time-varying parameters, the model can dynamically adjust the prediction results according to the production environment in different time periods, providing more accurate quality predictions.

[0105] In a possible implementation, the time-varying property can be achieved by introducing time functions or using adaptive filtering methods, making the model have stronger adaptability in the actual production process. Specifically, the influence of certain variables in the production process may change over time. At this time, the model parameters can be dynamically adjusted through online learning or adaptive mechanisms.

[0106] After constructing the above non-linear time-varying state space model, it is necessary to train and optimize the model through an optimization algorithm. The goal of the optimization process is to minimize the prediction error, so that the model can provide accurate quality predictions in the actual production process. Usually, methods such as gradient descent method and particle swarm optimization are used in the optimization process to improve the prediction accuracy by continuously adjusting the model parameters.

[0107] In the optimization process, the prediction error of the model can be measured by the following objective function:

[0108]

[0109] Where is the overall optimization objective function, T is the total number of time steps, is the predicted food quality, y(t) is the actually measured food quality, is the sum of the squares of the prediction errors, ||·||2 is the Euclidean norm, λ is the regularization parameter, and ||u(t)||1 represents the total magnitude of the control input.

[0110] For Step 4, in this embodiment, the core objective of the optimization process is to obtain the optimal model parameters by minimizing the prediction error of the model, so as to accurately predict the changes in food quality. In addition, the regularization term of the production process control input is also considered during the optimization process to ensure the rationality and controllability of production parameters and avoid production instability caused by over-adjustment.

[0111] Generally, the optimization objective is to minimize the prediction error and the regularization term of the control input. By introducing the regularization term, the optimization not only focuses on reducing the prediction error, but also avoids over-reliance on certain control input variables, ensuring the operability and stability of the production process. During the optimization process, the objective function can be expressed by the following formula:

[0112]

[0113] Where, is the overall optimization objective function, T is the total number of time steps, is the predicted food quality, y(t) is the actually measured food quality, is the sum of the squares of the prediction errors, ||·||2 is the Euclidean norm, λ is the regularization parameter, and ||u(t)||1 represents the sum of the magnitudes of the control inputs. The first term of the objective function is the sum of the squares of the prediction errors, representing the difference between the predicted value and the actual value; the second term is the regularization term of the control input, aiming to prevent the model from relying too much on certain specific control inputs and maintaining the rationality of the production process.

[0114] As an option, different algorithms can be used to solve the optimization process. Common optimization algorithms include the gradient descent method, the particle swarm optimization (PSO) algorithm, and the genetic algorithm, etc. In some embodiments, the gradient descent method may be the preferred optimization method. Specifically, the gradient descent method calculates the gradient of the objective function with respect to the model parameters and gradually adjusts the model parameters to minimize the value of the objective function. This method is simple to calculate and has a relatively fast convergence speed, so it can effectively perform optimization in most cases. Specifically, the update formula of the gradient descent method can be expressed as:

[0115]

[0116] Where, W k is the parameter in the k-th iteration, W k+1 represents the model parameter in the (k + 1)-th iteration, η is the learning rate, is the optimization objective function, is the gradient of the objective function with respect to the parameter W k . Through multiple iterations, the model parameters will be gradually adjusted to the optimal state.

[0117] In some embodiments, the Particle Swarm Optimization (PSO) algorithm can also be used to optimize the objective function. Particle Swarm Optimization is an optimization algorithm that simulates swarm behavior. Through the cooperation and search of multiple individuals (particles) in the swarm, it continuously approaches the optimal solution of the objective function. In the Particle Swarm Optimization algorithm, each particle represents a potential solution, and the particle searches for the optimal solution by updating its position and velocity. The update formula of Particle Swarm Optimization is as follows:

[0118]

[0119] x i (t + 1) = x i (t) + v i (t + 1);

[0120] where v i (t + 1) represents the velocity vector at time t + 1, v i (t) is the velocity of the i-th particle at the t-th iteration, w is the inertia weight, c1 and c2 are acceleration constants, and are random numbers, p i is the personal best position of the i-th particle, g is the global best position, x i is the current position of particle i, x i (t + 1) is the new position of particle i at time t + 1, x i (t) is the current position of particle i at time t.

[0121] In a possible implementation, optimization can also be combined with the Genetic Algorithm (GA). The Genetic Algorithm searches for the optimal solution in the solution space by simulating natural selection and genetic mechanisms. In the Genetic Algorithm, new solutions are generated through selection, crossover, and mutation operations, and the quality of the solutions is gradually improved. Specifically, the main steps of the Genetic Algorithm include selecting individuals with high fitness, crossing to generate new individuals, and increasing the diversity of the solution space through mutation operations. The advantage of the Genetic Algorithm is that it can jump out of local optimal solutions and explore a wider solution space.

[0122] For step S5, in this embodiment, Kalman filtering is used to perform real-time estimation of the dynamic state of food quality, solving the problem of noise interference in system state estimation. Kalman filtering updates the estimated state of the system at each moment by combining the prediction model of the system and actual observation data, thereby obtaining a more accurate predicted value of food quality. This process can effectively eliminate sensor noise and external interference, improving the accuracy and stability of quality prediction.

[0123] Generally, during the food production process, various uncontrollable external factors may be encountered. These factors, such as sudden changes in environmental temperature and fluctuations in production line speed, will cause fluctuations in sensor data, thereby affecting the prediction of food quality. The introduction of Kalman filtering can utilize the dynamic model of the system, combined with real-time observation data, to correct the state estimation of the system in real time, thereby obtaining more accurate quality prediction results. Kalman filtering is a recursive algorithm, mainly consisting of two major steps:

[0124] Prediction step: In this step, the state equation of the system is used to predict the system state at the current moment. The prediction step is based on the state estimation at the previous moment and the control input to perform state prediction. The formula is as follows:

[0125]

[0126] where, is the prediction of the system state at time t + 1, is the state estimation at time t, A(t) is the state transition matrix, B(t) is the control matrix, and u(t) is the control input.

[0127] Update step: The update step is used to compare the new observation value with the predicted system state and correct the predicted state. By updating the Kalman gain, the filter can adjust the estimation of the system state at each moment. The update formula is as follows:

[0128]

[0129] where, K(t + 1) is the Kalman gain, representing the weighting factor between prediction and observation, is the predicted covariance matrix at time t + 1, C(t + 1) is the observation matrix, representing the relationship between the observation data and the system state, R is the covariance matrix of the observation noise, is the updated system state estimation at time t + 1, is the predicted system state at time t + 1, y(t + 1) is the actually measured food quality, is the predicted observation value calculated based on the predicted state and the observation matrix at time t + 1. The core of the update step is to adjust the system state estimation according to the difference between the observation value y(t + 1) and the predicted value to further improve the accuracy of quality prediction.

[0130] Specifically, the Kalman filter estimates the state of food quality in real time through continuous prediction and update cycles. Each time the sensor obtains a new measurement value, the Kalman filter predicts the current food quality state according to the system model, compares it with the actual observed value, calculates the prediction error, and adjusts the prediction value. This iterative process can reflect the fluctuations of various quality parameters in food production in real time, ensuring the high precision of the food quality control system.

[0131] As an option, when dealing with a highly dynamic production environment, the Kalman filter can effectively reduce the errors caused by external factors (such as sensor accuracy limitations, environmental changes, etc.). For example, when the production speed changes suddenly, the Kalman filter can alleviate the impact of the observation error through the prediction of the system model, thus avoiding the generation of incorrect quality estimates.

[0132] For step S6, in this embodiment, the use of the cloud computing platform enables data stream processing and real-time prediction to no longer be limited by the processing capabilities of traditional computing environments. Through the powerful computing and storage capabilities of the cloud platform, data streams from multiple production lines or multiple sensors can be processed simultaneously, ensuring the processing speed and response ability of the system to a large amount of real-time data.

[0133] Generally, the data generated during the food production process is huge and complex, and this data needs to be analyzed and predicted on a real-time basis. The cloud computing platform uses efficient data stream processing frameworks, such as Apache Kafka and Apache Spark, to receive, process, and analyze sensor data in real time. Through this efficient data stream processing architecture, it can be ensured that the system can respond to data stream changes at the millisecond level, thereby adjusting the control parameters in the production process in real time to ensure the stability of food quality.

[0134] In this embodiment, the cloud platform uses a stream processing framework to manage and analyze real-time data streams. Specifically, by adopting Apache Kafka as the data stream transmission platform, data from each production link and sensor can flow into the cloud platform quickly. Kafka can process thousands of real-time messages through an efficient message queue mechanism, thus realizing efficient data stream transmission.

[0135] As an option, the Apache Spark Streaming framework can be used for real-time data processing. In this implementation, Spark Streaming divides the real-time data stream into small time windows and processes and analyzes the data within each window. Spark's parallel computing ability ensures the efficiency of real-time computing and prediction even in the case of massive data. For example, for the data stream from temperature sensors, Spark Streaming can batch process, analyze the collected data every certain period (such as every second), and generate real-time quality prediction results.

[0136] Specifically, when the sensor data is transmitted to the cloud platform through Kafka, Spark Streaming will perform real-time calculations on the data and generate real-time food quality prediction results according to the previously optimized state space model. This result not only reflects the current state of food quality but also provides a reference for adjusting the subsequent production process.

[0137] In this embodiment, real-time prediction is not limited to estimating the current food quality but also involves predicting the future food quality trend. This is achieved by using the computing resources in the cloud platform to predict the real-time data with an optimized model. The model makes predictions about the future food quality based on real-time input data such as the current temperature, humidity, production speed, etc. This prediction provides a basis for real-time adjustment of control parameters in the production process.

[0138] For example, during the production process, if the real-time data stream shows abnormal fluctuations in temperature or humidity, the system will immediately generate new quality prediction results through cloud platform calculations. If the prediction shows that the fluctuations will have a negative impact on food quality, the cloud platform will automatically issue instructions to adjust the production control parameters (such as adjusting the heating temperature or slowing down the production speed), and the production process can be dynamically adjusted according to the prediction results to ensure that the food quality remains within the standard range.

[0139] Specifically, when using the state space model for quality prediction, the input real-time data will be fed into the optimized model for calculation. The model will make trend predictions based on historical data and current data. The system can use the formula:

[0140]

[0141] where, is the predicted food quality, x(t) is the current food quality state, u(t) is the control input, f(x(t), u(t), p) represents the system's observation function, p is the model parameter. Through this prediction, the system can estimate the food quality level at several future moments and thus provide accurate guidance for production regulation.

[0142] In some embodiments, the cloud platform not only needs to process the data streams from various sensors, but also needs to adjust the production process according to real-time feedback. The system not only performs data stream processing within a single production line, but can integrate and process data across multiple production links and multiple sensors. Through data fusion technology, after receiving the data from each sensor in real time, the cloud platform can generate comprehensive quality predictions based on existing models. These prediction results are transmitted to the production management system for real-time adjustment of various production parameters.

[0143] For example, if the system predicts a deviation in food quality, the cloud platform will send adjustment instructions to the production control system, such as adjusting control variables such as production line speed, temperature, or humidity, so as to avoid product quality fluctuations. Through the cloud computing platform, the transmission, processing, and prediction of data can be carried out on a real-time basis, providing continuous and immediate feedback for production.

[0144] For step S7, in this embodiment, the system analyzes the real-time food quality prediction results and optimization goals to generate appropriate adjustment plans and adjusts the production control parameters in real time, such as temperature, humidity, production speed, etc. In this way, the food production process can more precisely control quality and avoid quality problems caused by parameter fluctuations. This adjustment mechanism can dynamically adjust the control variables in the production process according to the system prediction results, thereby effectively improving the quality and efficiency of food production.

[0145] Generally, various control parameters in food production, such as temperature, humidity, production line speed, etc., will directly affect the quality of the final product. If these parameters are not adjusted in a timely manner, it may lead to low production efficiency or unstable product quality. Accurately and timely adjusting the production parameters according to the prediction results can ensure that the food quality is always within the ideal range.

[0146] In this embodiment, according to the generated quality prediction results, the system not only considers the current food quality status, but also predicts the future quality change trend and adjusts the control parameters in the production process in combination with the optimization goals. The adjustment of these control parameters includes, but is not limited to, factors such as production line temperature, humidity, and speed.

[0147] Specifically, the adjusted control parameters can be calculated by the following formula:

[0148] u * (t) = u(t) + Δu(t);

[0149] where, u *(t) is the adjusted control parameter, u(t) is the current control parameter, and Δu(t) is the adjustment amount calculated based on the prediction result and the optimization objective. The adjustment amount Δu(t) is dynamically calculated according to the difference between the real-time predicted food quality and the set standard.

[0150] For example, if the food quality prediction result shows that the temperature is too high or the humidity is too low, the system will calculate the corresponding adjustment amount Δu(t), and adjust the temperature and humidity of the production line through an automated control system. This adjustment process is not only based on the real-time prediction result, but also combines the previously set quality standard and the actual requirements of the production process to ensure that the adjusted parameters meet the quality requirements and do not overly interfere with the production process, maintaining the smooth progress of production.

[0151] The setting of the optimization objective is the core basis for adjusting the control parameter. Usually, the optimization objectives include reducing the prediction error, keeping the food quality within the standard range, and improving production efficiency, etc. The optimization objective can be expressed in the following form:

[0152]

[0153] Among them, The overall optimization objective function is used to minimize the prediction error and the regularization term of the control input. T is the total number of time steps, representing the time span involved in the optimization process, is the predicted food quality, y(t) is the actual measured value, the sum of the squares of the prediction errors, and ||u(t)||1 represents the total magnitude of the control input, the sum of the squares of the changes in the control input, and λ1 and λ2 are regularization parameters, which are used to control the weights of the control input and the adjustment amount respectively. The first term represents the food quality prediction error, the second term is the regularization of the control input, and the third term is the regularization of the adjustment amount, aiming to avoid excessive adjustment of production parameters.

[0154] In some embodiments, the optimization objective can be dynamically adjusted according to different stages of production. In the initial stage of production, more attention may be paid to the adjustment of temperature and humidity to ensure the basic stability of product quality; while in the later stage of production, more emphasis may be placed on production efficiency and cost control, reducing the adjustment frequency of the production line, thereby improving production efficiency.

[0155] An important feature of this embodiment is the intelligent adjustment based on real-time data and prediction results. The system continuously makes real-time feedback according to the sensor data, and combines the quality trend predicted by the model to automatically generate new adjustment instructions and adjust various parameters in the production process in real time.

[0156] Specifically, the system is connected through an interface with production equipment to transmit control instructions in real time. Through the automated control system, adjustment instructions can be quickly applied to the production line, thus avoiding delays caused by human intervention. For example, when real-time data indicates a quality deviation in a certain production process, the system will automatically adjust the temperature, humidity, rotation speed, etc. of that process to ensure that the final product meets the set quality standards.

[0157] Please refer to the appendix Figure 2 , the present invention also provides a food detection information processing system based on cloud computing. Through the powerful computing power of the cloud computing platform, real-time monitoring, prediction, and adjustment of food quality are achieved, ensuring quality control and production efficiency during the food production process. Each module of the system realizes real-time data collection, processing, modeling and optimization, prediction, as well as decision support and execution through efficient cooperation, including the following modules:

[0158] Data collection module: It is used to collect multi-dimensional data related to food quality in real time. In this embodiment, the main function of the data collection module is to collect multi-dimensional data related to food quality in real time. The data collection module monitors various factors affecting quality during the food production process through various sensors installed in the production line and warehousing facilities. These data include but are not limited to environmental temperature, humidity, pH value, light intensity, production speed, etc.

[0159] Specifically, the data collection module transmits the data collected by each sensor to the cloud platform in real time through Internet of Things (IoT) technology. To ensure the accuracy and real-time nature of the data, the collection module can also have self-calibration functions, abnormal monitoring, and fault diagnosis capabilities. When sensor data is unstable or exceeds the preset threshold, the system will automatically detect and give a warning to ensure that the collected data is always within the valid range.

[0160] As an option, the data collection module can also include additional functions, such as supporting connections to the cloud platform through wireless communication (such as low-power wireless protocols like Wi-Fi, Zigbee, or LoRa), to ensure the flexibility and scalability of the system.

[0161] Data processing module: It is used to preprocess the collected data. In this embodiment, the main function of the data processing module is to preprocess the collected data, including data cleaning, denoising, missing value filling, and outlier detection, etc. Since the original data may contain noise, missing values, or outliers, which will all affect the accuracy of subsequent modeling and prediction, necessary preprocessing is required.

[0162] In this embodiment, the data processing module ensures the quality of data through various technical means. It uses interpolation to fill in missing data, applies moving average or low-pass filtering to remove noise, and identifies and processes outliers through the box plot method (IQR) or z-score method. The processed data will be provided as input to the modeling and optimization module in subsequent steps.

[0163] Modeling and Optimization Module: It is used to build a dynamic model of food quality based on the collected data and optimize the model through the objective function. In this embodiment, the modeling and optimization module is responsible for building a dynamic model of food quality based on the cleaned data provided by the data processing module and optimizing the model through the objective function. Specifically, this module first uses a nonlinear time-varying state space model or other suitable models (such as machine learning models) to describe the dynamic changes of food quality.

[0164] By setting appropriate optimization objective functions, this module optimizes the model parameters to minimize the prediction error and constrain the rationality of production parameters. The objective function usually includes a penalty term for the quality prediction error and a regularization term for the control input. Optimization techniques such as gradient descent method, particle swarm optimization (PSO), or genetic algorithm (GA) may be used in the optimization process.

[0165] Once the optimization is completed, the modeling and optimization module will obtain an efficient and accurate model that can predict food quality based on real-time data in future production processes and provide dynamic quality control strategies.

[0166] Real-time Prediction Module: It is used to process data streams in real time based on the cloud computing platform, generate food quality prediction results, and conduct production process predictions. The real-time prediction module performs stream processing on the real-time collected data through the cloud computing platform and generates food quality prediction results. The core function of this module is to instantaneously predict food quality based on historical data and multi-dimensional data collected in real time through the optimized dynamic model.

[0167] Using real-time stream processing technologies (such as Apache Kafka and Apache Spark, etc.), the real-time prediction module can quickly process large-scale and high-frequency data streams and make predictions based on the state space model. Each updated prediction result will reflect the current state and future trends of food quality for reference by the subsequent decision support module.

[0168] Decision Support Module: It is used to generate a production adjustment plan based on the prediction results, adjust production parameters in real time, and provide feedback through the operator interface. The decision support module generates a production adjustment plan and adjusts production parameters in real time according to the food quality prediction results generated by the real-time prediction module. By analyzing the difference between the real-time prediction results and the preset goals, this module proposes production adjustment suggestions and feeds back the adjustment plan to the production line operators through the operator interface.

[0169] Specifically, the decision support module determines the priority and intensity of the adjustment by analyzing the deviation between the quality prediction and the set standard, and then adjusts parameters such as temperature, humidity, and production speed in real time. For example, when the system predicts a decline in food quality, the module will automatically propose a plan to adjust the temperature or slow down the production line speed to ensure that the product quality is always within the ideal range.

[0170] Execution Module: It is used to perform real-time adjustment operations on production equipment according to the adjustment plan generated by the decision support module. The execution module is responsible for performing real-time adjustment operations on production equipment according to the adjustment plan generated by the decision support module. By connecting to the interfaces of the production line equipment, this module can quickly transmit adjustment instructions and automatically control various parameters in the production process.

[0171] For example, the execution module can automatically adjust the temperature, humidity, and production speed in the production process by connecting to the temperature control system, humidity control system, and production speed adjustment system to conform to the latest adjustment plan. This adjustment process requires no manual intervention and can respond in real time to quality changes in production, ensuring the smooth progress of the production process.

[0172] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A food detection information processing method based on cloud computing, characterized in that: The following steps are involved: Collect multi-dimensional data on food quality through sensors, including temperature, humidity, pH value, light intensity, and production speed; Preprocess the collected multidimensional data; Based on the collected multi-dimensional data, a nonlinear time-varying state space model is constructed to describe the dynamic process of food quality changes; The constructed state space model is optimized by an objective function, wherein the objective function includes a regularization term of a prediction error and a production process control input; Use Kalman filtering to estimate the dynamic state of food quality changes in real time and eliminate noise and errors; Through the cloud computing platform, the real-time collected data is stream processed and predicted to generate quality prediction results; Adjust the control parameters in the production process based on the prediction results and optimization goals.

2. The food detection information processing method based on cloud computing according to claim 1 is characterized in that: The objective function optimization step comprises: According to the dynamic model and real-time prediction results, the objective function is optimized using gradient descent method, genetic algorithm and particle swarm optimization algorithm; The objective function includes a penalty term for food quality prediction error and a regularization term for the production parameter control input; Production process control parameters are updated based on each optimization and the system is adjusted to achieve optimal food quality control.

3. The food detection information processing method based on cloud computing according to claim 1 is characterized in that: The nonlinear time-varying is modeled using a state-space model, which includes the following equations: x(t+1)=A(t)x(t)+B(t)u(t)+w(t); y(t)=C(t)x(t)+v(t); Among them, x(t) is the state vector of the system, A(t) is the state transfer matrix, B(t) is the control input matrix, u(tθ) is the control input, y(t) is the observation result, w(t) and v(t) represent process noise and observation noise respectively, and C(t) is the observation matrix.

4. The food detection information processing method based on cloud computing according to claim 2 is characterized in that: The objective function optimization is performed by minimizing the prediction error and the regularization term of the production process control input, and the objective function includes the following formula: in, is the overall optimization objective function, T is the total number of time steps, is the predicted food quality, y(t) is the actual measured food quality, is the sum of squares of prediction errors, ∥·∥2 is the Euclidean norm, λ is the regularization parameter, and u(t)∥1 represents the sum of the sizes of the control inputs.

5. The food detection information processing method based on cloud computing according to claim 1 is characterized in that: The dynamic state of the food quality change is estimated in real time by Kalman filtering, and the expansion steps of the Kalman filtering include: Prediction step: predict the state at the current time point based on the system model and control input; Update step: When new observations arrive, the Kalman filter adjusts and updates the predicted state based on the observations.

6. The food detection information processing method based on cloud computing according to claim 1 is characterized in that: The real-time collected data is stream processed, and the stream processing step uses a cloud computing platform to perform real-time prediction. The cloud computing platform supports real-time data stream processing in the following ways: Use big data processing framework to perform real-time analysis and processing of data streams; Run the real-time prediction model on the cloud platform, and adjust the temperature, humidity and production speed parameters during the production process based on the real-time prediction results.

7. The food detection information processing method based on cloud computing according to claim 1 is characterized in that: The dynamic adjustment scheme of the production process is generated through real-time feedback based on the prediction results and optimization goals, and the dynamic adjustment includes: Adjust temperature, humidity, and production speed parameters based on real-time predicted quality data; Provide real-time quality feedback to operators for intervention and adjustment.

8. The food detection information processing method based on cloud computing according to claim 3 is characterized in that: The nonlinear time-varying modeling steps include: Based on the collected data, the dynamic changes of food quality are modeled by using nonlinear models; Dynamically update the model parameters based on historical data on food quality and related environmental factors to more accurately describe changes in food quality; Quality prediction is carried out based on the combination of nonlinear modeling results and control parameters of the production process, and the model is used to guide the adjustment of parameters in the production process.

9. The food detection information processing method based on cloud computing according to claim 1, characterized in that: The collected multidimensional data is preprocessed, and the preprocessing step includes: Clean the collected multidimensional data to remove invalid and duplicate data points; De-noising the data, using sliding average and low-pass filtering methods to remove noise from sensor data; Use interpolation to fill missing values.

10. A food detection information processing system based on cloud computing, applied to the food detection information processing method based on cloud computing according to any one of claims 1 to 9, characterized in that: Includes the following modules: Data collection module: used to collect multi-dimensional data related to food quality in real time; Data processing module: used to pre-process the collected data; Modeling and optimization module: used to build a dynamic model of food quality based on collected data and optimize the model through objective function optimization; Real-time prediction module: used to process data streams in real time based on the cloud computing platform, generate food quality prediction results, and make production process predictions; Decision support module: used to generate production adjustment plans based on forecast results, adjust production parameters in real time, and provide feedback through the operator interface; Execution module: used to perform real-time adjustment operations of production equipment according to the adjustment plan generated by the decision support module.