Foodborne bacterial strain transmission risk early warning system and method based on cluster analysis

By combining the physical, chemical, and biological characteristics of food and environmental features with a cluster analysis-based early warning system for the transmission risk of foodborne pathogens, and utilizing the K-Means risk clustering model, the system solves the problem of real-time and multi-dimensional quantification of foodborne pathogen risks in existing technologies, thereby improving the accuracy of risk identification and response efficiency.

CN121659246BActive Publication Date: 2026-04-10潍坊市检验检测中心(潍坊市食品药品检验检测中心潍坊市农产品质量检测中心)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-05
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies are insufficient for real-time, multi-dimensional, and precise quantitative forward-looking early warning of foodborne pathogen risks. Terminal sampling is characterized by high lag and high cost. The HACCP system lacks the ability to integrate multi-source information, and the predictive microbiology models have poor universality.

Method used

A foodborne bacterial strain transmission risk early warning system based on cluster analysis is adopted. Through risk data collection and evaluation, quantitative assessment is carried out from two levels: the physical, chemical and biological characteristics of the food itself and its environment. Combined with the K-Means risk clustering model, the risk of cross-contamination between background colonies and fresh products is analyzed, food contamination risk sequences are generated, and characteristic groups with different risk levels are automatically identified.

Benefits of technology

It significantly improves the accuracy, foresight, and response efficiency of risk identification, enabling precise intervention and rapid assessment of the risk of foodborne bacterial strain transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659246B_ABST
    Figure CN121659246B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of strain transmission risk, in particular to a foodborne strain transmission risk early warning system and method based on cluster analysis, which calculates the bacterial adhesion capacity, environmental inhibition capacity and chemical protection capacity from two aspects of the physical, chemical and biological properties of food itself and the environment thereof, forms food surface contamination characteristic evaluation, simultaneously generates a food contamination risk sequence by analyzing background colonies and fresh product cross-contamination risk, then automatically discovers and defines feature groups with different risk levels by using a K-Means risk clustering model in combination with historical data and eating habits, can quickly determine the risk category of the feature groups through risk evaluation grouping, and executes precise intervention, so that the accuracy, foresight and response efficiency of risk identification are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of strain transmission risk, and particularly relates to a foodborne strain transmission risk early warning system and method based on cluster analysis. BACKGROUND

[0002] At present, the risk early warning of foodborne pathogenic bacteria mainly depends on the microbial limit standard based on terminal sampling and the preventive system based on HACCP; the former has legal effect, but has serious lag, high cost, limited coverage and cannot realize early warning; the latter focuses on the control of key points in the process, but is insufficient in risk quantification, is difficult to dynamically adapt to complex and changeable environment and product combination, and lacks the ability to integrate multi-source information for comprehensive evaluation; in addition, the emerging predictive microbiology model can simulate the behavior of microorganisms, but its parameters are seriously dependent on specific experiments, have poor universality, and are mostly limited to a few factors such as temperature and pH, and it is difficult to systematically quantify the key influence of physical and chemical properties of food surface on bacterial adhesion and residue; in general, the existing technology is difficult to realize real-time, multi-dimensional and accurate quantification of risk for prospective early warning. SUMMARY

[0003] In order to overcome the defects of the prior art, the present application provides a foodborne strain transmission risk early warning system and method based on cluster analysis, which quantitatively evaluates and intelligently groups the complex food safety risk in multiple dimensions and hierarchical levels; first, through risk data collection and data evaluation, the bacterial adhesion capacity, environmental inhibition capacity and chemical protection capacity are comprehensively calculated from two aspects of the physical, chemical and biological properties of food itself and the environment in which it is located, to form the evaluation of food surface contamination characteristics; at the same time, by analyzing the cross-contamination risk of background colonies and fresh products, a food contamination risk sequence is generated, then using the K-Means risk clustering model, combined with historical data and eating habits, the characteristic groups with different risk levels are automatically found and defined, which can quickly determine the risk category through risk evaluation grouping and execute precise intervention, thereby significantly improving the accuracy, prospectiveness and response efficiency of risk identification.

[0004] In order to achieve the above purpose, the present application adopts the following technical scheme:

[0005] In a first aspect, the present application provides a foodborne strain transmission risk early warning system based on cluster analysis, comprising the following modules:

