Method for predicting quality of frying oil assisted by artificial intelligence

By constructing a stratified random forest regression model, combining fatty acid composition and heating parameters, the oxidized triglyceride content in frying oil is predicted, which solves the accuracy and efficiency of frying oil quality detection, and realizes early warning and precise monitoring.

CN120334386APending Publication Date: 2025-07-18JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510294288.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the quality detection of frying oil mainly depends on indicators such as the total polar compound content, peroxide value and acid value. There are problems such as insufficient accuracy, high hysteresis and high detection cost, making it difficult to achieve early warning and on-site rapid detection.

Method used

Using artificial intelligence-assisted methods, a stratified random forest regression prediction model is constructed, combining fatty acid composition, heating temperature and time, the content of oxidized triglycerides is predicted, and the three-dimensional surface intersection mapping method is used to determine the threshold of oxidation triglycerides to establish an early warning mechanism for the degree of oxidation.

Benefits of technology

It realizes early accurate prediction and real-time monitoring of the quality of frying oil, improves the accuracy and efficiency of detection, avoids the lag misjudgment of traditional methods, and reduces the detection cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334386A_ABST
    Figure CN120334386A_ABST
Patent Text Reader

Abstract

The invention discloses a method for predicting the quality of frying oil assisted by artificial intelligence, and belongs to the technical field of food quality detection. The method comprises the following steps: firstly, determining an oxidized triglyceride early warning threshold value through temperature-time-index three-dimensional modeling on the basis of relevance between the oxidized triglyceride content and physicochemical indexes such as acid value, polar substances and peroxide value in a grease frying process; secondly, a layered random forest prediction model is constructed based on multi-factor and multi-index relation analysis, the first layer predicts the oxidized triglyceride content based on the frying temperature, time and fatty acid composition, and the second layer synchronously outputs an acid value, a peroxide value and a polar component in combination with an oxidized triglyceride prediction value. The oxidation risk can be recognized in advance, the problems that traditional indexes are high in hysteresis quality and high in detection cost are solved, and early warning and accurate prediction of the oxidation degree of the frying oil are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for predicting the quality of fried oil assisted by artificial intelligence, belonging to the technical field of food quality detection. Background Art

[0002] Frying is an important processing method in food processing. Frying can endow food with unique flavors and crispy textures. At high temperatures, a series of complex chemical changes such as oxidation, hydrolysis, and polymerization occur in oils and fats, generating harmful substances such as peroxides, polar compounds (TPC), aldehydes, and ketones. At the same time, phenomena such as deepening of color, increase in viscosity, and generation of peculiar smells also occur. Ingesting fried oil will pose a threat to human health and is likely to induce diseases such as obesity and inflammation. Therefore, it is necessary to strengthen the monitoring and management of the hot processing process of oils and fats and scientifically control the quality of oils and fats.

[0003] Currently, the quality judgment of fried oil mainly refers to GB 2716-2018 "National Food Safety Standard Vegetable Oil" and "Hygiene Standard for Fried Edible Vegetable Oil in GB7102". The quality of fried oil is judged from several aspects such as physical and chemical indicators (when the acid value (KOH) of the oil exceeds 5 mg / g, or the polar component is greater than 27%, it should be discarded), usage time (when used for more than 3 days; when continuously frying without adding new oil and used for more than 8 h, it should be discarded), and sensory indicators (judged according to color, smell, state of the oil, foam, and smoking situation). The quality evaluation of fried oil abroad mainly focuses on the acid value, polar component, and polymer content, and the specific values vary slightly in different countries. Currently, the polar component is an important basis for judging whether to discard fried oil. The polar component can be measured by a rapid detection device. However, since the polar component refers to the sum of polar substances generated during the processing and storage of oils and fats, including oxidized triglycerides (ox-TGs), fatty acids, monoglycerides, diglycerides, etc., the TPC value alone cannot elaborate on the deep chemical changes that occur during the thermal oxidation process of oils and fats. Among the five major components of polar substances, ox-TGs are the most toxic category and can be digested and absorbed by the human body, causing inflammation and metabolic disorders. Therefore, special attention should be paid to ox-TGs in oils and fats, especially fried oil, to provide a theoretical basis for further formulating a more perfect and detailed fried oil quality evaluation system.

