Food precooling temperature prediction method and device based on deep learning
By constructing a fusion deep learning model that combines multi-head self-attention, temporal convolutional networks, and long short-term memory networks, the modeling complexity and adaptability issues of food precooling temperature prediction are solved. This achieves high-precision, low-latency temperature prediction, adapts to different process parameters and meat block specifications, and reduces computational costs.
Patent Information
- Application Number
- CN202511025171.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-11
AI Technical Summary
Existing methods for predicting temperature changes during food precooling suffer from complex modeling, reliance on manually set boundary conditions, poor adaptability to different ingredients, and high computational resource consumption, making it difficult to meet the requirements for high-frequency, low-latency, and robust temperature prediction.
A deep learning-based approach is adopted, which integrates a multi-head self-attention module, a temporal convolutional network module, and a long short-term memory network module to construct a fusion deep learning model. This model dynamically identifies key temperature change time step features, captures local and long-distance dependencies, and performs temperature prediction.
It significantly improves the accuracy and stability of food precooling temperature prediction, reduces errors caused by human intervention, adapts to nonlinear and complex working conditions, reduces computing costs, adapts to different process parameters and meat block specifications, and supports real-time prediction and dynamic optimization.
Smart Images

Figure CN120930476A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food precooling monitoring, and more particularly to a method and apparatus for predicting food precooling temperature based on deep learning. Background Technology
[0002] Ventilation precooling is a crucial process in the food cold chain processing. It rapidly lowers food temperature through forced airflow, effectively inhibiting microbial growth and significantly contributing to improved food safety and extended shelf life. In the processing of cold chain foods such as braised meat products, precooling efficiency directly impacts final quality and cold chain compliance. Therefore, accurately predicting temperature changes during precooling has become a core technological requirement for optimizing precooling processes, reducing energy consumption, and ensuring product quality.
[0003] Currently, the prediction of temperature changes during food precooling mainly relies on the following methods: First, numerical simulation methods, such as the finite difference method (FDM), finite element method (FEM), and finite volume method (FVM), which estimate the internal temperature distribution of food by solving the heat conduction equation; second, computational fluid dynamics (CFD) methods, which simulate the coupled behavior of the flow field and temperature field to evaluate the cooling effect under different precooling conditions in a virtual environment. Although the above methods have certain predictive capabilities under specific conditions, they generally suffer from problems such as complex modeling, reliance on manually set boundary conditions, poor adaptability to different ingredients, and high computational resource consumption, making it difficult to meet the actual production requirements for high-frequency, low-latency, and robust temperature prediction. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a deep learning-based method and apparatus for predicting food precooling temperature. This method reduces errors caused by human intervention and significantly improves the accuracy of temperature prediction during food ventilation precooling.
[0005] This invention provides a deep learning-based method for predicting food precooling temperature, comprising:
[0006] Acquire temperature time-series data from multiple temperature measurement points based on given process parameter data during the ventilation pre-cooling process of the target food;
[0007] The temperature time series data is preprocessed to obtain a temperature fusion feature sequence;
[0008] The temperature fusion feature sequence is input into the fusion deep learning model, and the temperature prediction result is output; wherein, the fusion deep learning model includes a multi-head self-attention module, a temporal convolutional network module and a long short-term memory network module connected in sequence, and the temporal convolutional network module and the long short-term memory network module are connected through a dual residual connection module;
[0009] The multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence; the temporal convolutional network module captures the local and long-distance dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence; the long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence.
[0010] In one embodiment of the present invention, the processing of the temperature fusion feature sequence by the multi-head self-attention module includes:
[0011] The temperature fusion feature sequence is divided into multiple temperature feature time step vectors according to the time dimension;
[0012] Each temperature feature time step vector is mapped to a query vector, a key vector, and a value vector through a linear transformation layer, thereby constructing a query matrix, a key matrix, and a value matrix;
[0013] The query matrix, key matrix, and value matrix are divided into multiple headers, and the attention weight of each header is calculated by scaling dot product attention.
[0014] Based on the attention weight of each head, the output of the head whose attention weight value exceeds the preset weight threshold is identified as the key temperature change time step feature;
[0015] The outputs of all identified heads are concatenated and then fused through a linear transform layer to obtain the temperature attention feature sequence.
[0016] In one embodiment of the present invention, the processing of the temperature attention feature sequence by the temporal convolutional network module includes:
[0017] The temperature attention feature sequence is expanded into a two-dimensional feature matrix along the time dimension;
[0018] Local temperature features are captured by performing sliding window convolution on the two-dimensional feature matrix through a causal convolutional layer.
[0019] The local temperature features output by the causal convolutional layer are fed into the dilated convolutional layer, and the receptive field is expanded by the dilation factor that is multiplied layer by layer to capture long-distance temperature dependence.
[0020] After stacking multiple causal convolutions and multiple dilated convolutions, the temperature convolution feature sequence is output.
[0021] In one embodiment of the present invention, a residual connection is set after each causal convolutional layer and / or dilated convolutional layer, and the output feature matrix of the layer is adjusted in dimension by 1×1 convolution and then added to the input feature matrix of the layer.
[0022] In one embodiment of the present invention, the dual residual connection module includes:
[0023] The first fusion layer connects the output of the temporal convolutional network module and the input of the long short-term memory network module.
[0024] The temperature convolutional feature sequence output by the temporal convolutional network module is passed through a 1×1 convolutional layer. The output feature of the convolutional layer is added element by element to the temperature fusion feature sequence to fuse the feature before being output to the long short-term memory network module.
[0025] In one embodiment of the present invention, the processing of the temperature convolutional feature sequence by the long short-term memory network module includes:
[0026] The temperature convolutional feature sequence is divided into multiple time-step temperature convolutional feature vectors according to the time dimension;
[0027] Initialize the temperature memory state and the temperature hidden state, convolve the temperature feature vector at each time step, and calculate the retention ratio of historical temperature memory through the forget gate;
[0028] Candidate temperature memories and update ratios are generated through input gates;
[0029] The current temperature memory status is updated based on the historical temperature memory retention ratio, the candidate temperature memory, and the update ratio.
[0030] The current temperature memory state is combined with the output gate to generate the current temperature hidden state, which serves as a key feature for temperature prediction.
[0031] After traversing all time steps, all key features for temperature prediction are summarized, and the temperature prediction feature sequence is output.
[0032] In one embodiment of the present invention, the dual residual connection module further includes:
[0033] The second fusion layer connects the output of the temporal convolutional network module and the output of the long short-term memory network module.
[0034] The temperature convolutional feature sequence output by the temporal convolutional network module is passed through a 1×1 convolutional layer. The output features of this convolutional layer are then added element by element to the temperature prediction feature sequence output by the long short-term memory network module to fuse the features, thus obtaining the temperature prediction result.
[0035] In one embodiment of the present invention, the process parameter data includes wind speed, wind temperature, and food geometric parameters; the wind speed is selected from at least one continuously adjustable wind speed level within a preset range, the wind temperature is selected from at least one continuously adjustable temperature level within a preset low temperature range, the food geometric parameters include the volume or surface area of each food block, and the temperature time series data is a continuous temperature change sequence of multiple temperature measurement points collected by a temperature sensor.
[0036] In one embodiment of the present invention, the preprocessing includes:
[0037] A smoothing filter algorithm is used to denoise the temperature time series data while preserving the temperature change trend characteristics.
[0038] The denoised temperature time series data is resampled to reduce data redundancy, resulting in an equally spaced temperature sampling sequence.
[0039] The process parameter data and the temperature sampling sequence are concatenated into a multi-dimensional feature vector, and the multi-dimensional feature vector is normalized using a normalization method to obtain the temperature fusion feature sequence.
[0040] In another aspect, the present invention provides a food pre-cooling temperature prediction device based on deep learning, comprising:
[0041] The acquisition unit is used to acquire temperature time-series data from multiple temperature measurement points based on given process parameter data during the ventilation and precooling process of the target food.
[0042] A preprocessing unit is used to preprocess the temperature time series data to obtain a temperature fusion feature sequence;
[0043] The prediction unit is used to input the temperature fusion feature sequence into the fusion deep learning model and output the temperature prediction result; wherein, the fusion deep learning model includes a multi-head self-attention module, a temporal convolutional network module and a long short-term memory network module connected in sequence, and the temporal convolutional network module and the long short-term memory network module are connected through a dual residual connection module;
[0044] The multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence; the temporal convolutional network module captures the local and long-distance dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence; the long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence.
[0045] As can be seen from the above solutions, the advantages of the present invention are:
[0046] This invention provides a deep learning-based method for predicting food pre-cooling temperature. It acquires and preprocesses time-series temperature data from multiple temperature measurement points based on given process parameters during the ventilation pre-cooling process of the target food to obtain a temperature fusion feature sequence. This fusion feature sequence is then input into a fusion deep learning model to output the temperature prediction result. This invention integrates multi-head self-attention mechanisms, temporal convolutional networks, and long short-term memory networks to construct a fusion deep learning model. This model fully combines the local feature learning capability of the MHA-TCN layer, the long-term dependency modeling capability of the LSTM layer, and the global dependency capability of the attention mechanism, thereby improving the accuracy and stability of temperature prediction during the food ventilation pre-cooling process and reducing errors caused by human intervention. Attached Figure Description
[0047] Figure 1 A schematic diagram of the overall process of a deep learning-based food precooling temperature prediction method provided by an embodiment of the present invention is shown.
[0048] Figure 2 A schematic diagram of the structure of the fusion deep learning model is shown;
[0049] Figure 3 A schematic diagram of the overall structure of a food precooling temperature prediction device based on deep learning provided in an embodiment of the present invention is shown.
[0050] The attached figures are labeled as follows:
[0051] 11: Multi-head self-attention module;
[0052] 12: Temporal convolutional network module;
[0053] 13: Long Short-Term Memory Network Module;
[0054] 141: First fusion layer;
[0055] 142: Second fusion layer;
[0056] 300: Food precooling temperature prediction device;
[0057] 310: Acquisition Unit;
[0058] 320: Preprocessing unit;
[0059] 330: Prediction unit. Detailed Implementation
[0060] It should be noted that, in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0061] In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0062] refer to Figure 1 As shown, Figure 1 The diagram shows the overall flow of a deep learning-based food precooling temperature prediction method according to an embodiment of the present invention.
[0063] A deep learning-based method for predicting food precooling temperature includes the following steps:
[0064] Step S1: Obtain temperature time-series data from multiple temperature measurement points based on given process parameter data during the ventilation and pre-cooling process of the target food.
[0065] In one embodiment, given process parameters for the pre-cooling process of the target food, these process parameter data include wind speed, wind temperature, and food geometric parameters. The wind speed is selected from at least one continuously adjustable wind speed level within a preset range, the wind temperature is selected from at least one continuously adjustable temperature level within a preset low-temperature range, the food geometric parameters include the volume or surface area of each food block, and the temperature time series data is a continuous temperature change sequence from multiple temperature measurement points collected by a temperature sensor.
[0066] Taking the pre-cooling of braised meat products as an example, four wind velocities (1125, 2250, 3375, 4500 RPM), four wind temperatures (25℃, 0℃, -10℃, -20℃), and two meat block volumes (144cm²) were set. 3 1152cm 3 Under these given process parameters and at a sampling frequency of one second, continuous temperature changes at multiple temperature measurement points were recorded using K-type thermocouples, resulting in 32 sets of experimental data and temperature time-series data for multiple temperature measurement points, with over 250,000 temperature samples.
[0067] Step S2: Preprocess the temperature time series data to obtain a temperature fusion feature sequence.
[0068] In one optional implementation, a smoothing filtering algorithm is used to denoise the temperature time series data while retaining the temperature change trend characteristics; the denoised temperature time series data is resampled to reduce data redundancy, resulting in an equally spaced temperature sampling sequence; the process parameter data and the temperature sampling sequence are concatenated into a multi-dimensional feature vector, and the multi-dimensional feature vector is normalized using a normalization method to obtain the temperature fusion feature sequence.
[0069] In one specific embodiment, a Savitzky-Golay filter is used to denoise the temperature time series data, smooth the temperature curve, and eliminate acquisition noise.
[0070] The multidimensional feature vectors are normalized using the max-min normalization method to standardize the data range and obtain the temperature fusion feature sequence.
[0071] Step S3: Input the temperature fusion feature sequence into the fusion deep learning model and output the temperature prediction result.
[0072] In one alternative implementation, a fusion deep learning model is constructed by integrating multi-head attention (MHA), temporal convolutional network (TCN), and long short-term memory (LSTM) to capture the evolution of multi-scale, nonlinear temperature sequences during food precooling.
[0073] The overall architecture of the model that integrates deep learning models is as follows: Figure 2 As shown, it includes an input layer, a multi-head self-attention module (MHA) 11, a temporal convolutional network module (TCN) 12, a long short-term memory network module (LSTM) 13 and an output layer connected in sequence, and the temporal convolutional network module (TCN) and the long short-term memory network module (LSTM) are connected through a dual residual connection module.
[0074] The multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence. The temporal convolutional network module captures the local and long-range dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence. The long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence. In this embodiment, the MHA module dynamically weights the features at key time points, emphasizing modeling for moments with high information content; the TCN module captures local and long-range temporal dependencies through dilated convolutions, improving multi-scale modeling capabilities; the LSTM module has the ability to model long-term dependencies in time series, making it suitable for handling the evolution of temperature curves; and the dual residual connection mechanism further improves the stability of the model during deep training and avoids the gradient vanishing problem.
[0075] Specifically, in one optional implementation, the processing of the temperature fusion feature sequence by the multi-head self-attention module includes:
[0076] The temperature fusion feature sequence is divided into N temperature feature time step vectors along the time dimension, denoted as X = [x1, x2, ..., xN], where xt ∈ R. d d is the feature dimension;
[0077] Each temperature feature time step vector xt is mapped to a query vector Q through a linear transformation layer. t Key vector K t Sum vector V t Construct the query matrix, key matrix, and value matrix, i.e.:
[0078] Q t =W q ·x t +b q
[0079] K t =W k ·x t +b k
[0080] V t =W v ·x t +b v
[0081] Among them, W q W k W v ∈R d×d Let b be the weight matrix. q ,b k ,b v ∈R dIt is the bias vector;
[0082] The query matrix Q = [Q1, Q2, ..., Q N The key matrix K = [K1, K2, ..., K] N The sum matrix V = [V1, V2, ..., V] N The attention weights for each head are calculated by dividing the attention into h equal parts and scaling the dot product attention.
[0083]
[0084] Among them, Q i ,K i V i ∈R N×(d / h) Let d be the submatrix of the i-th head, and d / h be the feature dimension of each head.
[0085] Concatenate the attention weights of h heads [head1; head2; ...; head h Based on the attention weight of each head, the output of the head whose attention weight value exceeds a preset weight threshold is identified as the key temperature change time step feature. The outputs of all identified heads are concatenated and fused through a linear transform layer to obtain the temperature attention feature sequence H = [h1, h2, ..., h...]. N Through the above process, the softmax output attention weight value corresponding to the time step with a high temperature change rate during the precooling process is increased to enhance the extraction of features in key temperature change stages, and finally output a weighted fused temperature attention feature sequence.
[0086] In this embodiment, the multi-head self-attention mechanism can dynamically identify the importance of temperature changes at different time steps during the precooling process, adaptively adjust the attention weight of features at different stages, and effectively enhance the feature extraction capability of key temperature change stages.
[0087] In an optional implementation, the temporal convolutional network module processes the temperature attention feature sequence H = [h1, h2, ..., h...] after it has been processed by the multi-head self-attention module. N Perform the following operations:
[0088] Expand the temperature attention feature sequence H into R along the time dimension. N×d The two-dimensional feature matrix is denoted by N, where N is the number of time steps and d is the feature dimension. A sliding window convolution is performed on the two-dimensional feature matrix using a causal convolutional layer to capture local temperature features. The calculation formula is as follows:
[0089]
[0090] Where x is the input sequence, f is the convolution kernel, and k is the size of the convolution kernel;
[0091] The local temperature features output from the causal convolutional layer are fed into the dilated convolutional layer. The receptive field is expanded by a dilation factor that increases layer by layer to capture long-range temperature dependencies. The calculation of the dilated convolutional receptive field is as follows:
[0092] R f =1+(k-1))×d
[0093] Among them, R f d represents the receptive field size, d is the expansion factor, and k is the kernel size.
[0094] Thus, after stacking multiple layers of causal convolution and multiple layers of dilated convolution, the output is the temperature convolution feature sequence that fuses local temperature details and long-range dependent features.
[0095] The TCN module uses causal convolution to ensure that when calculating the output at a certain time step, it only relies on the current and previous input data and is not affected by subsequent data. This avoids the problem of future information leakage and ensures the causality of the temperature prediction task, which is consistent with the actual industrial scenario.
[0096] Since the input temperature attention feature sequence is long and the temperature change trend has a significant non-linear relationship during the precooling process, the dilated convolution of the TCN module can solve this problem well. The dilated convolution expands the receptive field of the convolution kernel by increasing the dilation factor (dilation coefficient), so that the model can better capture long-term temperature-dependent features.
[0097] Thus, after stacking multiple layers of causal convolution and multiple layers of dilated convolution, the temperature convolutional feature sequence is output. This layer-by-layer doubling design enables the model to efficiently capture the long-term trend of temperature changes during precooling without significantly increasing network depth and computational cost, thereby improving the model's generalization performance and prediction accuracy under extreme conditions (such as ultra-low wind temperature and high wind speed).
[0098] Residual connections are set after each causal convolutional layer and / or dilated convolutional layer. The output feature matrix of this layer is adjusted in dimension by a 1×1 convolution and then added to the input feature matrix of the same layer. This ensures smooth information transfer during the training of deep networks, avoids the vanishing or exploding gradient problem, and thus improves training stability and prediction accuracy. The specific formula is shown below:
[0099] R = x + F(x)
[0100] Where x represents the input of the current convolutional layer, F(x) represents the output feature of the layer, and R represents the final output after residual connection.
[0101] The temperature fusion feature sequence is processed by a multi-head self-attention module and a temporal convolutional network module for feature extraction. The purpose of the MHA-TCN layer is to extract effective features from the input data, especially when processing temporal data, to better capture temporal dependencies. The multi-head self-attention mechanism helps the network focus on important time steps, while TCN effectively captures local temporal dependencies through convolutional operations.
[0102] In an optional implementation, the output of the temporal convolutional network module is further input to a first fusion layer, which 141 connects the output of the temporal convolutional network module and the input of the long short-term memory network module. This layer consists of 1×1 convolutions (1×1 conv) and addition operations, and its function is to adjust the data formats from different sources to match their sizes for subsequent addition fusion. In this layer, the temperature convolutional feature sequence output by the temporal convolutional network module is passed through a 1×1 convolutional layer. The output feature of this convolutional layer is added element-wise to the temperature fusion feature sequence to achieve fusion feature output to the long short-term memory network module. This fusion feature includes both the deep features mined by local convolution and attention mechanisms and retains the original temperature physical information of the input, thereby providing a richer and more structured temporal input for LSTM and preventing feature degradation.
[0103] The Long Short-Term Memory (LSTM) network module is composed of a Long Short-Term Memory network and can effectively handle long-term dependencies. This layer's function is to further predict and extract features from the feature data processed by the first two layers. In an optional implementation, the fused features output from the first fusion layer 141 are input into the LSTM network module 13, first being divided into multiple time-step temperature convolutional feature vectors according to the time dimension. Then, the temperature memory state C0 = 0 ∈ R is initialized. d and temperature hidden state h0=0∈R d For each time step, the temperature convolutional feature vector is used to calculate the historical temperature memory retention ratio through a forget gate. The forget gate determines the memory portion (C) of the previous time step in the LSTM module. t-1 How much needs to be kept and how much needs to be discarded? 0 represents complete discarding, and 1 represents complete retention. The calculation formula is as follows:
[0104] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0105] Among them, f t It represents the percentage of historical temperature memory retained, i.e., the output of the forget gate; σ is the sigmoid activation function; W f and b fThe weights and biases of the forget gate, h t-1 It is the hidden state of the previous time step, x t It is the temperature convolution feature vector at the current time step t.
[0106] The input gate determines the temperature convolution feature vector (x) at the current time step. t How much of it will be used to update the memory state of the LSTM? It consists of two parts: one is the update ratio i calculated using the sigmoid function. t One represents how much information will be written to the memory cell, and the other is the candidate temperature memory calculated using the tanh function. This represents potential memory information. Candidate temperature memories and update ratios are generated through an input gate, i.e.:
[0107] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0108]
[0109] Among them, i t Control how much information can be added to memory at the current moment. It is a new candidate temperature memory.
[0110] Cell state update: The state of a memory unit is determined by the forget gate and the input gate. The forget gate discards or retains the memory from the previous moment in proportion, while the input gate combines the candidate memory content of the current moment with the input information and determines how much is written into the memory.
[0111] The current temperature memory state is updated based on the historical temperature memory retention ratio, the candidate temperature memory, and the update ratio:
[0112]
[0113] Among them, C t It is the memory state at the current moment, that is, the memory state of the current temperature; f t It is the percentage of historical temperature memory retained, i.e., the output of the forget gate; i t It is the update ratio, i.e., the output of the input gate, C. t-1 It is the temperature memory state from the previous moment, C t It is the current temperature memory state. It is the candidate temperature memory at the current moment.
[0114] The output gate determines the hidden state at the current moment (h tWhat is )? The output gate controls which parts of the memory can be output through the sigmoid function, and transforms the memory state through the tanh activation function. Combined with the current temperature memory state C... t The current hidden temperature state is generated through the output gate and serves as a key feature for temperature prediction.
[0115] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0116] h t =o t *tanh(C t )
[0117] Among them, O t Control the output at the current moment, C t It is the current temperature memory state, h t It represents the current hidden temperature state.
[0118] Finally, after traversing all time steps, all key features for temperature prediction are summarized, and the temperature prediction feature sequence is output.
[0119] In an optional implementation, the temperature prediction feature sequence output by the Long Short-Term Memory (LSTM) network module enters the second fusion layer 142. This second fusion layer connects the outputs of the temporal convolutional network module and the LSTM network module. It also consists of 1×1 convolutions and addition operations. The input to this second fusion layer includes the temperature prediction feature sequences output from the LSTM module and the TCN layer. The temperature convolutional feature sequence output from the temporal convolutional network module is passed through the 1×1 convolutional layer, and the output features of this convolutional layer are added element-wise to the temperature prediction feature sequence output from the LSTM network module. This addition fusion fully integrates local and global feature information. The final temperature prediction result is then obtained, used to predict temperature changes during the pre-cooling process of the target food. This fusion deep learning model fully combines the local feature learning capability of the MHA-TCN layer, the long-term dependency modeling capability of the LSTM layer, and the global dependency capability of the attention mechanism, thereby improving the accuracy and stability of temperature prediction.
[0120] In summary, the deep learning-based food pre-cooling temperature prediction method disclosed in this invention integrates multi-head self-attention mechanisms, temporal convolutional networks, and long short-term memory networks to construct a fusion deep learning model. This model fully combines the local feature learning capabilities of the MHA-TCN layer, the long-term dependency modeling capabilities of the LSTM layer, and the global dependency capabilities of the attention mechanism, thereby improving the accuracy and stability of temperature prediction during food ventilation pre-cooling and reducing errors caused by human intervention. It has the following significant technical advantages:
[0121] (1) Temperature prediction accuracy is greatly improved, adapting to complex nonlinear working conditions:
[0122] By introducing a multi-head self-attention mechanism (MHA), a temporal convolutional network (TCN), and a long short-term memory network (LSTM) and structurally fusing them to construct a fused deep learning model, this model can accurately model the nonlinear, multivariable, and multi-scale temperature change patterns during the ventilation pre-cooling process, thus improving the accuracy of temperature prediction. Experimental results show that, compared with the traditional LSTM model, the fused deep learning model of this invention reduces the root mean square error (RMSE) by 44.2%, the mean absolute error (MAE) by 54.2%, the mean absolute percentage error (MAPE) by 59.7%, and the coefficient of determination R0 is [not specified in the original text]. 2 The value was increased to 0.964, demonstrating higher fitting accuracy and stability.
[0123] (2) It has strong adaptability and can adapt to different process parameters and meat block specifications:
[0124] The fusion deep learning model of this invention showed good consistency in 32 sets of experiments with different combinations of process parameters. Compared with the traditional GRU model, RMSE, MAE, and MAPE were further reduced by 35.1%, 47.4%, and 51.8%, respectively. It can maintain strong generalization ability under multiple operating conditions and is suitable for multi-batch, variable-parameter production environments in industrial sites.
[0125] (3) Surpasses traditional CFD simulation methods, offering flexible and efficient deployment:
[0126] Compared with computational fluid dynamics (CFD) methods, the fusion of deep learning models significantly improves accuracy, reducing RMSE by 83.9%, MAE by 81.5%, and MAPE by 78.7%. Furthermore, it eliminates the need for complex mesh generation and boundary condition settings, greatly reducing modeling and computation costs and supporting real-time prediction and dynamic optimization.
[0127] (4) Easy to deploy, fast system response, and easy to integrate into industries:
[0128] The method of this invention can build a temperature prediction system based on the lightweight Streamlit framework and SQLite database. It has a simple interface, fast response, and flexible deployment, and can be directly embedded into the process control system of the target food processing workshop.
[0129] The following are device embodiments corresponding to the above method embodiments, such as... Figure 3 As shown, Figure 3 A schematic diagram of a food precooling temperature prediction device according to an embodiment of the present invention is shown. This device embodiment can be implemented in conjunction with the above-described method embodiment. The relevant technical details mentioned in the above method embodiment remain valid in this device embodiment, and will not be repeated here to avoid repetition.
[0130] A deep learning-based food precooling temperature prediction device 300 includes:
[0131] The acquisition unit 310 is used to acquire temperature time-series data of multiple temperature measurement points based on given process parameter data during the ventilation and pre-cooling process of the target food.
[0132] The preprocessing unit 320 is used to preprocess the temperature time series data to obtain a temperature fusion feature sequence.
[0133] The prediction unit 330 is used to input the temperature fusion feature sequence into a fusion deep learning model and output a temperature prediction result. The fusion deep learning model includes a multi-head self-attention module, a temporal convolutional network module, and a long short-term memory network module connected in sequence, with the temporal convolutional network module and the long short-term memory network module connected via a dual residual connection module. Specifically, the multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence; the temporal convolutional network module captures the local and long-range dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence; the long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence.
[0134] This device embodiment can be implemented in conjunction with the implementation methods described above. The relevant technical details mentioned in the implementation methods of the above embodiments remain valid in the implementation methods of this method embodiment, and will not be repeated here to avoid repetition.
[0135] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for predicting food precooling temperature based on deep learning, characterized in that, include: Acquire temperature time-series data from multiple temperature measurement points based on given process parameter data during the ventilation pre-cooling process of the target food; The temperature time series data is preprocessed to obtain a temperature fusion feature sequence; The temperature fusion feature sequence is input into the fusion deep learning model, and the temperature prediction result is output; wherein, the fusion deep learning model includes a multi-head self-attention module, a temporal convolutional network module and a long short-term memory network module connected in sequence, and the temporal convolutional network module and the long short-term memory network module are connected through a dual residual connection module; The multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence; the temporal convolutional network module captures the local and long-distance dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence; the long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence.
2. The method according to claim 1, characterized in that, The processing of the temperature fusion feature sequence by the multi-head self-attention module includes: The temperature fusion feature sequence is divided into multiple temperature feature time step vectors according to the time dimension; Each temperature feature time step vector is mapped to a query vector, a key vector, and a value vector through a linear transformation layer, thereby constructing a query matrix, a key matrix, and a value matrix. The query matrix, key matrix, and value matrix are divided into multiple headers, and the attention weight of each header is calculated by scaling dot product attention. Based on the attention weight of each head, the output of the head whose attention weight value exceeds the preset weight threshold is identified as the key temperature change time step feature; The outputs of all identified heads are concatenated and then fused through a linear transformation layer to obtain the temperature attention feature sequence.
3. The method according to claim 1, characterized in that, The processing of the temperature attention feature sequence by the temporal convolutional network module includes: The temperature attention feature sequence is expanded into a two-dimensional feature matrix along the time dimension; Local temperature features are captured by performing sliding window convolution on the two-dimensional feature matrix through a causal convolutional layer. The local temperature features output by the causal convolutional layer are fed into the dilated convolutional layer, and the receptive field is expanded by the dilation factor that is multiplied layer by layer to capture long-distance temperature dependence. After stacking multiple causal convolutions and multiple dilated convolutions, the temperature convolution feature sequence is output.
4. The method according to claim 3, characterized in that, Each causal convolutional layer and / or dilated convolutional layer is followed by a residual connection. The output feature matrix of the layer is adjusted in dimension by a 1×1 convolution and then added to the input feature matrix of the layer.
5. The method according to claim 1, characterized in that, The dual residual connection module includes: The first fusion layer connects the output of the temporal convolutional network module and the input of the long short-term memory network module. The temperature convolutional feature sequence output by the temporal convolutional network module is passed through a 1×1 convolutional layer. The output feature of the convolutional layer is added element by element to the temperature fusion feature sequence to fuse the feature before being output to the long short-term memory network module.
6. The method according to claim 1 or 5, characterized in that, The processing of the temperature convolutional feature sequence by the Long Short-Term Memory network module includes: The temperature convolutional feature sequence is divided into multiple time-step temperature convolutional feature vectors according to the time dimension; Initialize the temperature memory state and the temperature hidden state, convolve the temperature feature vector at each time step, and calculate the retention ratio of historical temperature memory through the forget gate; Candidate temperature memories and update ratios are generated through input gates; The current temperature memory status is updated based on the historical temperature memory retention ratio, the candidate temperature memory, and the update ratio. The current temperature memory state is combined with the output gate to generate the current temperature hidden state, which serves as a key feature for temperature prediction. After traversing all time steps, all key features for temperature prediction are summarized, and the temperature prediction feature sequence is output.
7. The method according to claim 6, characterized in that, The dual residual connection module further includes: The second fusion layer connects the output of the temporal convolutional network module and the output of the long short-term memory network module. The temperature convolutional feature sequence output by the temporal convolutional network module is passed through a 1×1 convolutional layer. The output features of this convolutional layer are then added element by element to the temperature prediction feature sequence output by the long short-term memory network module to fuse the features, thus obtaining the temperature prediction result.
8. The method according to claim 1, characterized in that, The process parameter data includes wind speed, wind temperature, and food geometric parameters; the wind speed is selected from at least one continuously adjustable wind speed level within a preset range, the wind temperature is selected from at least one continuously adjustable temperature level within a preset low temperature range, the food geometric parameters include the volume or surface area of each food block, and the temperature time series data is a continuous temperature change sequence of multiple temperature measurement points collected by a temperature sensor.
9. The method according to claim 1, characterized in that, The preprocessing includes: A smoothing filter algorithm is used to denoise the temperature time series data while preserving the temperature change trend characteristics. The denoised temperature time series data is resampled to reduce data redundancy, resulting in an equally spaced temperature sampling sequence. The process parameter data and the temperature sampling sequence are concatenated into a multi-dimensional feature vector, and the multi-dimensional feature vector is normalized using a normalization method to obtain the temperature fusion feature sequence.
10. A food precooling temperature prediction device based on deep learning, characterized in that, include: The acquisition unit is used to acquire temperature time-series data from multiple temperature measurement points based on given process parameter data during the ventilation and precooling process of the target food. A preprocessing unit is used to preprocess the temperature time series data to obtain a temperature fusion feature sequence; The prediction unit is used to input the temperature fusion feature sequence into the fusion deep learning model and output the temperature prediction result; wherein, the fusion deep learning model includes a multi-head self-attention module, a temporal convolutional network module and a long short-term memory network module connected in sequence, and the temporal convolutional network module and the long short-term memory network module are connected through a dual residual connection module; The multi-head self-attention module receives the temperature fusion feature sequence, dynamically identifies key temperature change time step features, and outputs a temperature attention feature sequence; the temporal convolutional network module captures the local and long-distance dependencies of the temperature attention feature sequence and outputs a temperature convolutional feature sequence; the long short-term memory network module models the temporal dependencies of the temperature convolutional feature sequence based on a gating mechanism and outputs a temperature prediction feature sequence.
Citation Information
Cited By
Preservation method for water content of preserved fruit based on multi-sensor data driving
CN122065252A
Meat freezing damage degree intelligent discrimination method and system based on multi-modal information
CN122200632A