[0006] The risk data collection module, the data evaluation module, the clustering risk grouping module, the risk evaluation module and the risk warning module, wherein the risk data collection module is configured to acquire inherent characteristics of a food surface and environmental characteristics of a location where the food is located; the data evaluation module is configured to evaluate food surface contamination characteristics according to the inherent characteristics of the food surface, and evaluate food contamination risks according to the environmental characteristics of the location where the food is located; the clustering risk grouping module is configured to perform risk clustering and grouping according to historical data and historical eating habits; the risk evaluation module is configured to perform risk evaluation grouping according to the evaluation results of the food surface contamination characteristics and the evaluation results of the food contamination risks; and the risk warning module is configured to perform risk warning dissemination according to the risk evaluation grouping results.

[0007] In an implementation form of the present application, the inherent characteristics of the food surface specifically include: physical characteristics including surface roughness, porosity and surface area / volume ratio; chemical characteristics including pH value, water activity (Aw) and inherent nutrient components (such as protein and fat content); and biological characteristics including the content of bacteriostatic substances, wherein the pH value (acidity) measures the acidity of the environment; most bacteria grow best in neutral environments, and excessive acidity or alkalinity will inhibit their growth; water activity refers to the content of free water available to microorganisms in the food, ranging from 0 (no water) to 1.0 (pure water); inherent nutrient components are the protein, carbohydrate, fat, vitamins and minerals provided by the food itself, which are the fuel for bacterial growth; temperature includes average temperature and fluctuation range. Temperature directly affects enzyme activity and determines growth rate. The temperature danger zone usually refers to 4°C to 60°C; relative humidity mainly affects the growth of microorganisms on the surface of the food and in the surrounding environment, and is crucial for cross-contamination during storage, wherein the characteristics herein are the average values; and the environmental characteristics of the location where the food is located include: physical environment including average temperature, temperature fluctuation range and relative humidity; biological environment including total known colony count (APC) or background concentration of specific pathogenic bacteria; and cross-contamination environment including physical distance or contact frequency with fresh products (especially poultry and seafood).

[0008] In an implementation form of the present application, the food surface contamination characteristic evaluation includes the following specific contents:

[0009] Step one, obtain the surface roughness, porosity and surface area / volume ratio of the food surface, and obtain the abnormality of bacterial adhesion by weighted summation according to the standardized results of the surface roughness, porosity and surface area / volume ratio, wherein the standardization process is to divide the corresponding parameters by the safety value of the corresponding parameters, the initial adhesion of bacteria on the surface of the object is the first step of forming pollution, which is deeply affected by the physical properties of the object surface, the higher the surface roughness, the greater the porosity and the larger the surface area / volume ratio, the more hiding places and adhesion area are provided for bacteria, which makes it more difficult to be cleaned and removed, thereby significantly increasing the risk and strength of adhesion; By quantifying these key physical parameters, this step can objectively compare the easy contamination of different food or packaging material surfaces;

[0010] Step two, obtain the pH value, water activity, inherent nutrient composition, average environmental temperature, temperature fluctuation range and relative humidity of the food, and obtain the corresponding safety range of the suitable environment for bacterial growth, wherein the corresponding parameter range of the suitable environment for bacterial growth is obtained by bacterial tolerance experiment to set as the corresponding parameter range of the suitable environment for bacterial growth, the bacterial growth inhibition results of the corresponding parameters are obtained by comparing the obtained pH value, water activity, inherent nutrient composition, average environmental temperature, temperature fluctuation range and relative humidity with the corresponding parameter range of the suitable environment for bacterial growth, and the environmental bacterial growth inhibition results are obtained by weighted summation of the bacterial growth inhibition results of all corresponding parameters, wherein the parameter comparison process is: the absolute value of the value of the corresponding parameter minus the median of the safety range of the corresponding parameter divided by the range value of the safety range of the corresponding parameter to obtain the result, and the range value is the maximum value minus the minimum value of the safety range of the corresponding parameter;

[0011] Step three, obtain the content of bacteriostatic agent per unit mass of food surface, and obtain the safety value of bacteriostatic agent by dividing the content of bacteriostatic agent per unit mass of food surface by the safety content, in the food industry, the residual of the legal added bacteriostatic agent or the disinfectant used in the processing process is a direct chemical means to actively inhibit or kill surface microorganisms, and the effectiveness is directly related to the effective concentration of the action point, this step introduces the quantitative evaluation of the active intervention factor, by comparing the measured content of bacteriostatic agent with the known safe and effective concentration, it can be judged whether the protection ability of the chemical barrier is sufficient, and the abnormality of bacterial adhesion, the environmental bacterial growth inhibition result and the safety value of the bacteriostatic agent are obtained as the food surface contamination characteristic evaluation sequence.

[0012] In an implementation manner of the present application, the food contamination risk assessment specifically includes the following specific contents:

[0013] Step one, obtain the total number of known background colonies, the physical distance of fresh products, and the shelf life and existing time of fresh products, wherein the shelf life of fresh products is obtained by averaging the historical shelf life data, for example, the shelf life of fresh beef in the corresponding refrigeration scene is two days on average, and the fresh meat has less than 10,000 bacteria per 1 gram of surface;

[0014] Step two, obtain the background colony risk value by dividing the total number of known background colonies by the safety value of the corresponding total number of background colonies;

[0015] Step three, analyze the contamination of fresh products on food by the physical distance of fresh products at each time, the weight, shelf life and existing time of the corresponding fresh products, the specific steps are: obtaining the fresh product existing abnormality at the corresponding time by dividing the existing time of fresh products at the corresponding time by the shelf life, obtaining the fresh product distance abnormality at the corresponding time by dividing the safety distance by the physical distance between the fresh product at the corresponding time and the food, obtaining the fresh product infection abnormality by weighted sum of the fresh product existing abnormality at the corresponding time and the fresh product distance abnormality at the corresponding time, obtaining the fresh product abnormality at the corresponding time by multiplying the fresh product infection abnormality by the standardized weight of the corresponding fresh product at the corresponding time, wherein the standardization is to remove the unit, that is, to divide by the standard weight, integrating the fresh product abnormality at the corresponding time in the time length and dividing by the standard time to obtain the contamination abnormality of fresh products on food, and taking the background colony risk value and the contamination abnormality of fresh products on food as the food contamination risk sequence.

[0016] In an implementation manner of the present application, the risk clustering grouping includes the following specific contents:

[0017] Obtain the historical personnel eating habit situation, the historical food surface contamination characteristic evaluation sequence, and the historical food contamination risk sequence, wherein the eating habit situation includes the proportion of various eating methods of corresponding food in the corresponding region and the eating frequency, which includes food cooking time and temperature, and is obtained by historical custom statistics; and obtain the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold, construct a K-Means risk clustering model with the input of personnel eating habit situation, food surface contamination characteristic evaluation sequence and food contamination risk sequence, and the output of the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold, according to the historical personnel eating habit situation, the historical food surface contamination characteristic evaluation sequence, the historical food contamination risk sequence and the judgment result.

[0018] In an implementation manner of the present application, the risk assessment grouping includes the following specific contents:

[0019] The real-time acquired personnel eating habit condition of the corresponding food, the food surface contamination characteristic evaluation sequence and the food contamination risk sequence are introduced into the K-Means risk clustering model, and the output is a judgment result condition of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold.

[0020] In an implementation form of the present application, the propagation risk warning comprises the following specific contents:

[0021] If the judgment result condition of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold is yes, a propagation risk warning needs to be performed, and the corresponding food needs to be removed from the shelf for processing, and if the judgment result is no, no propagation risk warning is performed, and the selling continues.

[0022] In a second aspect, the present application further provides a food-borne strain propagation risk warning method based on clustering analysis, comprising the following specific steps:

[0023] Acquiring food surface inherent characteristics and food location environment characteristics;

[0024] Performing food surface contamination characteristic evaluation according to the food surface inherent characteristics, and performing food contamination risk evaluation according to the food location environment characteristics;

[0025] Performing risk clustering grouping according to historical data and historical eating habits;

[0026] Performing risk evaluation grouping according to the food surface contamination characteristic evaluation result and the food contamination risk evaluation result;

[0027] Performing propagation risk warning according to the risk evaluation grouping result.

[0028] In a third aspect, the present application provides an electronic pipeline, comprising a processor and a memory, wherein the memory stores a computer program that can be called by the processor, and the processor executes a food-borne strain propagation risk warning method based on clustering analysis by calling the computer program stored in the memory.

[0029] In a fourth aspect, the present application provides a computer readable storage medium storing instructions, which, when executed on a computer, cause the computer to execute a food-borne strain propagation risk warning method based on clustering analysis.

[0030] Compared with the prior art, the present application has the following advantages and beneficial effects:

[0031] The complex food safety risk is quantitatively evaluated and intelligently grouped in multiple dimensions and hierarchical levels; first, through risk data collection and data evaluation, the bacterial adhesion capacity, environmental inhibition capacity and chemical protection capacity are comprehensively calculated from two aspects of the physical, chemical and biological characteristics of the food itself and the environment in which the food is located, to form the food surface contamination characteristic evaluation; at the same time, by analyzing the background bacterial colonies and the cross-contamination risk of fresh products, a food contamination risk sequence is generated, then, by using the K-Means risk clustering model, combining historical data and eating habits, a characteristic group with different risk levels is automatically found and defined, which can quickly determine the risk category through risk evaluation grouping and execute precise intervention, thereby significantly improving the accuracy, foresight and response efficiency of risk identification. BRIEF DESCRIPTION OF DRAWINGS