[0004] In the prior art, the quality detection of fried oil mostly uses indicators such as total polar compound content, peroxide value (POV), and acid value (AV), and has the following defects: 1. The accuracy of using AV as a waste judgment standard is poor, and POV has hysteresis and cannot warn of the accumulation of early toxic products (such as epoxy-type ox-TGs), resulting in a risk of misjudgment; 2. Traditional chemical analysis methods are time-consuming and the detection process needs to be completed in a laboratory, making it difficult to achieve on-site rapid detection. Summary of the Invention

[0005] To improve the accuracy and detection efficiency of frying oil quality prediction, the present invention provides an artificial intelligence-assisted method for predicting the quality of frying oil. The technical solution is as follows:

[0006] Step 1: Collect samples of different frying oils at different temperatures and different frying times, measure the TPC index, POV index, AV index, fatty acid composition, and relative content of ox-TGs of the oil samples, perform standardization processing on these data, and construct a database of physical and chemical indexes of frying oil and relative content of ox-TGs;

[0007] Step 2: Establish the mathematical relationships between the TPC index, POV index, AV index and heating temperature T, heating time t;

[0008] Step 3: Use the three-dimensional surface intersection mapping method to establish the correlation threshold between the relative content of ox-TGs and the TPC index, POV index, AV index, and obtain the ox-TGs threshold;

[0009] Step 4: Construct a hierarchical random forest regression prediction model and train it. The model structure is as follows:

[0010] The first-layer structure: The input layer is the fatty acid composition, heating temperature T, and heating time t; the output layer is the relative content of ox-TGs;

[0011] The second-layer structure: The input layer is the fatty acid composition, heating temperature T, heating time t, and the relative content of ox-TGs output by the first layer; the output layer is the TPC index, POV index, AV index;

[0012] Step 5: Use the trained hierarchical random forest regression prediction model to predict the quality of frying oil.

[0013] Optionally, the step 2 includes:

[0014] Step 21: Establish a three-dimensional data matrix of frying oil temperature-time-evaluation index according to the heating temperature gradient and heating time gradient;

[0015] Step 22: Use the heating temperature T as the X-axis, the heating time t as the Y-axis, and each index as the Z-axis. Use the griddata function to draw the numerical continuous surfaces of the TPC index, POV index, AV index, and relative content of ox-TGs of various frying oils, and use polynomial regression to represent the surface with a mathematical expression to establish the mathematical relationships between each index and T, t.

[0016] Optionally, the process of determining the ox-TGs threshold in the step 3 using the three-dimensional surface intersection mapping method includes:

[0017] Step 31: When AV = 5 mg / g, the plane Z1 = 5 intersects with the AV index surface T-t-AV to form a curve L1 = f(T, t). L1 consists of a series of points that satisfy AV = 5 mg / g. Apply the grid search method in MATLAB to find the points that meet the requirements, and substitute the points of L1 into the ox-TGs surface expression to obtain the ox-TGs relative content data set O1{x1, x2,..., x n};

[0018] Step 32: When POV = 10 mmol / kg, the plane Z2 = 10 intersects with the POV index surface T-t-POV to form a curve L2 = g(T, t). L2 consists of a series of points that satisfy POV = 10 mmol / kg. Apply the grid search method in MATLAB to find the points that meet the requirements, and substitute the points of L2 into the ox-TGs surface expression to obtain the ox-TGs relative content data set O2{y1, y2,..., y m};

[0019] Step 33: When TPC = 27%, the plane Z3 = 27 intersects with the TPC index surface T-t-TPC to form a curve L3 =

