Risk early warning method based on food management risk information base
By collecting food business data in real time and building a risk information database, and building a risk prediction model with cross-verification and Bayesian optimization methods, the problem of low operating risk prediction accuracy in food business is solved, and higher risk prediction accuracy and evaluation accuracy are achieved.
Patent Information
- Application Number
- CN202411949178.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the accuracy of operating risk prediction in the food operation process is low, and the complexity and diversity of food operation risks cannot be fully learned.
By collecting food business data in real time and building a food business risk information database, building a risk prediction model with cross-verification method, and using Bayesian optimization method for parameter tuning to improve risk prediction accuracy.
It has achieved improvement in the accuracy of operating risk prediction in the food operation process, effectively solved the problem of low risk prediction accuracy in the existing technology, and improved the accuracy and reliability of risk assessment.
Smart Images

Figure CN119647975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a risk early warning method based on a food business risk information database. Background Art
[0002] With the rapid development of the food industry, the food supply chain has become more complex. From raw material procurement, production and processing, storage and transportation to sales, there may be potential risks in every link. These risks may come from raw material contamination, improper operation during the production process, deterioration of the storage environment, and damage during transportation. If these risks are not identified and responded to in a timely manner, they may threaten the health of consumers and cause serious damage to the reputation and economic interests of enterprises. For example, unstable raw material quality, lax production process control, and hidden dangers in the logistics link may bring potential safety risks to food operations. Traditional food operation risk warning mainly relies on manual experience and regular inspections. These methods may have certain effects in dealing with simple risks, but with the increasing complexity of the food operation environment and the increasing number of risk types, their limitations are gradually emerging. Therefore, it is of great significance to establish a risk warning method based on the food operation risk information database to analyze and predict risk information in real time, realize automatic warning and monitoring of food operation risks, ensure food safety, and safeguard consumer rights.
[0003] Existing technologies collect, integrate and analyze data from the production and operation processes of food companies to build an operating risk information database, and conduct real-time monitoring and prediction of the operating risk information database to build a risk warning model. At the same time, risk warning methods are formulated based on the laws and trends of risk occurrence.
[0004] For example, a food safety risk prediction method and system announced by the invention patent with announcement number: CN115964504B includes: obtaining first food safety sampling data and second food safety sampling data of the food to be predicted; constructing a set of food safety dynamic knowledge graphs at historical moments of the food to be predicted based on the first food safety sampling data to obtain historical moment prediction results, and at the same time constructing a food safety dynamic knowledge graph at the current moment of the food to be predicted based on the second food safety sampling data to obtain current moment prediction results; fusing the historical moment prediction results and the current moment prediction results to obtain the final prediction result of the food safety risk of the food to be predicted at the next moment.
[0005] For example, the patent application with publication number: CN117171142A discloses a method for constructing a risk information database for the entire process of food production and operation, including: monitoring the food production and operation conditions in the monitoring area and collecting data to obtain production and operation monitoring information and preprocessing it; classifying the preprocessed targets into categories to obtain an identification combined data set and obtain safety accident implementation data for food production and operation; calculating and analyzing the safety accident implementation data, and implementing targeted business risk warnings and risk investigation warnings.
[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems: In the existing technology, the constructed risk warning model cannot fully learn the complexity and diversity of food business risks, resulting in the inability to accurately predict food business risks, and there is a problem of low accuracy in predicting business risks during food operations. Summary of the invention
[0007] The embodiment of the present application solves the problem of low accuracy in predicting business risks in the food business process in the prior art by providing a risk warning method based on a food business risk information database, thereby improving the accuracy in predicting business risks in the food business process.
[0008] The embodiment of the present application provides a risk warning method based on a food business risk information database, comprising the following steps: S1, collecting food business data in a food business process in real time and inputting the data into a data warehouse, wherein the food business data includes supply chain information data, production process data, product quality data, and food safety incident data; S2, conducting a risk assessment on the food business data in the data warehouse and classifying and storing the data according to preset categories and preset attributes, and constructing a food business risk information database according to the results of the risk assessment, wherein the risk assessment is used to assess the food business data according to a preset risk level, and the food business risk information database is used to numerically manage the business risks in the food business process in a risk warning mechanism, wherein the risk warning mechanism includes a food supply chain risk warning, a production process risk warning, and Food sales risk warning; S3, construct a risk prediction model according to the needs of risk warning and in combination with the constructed food business risk information database, and at the same time perform a performance evaluation on the constructed risk prediction model according to the cross-validation method. The risk prediction model is used to predict the probability and degree of impact of business risks in the food business process within a preset time period according to the identification principle of the food business risk information database; S4, optimize the constructed risk prediction model according to the results of the performance evaluation, and use the Bayesian optimization method to tune the parameters. The model optimization is used to trend the prediction results to screen out the model parameters to be optimized. The trend fusion is used to automatically classify the model parameters to be optimized according to the occurrence trend of business risks in the food business data process within a preset time period and store them in the risk prediction model.
[0009] Furthermore, the specific steps of conducting risk assessment on the food business data in the data warehouse include: S11, standardizing the food business data in the data warehouse and extracting food risk assessment feature data, the standardization includes data dimension removal, filling missing values and removing outliers, the food risk assessment feature data includes production process control parameter data and food quality inspection index data, the production process control parameter data includes food processing temperature data and food processing cleanliness data, the food quality inspection index data includes food reliability index and environmental adaptability index, the food reliability index represents the degree of food reliability obtained by conducting microbial testing on food samples, and the environmental adaptability index represents the degree of environmental adaptability obtained by simulating the storage of food under extreme environmental conditions; S12, classifying the extracted food risk assessment feature data according to the risk adaptation index and in combination with the preset risk level, the risk adaptation index is used to measure the degree of adaptation of the food risk assessment feature data to the preset risk level; S13, generating a risk assessment report based on the classified food risk assessment feature data and formulating corresponding risk management measures.
[0010] Furthermore, the risk adaptation index is obtained by the following steps: extracting the food risk assessment characteristic data and encoding it to obtain a preset batch of food, and performing a correlation analysis on the preset batch of food after the characteristic data is quantified in combination with the preset risk data, wherein the characteristic data quantification is used to convert the non-numerical data in the preset batch of food into numerical data; and obtaining the risk adaptation index according to the result of the correlation analysis, wherein the risk adaptation index is calculated by the following formula: , Where i is the number of the preset batch of food, , X is the total quantity of food in the preset batch, represents the risk adaptation index corresponding to the i-th preset batch of food, e is a natural constant, represents the food processing temperature data corresponding to the i-th preset batch of food, Indicates food processing temperature reference data, A represents the reference deviation of food processing temperature data. represents the food processing cleanliness data corresponding to the i-th preset batch of food, Indicates the reference data of food processing cleanliness. B represents the reference deviation of food processing data, represents the food reliability index corresponding to the i-th preset batch of food, Represents the food reliability reference index, C represents the reference deviation of food reliability index, represents the environmental adaptability index corresponding to the i-th preset batch of food, Represents the reference index of environmental adaptability. D represents the reference deviation of environmental adaptability index.
[0011] Furthermore, the specific steps for constructing the food operation risk information database are as follows: S21, setting risk warning indicators for the food operation process based on the results of risk assessment, and judging whether the operating risks in the food operation process within a preset time period meet the triggering conditions of the risk warning mechanism in combination with the set risk warning indicators; if so, classifying the operating risks and optimizing the classified operating risks according to the corresponding risk management measures until the set risk warning indicators are met; otherwise, designing a database structure according to the set risk warning indicators, and the risk warning indicators are used to measure the degree of deviation between the operating risks in the food operation process and the triggering conditions of the risk warning mechanism; S22, constructing a food operation risk information database according to the designed database structure and in combination with the triggering conditions of the risk warning mechanism, and updating the constructed food operation risk information database at the same time.
[0012] Furthermore, the risk warning indicator is calculated by the following formula: , In the formula, n is the number of times the risk warning indicator is set. , N is the total number of times the risk warning indicator is set, represents the risk warning indicator corresponding to the nth risk warning indicator setting, e is a natural constant, It represents the supplier reliability evaluation coefficient corresponding to the nth risk warning indicator setting. Represents the supplier reliability reference evaluation coefficient, M represents the reference deviation of the supplier reliability assessment coefficient, It represents the weight of the supplier reliability assessment coefficient relative to the risk warning index. It indicates the production line operation efficiency corresponding to the nth risk warning indicator setting. It indicates the reference efficiency of the production line operation. K represents the reference deviation of the production line operation efficiency, It indicates the weight of the production line operation efficiency relative to the risk warning index. Indicates the food sales data corresponding to the nth risk warning indicator setting, It represents the food return rate data corresponding to the nth risk warning indicator setting; the supplier reliability evaluation coefficient is used to measure the reliability of the food quality and production quality of the food supplied by the supplier; the production line operation efficiency is obtained through the production efficiency and food qualification rate in the food production process.
[0013] Furthermore, the specific steps of constructing the risk prediction model include: S31, using the constructed food business risk information database to screen out data sets related to the prediction target of the risk prediction model, the data sets include historical risk data sets, risk warning indicators, and food business market data; S32, normalizing the screened data sets to ensure the consistency of data dimensions in the data sets, and analyzing the complexity of the prediction targets after normalization; S33, selecting a risk prediction model framework based on a preset adaptation model structure and in combination with the actual needs of the application scenarios corresponding to the risk prediction model and the complexity of the prediction targets; S34, performing simulation evaluation on the selected risk prediction model framework and constructing a risk prediction model, the simulation evaluation is used to evaluate the degree of match between the risk prediction model framework and the risk prediction model at a preset accuracy.
[0014] Furthermore, after constructing the risk prediction model, the method also includes performing a performance evaluation on the constructed risk prediction model, and the specific steps include: dividing the screened data set into a training set and a test set, using the training set to train the risk prediction model to obtain a training data set, and the training data set represents the training accuracy and training loss value of the risk prediction model during the training process; using the test set and combining the acquired training data set to test the risk prediction model to obtain a test data set, and the test data set represents the test accuracy and test loss value of the risk prediction model during the testing process; combining the cross-iteration principle in the cross-validation method to perform a performance evaluation on the trained risk prediction model and optimize it until the preset performance evaluation indicators are met, and the performance evaluation indicators are used to measure the performance of the risk prediction model during the training and testing process.
[0015] Furthermore, the method for obtaining the performance evaluation index is: according to the training accuracy of the risk prediction model in the training process and the test accuracy in the testing process and in combination with the corresponding reference deviation, the training accuracy coefficient and the test accuracy coefficient are obtained, the training accuracy coefficient is used to measure the degree of fit of the risk prediction model to the training data set, and the test accuracy coefficient is used to measure the degree of fit of the risk prediction model to the test data set; according to the training loss value of the risk prediction model in the training process and the test loss value in the testing process and in combination with the corresponding reference deviation, the training loss coefficient and the test loss coefficient are obtained, the training loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the training set, and the test loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the test set; the performance evaluation index is obtained by combining the obtained training accuracy coefficient, test accuracy coefficient, training loss coefficient and test loss coefficient.
[0016] Furthermore, the parameter tuning includes the following specific steps: S41, taking the performance evaluation index of the risk prediction model as the objective function and combining the results of model fusion to obtain the model parameters to be optimized, the objective function is used to measure the degree of matching between the model parameters to be optimized and the preset model parameters; S42, initializing the Bayesian optimizer according to the objective function and the parameter space, and using the initialized Bayesian optimizer to search for the target parameter combination in the parameter space, the parameter space is used to identify and determine the area where the target parameter combination is located, and the initialization is used to update the probability model of the Bayesian optimizer according to the historical evaluation results; S43, evaluating the searched target parameter combination according to the cross-validation method to obtain the target model performance, and the target model performance is used to measure the degree of adaptation between the target parameter combination and the preset performance evaluation index; S44, inputting the target model performance into the risk prediction model to re-evaluate the performance, and optimizing according to the results of the performance evaluation until the model performance meets the objective function.
[0017] The embodiment of the present application provides a risk warning system based on a food business risk information library, including: a food business data input module, a food business risk information library construction module, a risk prediction model construction module and a model optimization and parameter tuning module; wherein the food business data input module is used to collect food business data in the food business process in real time and input it into a data warehouse, and the food business data includes supply chain information data, production process data, product quality data and food safety incident data; the food business risk information library construction module is used to perform risk assessment on the food business data in the data warehouse and classify and store them according to preset categories and preset attributes, and at the same time construct a food business risk information library according to the results of the risk assessment, the risk assessment is used to evaluate the food business data according to the preset risk level, and the food business risk information library is used to numerically manage the business risks in the food business process in the risk warning mechanism, and the risk The early warning mechanism includes food supply chain risk warning, production process risk warning and food sales risk warning; the risk prediction model construction module is used to construct a risk prediction model according to the needs of risk warning and in combination with the constructed food business risk information database, and at the same time, the constructed risk prediction model is evaluated according to the cross-validation method. The risk prediction model is used to predict the probability of occurrence and impact of business risks in the food business process within a preset time period according to the identification principle of the food business risk information database; the model optimization and parameter tuning module is used to optimize the constructed risk prediction model according to the results of performance evaluation, and at the same time, the Bayesian optimization method is used to tune the parameters. The model optimization is used to trend the prediction results to screen out the model parameters to be optimized. The trend fusion is used to automatically classify the model parameters to be optimized according to the occurrence trend of business risks in the food business data process within a preset time period and store them in the risk prediction model.
[0018] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By collecting food business data in the food business process in real time and conducting risk assessment, a food business risk information database is constructed. Then, according to the needs of risk warning and in combination with the constructed food business risk information database, a risk prediction model is constructed and a performance evaluation is performed on the constructed risk prediction model. Finally, according to the results of the performance evaluation, the constructed risk prediction model is optimized and the parameters are tuned, thereby achieving accurate construction of the risk prediction model, and then achieving improved accuracy in predicting business risks in the food business process, effectively solving the problem of low accuracy in predicting business risks in the food business process in the prior art.
[0019] 2. By standardizing the food business data in the data warehouse and extracting the food risk assessment feature data, the extracted food risk assessment feature data are classified according to the risk adaptation index and the preset risk level. Finally, a risk assessment report is generated based on the classified food risk assessment feature data and corresponding risk management measures are formulated, thereby achieving accurate extraction of food risk assessment feature data and improving the accuracy and reliability of risk assessment.
[0020] 3. By setting risk warning indicators for the food operation process based on the results of risk assessment, and combining the set risk warning indicators to determine whether the operating risks in the food operation process within the preset time period meet the triggering conditions of the risk warning mechanism, then construct a food operation risk information database based on the designed database structure and combined with the triggering conditions of the risk warning mechanism, and at the same time update the constructed food operation risk information database, thereby achieving the precise setting of risk warning indicators and further achieving a more precise construction of the food operation risk information database. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A flow chart of a risk warning method based on a food business risk information database provided in an embodiment of the present application; Figure 2 A flowchart for constructing a risk prediction model provided in an embodiment of the present application; Figure 3 A flowchart for performing performance evaluation on a risk prediction model provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a risk warning system based on a food business risk information database provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The embodiment of the present application solves the problem of low accuracy in predicting business risks in the food business process in the prior art by providing a risk warning method based on a food business risk information database. The method collects supply chain information data, production process data, product quality data and food safety incident data in the food business process in real time and inputs them into a data warehouse for risk assessment. The data are classified and stored according to preset categories and preset attributes. A food business risk information database is constructed based on the results of the risk assessment. A risk prediction model is then constructed based on the needs of risk warning and in combination with the constructed food business risk information database. The probability of occurrence and degree of impact of business risks in the food business process within a preset time period are predicted based on the identification principle of the food business risk information database. The performance of the constructed risk prediction model is evaluated based on the cross-validation method. Finally, the constructed risk prediction model is optimized based on the results of the performance evaluation. The Bayesian optimization method is used to tune the parameters, thereby improving the accuracy of business risk prediction in the food business process.
[0023] The technical solution in the embodiment of the present application is to solve the problem of low accuracy in business risk prediction in the above-mentioned food business process, and the overall idea is as follows: By collecting food operation data in the food operation process in real time and conducting risk assessment, a food operation risk information database is constructed. Then, according to the needs of risk warning and in combination with the constructed food operation risk information database, a risk prediction model is constructed and a performance evaluation is performed on the constructed risk prediction model. Finally, according to the results of the performance evaluation, the constructed risk prediction model is optimized and parameters are tuned, thereby achieving the effect of improving the accuracy of business risk prediction in the food operation process.
[0024] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0025] like Figure 1As shown, it is a flow chart of a risk warning method based on a food business risk information library provided by an embodiment of the present application, the method comprising the following steps: S1, collecting food business data in the food business process in real time and inputting it into a data warehouse, the food business data including supply chain information data, production process data, product quality data and food safety incident data; S2, conducting risk assessment on the food business data in the data warehouse and classifying and storing them according to preset categories and preset attributes, and constructing a food business risk information library according to the results of the risk assessment, the risk assessment is used to assess the food business data according to preset risk levels, the food business risk information library is used to numerically manage the business risks in the food business process in the risk warning mechanism, the risk warning mechanism includes food supply chain risk warning, production process risk warning, Risk warning and food sales risk warning; S3, according to the needs of risk warning and in combination with the constructed food business risk information database, a risk prediction model is constructed, and at the same time, the performance of the constructed risk prediction model is evaluated according to the cross-validation method. The risk prediction model is used to predict the probability of occurrence and degree of impact of business risks in the food business process within a preset time period according to the identification principle of the food business risk information database; S4, according to the results of the performance evaluation, the constructed risk prediction model is optimized, and the Bayesian optimization method is used to tune the parameters. The model optimization is used to trend the prediction results to screen out the model parameters to be optimized. The trend fusion is used to automatically classify the model parameters to be optimized according to the occurrence trend of business risks in the food business data process within the preset time period, and then store them in the risk prediction model.
[0026] In this embodiment, a structured data set is formed by collating, cleaning and standardizing the data in the food business risk information database to provide data support for the subsequent risk prediction model; the risk prediction model usually uses the historical data and real-time data in the food business risk information database to extract and learn risk features through machine learning algorithms. These features usually include food types, sales channels, price fluctuations and consumer feedback. By analyzing these features, the risk prediction model can discover the laws and patterns of risk occurrence; in addition, after completing the performance evaluation, it can be used to predict the probability of business risk occurrence, that is, the probability value of risk occurrence is obtained based on the input data and historical data in the information database; at the same time, the risk prediction model can further predict the impact of the risk, which includes possible economic losses and brand image damage; through the application of the risk prediction model, enterprises and regulatory authorities can promptly understand the possible risks in food operations and formulate corresponding risk response measures. For example, for foods or sales channels with higher predicted risks, supervision and inspection efforts can be strengthened to prevent risks in advance, thereby improving the accuracy of business risk prediction in the food operation process.
[0027] Furthermore, the specific steps of conducting risk assessment on food business data in the data warehouse include: S11, standardizing the food business data in the data warehouse and extracting food risk assessment feature data, the standardization includes data dimension removal, filling missing values and removing outliers, the food risk assessment feature data includes production process control parameter data and food quality inspection index data, the production process control parameter data includes food processing temperature data and food processing cleanliness data, the food quality inspection index data includes food reliability index and environmental adaptability index, the food reliability index represents the degree of food reliability obtained by conducting microbial testing on food samples, and the environmental adaptability index represents the degree of environmental adaptability obtained by simulating the storage of food under extreme environmental conditions; S12, classifying the extracted food risk assessment feature data according to the risk adaptation index and in combination with the preset risk level, the risk adaptation index is used to measure the degree of adaptation of the food risk assessment feature data to the preset risk level; S13, generating a risk assessment report based on the classified food risk assessment feature data and formulating corresponding risk management measures.
[0028] In this embodiment, data de-dimensionalization is usually because food business data may involve different measurement units and dimensions. Direct comparison and analysis may lead to misleading results. The data needs to be converted to the same dimension for analysis. To avoid the impact of missing values on risk assessment results, missing values need to be filled. Common filling methods include mean filling, median filling and interpolation. Outliers will seriously interfere with the accuracy of risk assessment results. Before extracting risk assessment feature data, statistical methods or machine learning algorithms need to be used to detect and remove outliers. The preset risk level is usually set based on historical data, expert knowledge and relevant regulations and standards, reflecting the impact of different risk levels on food safety and consumer health. Specifically, the calculated risk adaptation index is compared with the preset risk level threshold, and the data is classified into the corresponding risk level according to the comparison result. For example, if the risk adaptation index is lower than the low risk threshold, then the data can be classified as low risk. If the index is higher than the high risk threshold, it is classified as high risk, thereby achieving more accurate analysis of food risk assessment feature data in the food production process.
[0029] Furthermore, the food risk assessment characteristic data is fuzzified using fuzzy mathematics theory, and then a fuzzy evaluation matrix is constructed and input into the machine learning algorithm to obtain the risk adaptation index; in addition to obtaining the risk adaptation index through the above fuzzy comprehensive evaluation method, it can also be obtained more accurately: the risk adaptation index is obtained through the following steps: the extracted food risk assessment characteristic data is encoded to obtain a preset batch of food, and at the same time, the preset risk data is combined to perform a correlation analysis on the preset batch of food after the characteristic data is quantified. The characteristic data quantification is used to convert the non-numerical data in the preset batch of food into numerical data; the risk adaptation index is obtained according to the results of the correlation analysis, and the risk adaptation index is calculated by the following formula: , Where i is the number of the preset batch of food, , X is the total quantity of food in the preset batch, represents the risk adaptation index corresponding to the i-th preset batch of food, e is a natural constant, represents the food processing temperature data corresponding to the i-th preset batch of food, Indicates food processing temperature reference data, A represents the reference deviation of food processing temperature data. represents the food processing cleanliness data corresponding to the i-th preset batch of food, Indicates the reference data of food processing cleanliness. B represents the reference deviation of food processing data, represents the food reliability index corresponding to the i-th preset batch of food, Represents the food reliability reference index, C represents the reference deviation of food reliability index, represents the environmental adaptability index corresponding to the i-th preset batch of food, Represents the reference index of environmental adaptability. D represents the reference deviation of environmental adaptability index.
[0030] In this embodiment, the food processing temperature data is collected in real time during the food processing process by temperature sensors installed on the production line. These sensors can be set in key process links (such as steaming, baking, and cooling) to ensure accurate monitoring of temperature changes. Appropriate processing temperature helps to maintain the nutritional content, taste and safety of food, avoid excessive microbial growth or food spoilage. Once the temperature in the production and processing process exceeds the set temperature threshold range, the alarm system of the monitoring equipment will be immediately triggered.
[0031] Specifically, the food processing cleanliness data is obtained by using cleanliness monitoring equipment (such as particle counters, microbial detectors) to monitor the cleanliness of the production environment regularly or in real time. At the same time, regular hygiene inspections are carried out on processing equipment, work surfaces, etc. A high-cleanliness production environment can reduce the risk of microbial contamination and improve the quality and safety of food.
[0032] Specifically, the food reliability index evaluates the reliability of food by conducting microbial testing on food samples, which includes detecting the types and quantities of microorganisms such as bacteria, molds, and viruses in food to determine whether the food is contaminated. It can also be combined with chemical analysis and other methods to detect the content of harmful substances in food. Microbial testing can directly reflect the sanitary condition of food, evaluate food safety risks, and warn and dispose of unqualified products; the environmental adaptability index evaluates the environmental adaptability of food by simulating the storage of food under extreme environmental conditions, which includes setting different environmental conditions such as high temperature, high humidity, low temperature, and low humidity, and observing the changes in food quality under these conditions to evaluate the adaptability of food under different environmental conditions. This is of great significance for predicting the shelf life of food and guiding consumers to store food correctly; it achieves more accurate acquisition of the risk adaptation index.
[0033] Furthermore, the specific steps for constructing the food operation risk information database are as follows: S21, setting risk warning indicators for the food operation process based on the results of risk assessment, and judging whether the operating risks in the food operation process within a preset time period meet the triggering conditions of the risk warning mechanism in combination with the set risk warning indicators; if so, classifying the operating risks and optimizing the classified operating risks according to the corresponding risk management measures until the set risk warning indicators are met; otherwise, designing a database structure according to the set risk warning indicators, and the risk warning indicators are used to measure the degree of deviation between the operating risks in the food operation process and the triggering conditions of the risk warning mechanism; S22, constructing a food operation risk information database according to the designed database structure and in combination with the triggering conditions of the risk warning mechanism, and updating the constructed food operation risk information database at the same time.
[0034] In this embodiment, the specific steps for setting the risk warning indicators are: conducting an in-depth analysis of the results of the food business risk assessment to understand the distribution, degree and potential impact of various risks, which includes analyzing the food risk assessment characteristic data, risk adaptation index and risk level; identifying the key risk points that have a significant impact on the food business process based on the risk assessment results, which may involve raw material quality, production process control, storage conditions and transportation links; setting corresponding risk warning indicators for the preset key risk points, which can be quantitative (such as microbial content threshold, temperature control range) or qualitative (such as production environment cleanliness level, processing temperature, etc.) process compliance); according to the actual situation and needs of food operations, set the triggering conditions of the risk warning mechanism. These conditions may include the exceeding of a single risk warning indicator, the combined effect of multiple indicators, and the continuous deterioration of the risk trend. Within the preset time period, if the real-time data meets or exceeds any preset triggering condition, the risk warning mechanism is determined to be triggered. Therefore, once the risk warning mechanism is triggered, corresponding response measures should be immediately formulated and implemented, including adjusting the production process control parameters, strengthening the quality inspection of raw materials and improving the storage conditions, so as to reduce the operation risk and ensure food safety, thereby improving the accuracy and reliability of the food operation risk information database.
[0035] Furthermore, by applying the association rule mining principle in data mining technology, the food business data in the food business risk information database is deeply explored. By discovering the potential associations and patterns between the data, the risk information hidden behind the data can be revealed, and corresponding risk warning indicators can be set accordingly. In addition to obtaining risk warning indicators through the above data mining method, they can also be calculated through the following formula: , In the formula, n is the number of times the risk warning indicator is set. , N is the total number of times the risk warning indicator is set, represents the risk warning indicator corresponding to the nth risk warning indicator setting, e is a natural constant, It represents the supplier reliability evaluation coefficient corresponding to the nth risk warning indicator setting. Represents the supplier reliability reference evaluation coefficient, M represents the reference deviation of the supplier reliability assessment coefficient, It represents the weight of the supplier reliability assessment coefficient relative to the risk warning index. It indicates the production line operation efficiency corresponding to the nth risk warning indicator setting. It indicates the reference efficiency of the production line operation. K represents the reference deviation of the production line operation efficiency, It indicates the weight of the production line operation efficiency relative to the risk warning index. Indicates the food sales data corresponding to the nth risk warning indicator setting, It represents the food return rate data corresponding to the nth risk warning indicator setting; the supplier reliability assessment coefficient is used to measure the reliability of the food quality and production quality of the food supplied by the supplier; the production line operation efficiency is obtained through the production efficiency and food qualification rate in the food production process.
[0036] In this embodiment, the specific steps for obtaining the supplier reliability evaluation coefficient include: collecting relevant information of the supplier, including its company qualifications, scale, operating conditions and industry reputation, which is usually obtained by consulting the supplier's official website, corporate profile, rating report of a third-party evaluation agency, and consulting with other companies or industry experts; organizing and analyzing the collected information to establish an evaluation index system, which should cover multiple aspects of food quality (such as taste, nutritional ingredients, shelf life), and multiple links of production quality (such as raw material procurement, production process, and hygiene standards); quantifying and scoring each indicator, which can be conducted through questionnaire surveys, field visits, and sample testing, and obtaining a specific value of the supplier reliability evaluation coefficient based on the scoring results; judging the reliability of the supplier based on the value of the evaluation coefficient, the higher the value, the stronger the reliability of the supplier, and the more guaranteed the food quality and production quality of the supplied food.
[0037] Specifically, the steps for obtaining the operating efficiency of the production line include: collecting relevant data in the food production process, including the operating time of production equipment, production cycle and employee work efficiency, and conducting quality inspections on the produced food to count the number and proportion of qualified products; obtaining the production efficiency and the qualified rate of food based on these data. The production efficiency can be obtained by calculating the number of products produced per unit time, while the qualified rate of food is the proportion of the number of qualified products to the total production quantity; conducting an effect analysis on the production efficiency and qualified rate. If the production efficiency is high and the qualified rate is high, it means that the production line operation efficiency is high. Otherwise, it is necessary to analyze the reasons and take corresponding measures to improve it (such as optimizing the production process and improving employee skills); a more accurate assessment and acquisition of risk warning indicators is achieved.
[0038] Further, such as Figure 2As shown, it is a flow chart for constructing a risk prediction model provided in an embodiment of the present application, and the specific steps for constructing the risk prediction model include: S31, using the constructed food business risk information library to screen out data sets related to the prediction target of the risk prediction model, and the data sets include historical risk data sets, risk warning indicators, and food business market data; S32, normalizing the screened data sets to ensure the consistency of the data dimensions in the data sets, and analyzing the complexity of the prediction targets after normalization, specifically including the risk warning type, risk influencing factors and prediction accuracy requirements; S33, selecting a risk prediction model framework according to a preset adaptation model structure and in combination with the actual needs of the application scenarios corresponding to the risk prediction model and the complexity of the prediction targets; S34, performing simulation evaluation on the selected risk prediction model framework and constructing a risk prediction model, and the simulation evaluation is used to evaluate the degree of match between the risk prediction model framework and the risk prediction model at a preset accuracy.
[0039] In this embodiment, the food business market data reflects the dynamic changes of the food market, including consumer demand, price fluctuations and competition patterns. These data are of great significance for predicting market risks and formulating risk response strategies. After screening out the data sets related to the prediction target, in practical applications, machine learning and statistical analysis can be used to construct a risk prediction model. By training and verifying the model, we can evaluate the prediction performance of the model and continuously optimize the model parameters. Finally, the constructed risk prediction model is used to predict and warn food business risks in real time. The risk warning type can be divided according to different business needs (such as single risk warning, comprehensive risk warning or graded risk warning). In the process of food business, risk influencing factors usually include supplier stability, raw material quality, production environment and market demand fluctuations. There may be complex interactions between these factors, and their internal laws need to be revealed through in-depth data analysis and model construction. The prediction accuracy requirement reflects the expectations and requirements of the enterprise for the risk warning results. The higher the prediction accuracy, the more accurate the enterprise's grasp of the risk, but the corresponding model construction difficulty and data requirements may also increase. Therefore, when constructing a risk warning model, it is necessary to set a suitable prediction accuracy target according to the actual situation and needs of the enterprise, so as to improve the accuracy of the prediction performance of the risk prediction model.
[0040] Further, such as Figure 3As shown, a flowchart for performance evaluation of a risk prediction model provided in an embodiment of the present application is provided. After constructing the risk prediction model, it also includes performance evaluation of the constructed risk prediction model. The specific steps include: dividing the screened data set into a training set and a test set, using the training set to train the risk prediction model to obtain a training data set, the training data set represents the training accuracy and training loss value of the risk prediction model during the training process; using the test set and combining the acquired training data set to test the risk prediction model to obtain a test data set, the test data set represents the test accuracy and test loss value of the risk prediction model during the testing process; combining the cross-iteration principle in the cross-validation method to perform performance evaluation on the trained risk prediction model and optimize it until the preset performance evaluation indicators are met, and the performance evaluation indicators are used to measure the performance of the risk prediction model during the training and testing processes.
[0041] In this embodiment, in actual operation, the data set can be divided according to a certain ratio (such as 70% training set and 30% test set) according to the size of the data set and the complexity of the risk prediction model. Then, the risk prediction model is trained using the training set, and the training accuracy and training loss value during the training process are recorded. These data sets can understand the learning status of the risk prediction model during the training process. After the training is completed, the risk prediction model is tested using the test set, and the test accuracy and test loss value are recorded. These data sets can reflect the predictive ability of the model on unseen data, thereby evaluating the generalization performance of the model; the performance of the model is evaluated by comparing the training data set and the test data set. If the training accuracy and test accuracy of the risk prediction model are both high, and the training loss value and test loss value are both low, then it means that the model has good predictive ability and generalization performance. Otherwise, it may mean that the model has overfitting or underfitting problems and needs further adjustment and optimization; it should be noted that when dividing the training set and the test set, the independence and same distribution of the data must be ensured to avoid data leakage and bias, thereby achieving a more accurate evaluation of the risk prediction model.
[0042] Furthermore, the method for obtaining the performance evaluation index is as follows: according to the training accuracy of the risk prediction model in the training process and the test accuracy in the testing process and combined with the corresponding reference deviation, the training accuracy coefficient and the test accuracy coefficient are obtained, the training accuracy coefficient is used to measure the degree of fit of the risk prediction model to the training data set, and the test accuracy coefficient is used to measure the degree of fit of the risk prediction model to the test data set; according to the training loss value of the risk prediction model in the training process and the test loss value in the testing process and combined with the corresponding reference deviation, the training loss coefficient and the test loss coefficient are obtained, the training loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the training set, and the test loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the test set; the performance evaluation index is obtained by combining the obtained training accuracy coefficient, test accuracy coefficient, training loss coefficient and test loss coefficient.
[0043] In this embodiment, by calculating the training accuracy coefficient and the test accuracy coefficient, these two coefficients not only take into account the accuracy of the model, but also take into account the comparison with the reference deviation, so that the performance of the risk prediction model can be evaluated more comprehensively; by adopting k-fold cross-validation (such as 5-fold, 10-fold), the data set can be divided into k subsets, and k-1 subsets are used for training each time, and the remaining subset is used for testing. The average value and standard deviation of the model performance are obtained through multiple cross-validations to evaluate the stability and generalization ability of the model, and then the loss function changes of the risk prediction model during the training and testing process are analyzed according to the specific type of risk warning model (such as logistic regression, neural network). The smaller the loss function value, the better the model fits the training data. Finally, the performance evaluation index is obtained by combining the accuracy and loss function value.
[0044] Specifically, in addition to obtaining performance evaluation indicators through the above cross-validation and loss function analysis methods, they can also be calculated through the following formula: , In the formula, q is the number of times the performance evaluation is performed. , Q is the total number of performance evaluations, represents the performance evaluation index corresponding to the qth performance evaluation, e is a natural constant, represents the training accuracy corresponding to the qth performance evaluation, represents the reference training accuracy, Indicates the training accuracy reference deviation, represents the test accuracy corresponding to the qth performance evaluation, represents the reference test accuracy, Indicates the reference deviation of test accuracy, represents the training loss value corresponding to the qth performance evaluation, represents the reference training loss value, Represents the reference deviation of the training loss value, represents the test loss value corresponding to the qth performance evaluation, represents the reference test loss value, Indicates the reference deviation of the test loss value.
[0045] Specifically, the reference deviation usually refers to the deviation between the predicted result and the actual result without the intervention of the risk prediction model. It is usually used as a benchmark and compared with the prediction deviation of the risk prediction model to evaluate the performance improvement of the risk prediction model. The training accuracy coefficient reflects the degree of improvement in the accuracy of the model relative to the reference deviation during the training process. The higher the coefficient value, the better the performance of the model in the training stage. Similarly, the test accuracy coefficient measures the improvement in the accuracy of the model relative to the reference deviation in the testing stage. The high or low test accuracy coefficient directly reflects the predictive ability of the model on unseen data. It should be noted that in actual applications, if the training accuracy or the test accuracy is lower than the reference deviation, then the corresponding accuracy coefficient may be negative, which means that the prediction performance of the model is not as good as the benchmark and needs further optimization. Through continuous iterative optimization, more accurate performance evaluation indicators are eventually obtained, thereby improving the accuracy and reliability of the performance evaluation indicators.
[0046] Furthermore, parameter tuning includes the following specific steps: S41, taking the performance evaluation index of the risk prediction model as the objective function and combining the results of model fusion to obtain the model parameters to be optimized, and the objective function is used to measure the degree of matching between the model parameters to be optimized and the preset model parameters; S42, initializing the Bayesian optimizer according to the objective function and parameter space, and using the initialized Bayesian optimizer to search for the target parameter combination in the parameter space, the parameter space is used to identify and determine the area where the target parameter combination is located, and the initialization is used to update the probability model of the Bayesian optimizer according to the historical evaluation results; S43, evaluating the searched target parameter combination according to the cross-validation method to obtain the target model performance, and the target model performance is used to measure the degree of adaptation between the target parameter combination and the preset performance evaluation index; S44, inputting the target model performance into the risk prediction model for re-performance evaluation, and optimizing according to the results of the performance evaluation until the model performance meets the objective function.
[0047] In this embodiment, before initializing the Bayesian optimizer, it is necessary to clarify the optimization goal, that is, to define the objective function. In the parameter tuning of the risk warning model, the objective function is usually the performance metric of the risk prediction model (such as accuracy, cross-validation score). This function maps the parameter combination to a real number, representing the model performance under the parameter combination; the parameter space is the set of all possible parameter combinations. For the risk warning model, this usually includes the learning rate, regularization coefficient, number of network layers and number of nodes. When initializing the parameter space, it is necessary to determine the value range or possible discrete value of each parameter; When initializing the Bayesian optimizer, this probability model is usually based on some prior knowledge or assumptions. In practical applications, if there are historical evaluation results (i.e., previous evaluation data on parameter combinations), these data can be used to initialize the probability model to make it closer to the actual situation, thereby improving the reliability of the risk prediction model in practical applications.
[0048] like Figure 4As shown, it is a structural schematic diagram of a risk warning system based on a food business risk information library provided in an embodiment of the present application. A risk warning system based on a food business risk information library provided in an embodiment of the present application includes: a food business data input module, a food business risk information library construction module, a risk prediction model construction module and a model optimization and parameter tuning module; wherein the food business data input module is used to collect food business data in the food business process in real time and input it into the data warehouse, and the food business data includes supply chain information data, production process data, product quality data and food safety incident data; the food business risk information library construction module is used to perform risk assessment on the food business data in the data warehouse and classify and store them according to preset categories and preset attributes, and at the same time, a food business risk information library is constructed according to the results of the risk assessment, and the risk assessment is used to evaluate the food business data according to the preset risk level, and the food business risk information library is used to numerically manage risk warnings. The risk early warning mechanism includes food supply chain risk early warning, production process risk early warning and food sales risk early warning. The risk prediction model construction module is used to construct a risk prediction model according to the needs of risk early warning and in combination with the constructed food operation risk information database, and at the same time, the performance of the constructed risk prediction model is evaluated according to the cross-validation method. The risk prediction model is used to predict the probability of occurrence and degree of impact of the operating risks in the food operation process within a preset time period according to the identification principle of the food operation risk information database. The model optimization and parameter tuning module is used to optimize the constructed risk prediction model according to the results of performance evaluation, and at the same time, the Bayesian optimization method is used to tune the parameters. The model optimization is used to perform trend fusion on the predicted results to screen out the model parameters to be optimized. The trend fusion is used to automatically classify the model parameters to be optimized according to the occurrence trend of operating risks in the food operation data process within a preset time period and store them in the risk prediction model.
[0049] In this embodiment, trend fusion in the model optimization and parameter tuning module is a method for combining multiple prediction results or trend information to draw more accurate conclusions. In food business risk prediction, trend fusion can automatically classify the model parameters to be optimized according to the occurrence trend of business risks in the food business data process within a preset time period; specifically, trend fusion may involve the following steps: collecting food business data within a preset time period, including historical risk events, sales data, and supply chain information; using time series analysis and statistical methods to analyze the occurrence trend of business risks, which can help identify the cyclical, seasonal or trend changes of risk events; fusing the prediction results of multiple models or methods, which can be achieved through weighted averaging, voting and stacking methods; based on the fused prediction results, screening out parameters that have a greater impact on model performance, and these parameters will become the objects of subsequent parameter tuning; through the collaborative work of the model optimization and parameter tuning modules, the performance of the food business risk prediction model can be continuously improved, and the accuracy and reliability of risk prediction can be improved.
[0050] The technical scheme in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: relative to a food safety risk prediction method and system announced in the invention patent with announcement number: CN115964504B, the embodiment of the present application standardizes the food business data in the data warehouse and extracts the food risk assessment feature data, and then classifies the extracted food risk assessment feature data according to the risk adaptation index and the preset risk level, and finally generates a risk assessment report based on the classified food risk assessment feature data and formulates corresponding risk management measures, thereby realizing the accurate extraction of food risk assessment feature data, and then realizing the accuracy and reliability of risk assessment. Reliability is improved; relative to a method for constructing a risk information database for the entire process of food production and operation disclosed in a patent application with publication number: CN117171142A, the embodiment of the present application sets risk warning indicators for the food operation process based on the results of risk assessment, and judges whether the operating risks in the food operation process within a preset time period meet the triggering conditions of the risk warning mechanism in combination with the set risk warning indicators, and then constructs a food operation risk information database according to the designed database structure and in combination with the triggering conditions of the risk warning mechanism, and at the same time updates the constructed food operation risk information database, thereby achieving accurate setting of risk warning indicators, and further achieving more accurate construction of the food operation risk information database.
[0051] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0053] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0054] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0055] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A risk early warning method based on a food business risk information database, characterized in that: The following steps are involved: S1, collecting food business data in the food business process in real time and inputting it into a data warehouse, wherein the food business data includes supply chain information data, production process data, product quality data and food safety incident data; S2, conduct risk assessment on the food business data in the data warehouse and classify and store them according to preset categories and preset attributes, and build a food business risk information database based on the results of the risk assessment, wherein the risk assessment is used to assess the food business data according to the preset risk level, and the food business risk information database is used to numerically manage the business risks in the food business process in the risk warning mechanism, and the risk warning mechanism includes food supply chain risk warning, production process risk warning and food sales risk warning; S3, constructing a risk prediction model according to the needs of risk warning and in combination with the constructed food business risk information database, and performing a performance evaluation on the constructed risk prediction model according to a cross-validation method, wherein the risk prediction model is used to predict the probability of occurrence and degree of impact of business risks in the food business process within a preset time period according to the identification principle of the food business risk information database; S4, optimizing the constructed risk prediction model according to the results of the performance evaluation, and tuning the parameters using the Bayesian optimization method, wherein the model optimization is used to perform trend fusion on the prediction results to screen out the model parameters to be optimized, and the trend fusion is used to automatically classify the model parameters to be optimized according to the occurrence trend of business risks in the food business data process within a preset time period and store them in the risk prediction model; The specific steps of conducting risk assessment on the food business data in the data warehouse include: S11, standardize the food business data in the data warehouse and extract food risk assessment feature data, wherein the standardization includes data dimension removal, missing value filling and outlier removal, and the food risk assessment feature data includes production process control parameter data and food quality detection index data, wherein the production process control parameter data includes food processing temperature data and food processing cleanliness data, and the food quality detection index data includes food reliability index and environmental adaptability index, wherein the food reliability index indicates the degree of food reliability obtained by performing microbial detection on food samples, and the environmental adaptability index indicates the degree of environmental adaptability obtained by simulating the storage of food under extreme environmental conditions; S12, classifying the extracted food risk assessment characteristic data according to a risk adaptation index and in combination with a preset risk level, wherein the risk adaptation index is used to measure the degree of adaptation of the food risk assessment characteristic data to the preset risk level; S13, generate a risk assessment report based on the food risk assessment characteristic data after grade classification and formulate corresponding risk management measures; The risk adaptation index is obtained by following the steps below: The extracted food risk assessment characteristic data is encoded to obtain a preset batch of food, and at the same time, a correlation analysis is performed on the preset batch of food after the characteristic data is quantified in combination with the preset risk data, wherein the characteristic data quantification is used to convert non-numerical data in the preset batch of food into numerical data; The risk adaptation index is obtained according to the result of the correlation analysis, and the risk adaptation index is calculated by the following formula: , Where i is the number of the preset batch of food, , X is the total quantity of food in the preset batch, represents the risk adaptation index corresponding to the i-th preset batch of food, e is a natural constant, represents the food processing temperature data corresponding to the i-th preset batch of food, Indicates food processing temperature reference data, A represents the reference deviation of food processing temperature data. represents the food processing cleanliness data corresponding to the i-th preset batch of food, Indicates the reference data of food processing cleanliness. B represents the reference deviation of food processing data, represents the food reliability index corresponding to the i-th preset batch of food, Represents the food reliability reference index, C represents the reference deviation of food reliability index, represents the environmental adaptability index corresponding to the i-th preset batch of food, Represents the reference index of environmental adaptability. D represents the reference deviation of environmental adaptability index; The specific steps for constructing the food business risk information database are as follows: S21, based on the results of the risk assessment, risk warning indicators are set for the food business process, and combined with the set risk warning indicators, it is determined whether the business risks in the food business process within a preset time period meet the triggering conditions of the risk warning mechanism. If so, the business risks are classified and the classified business risks are optimized according to the corresponding risk management measures until the set risk warning indicators are met. Otherwise, a database structure is designed according to the set risk warning indicators, and the risk warning indicators are used to measure the degree of deviation between the business risks in the food business process and the triggering conditions of the risk warning mechanism; S22, constructing a food business risk information database according to the designed database structure and in combination with the triggering conditions of the risk early warning mechanism, and updating the constructed food business risk information database; The risk warning indicator is calculated by the following formula: , In the formula, n is the number of times the risk warning indicator is set. , N is the total number of times the risk warning indicator is set, represents the risk warning indicator corresponding to the nth risk warning indicator setting, e is a natural constant, It represents the supplier reliability evaluation coefficient corresponding to the nth risk warning indicator setting. Represents the supplier reliability reference evaluation coefficient, M represents the reference deviation of the supplier reliability assessment coefficient, It represents the weight of the supplier reliability assessment coefficient relative to the risk warning index. It indicates the production line operation efficiency corresponding to the nth risk warning indicator setting. It indicates the reference efficiency of the production line operation. K represents the reference deviation of production line operation efficiency, It indicates the weight of the production line operation efficiency relative to the risk warning index. Indicates the food sales data corresponding to the nth risk warning indicator setting, Indicates the food return rate data corresponding to the nth risk warning indicator setting; The supplier reliability assessment coefficient is used to measure the reliability of food quality and production quality of food supplied by the supplier; The production line operation efficiency is obtained through the production efficiency and the qualified rate of food during the food production process; The specific steps of constructing the risk prediction model include: S31, using the constructed food business risk information database to screen out data sets related to the prediction target of the risk prediction model, the data sets including historical risk data sets, risk warning indicators, and food business market data; S32, normalizing the screened data set to ensure that the data dimensions in the data set are consistent, and analyzing the complexity of the prediction target after the normalization process; S33, selecting a risk prediction model framework according to a preset adaptation model structure and in combination with the actual needs of the application scenario corresponding to the risk prediction model and the complexity of the prediction target; S34, performing simulation evaluation on the selected risk prediction model framework and constructing a risk prediction model, wherein the simulation evaluation is used to evaluate the matching degree between the risk prediction model framework and the risk prediction model at a preset accuracy; After the risk prediction model is constructed, the step further includes evaluating the performance of the constructed risk prediction model, and the specific steps include: Dividing the screened data set into a training set and a test set, using the training set to train the risk prediction model to obtain a training data set, wherein the training data set represents the training accuracy and training loss value of the risk prediction model during the training process; Using the test set in combination with the acquired training data set to test the risk prediction model to obtain a test data set, wherein the test data set represents a test accuracy and a test loss value of the risk prediction model during the test process; The performance of the trained risk prediction model is evaluated and optimized in combination with the cross-iteration principle in the cross-validation method until the preset performance evaluation index is met. The performance evaluation index is used to measure the performance of the risk prediction model during the training and testing process.
2. A risk early warning method based on a food business risk information database as claimed in claim 1, characterized in that: The method for obtaining the performance evaluation index is: According to the training accuracy of the risk prediction model during the training process and the test accuracy during the testing process and in combination with the corresponding reference deviation, a training accuracy coefficient and a test accuracy coefficient are obtained, wherein the training accuracy coefficient is used to measure the degree of fit of the risk prediction model to the training data set, and the test accuracy coefficient is used to measure the degree of fit of the risk prediction model to the test data set; The training loss coefficient and the test loss coefficient are obtained according to the training loss value of the risk prediction model during the training process and the test loss value during the testing process and in combination with the corresponding reference deviation. The training loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the training set, and the test loss coefficient is used to measure the degree of deviation between the predicted value and the true value of the risk prediction model on the test set.
3. A risk early warning method based on a food business risk information database as claimed in claim 1, characterized in that: The performance evaluation index is obtained by combining the obtained training accuracy coefficient, test accuracy coefficient, training loss coefficient and test loss coefficient; The performance evaluation index is calculated using the following formula: , Where q is the number of times the performance evaluation is performed. , Q is the total number of performance evaluations, represents the performance evaluation index corresponding to the qth performance evaluation, e is a natural constant, represents the training accuracy corresponding to the qth performance evaluation, represents the reference training accuracy, Indicates the training accuracy reference deviation, represents the test accuracy corresponding to the qth performance evaluation, represents the reference test accuracy, Indicates the reference deviation of test accuracy, represents the training loss value corresponding to the qth performance evaluation, represents the reference training loss value, Represents the reference deviation of the training loss value, represents the test loss value corresponding to the qth performance evaluation, represents the reference test loss value, Indicates the reference deviation of the test loss value.
4. A risk early warning method based on a food business risk information database as claimed in claim 1, characterized in that: The parameter tuning includes the following specific steps: S41, using the performance evaluation index of the risk prediction model as an objective function and combining the result of model fusion to obtain the model parameters to be optimized, wherein the objective function is used to measure the matching degree between the model parameters to be optimized and the preset model parameters; S42, initializing the Bayesian optimizer according to the objective function and the parameter space, and searching for the target parameter combination in the parameter space using the initialized Bayesian optimizer, wherein the parameter space is used to identify and determine the region where the target parameter combination is located, and the initialization is used to update the probability model of the Bayesian optimizer according to the historical evaluation results; S43, evaluating the searched target parameter combination according to a cross-validation method to obtain a target model performance, wherein the target model performance is used to measure the degree of adaptation between the target parameter combination and a preset performance evaluation index; S44, input the target model performance into the risk prediction model to re-evaluate the performance, and optimize according to the results of the performance evaluation until the model performance meets the objective function.
Citation Information
Patent Citations
A food safety risk prediction method and system
CN115964504B
Construction method of food production and management whole-course risk information base
CN117171142A
Cited By
Bayesian network-based food adulteration prediction method and system
CN120373552A
A food adulteration prediction method and system based on Bayesian network
CN120373552B
Agricultural food product quality safety monitoring and standardization system based on technical trade measures
CN120387737A
Food processing and quality control system based on artificial intelligence
CN120912068A