[0032] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments, made with reference to the attached drawings:

[0033] Figure 1 The figure is a schematic diagram of the overall process of the method embodiment of the present application;

[0034] Figure 2 The figure is a schematic diagram of the food surface contamination characteristic evaluation process of the method embodiment of the present application;

[0035] Figure 3 The figure is a schematic diagram of the clustering algorithm of the method embodiment of the present application;

[0036] Figure 4 The figure is a schematic diagram of the module composition structure of the system embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions of the present application will be described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific features in the embodiments and the embodiments of the present application are detailed descriptions of the technical solutions of the present application, and not limitations of the technical solutions of the present application. In the case of no conflict, the technical features in the embodiments and the embodiments of the present application can be combined with each other.

[0038] Please refer to Figures 1 to 3 , Figure 1 The figure is a schematic diagram of the overall process of the foodborne bacterial strain transmission risk early warning method based on clustering analysis provided by the embodiments of the present application, which specifically includes the following steps:

[0039] Obtain the inherent characteristics of the food surface and the environmental characteristics of the location where the food is located;

[0040] It is to be noted that the inherent characteristics of the food surface in the embodiment include: physical characteristics including surface roughness, porosity and surface area / volume ratio; chemical characteristics including pH value, water activity (Aw) and inherent nutrients (such as protein, fat content); biological characteristics are the content of bacteriostatic substances, wherein the pH value (acidity): measures the acidity of the environment; most bacteria grow best in neutral environments, and excessive acid or alkali will inhibit their growth; water activity: refers to the content of free water available to microorganisms in food, ranging from 0 (no water) to 1.0 (pure water); inherent nutrients: proteins, carbohydrates, fats, vitamins and minerals provided by the food itself, which are the fuel for bacterial growth; temperature: including average temperature and fluctuation range. Temperature directly affects enzyme activity and determines growth rate. The temperature danger zone usually refers to 4°C to 60°C; relative humidity: mainly affects the growth of microorganisms on the surface of the food and the surrounding environment, and is crucial for cross-contamination during storage, wherein the characteristics herein are the average values obtained;

[0041] The food surface contamination characteristics are evaluated according to the inherent characteristics of the food surface, and the food contamination risk is evaluated according to the environmental characteristics of the location where the food is located;

[0042] In the embodiment, the food surface contamination characteristics evaluation includes the following specific contents:

[0043] Step one, obtain the surface roughness, porosity and surface area / volume ratio of the food surface, and obtain the bacterial adhesion abnormality by weighted summation according to the standardized results of the surface roughness, porosity and surface area / volume ratio, wherein the standardization process is to divide the obtained parameters by the safety value of the corresponding parameters. The initial adhesion of bacteria on the surface of the object is the first step of forming pollution, which is deeply affected by the physical properties of the object surface. The higher the surface roughness, the greater the porosity and the larger the surface area / volume ratio, the more hiding places and adhesion area are provided for bacteria, making it more difficult to be cleaned and removed, thereby significantly increasing the risk and strength of adhesion. By quantifying these key physical parameters, this step can objectively compare the contamination susceptibility of different food or packaging material surfaces;

[0044] Step two, obtain the pH value, water activity, inherent nutrient composition, average temperature, temperature fluctuation range and relative humidity of the food, and obtain the corresponding safe range of the suitable environment for bacterial growth, wherein the corresponding parameter range of the suitable environment for bacterial growth is obtained by bacterial tolerance experiment, and the corresponding parameter range of the suitable environment for bacterial growth is set as the corresponding parameter range of the suitable environment for bacterial growth. The obtained pH value, water activity, inherent nutrient composition, average temperature, temperature fluctuation range and relative humidity of the food are compared with the corresponding parameter range of the suitable environment for bacterial growth to obtain the bacterial growth inhibition result of the corresponding parameter. The bacterial growth inhibition results of all corresponding parameters are summed to obtain the environmental bacterial growth inhibition result. In the parameter comparison process, the result is calculated by subtracting the absolute value of the median of the corresponding parameter safe range from the range value of the corresponding parameter safe range. The range value is the maximum value minus the minimum value of the corresponding parameter safe range. Whether the bacteria can reproduce and reach the pathogenic amount after adhesion depends entirely on the microenvironment conditions. pH value, water activity, temperature and other factors are the core environmental factors that determine the speed of bacterial metabolism and division. Each pathogenic bacteria has a specific tolerance range for growth and reproduction. The farther the environmental parameters deviate from the optimal range, the stronger the inhibition effect on the growth of the pathogenic bacteria. This step realizes comprehensive biological risk assessment of the chemical properties of the food itself and its storage environment. It can not only warn of the risk of rapid bacterial proliferation under certain conditions, but also identify scenarios that may support the slow growth of specific pathogenic bacteria with strong tolerance (such as acid-resistant E. coli or dry-resistant S. aureus) that appear to be safe (such as acidic or dry food), making risk assessment more targeted and accurate.