[0020] h(T, t). L3 consists of a series of points that satisfy TPC = 27%. Apply the grid search method in MATLAB to find the points that meet the requirements, and substitute the points of L3 into the ox-TGs surface expression to obtain the ox-TGs relative content data set O3{z1, z2,..., zk};

[0021] Step 34: Conduct normality test, homogeneity of variance test, and ANOVA test on the O1, O2, and O3 data sets. According to the statistical results, select the method to determine the ox-TGs threshold: If there is no significant difference between groups, take the geometric mean of the three groups of data as the ox-TGs threshold; if there is a significant difference, take the maximum value of the lower limit of the 95% confidence interval of each data set as the ox-TGs threshold.

[0022] Optionally, the fatty acid composition includes: saturated fatty acid ratio, monounsaturated fatty acid ratio, and polyunsaturated fatty acid ratio.

[0023] Optionally, in step 21, in the temperature range of 120°C - 210°C, a three-dimensional data matrix of frying oil temperature-time-evaluation index is established with a gradient of 10°C.

[0024] Optionally, in step 21, in the temperature range of 0 - 48 h, a three-dimensional data matrix of frying oil temperature-time-evaluation index is established with a gradient of 3 h.

[0025] Optionally, in step 1, gas chromatography is used to determine the fatty acid composition.

[0026] Optionally, in step 1, the relative content of ox-TGs in the oil sample is detected by HPLC-MS, and is obtained by calculating the ratio of the total peak area of ox-TGs to the total lipid peak area in the chromatogram.

[0027] The present invention provides an electronic device, including a memory and a processor;

[0028] The memory is used to store a computer program;

[0029] The processor is used to, when executing the computer program, implement the method for predicting the quality of frying oil as described in any one of the above.

[0030] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for predicting the quality of frying oil as described in any one of the above is implemented.

[0031] The beneficial effects of the present invention are:

[0032] The present invention introduces the content index of ox-TGs as a sensitive index for the oxidation degree of frying oil, and at the same time verifies that the content index of ox-TGs is a more sensitive early deterioration index than other indexes such as TPC. On this basis, a random forest hierarchical prediction model is constructed. First, a correlation model between the fatty acid composition and the content of ox-TGs is established by using the random forest model to achieve accurate prediction of the content of ox-TGs. Then, combined with the content of ox-TGs, fatty acid composition, temperature and time, the prediction of TPC, AV, and POV indexes is carried out. Compared with the existing prediction scheme, the present invention can give an early warning of the quality of frying oil earlier and more accurately. The experimental results prove that the ox-TGs introduced by the present invention as a sensitive index for the oxidation degree can help the model better capture the oxidation kinetic process, thereby improving the prediction accuracy and early warning ability; and the hierarchical model can identify the oxidation risk in advance by preferentially predicting ox-TGs, solve the problems of high lag and high detection cost of traditional indexes, and realize the early warning and accurate prediction of the oxidation degree of frying oil. Description of the Drawings

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0034] Figure 1 It is a corresponding relationship diagram of TPC, POV, AV and ox-TGs indexes in the present invention.

[0035] Figure 2 This is the three-dimensional surface diagram of heating temperature - heating time - index in the present invention.

[0036] Figure 3 This is the comparison diagram of the predicted values and actual values of the random forest prediction model for frying oil in the present invention.

[0037] Figure 4 This is the flowchart of the method for predicting the quality of frying oil in the present invention. Detailed implementation manners

[0038] To make the objectives, technical solutions and advantages of the present invention clearer, the following will further describe the embodiments of the present invention in detail with reference to the accompanying drawings.

[0039] Embodiment 1:

[0040] This embodiment provides a method for predicting the quality of frying oil, including:

[0041] Step 1: Collect samples of different frying oils at different temperatures and different frying times, measure the TPC index, POV index, AV index, fatty acid composition and relative content of ox-TGs of the oil samples, and perform standardization processing on these data to construct a database of physical and chemical indexes of frying oil and relative content of ox-TGs;

[0042] Step 2: Establish the mathematical relationship between the TPC index, POV index, AV index and heating temperature T, heating time t;

