CN-122024924-A - Training method and training device for prediction model, prediction method, device, medium and product
Abstract
The application provides a prediction method for the total polar substance TPM (tire building module) exceeding probability in grease, a training method for a prediction model for predicting the total polar substance TPM exceeding probability in grease, a training device, electronic equipment, media and products. The training method comprises the steps of obtaining training data, wherein the training data comprises historical TPM values of grease, time sequence data of fried objects, equipment operation data and environment detection data, the time sequence data of fried objects are used for representing frying time and frying times, the equipment operation data comprise equipment operation temperature and equipment operation time, the environment detection data comprise environment humidity, constructing a cost-sensitive loss function, the loss function comprises asymmetric punishment weight, inputting the historical TPM values, the time sequence data of fried objects, the equipment operation data and the environment detection data into an initial model, and performing iterative training by using the loss function to obtain the prediction model.
Inventors
- YANG YANG
- WANG YIQING
- GUO HAISHAN
- LI JIABIN
- LOU XIAOJUN
- LU CAIWEN
Assignees
- 金拱门(中国)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260122
Claims (12)
- 1. A training method of a prediction model for predicting the TPM (tire building module) exceeding probability of total polar substances in grease is characterized by comprising the following steps: Acquiring training data, wherein the training data comprises historical TPM values of grease, frying time sequence data, equipment operation data and environment detection data, the frying time sequence data is used for representing frying time and frying times, the equipment operation data comprises equipment working temperature and equipment working time, and the environment detection data comprises environment humidity; constructing a cost-sensitive loss function, wherein the loss function comprises asymmetric penalty weights; And inputting the historical TPM values, the fried time sequence data, the equipment operation data and the environment detection data into an initial model, and performing iterative training by using the loss function to obtain the prediction model.
- 2. Training method according to claim 1, characterized in that the loss function is a weighted cross entropy loss function L wce , expressed as follows: , The method comprises the steps of obtaining a prediction model, wherein i represents an ith sample in samples of each generation in an iterative process of the prediction model, y i represents a real value of the ith sample, when the real value is 1, the TPM exceeds standard, when the real value is 0, the TPM is normal, p i represents the TPM exceeding standard probability of the ith sample predicted by the prediction model, N represents the total number of samples, alpha represents the exceeding standard penalty weight, and when the exceeding standard penalty weight is 1, the TPM exceeding standard probability is smaller than the oil change threshold.
- 3. The training method of claim 2, wherein the penalty weights include the overstandard penalty weight and a unit penalty weight, the unit penalty weight being for the case where the TPM overstandard probability is greater than the oil change threshold when the true value is 0.
- 4. A training method according to claim 3, wherein the out-of-standard penalty weight is K times the unit penalty weight, wherein K is ≡5.
- 5. The training method of claim 4, wherein the samples are obtained by weighted sampling during the iterative process to increase the proportion of samples having a true value of 1.
- 6. The training method of claim 5, wherein robustness of the predictive model is improved by countertraining.
- 7. The training method of claim 1, wherein the initial model comprises one of a weighted logistic regression model, a cost sensitive support vector machine model, and an unbalanced data processing neural network model with a attentional mechanism.
- 8. The method for predicting the total polar substance TPM exceeding probability in the grease is characterized by comprising the following steps of: collecting data of grease to be detected, wherein the data of the grease to be detected comprise current TPM values, frying time sequence data, equipment operation data and environment detection data; inputting the current TPM value, the fry timing data, the device operation data and the environment detection data into the predictive model obtained according to the training method of any one of claims 1-7 to obtain the TPM over-standard probability.
- 9. A training device for a predictive model for predicting the total polar substance TPM over-standard probability in grease, comprising: the device comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for acquiring training data, the training data comprises a historical TPM value of grease, frying time sequence data, device operation data and environment detection data, the frying time sequence data is used for representing frying time and frying times, the device operation data comprises device working temperature and device working time, and the environment detection data comprises environment humidity; A loss function unit, configured to construct a cost-sensitive loss function, where the loss function includes an asymmetric penalty weight; The model training unit is used for inputting the historical TPM value, the explosive time sequence data, the equipment operation data and the environment detection data into an initial model, and performing iterative training by using the loss function to obtain the prediction model.
- 10. An electronic device comprising a memory storing computer executable instructions and a processor, which when executed by the processor, cause the device to implement the training method of any one of claims 1 to 7 or the prediction method of claim 8.
- 11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, the one or more programs are executable by one or more processors to implement the training method of any one of claims 1 to 7 or the prediction method of claim 8.
- 12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the training method of any one of claims 1 to 7 or the prediction method of claim 8.
Description
Training method and training device for prediction model, prediction method, device, medium and product Technical Field The application relates to the field of artificial intelligence, in particular to a training method, a training device, a prediction method, equipment, a medium and a product of a prediction model. Background In the catering industry, edible oil is used as an important cooking medium and is widely applied to various high-temperature processing modes such as frying, frying and the like. However, in the repeated high-temperature heating process, the grease undergoes a series of complex chemical reactions such as oxidation, hydrolysis, polymerization, etc., and various polar substances including aldehydes, ketones, acids, and high-molecular polymers are generated. The total amount of these polar materials is generally characterized by the total polar material (Total Polar Materials, TPM) content. Research shows that when the TPM content exceeds a certain threshold (for example, in Chinese national standard, TPM cannot exceed 27%), the nutrition value of the grease is obviously reduced, substances harmful to health can be generated, and health risks exist in long-term intake. Currently, monitoring of frying oil quality by restaurant stores mainly comprises empirical judgment or judgment of total substances TPM in grease by means of TPM detectors and the like. However, experience judgment has the problems of strong subjectivity, poor accuracy and the like, and the TPM detector has the problems of long detection period, high cost, complex operation and the like. At the same time, both methods have hysteresis, which may be detected after the TPM has exceeded a threshold. In addition to the food safety problem caused by the exceeding of the limit value of the TPM, the economic problem caused by waste caused by the fact that oil is replaced when the TPM threshold value is not reached is also existed. Therefore, a method for predicting the TPM content in grease in advance is needed to reduce the oil waste while ensuring that the TPM content does not exceed the health threshold. Disclosure of Invention In order to solve the problem that the lipid TPM (tire building module) exceeding probability cannot be predicted, the application provides a training method of a prediction model for predicting the total polar substance TPM exceeding probability in lipid. The training method comprises the steps of obtaining training data, wherein the training data comprise historical TPM values of grease, time sequence data of fried objects, equipment operation data and environment detection data, the time sequence data of fried objects are used for representing frying time and frying times, the equipment operation data comprise equipment operation temperature and equipment operation time, the environment detection data comprise environment humidity, constructing a cost sensitive loss function, the loss function comprises asymmetric punishment weight, inputting the historical TPM values, the time sequence data of fried objects, the equipment operation data and the environment detection data into an initial model, and performing iterative training by using the loss function to obtain the prediction model. Optionally, the loss function is a weighted cross entropy loss function L wce, which has the following expression: The method comprises the steps of obtaining a prediction model, wherein i represents an ith sample in samples of each generation in an iterative process of the prediction model, y i represents a real value of the ith sample, when the real value is 1, the TPM exceeds standard, when the real value is 0, the TPM is normal, p i represents the TPM exceeding standard probability of the ith sample predicted by the prediction model, N represents the total number of samples, alpha represents the exceeding standard penalty weight, and when the exceeding standard penalty weight is 1, the TPM exceeding standard probability is smaller than the oil change threshold. Optionally, the penalty weight includes the exceeding penalty weight and a unit penalty weight, where the unit penalty weight is for a case that when the true value is 0, the TPM exceeding probability is greater than the oil change threshold. Optionally, the out-of-standard penalty weight is K times the unit penalty weight, wherein K is greater than or equal to 5. Optionally, the samples are obtained through weighted sampling in the iterative process, so as to increase the proportion of samples with the true value of 1 in the samples. Optionally, the robustness of the predictive model is improved by countermeasure training. Optionally, the initial model includes one of a weighted logistic regression model, a cost sensitive support vector machine model, and an unbalanced data processing neural network model with an attention mechanism. The application further provides a prediction method for the total polar substance TPM (tire pressure) exceeding probability