[0045] Step three, obtain the content of the bacteriostatic agent per unit mass of the food surface, and obtain the bacteriostatic agent safety value by dividing the content of the bacteriostatic agent per unit mass of the food surface by the safety content. In the food industry, the residual of the bacteriostatic agent (such as preservative) or the disinfectant used in the processing process is a direct chemical means to actively inhibit or kill surface microorganisms. The effectiveness is directly related to the effective concentration of the action point. This step introduces quantitative evaluation of active intervention factors. By comparing the measured bacteriostatic agent content with the known safe and effective concentration, it can be determined whether the protective ability of the chemical barrier is sufficient. The bacterial adhesion anomaly, environmental bacterial growth inhibition result and bacteriostatic agent safety value are obtained as the food surface contamination characteristic evaluation sequence.

[0046] In this embodiment, the food contamination risk assessment specifically includes the following specific contents:

[0047] Step one, obtain the total number of known background colonies, the physical distance of fresh products, and the shelf life and existing time of fresh products, wherein the shelf life of fresh products is obtained by the average value of historical shelf life data, for example, the shelf life of fresh beef in the corresponding refrigeration scenario is two days on average, and the fresh meat has less than 10,000 bacteria per gram of surface;

[0048] Step two, obtain the background colony risk value by dividing the known background colony total number by the corresponding background colony total number safety value;

[0049] Step three, analyze the contamination of fresh products on food by the physical distance of fresh products at each time, and the corresponding fresh weight, shelf life and existing time, the specific steps are: obtaining the fresh existing time at the corresponding time divided by the shelf life to obtain the fresh existing abnormality at the corresponding time, obtaining the safety distance divided by the physical distance between the fresh product and the food at the corresponding time to obtain the fresh distance abnormality at the corresponding time, obtaining the fresh infection abnormality by weighted sum of the fresh existing abnormality at the corresponding time and the fresh distance abnormality at the corresponding time, obtaining the fresh abnormality at the corresponding time by multiplying the fresh infection abnormality and the corresponding fresh weight after standardization, wherein the standardization is to remove the unit, that is, to divide by the standard weight, integrating the fresh abnormality at the corresponding time in the time length divided by the standard time to obtain the contamination abnormality of fresh products on food, and taking the background colony risk value and the contamination abnormality of fresh products on food as the food contamination risk sequence; the fresh existing time / shelf life quantifies the degree of corruption and microbial proliferation potential of fresh products, and the safety distance / physical distance quantifies the risk of space transmission, the closer the distance, the higher the risk of cross contamination through air suspension, contact, splashing, etc. In toxicology and microbial risk assessment, the probability of infection or pathogenicity is related to the exposure dose, and the fresh abnormality here can be regarded as a proxy indicator of the potential exposure dose of the target food;

[0050] According to historical data and historical eating habits, risk clustering grouping is performed;

[0051] In this embodiment, risk clustering grouping includes the following specific contents:

[0052] The process involves acquiring historical data on people's eating habits, historical food surface contamination characteristic assessment sequences, and historical food contamination risk sequences. Eating habits include the proportion and frequency of various consumption methods for corresponding foods in the relevant region, including food cooking time and temperature, obtained through historical custom statistics. Simultaneously, the process yields results indicating whether the bacterial infection rate of the corresponding purchaser exceeds a safe threshold. Based on these data, a K-Means risk clustering model is constructed, taking the historical data on people's eating habits, food surface contamination characteristic assessment sequences, and food contamination risk sequences as inputs, and outputting the results indicating whether the bacterial infection rate of the corresponding purchaser exceeds a safe threshold. The specific steps are as follows:

[0053] 1. Constructing feature vectors and data preprocessing

[0054] 1.1 Constructing Feature Vectors: Calculate all feature values ​​for each object to be evaluated in the dataset (e.g., each food-consumer group combination) to form an original data record: (surface contamination risk, cross-contamination risk, environmental microbial risk, consumption habit risk, judgment result);

[0055] 1.2 Data Preprocessing: Standardize all feature values ​​(e.g., use Z-score standardization) so that the mean of each feature is 0 and the standard deviation is 1. This step is to ensure that all features have the same importance when calculating distance and to avoid features with large dimensions dominating the clustering results.