[0043] Step 3: Use the three-dimensional surface intersection mapping method to establish the correlation threshold between the relative content of ox-TGs and the TPC index, POV index, AV index, and obtain the ox-TGs threshold;

[0044] Step 4: Construct a hierarchical random forest regression prediction model and perform training. The model structure is as follows:

[0045] The first-layer structure: The input layer is the fatty acid composition, heating temperature T and heating time t; the output layer is the relative content of ox-TGs;

[0046] The second-layer structure: The input layer is the fatty acid composition, heating temperature T, heating time t and the relative content of ox-TGs output by the first layer; the output layer is the TPC index, POV index, AV index;

[0047] Step 5: Use the trained hierarchical random forest regression prediction model to predict the quality of frying oil.

[0048] Embodiment 2

[0049] This embodiment provides an artificial intelligence-assisted method for predicting the quality of frying oil. The construction process of the method is introduced in detail based on sunflower oil, including the following steps.

[0050] Step 1: Establish a database of physicochemical indexes and ox-TGs of frying oil.

[0051] (1) Preparation of oil samples: Place fresh French fries in sunflower oil and fry at 120 °C, 130 °C, 140 °C, 150 °C, 160 °C, 170 °C, 180 °C, 190 °C, 200 °C, and 210 °C. The total frying time is 48 h. Take oil samples every 3 h, collect 50 mL each time into a clean glass sample bottle, and store at -20 °C.

[0052] (2) For the frying oil samples collected at different temperatures (120 - 210 °C) and times (0 - 48 h), measure the three basic physicochemical indexes of AV, POV, and TPC of the collected oil samples according to the national standard method, and conduct 3 parallel tests on each oil sample.

[0053] (3) Detect ox-TGs in the oil samples by HPLC-MS. Its relative content is obtained by calculating the ratio of the total peak area of ox-TGs in the chromatogram to the total lipid peak area. The HPLC-MS conditions are as follows: C18 chromatographic column (Kinetex, 100×2.1 mm×2.6 μm); positive ion mode of electrospray ionization source; ion spray voltage floating at 5500 V, scanning range of 60 - 1250 Da, scanning time of 0.25 s, and ion source temperature of 500 °C;

[0054] (4) Since the numerical ranges and dimensions of AV, POV, TPC, and ox-TGs are different, it is necessary to standardize the original data. The percentage-based standardization method is used: Z = (x - [min]) / ([max] - [min]) * 100, where x can be AV, POV, or TPC, and [max] and [min] are the maximum and minimum values of the data respectively;

[0055] (5) Plot the standardized data obtained above as a scatter diagram as Figure 1 , and compare the change trends of ox-TGs and other indexes at different heating temperatures and heating times. The points in the figure are always in the area where Y > X, indicating that the percentage value of ox-TGs is always higher than the percentage values of TPC, POV, and AV. Further, it shows that the accumulation of ox-TGs is faster than other indexes. Therefore, taking ox-TGs as the core of predicting the quality of frying oil has a warning significance.

[0056] Step 2: Establish the mathematical relationship between each index and T, t.

[0057] (1) Establish a three-dimensional data matrix according to the heating temperature gradient (120°C - 210°C, with a temperature gradient of 10°C) and the heating time gradient (0 - 48 h, with a time gradient of 3 h).

[0058] (2) Import the data in step two (1) into Matlab, and use the griddata function in the two-dimensional interpolation method to draw the continuous surfaces of AV, POV, TPC, and ox-TGs. The heating temperature is used as the X-axis, the heating time is used as the Y-axis, and each index is used as the Z-axis. The three-dimensional surface is shown in Figure 2 ; Use polynomial regression to represent the surface with a mathematical expression. The specific expressions of each index are shown in Table 1 below.

[0059] Table 1 Mathematical expressions of each index of frying oil

[0060]

[0061] Higher R 2 values (0.98058 - 0.99684) and lower RMSE values (0.03189 - 0.18606) indicate that the three-dimensional surface drawn by the polynomial response surface method has a good fitting effect, and the expressions in Table 1 above can be used to represent the three-dimensional surfaces of AV, POV, TPC, and ox-TGs.

[0062] Step three: Establish the correlation thresholds between ox-TGs and AV, POV, TPC.

[0063] Relate ox-TGs to the national standard indicators through geometric and statistical means: It is known that the threshold values of the oil evaluation indicators are AV = 5 mg / g, POV = 10 mmol / kg, and TPC = 27%. When any of the threshold values is exceeded, it can be judged that the oil cannot be used continuously. The ox-TGs threshold can be determined according to AV, POV, and TPC, and is obtained through the three-dimensional surface intersection mapping method:

[0064] (1) When AV = 5 mg / g, the plane Z1 = 5 intersects with the surface T-t-AV to form a curve L1 = f(T, t) (120°C ≤ T ≤ 210°C, 0 h ≤ T ≤ 36 h). L1 consists of a series of points that satisfy AV = 5 mg / g: A1(T1, t1), A2(T2, t2), A3(T3, t3), …, A n (T n , t n ); Apply the grid search method in MATLAB to find the point set that meets the requirements, use the meshgrid function to generate the grid points of T and t. To improve the calculation accuracy, set the step sizes ΔT = 1°C and Δt = 1 h. Substitute the points obtained for L1 into the ox-TGs surface expression to obtain the relative content range of ox-TGs as 3.0% - 5.2%, and the geometric mean as 3.5%.

[0065] (2) When POV = 10 mmol / kg, the plane Z2 = 10 intersects the surface T - t - POV to form a curve L2 = g(T, t) (120 °C ≤ T ≤ 210 °C, 0 h ≤ T ≤ 36 h). L2 consists of a series of points satisfying POV = 10 mmol / kg: P1(T1, t1), P2(T2, t2), P3(T3, t3), …, P n (T n , t n ); Using the grid search method in MATLAB to find the set of points that meet the requirements, substituting the points obtained for L2 into the ox - TGs surface expression, the relative content range of ox - TGs is found to be 2.8% - 4.9%, and the geometric mean is 3.2%.

[0066] (3) When TPC = 27%, the plane Z3 = 27 intersects the surface T - t - TPC to form a curve L3 = h(T, t) (120 °C ≤ T ≤ 210 °C, 0 h ≤ T ≤ 36 h). L3 consists of a series of points satisfying TPC = 27%: T1(T1, t1), T2(T2, t2), T3(T3, t3), …, T n (T n , t n ); Using the grid search method in MATLAB to find the set of points that meet the requirements, substituting the points obtained for L3 into the ox - TGs surface expression, the relative content range of ox - TGs is found to be 3.1% - 5.5%, and the geometric mean is 3.8%.

[0067] (4) In order to reduce the influence of outliers or measurement errors on the final threshold, normality test, homogeneity of variance test and ANOVA test are performed on O1, O2, O3. After testing, the three groups of data of O1, O2, O3 conform to the normal distribution (p = 0.062 / 0.102 / 0.147 > 0.05) and have homogeneity of variance (p = 0.213 > 0.05). The ANOVA test results show no significant difference (p = 0.326 > 0.05). Therefore, the geometric mean of the three groups of data of O1, O2, O3 can be used as the threshold O: O = 3 √3.5% × 3.2% × 3.8% ≈ 3.5%, that is, the threshold of ox - TGs is 3.5%.

[0068] Step Four: Construct a random forest model to predict the quality of oil and fat.

[0069] (1) Construct a conventional random forest regression prediction model.

[0070] When using the fatty acid composition as the model input, directly use the actual proportion of fatty acids (specific percentages of saturated fatty acids, monounsaturated fatty acids, and polyunsaturated fatty acids in the oil). A random forest regression prediction model is established using Python. Input layer: heating time, heating temperature, and fatty acid composition; output layer: POV (mmol / kg), AV (mg / g), TPC (%) values; Model-related parameters: The dataset is divided into training set: test set: validation set = 6:2:2; Bayesian optimization is used for hyperparameter tuning, and through 10-fold cross-validation, max_depth = 6 (to prevent overfitting) and n_estimators = 150 (to balance accuracy and computational efficiency) are determined.