[0056] 2. Determine the optimal number of clusters

[0057] 2.1. Select the optimal range of cluster size: Select a reasonable range of optimal cluster size for the search (e.g., from 2 to 10).

[0058] 2.2. Calculate the sum of squared intra-cluster deviations for each optimal cluster size: For each candidate optimal cluster size, run the K-Means algorithm once and calculate the sum of squared intra-cluster deviations for that optimal cluster size (i.e., the sum of the squared distances from each sample to the center of its cluster).

[0059] 2.3. Plot a line graph with the optimal number of clusters as the x-axis and the corresponding sum of squared deviations within clusters as the y-axis;

[0060] 2.4. Observe the curve and find the inflection point. Before this inflection point, the rate of decline of the curve exceeds 10%, and after the inflection point, the rate of decline is halved. The optimal number of clusters corresponding to this inflection point is the recommended optimal number of clusters.

[0061] Final confirmation combined with business interpretation: observe the clustering results generated by the recommended optimal number of clusters (for example, K=4), and judge from a business perspective whether these categories have clear and reasonable risk level distinctions (for example, whether the accuracy of the judgment result exceeds the set value, preferably 85%); if the classification result is difficult to interpret, the optimal number of clusters can be fine-tuned (for example, try K=3 or K=5) and re-evaluated;

[0062] 3. Perform K-Means clustering

[0063] Initialize the model: use the optimal number of clusters determined in the second step to initialize the K-Means model; set a random seed: in order to ensure that the results of each run can be reproduced, a fixed random seed needs to be set, which is achieved by a specific function or parameter. This operation initializes the internal state of the pseudo-random number generator, making it start from the same starting point, so as to ensure that algorithms containing randomness (such as the selection of initial center points for K-Means) can produce exactly the same results each time. For example, when using the Scikit-learn library to build a K-Means model in Python, the random seed can be set through the random_state parameter when initializing the model, and the preferred value is 42; Train the model: input the feature matrix prepared in the first step and standardized into the K-Means model for training, and the algorithm will automatically assign all data records to the optimal number of clusters; analyze the original data of samples in each cluster in depth, verify the accuracy of the label, obtain the model with the highest accuracy as the K-Means risk clustering model, and form a specific portrait of each risk group. The core advantage of the model is to sublimate the judgment results for individual records into risk classification for the entire consumer group; avoid subjective risk threshold rules. The model is completely based on the distribution of the data itself for clustering; by analyzing the group portrait of each cluster, it can be clearly known which type of food, which type of consumption habit, and in which environment the risk is highest; this provides a direct basis for formulating precise food safety intervention measures (such as targeted publicity and education for specific groups, and strengthening detection of specific foods);

[0064] Risk assessment grouping according to the food surface contamination characteristic evaluation results and the food contamination risk evaluation results;

[0065] In this embodiment, the risk assessment grouping includes the following specific contents:

[0066] Import the real-time acquired personnel eating habit situation of the corresponding food, food surface contamination characteristic evaluation sequence, and food contamination risk sequence into the K-Means risk clustering model, and output the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold value;

[0067] According to the risk assessment grouping result, a transmission risk warning is given;

[0068] In the embodiment, the transmission risk warning includes the following specific contents:

[0069] If the judgment result of whether the infection rate of the strain corresponding to the purchaser exceeds the safety threshold is yes, a transmission risk warning needs to be given, and the corresponding food needs to be removed from the shelf for processing, if the judgment result is no, no transmission risk warning is given, and the selling continues; the judgment result is sent to the client through wired or wireless means.

[0070] The benefits of the present application are as follows: the complex food safety risks are quantitatively evaluated and intelligently grouped in multiple dimensions and levels; first, through risk data collection and data evaluation, the bacterial adhesion ability, environmental inhibition ability and chemical protection ability are calculated comprehensively from two aspects of the physical, chemical and biological properties of the food itself and the environment in which the food is located, to form the food surface contamination characteristic evaluation; at the same time, by analyzing the background colony and the cross-contamination risk of fresh products, a food contamination risk sequence is generated, then, using the K-Means risk clustering model, combined with historical data and eating habits, a characteristic group with different risk levels is automatically found and defined, the risk belonging category can be quickly determined through risk assessment grouping, and precise intervention is executed, thereby significantly improving the accuracy, foresight and response efficiency of risk identification.

[0071] Please refer to Figure 4 , Figure 4 is a structural schematic diagram of a foodborne strain transmission risk warning system based on clustering analysis provided by the embodiment of the present application, which includes:

[0072] The risk data collection module, the data evaluation module, the clustering risk grouping module, the risk assessment module and the risk warning module, wherein the risk data collection module is used to acquire the inherent characteristics of the food surface and the environmental characteristics of the location where the food is located; the data evaluation module is used to evaluate the food surface contamination characteristics according to the inherent characteristics of the food surface, and evaluate the food contamination risk according to the environmental characteristics of the location where the food is located; the clustering risk grouping module performs risk clustering grouping according to historical data and historical eating habits; the risk assessment module is used to perform risk assessment grouping according to the food surface contamination characteristic evaluation result and the food contamination risk evaluation result; the risk warning module is used to give a transmission risk warning according to the risk assessment grouping result; the connection structure corresponding to the system module is shown in Figure 4 .

[0073] The above-mentioned parameters and steps of each unit module for realizing corresponding functions in the foodborne strain transmission risk early warning system based on cluster analysis of the present application can refer to the parameters and steps in the embodiments of the foodborne strain transmission risk early warning method based on cluster analysis, which will not be repeated here.

[0074] The embodiments of the present application also provide an electronic pipeline, including a memory, a processor and a communication bus; the memory and the processor are connected through the communication bus. The memory stores a computer program which can be loaded and executed by the processor to implement the foodborne strain transmission risk early warning method based on cluster analysis provided by the above-mentioned embodiments.

[0075] The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the foodborne strain transmission risk early warning method based on cluster analysis provided by the above-mentioned embodiments, etc.; the data storage area can store data involved in the foodborne strain transmission risk early warning method based on cluster analysis provided by the above-mentioned embodiments, etc.

[0076] The processor can include one or more processing cores. The processor executes various functions and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. The processor can be at least one of an application specific integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field programmable gate array, a central processing unit, a controller, a microcontroller and a microprocessor. It can be understood that for different pipelines, electronic devices for realizing the functions of the above-mentioned processor can also be other, and the embodiments of the present application are not limited specifically.

[0077] The communication bus can include a channel for transmitting information between the above-mentioned components. The communication bus can be a PCI bus or an EISA bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0078] The embodiments of the present application provide a computer readable storage medium storing a computer program which can be loaded and executed by the processor to implement the foodborne strain transmission risk early warning method based on cluster analysis provided by the above-mentioned embodiments.

[0079] The above description is only the preferred embodiment of the present application and the explanation of the technical principles. It should be understood by those skilled in the art that the application scope of the present application is not limited to the technical solutions with the specific combination of the above technical features, and should also cover other technical solutions formed by combining the above technical features or their equivalent features without departing from the concept of the application. For example, the technical solutions formed by replacing the above features with the technical features with similar functions applied in the present application (but not limited to) with each other.

Claims

1. A foodborne strain transmission risk early warning system based on cluster analysis, characterized in that, The system comprises the following modules: a risk data collection module, a data evaluation module, a clustering risk grouping module, a risk evaluation module, and a risk warning module, wherein the risk data collection module is configured to acquire inherent characteristics of a food surface and environmental characteristics of a location where the food is located; the data evaluation module is configured to evaluate food surface contamination characteristics according to the inherent characteristics of the food surface, and evaluate food contamination risks according to the environmental characteristics of the location where the food is located; the clustering risk grouping module is configured to group risks according to historical data and historical eating habits; the risk evaluation module is configured to group risks according to the evaluation results of the food surface contamination characteristics and the evaluation results of the food contamination risks; and the risk warning module is configured to warn of spreading risks according to the grouping results of the risk evaluation. The food surface contamination characteristic evaluation comprises the following specific contents: Step one: acquire the surface roughness, porosity, and surface area / volume ratio of the food surface, and obtain the bacterial adhesion anomaly by weighted summation according to the standardized results of the surface roughness, porosity, and surface area / volume ratio, wherein the standardization process is to divide the acquired parameters by the safety values of the corresponding parameters; Step two: acquire the pH value, water activity, inherent nutritional ingredients, average environmental temperature, temperature fluctuation range, and relative humidity of the food, and acquire the corresponding safety range of the suitable environment for bacterial growth, compare the acquired pH value, water activity, inherent nutritional ingredients, average environmental temperature, temperature fluctuation range, and relative humidity of the food with the corresponding parameter ranges of the suitable environment for bacterial growth to obtain the bacterial growth inhibition results of the corresponding parameters, and obtain the environmental bacterial growth inhibition results by weighted summation of the bacterial growth inhibition results of all the corresponding parameters; Step three: acquire the content of the bacteriostatic agent per unit mass of the food surface, obtain the bacteriostatic agent safety value by dividing the content of the bacteriostatic agent per unit mass of the food surface by the safety content, and obtain the bacterial adhesion anomaly, environmental bacterial growth inhibition results, and bacteriostatic agent safety value as the food surface contamination characteristic evaluation sequence; The food contamination risk evaluation specifically comprises the following specific contents: Step one: acquire the known background colony total number, and the physical distance from the fresh product, and acquire the shelf life and existing time of the fresh product, wherein the shelf life of the fresh product is acquired by averaging the historical shelf life data; Step two: acquire the background colony danger value by dividing the known background colony total number by the safety value of the corresponding background colony total number. Step three, analyzing the contamination of the fresh food product on the food by the physical distance of the fresh food product at each time and the weight, shelf life and existing time of the corresponding fresh food, the specific steps are: obtaining the fresh food existing abnormality of the corresponding time by dividing the existing time of the fresh food at the corresponding time by the shelf life, obtaining the fresh food distance abnormality of the corresponding time by dividing the safety distance by the physical distance of the fresh food product and the food at the corresponding time, obtaining the fresh food infection abnormality by weighted sum of the fresh food existing abnormality at the corresponding time and the fresh food distance abnormality at the corresponding time, obtaining the fresh food abnormality at the corresponding time by multiplying the fresh food infection abnormality and the standardized weight of the corresponding fresh food at the corresponding time, obtaining the contamination abnormality of the fresh food product on the food by integrating the fresh food abnormality at the corresponding time in the time length and dividing by the standard time, and taking the background colony risk value and the contamination abnormality of the fresh food product on the food as the food contamination risk sequence.