[0071] Table 2 Evaluation indicators of the conventional random forest prediction model

[0072]

[0073] (2) Construct a hierarchical random forest regression prediction model.

[0074] When using the fatty acid composition as the model input, directly use the actual proportion of fatty acids (specific percentages of saturated fatty acids, monounsaturated fatty acids, and polyunsaturated fatty acids in the oil).

[0075] A hierarchical random forest regression prediction model is established using Python - T / t / FA composition → ox-TGs → national standard indicators (using ox-TGs as the intermediate node of the model). The specific model structure is as follows:

[0076] Structure of the first layer (input → ox-TGs): The input layer is SFA%, MUFA%, PUFA%, T, t; (The fatty acid composition, temperature, and time directly affect the generation of ox-TGs); The output layer is ox-TGs; A random forest regression model is selected.

[0077] Structure of the second layer (ox-TGs → output): The input layer is SFA%, MUFA%, PUFA%, T, t, ox-TGs_predicted (output of the first layer); The output layer is TPC, AV, POV; A multi-output random forest regression model is selected to output TPC, AV, and POV simultaneously.

[0078] Model-related parameters: The dataset is divided into training set: test set: validation set = 6:2:2; Bayesian optimization is used for hyperparameter tuning, and through 10-fold cross-validation, for the first layer (ox-TGs prediction): max_depth = 8, n_estimators = 200, test set R 2= 0.97, RMSE = 0.0141; For the second layer (national standard index prediction): max_depth = 10, n_estimators = 250; Use the MultiOutputRegressor regressor to expand the single-output model into a multi-output one to independently predict each index; Evaluate the model performance through RMSE and R 2 value, as shown in Table 3.

[0079] Table 3 Evaluation Metrics of the Hierarchical Random Forest Prediction Model

[0080]

[0081]

[0082] Table 3 shows that for all dataset metrics of this hierarchical model, R 2 > 0.97, RMSE < 0.2, Figure 3 the predicted values and actual values in it basically coincide, indicating that the overall performance of this model is excellent and can be used for predicting various indicators of frying oil.

[0083] (3) Evaluate the difference in the prediction effects of the two models from the perspectives of prediction accuracy (RMSE, R 2 ), early warning ability, etc.

[0084] Table 4 Comparison of the Performance between the Conventional Model and the Hierarchical Model