2. The cluster analysis-based foodborne strain transmission risk early warning system according to claim 1, characterized in that, The inherent characteristics of the food surface specifically include: physical characteristics including surface roughness, porosity and surface area / volume ratio; chemical characteristics including pH value, water activity and inherent nutrient content; biological characteristics including antibacterial substance content; environmental characteristics of the location where the food is located include: physical environment including average ambient temperature, temperature fluctuation range and relative humidity; biological environment including known total number of colonies or background concentration of specific pathogenic bacteria; cross-contamination environment including physical distance or contact frequency with fresh food products. 3.The cluster analysis based foodborne strain transmission risk early warning system according to claim 1, characterized in that, The risk clustering grouping includes the following specific contents: Obtain the historical personnel eating habits, historical food surface contamination characteristic evaluation sequence, and historical food contamination risk sequence, wherein the eating habits include the proportion of various eating methods of corresponding food in the corresponding area and the eating frequency, which includes food cooking time and temperature, and is obtained by historical custom statistics; at the same time, obtain the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold, and construct a K-Means risk clustering model with the input of personnel eating habits, food surface contamination characteristic evaluation sequence and food contamination risk sequence, and the output of the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold. 4.The cluster analysis based foodborne strain transmission risk early warning system according to claim 1, wherein, The risk assessment grouping includes the following specific contents: Import the real-time obtained personnel eating habits, food surface contamination characteristic evaluation sequence and food contamination risk sequence of the corresponding food into the K-Means risk clustering model, and output the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold.

5. The cluster analysis-based foodborne strain transmission risk early warning system according to claim 1, characterized in that, The transmission risk warning includes the following specific contents: If the judgment result of whether the strain infection proportion of the corresponding purchaser exceeds the safety threshold is yes, the transmission risk warning needs to be carried out, and the corresponding food needs to be removed; if the judgment result is no, the transmission risk warning is not carried out, and the selling continues.

6. The foodborne strain transmission risk early warning method based on cluster analysis, implemented by the foodborne strain transmission risk early warning system based on cluster analysis according to any one of claims 1-5, characterized in that, Specifically including: Obtain the inherent characteristics of the food surface and the environmental characteristics of the location where the food is located; The food surface contamination characteristic is evaluated according to inherent characteristics of the food surface, and the food contamination risk is evaluated according to environmental characteristics of a location where the food is located; The risk is clustered and grouped according to historical data and historical eating habits; The risk is evaluated and grouped according to the evaluation results of the food surface contamination characteristic and the evaluation results of the food contamination risk; The transmission risk is prewarned according to the evaluation grouping results of the risk.

7. An electronic device comprising: A processor and a memory, wherein the memory stores a computer program which can be invoked by the processor; characterized in that the processor invokes the computer program stored in the memory to execute the food-borne bacterial strain transmission risk prewarning method based on cluster analysis according to claim 6.

Citation Information

Patent Citations

  • Fire risk dynamic assessment and early warning system based on K-class mean value clustering

    CN119558651A

  • Multi-level food safety risk evaluation method based on clustering and entropy weight method

    CN120634240A