[0085] Index Conventional model Hierarchical model <![CDATA[R 2 > 0.89-0.94 0.97-0.99 RMSE 0.1457-0.2278 0.0141-0.0923 Early warning ability Only give early warning after the index actually exceeds the standard Can predict the index exceeding the standard in advance through ox-TGs

[0086] Through the comparison of RMSE and R 2 value, the prediction effect of the hierarchical model is better than that of the conventional model. In the hierarchical model, ox-TGs, as a sensitive indicator of the oxidation degree, helps the model better capture the oxidation kinetic process, thereby improving the prediction accuracy and early warning ability; and the hierarchical model can identify the oxidation risk in advance by preferentially predicting ox-TGs, avoiding lagging misjudgment.

[0087] Step Five: Prediction (Application) of the Quality of Frying Oil.

[0088] Use the model in Step Four to predict ox-TGs, TPC, AV, and POV for the frying oil samples (with known heating temperature and heating time) not included in the model. The overall prediction method process of the frying oil quality is as Figure 4 shown.

[0089] Use the conventional random forest model to predict:

[0090] Known parameters of the frying oil sample: heating temperature is 185 °C, heating time is 16 h, fatty acid composition (PUFA 60%, MUFA 28%, SFA 12%). The prediction results of its conventional random forest model are shown in Table 5 below:

[0091] Table 5 Prediction Results of the Conventional Random Forest Model for This Oil Sample

[0092]

[0093] As can be seen from Table 5 above, when this oil sample is heated at 185°C for 16 h, all indicators do not exceed the national standards, and the oil product is still safe at 16 h. Therefore, the quality of this oil sample is further predicted by combining ox-TGs. Through the three-dimensional surface intersection mapping method in Step 3, using the mathematical expression in Table 1 and fixing the temperature T = 185°C, the critical time t when each indicator reaches the threshold can be solved. The specific values are shown in Table 6 below. From the data in the table, it can be seen that as frying progresses, AV exceeds the standard first. The service life of this oil at 185°C is 18.3 h, and at this time, the frying oil should be stopped being used.

[0094] Table 6 Comparison of Times When Each Indicator Reaches the Threshold

[0095]

[0096] Prediction using the hierarchical random forest model:

[0097] Given the parameters of the frying oil sample: heating temperature is 185°C, heating time is 16 h, and fatty acid composition (PUFA 60%, MUFA 28%, SFA 12%), the prediction results of its hierarchical random forest model are shown in Table 7 below:

[0098] Table 7 Prediction Results of the Hierarchical Random Forest Model for This Oil Sample

[0099]

[0100] As can be seen from Table 7 above, when this oil sample is heated at 185°C for 16 h, all indicators do not exceed the national standards, and the oil product is still safe at 16 h. Therefore, the quality of this oil sample is further predicted by combining ox-TGs. Through the three-dimensional surface intersection mapping method in Step 3, using the mathematical expression in Table 1 and fixing the temperature T = 185°C, the critical time t when each indicator reaches the threshold can be solved. The specific values are shown in Table 8 below. From the data in the table, it can be seen that as frying progresses, AV exceeds the standard first. The service life of this oil at 185°C is 18.3 h; while ox-TGs reach the threshold of 3.5% at 16 h, and the model predicts that AV will exceed the standard in about 2.3 h in the future, triggering an alarm.

[0101] Table 8 Comparison of Times When Each Indicator Reaches the Threshold

[0102]

[0103] This model can perform real-time monitoring and trend prediction on frying oil: when ox-TGs approach the threshold value (3.5%), the model combines parameters such as temperature, time, and fatty acid composition to predict that the AV will exceed 5 mg / g in the short term (2-3 hours) in the future, triggering an alarm, and can pre-judge the quality of frying oil in advance.

[0104] This embodiment provides a method for predicting the quality of frying oil assisted by artificial intelligence. Based on the traditional indicators TPC, POV, and AV, a hierarchical random forest model is established by combining ox-TGs to predict the quality of frying oil. Through the early sensitivity of ox-TGs to the thermal oxidation of oil, the oxidation risk is predicted before the national standard indicators exceed the standard, providing a more accurate basis for predicting the quality of frying oil from the perspective of oxidation products, and at the same time, it does not require a large amount of reagents and manpower.

[0105] Some steps in the embodiments of the present invention can be implemented by software, and the corresponding software program can be stored in a readable storage medium, such as a CD or a hard disk, etc.

[0106] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting the quality of frying oil, characterized in that, The method includes the following steps: Step 1: Collect samples of different frying oils at different temperatures and different frying times, measure the TPC index, POV index, AV index, fatty acid composition and relative content of ox-TGs of the oil samples, perform standardization processing on these data, and construct a database of the physical and chemical indexes of frying oils and the relative content of ox-TGs; Step 2: Establish the mathematical relationships between the TPC index, POV index, AV index and heating temperature T and heating time t; Step 3: Use the three-dimensional surface intersection mapping method to establish the correlation threshold between the relative content of ox-TGs and the TPC index, POV index, AV index, and obtain the ox-TGs threshold; Step 4: Construct a hierarchical random forest regression prediction model and perform training. The model structure is as follows: The first-layer structure: The input layer is the fatty acid composition, heating temperature T and heating time t; the output layer is the relative content of ox-TGs; The second-layer structure: The input layer is the fatty acid composition, heating temperature T, heating time t and the relative content of ox-TGs output by the first layer; the output layer is the TPC index, POV index, AV index; Step 5: Use the trained hierarchical random forest regression prediction model to predict the quality of frying oils.

2. The method for predicting the quality of frying oil according to claim 1, wherein The said Step 2 includes: Step 21: Establish a three-dimensional data matrix of frying oil temperature-time-evaluation index according to the heating temperature gradient and heating time gradient; Step 22: Take the heating temperature T as the X-axis, the heating time t as the Y-axis, and each index as the Z-axis. Use the griddata function to draw the numerical continuous surfaces of the TPC index, POV index, AV index, and relative content of ox-TGs of various frying oils, and use polynomial regression to represent the surface with a mathematical expression to establish the mathematical relationships between each index and T, t.

3. The method for predicting the quality of frying oil according to claim 1, characterized in that The process of determining the ox-TGs threshold by using the three-dimensional surface intersection mapping method in the said Step 3 includes: Step 31: When AV = 5 mg / g, the plane Z1 = 5 intersects the AV index surface T-t-AV to form a curve L1 = f(T, t). L1 consists of a series of points satisfying AV = 5 mg / g. The grid search method is applied in MATLAB to find the points meeting the requirements. Substituting the points of L1 into the ox-TGs surface expression, the ox-TGs relative content data set O1{x1, x2,..., x n}; Step 32: When POV = 10 mmol / kg, the plane Z2 = 10 intersects the POV index surface T-t-POV to form a curve L2 = g(T, t). L2 consists of a series of points that satisfy POV = 10 mmol / kg. The grid search method is applied in MATLAB to find the points that meet the requirements. Substitute the points of L2 into the ox-TGs surface expression to obtain the ox-TGs relative content data set O2{y1, y2,..., y m}; Step 33: When TPC = 27%, the plane Z3 = 27 intersects with the TPC index surface T-t-TPC to form a curve L3 = h(T, t). L3 consists of a series of points that satisfy TPC = 27%. Use the grid search method in MATLAB to find the points that meet the requirements, and substitute the points of L3 into the ox-TGs surface expression to obtain the relative content dataset O3{z1, z2,..., zk} of ox-TGs; Step 34: Perform normality test, homogeneity of variance test and ANOVA test on the datasets O1, O2, O3, and select the method for determining the ox-TGs threshold according to the statistical results: When there is no significant difference between groups, take the geometric mean of the three groups of data as the ox-TGs threshold; if there is a significant difference, take the maximum value of the lower limit of the 95% confidence interval of each dataset as the ox-TGs threshold.

4. The method for predicting the quality of frying oil according to claim 1, wherein The said fatty acid composition includes: The proportion of saturated fatty acids, the proportion of monounsaturated fatty acids, and the proportion of polyunsaturated fatty acids.

5. The method for predicting the quality of frying oil according to claim 2, wherein In the said Step 21, in the temperature range of 120°C - 210°C, a three-dimensional data matrix of frying oil temperature-time-evaluation index is established with a gradient of 10°C.

6. The method for predicting the quality of frying oil according to claim 2, wherein In the step 21, within the temperature range of 0 - 48 h, a three-dimensional data matrix of frying oil temperature - time - evaluation index is established with a gradient of 3 h.

7. The method for predicting the quality of frying oil according to claim 1, wherein In the step 1, gas chromatography is used to determine the fatty acid composition.

8. The method for predicting the quality of frying oil according to claim 1, wherein In the step 1, HPLC - MS is used to detect the relative content of ox - TGs in the oil sample, which is obtained by calculating the ratio of the total peak area of ox - TGs to the total lipid peak area in the chromatogram.

9. An electronic device, characterized in that, It includes a memory and a processor; The memory is used to store a computer program; The processor is used to implement the method for predicting the quality of frying oil according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by the processor, the method for predicting the quality of frying oil according to any one of claims 1 to 8 is implemented.