Additive self-service inquiring and tracing system
By designing a self-service query and traceability system for additives, accurate traceability of food additives and food and in-depth analysis of sampling data, the problems of food traceability and insufficient analysis of sampling data are solved, the pertinence and effectiveness of food safety supervision are improved, and convenient information query channels are provided for consumers.
Patent Information
- Application Number
- CN202411714982.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing food traceability system is difficult to achieve accurate traceability of the entire process of food additives from production to circulation, and it is impossible to deeply analyze and inspect data, which makes it difficult to detect and prevent food safety issues in a timely manner.
A self-service query and traceability system for additives is designed, including food additive management module, food production integration module, sampling management module, intelligent analysis module and interactive query module. By generating a unique shipment code and traceability code, the system realizes the precise correlation and traceability of food additives and food, and uses the K-means clustering analysis algorithm to conduct in-depth analysis of the sampling data and dynamically adjust the sampling strategy.
It realizes accurate traceability between food additives and food, ensures the accuracy and completeness of information, improves the pertinence and effectiveness of food safety supervision, provides consumers with convenient information query channels, and enhances consumers' right to know and choose.
Smart Images

Figure CN119624477A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food safety traceability, and in particular to a self-service query and traceability system for additives. Background Art
[0002] In the current field of food production and circulation, the use and management of food additives are of vital importance. However, the traditional management methods of food additives have many shortcomings, such as difficulty in tracing and opaque information, which bring potential risks to food safety. Most of the existing traceability systems can only realize simple information query, and cannot conduct in-depth analysis of the sampling data of food and its additives, making it difficult to timely discover and prevent food safety problems. In addition, consumers have limited knowledge of information about additives in food, making it difficult to make wise consumer choices. Therefore, the development of a system that can trace food additives from production to circulation and perform intelligent analysis of sampling data is of great significance to improving food safety levels and protecting consumer rights. Summary of the invention
[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a self-service query and traceability system for additives to solve the problems of difficult food traceability, opaque information, and insufficient analysis of sampling data in the prior art.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a self-service query and traceability system for additives, the system comprising: A food additive management module, which is used to automatically generate a unique shipping code in the production process of food additives and print the shipping code on the surface of the food additive packaging; The food production integration module, during the food processing and manufacturing stage, automatically associates and generates a traceability code by scanning the shipping code provided by the food additive management module, and prints the traceability code on the surface of the food packaging; The sampling inspection management module conducts sampling inspections on food according to the preset sampling inspection strategy and records the sampling inspection information and results to the cloud database; The intelligent analysis module uses the K-means cluster analysis algorithm to analyze the sampling data of food and its additives, and dynamically adjusts the sampling strategy based on the analysis results; In the interactive query module, consumers use terminal devices to scan the traceability code on the food packaging to obtain information about all additives contained in the food and the sampling results of the batch of food.
[0005] Preferably, in a possible implementation manner of the first aspect, the information in the shipping code includes the name of the food additive, the production date of the food additive, the expiration date of the food additive, the batch number of the food additive, the number of the food additive safety certification document, and the distribution destination of the food additive; the information contained in the traceability code includes the information in the shipping code, the name of the food, the production date of the food, the expiration date of the food, the batch number of the food, the number of the food safety certification document, the food sampling information and results, and the distribution destination of the food.
[0006] Preferably, in a possible implementation manner of the first aspect, the shipping code and the traceability code are connected to a cloud database; After the distribution destination of food additives is determined, the distribution destination of food additives is updated to the cloud database; After the food distribution destination is determined, the food distribution destination is updated to the cloud database; After the sampling management module completes the sampling, it updates the sampling information and results of the batch of food to the cloud database.
[0007] Preferably, in a possible implementation of the first aspect, before generating the traceability code, it is verified whether the shipping code and the food additive information are consistent, and the system records the corresponding relationship between the food additives and the food.
[0008] Preferably, in a possible implementation of the first aspect, the K-means clustering analysis algorithm step includes: Obtain sampling data from the sampling management module and perform data preprocessing; Use the elbow method to determine the optimal number of clusters K; Initialize a random centroid, iteratively assign data points to the cluster to which the nearest centroid belongs, and update the centroid until it is stable or the number of iterations is reached; Use the silhouette coefficient to evaluate the clustering results and optimize the algorithm strategy until the preset silhouette coefficient threshold is met; Based on the clustering results, high-risk food areas are marked.
[0009] Preferably, in a possible implementation manner of the first aspect, the data preprocessing includes removing duplicate data, processing missing values, converting data types, and feature selection.
[0010] Preferably, in a possible implementation of the first aspect, the elbow method calculates the total intra-cluster error sum of squares under different K values, and selects the K value corresponding to the point where the SSE curve drops sharply and then tends to be flat as the optimal number of clusters.
[0011] Preferably, in a possible implementation manner of the first aspect, for the i-th sample point in the data set, the silhouette coefficient calculation formula is:
[0012] in is the average distance from the i-th sample point to all other sample points in its cluster. It is the minimum average distance from the i-th sample point to all other clusters, that is, the average distance from the i-th sample point to all sample points in its nearest neighbor cluster; The silhouette coefficient of the entire data set is the average of the silhouette coefficients of all sample points, that is,
[0013] Where N is the total number of sample points in the dataset.
[0014] Preferably, in a possible implementation of the first aspect, the dynamic adjustment of the sampling inspection strategy includes judging the clusters in which the proportion of unqualified food exceeds a preset proportion as high safety risk food areas based on the cluster analysis results, and increasing the frequency and quantity of sampling inspections in the high safety risk food areas.
[0015] Preferably, in a possible implementation of the first aspect, the dynamically adjusting sampling strategy further includes analyzing the impact of food additives on food unqualifiedness based on the distribution of food additives in high safety risk food areas, and when the frequency of occurrence of a certain food additive is greater than a preset threshold, increasing the sampling frequency of foods containing the food additive.
[0016] The beneficial effects of the present invention are: through the food additive management module and the food production integration module, the precise association and traceability between food additives and food are realized, ensuring the accuracy and completeness of the information. The introduction of the sampling management module and the intelligent analysis module enables the system to conduct in-depth analysis of the sampling data of food and its additives, identify high-safety risk food areas, and dynamically adjust the sampling strategy based on the analysis results, thereby improving the pertinence and effectiveness of food safety supervision. The interactive query module provides consumers with a convenient information query channel, enabling them to easily obtain information on additives contained in food and the sampling results of food, enhancing consumers' right to know and right to choose. In addition, the system also improves the accuracy and efficiency of data analysis by optimizing the K-means clustering analysis algorithm, providing strong technical support for food safety supervision. In summary, the additive self-service query and traceability system of the present invention has significant social and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A structural diagram of a self-service query and traceability system for additives is provided for this application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Embodiment 1: Figure 1 As shown, the present invention provides a self-service query and traceability system for additives, the system comprising: The food additive management module is used to automatically generate a unique shipping code in the production process of food additives and print the shipping code on the surface of the food additive packaging.
[0021] Specifically, the food additive management module consists of four parts: data processing unit, code generation unit, printing control unit and database management system. The data processing unit is responsible for receiving various data from the production line, including basic information such as the name of the food additive, production date, and expiration date; the code generation unit automatically generates a unique shipping code based on this information and combined with the coding rules; the printing control unit is responsible for printing the generated shipping code on the packaging of the food additive; the database management system is connected to the cloud database and is responsible for storing all generated shipping codes and their associated product information.
[0022] The design information of the shipping code includes the name of the food additive, which identifies the product type for quick identification; the production date of the food additive, which records the specific date of product production; the expiration date of the food additive, which specifies the expiration date when the product can be safely used; the batch number of the food additive, which is a unique identifier for the same batch of products produced in the same production cycle for batch tracking; the food additive safety certification document number, which is related to the product's quality inspection report, health license and other key safety certification documents; the distribution destination of the food additive, which records the flow of the product after leaving the factory, including sales channels and warehouse locations.
[0023] When the food additives are produced and have passed the quality inspection, the data processing unit automatically collects product-related information and uploads it to the code generation unit. The code generation unit generates a shipping code that contains all the above information and guarantees uniqueness based on the coding rules. Subsequently, the shipping code is sent to the printing control unit and printed on the packaging surface of the food additives through the printing device to ensure that it is clearly visible and not easy to fall off. At the same time, after the food additives are determined, the distribution destination of the food additives is updated to the cloud database.
[0024] All generated shipping codes and their associated information are stored in the database management system to form a complete traceability chain. Once a food safety issue occurs, all production information, circulation routes and safety certification documents of the product can be quickly queried by scanning the shipping code on the package.
[0025] The food production integration module, during the food processing and manufacturing stage, automatically associates and generates a traceability code by scanning the shipping code provided by the food additive management module, and prints the traceability code on the surface of the food packaging.
[0026] Specifically, the food production integration module is mainly composed of five parts: code scanning unit, information verification and association unit, traceability code generation unit, printing control unit and database management system. The code scanning unit is responsible for scanning the shipping code provided by the food additive management module; the information verification and association unit is responsible for verifying the authenticity of the shipping code and whether the food additive information it carries is accurate, and at the same time establishing the corresponding relationship between food additives and food; the traceability code generation unit generates a unique food traceability code based on the verified information; the printing control unit is responsible for printing the traceability code on the food packaging; the database management system is connected to the cloud database and is responsible for storing all traceability codes and their associated information for subsequent query and traceability.
[0027] The traceability code information consists of: information in the shipping code, which lists in detail the types, amounts and batch numbers of additives used in food to ensure that the source of raw materials is clear; food name, which directly identifies the product type; food production date, which records the specific date of food production; food expiration date, which clearly states the expiration date after which the food can be safely eaten to ensure consumer safety; food batch number, which is a unique identifier for the same batch of products produced in the same production cycle to facilitate batch tracking; food safety certificate number: key safety certification documents such as quality inspection reports and health licenses for related foods; food sampling information and results, which are the sampling information and results obtained by the sampling management module; food distribution destination, which records the flow of food after leaving the factory, such as sales channels, warehouse locations, etc.
[0028] During the food processing and manufacturing stage, when the food raw materials (including food additives) are prepared, the code scanning unit first scans the shipping code provided by the food additive management module. The information verification and association unit then verifies the shipping code to confirm its authenticity and whether the food additive information it carries is accurate. After the verification is passed, the unit establishes the correspondence between food additives and food and uploads it to the database management system. Subsequently, the traceability code generation unit generates a unique food traceability code based on the verified information, combined with an encryption algorithm or specific coding rules. Finally, the printing control unit prints the traceability code on the food packaging to ensure that it is clearly visible and not easy to fall off. At the same time, after the food has determined its circulation destination, the system will update the food circulation destination to the cloud database.
[0029] All generated traceability codes and their associated information are stored in the database management system to form a complete traceability chain.
[0030] The sampling management module conducts sampling inspections on food according to the preset sampling inspection strategies, and records the sampling inspection information and results in the cloud database.
[0031] Specifically, the sampling management module is mainly composed of four parts: sampling strategy setting unit, sampling execution unit, information recording unit and data reporting unit. The sampling strategy setting unit is responsible for setting reasonable sampling strategies, including sampling frequency, sampling quantity, sampling items, etc., according to factors such as food safety regulations, enterprise standards and product characteristics; the sampling execution unit is responsible for automatically triggering sampling tasks and performing sampling operations according to the set sampling strategies; the information recording unit is responsible for recording all information during the sampling process, including sampling time, sampling personnel, sampling samples, sampling results, etc.; the data reporting unit is responsible for organizing the recorded sampling information and generating sampling reports.
[0032] The sampling strategy setting unit sets a reasonable sampling strategy based on food safety regulations, enterprise standards, product characteristics, etc., including sampling frequency (such as daily, weekly, monthly, etc.), sampling quantity (such as how many pieces are sampled per batch), sampling items (such as sensory indicators, physical and chemical indicators, microbiological indicators, etc.), etc.
[0033] The sampling execution unit automatically triggers the sampling task according to the set sampling strategy. During the sampling process, the sampling personnel collect, test and analyze samples according to the set sampling items and standards. The information recording unit is responsible for recording all information in the sampling process, including sampling time, sampling personnel, sampling samples (including sample name, batch number, production date, etc.), sampling results (including test results, whether it is qualified, reasons for failure, etc.). All recorded sampling information is stored in the database management system for subsequent query, analysis and traceability. At the same time, the system updates the sampling information and results of the batch of food to the cloud database.
[0034] The data reporting unit analyzes the recorded sampling information and generates a sampling report, which includes the sampling overview, sampling result summary, and non-conforming conditions.
[0035] The intelligent analysis module uses the K-means cluster analysis algorithm to analyze the sampling data of food and its additives, identify high-safety risk food areas, and dynamically adjust the sampling strategy based on the analysis results.
[0036] Specifically, the intelligent analysis module is mainly composed of four parts: data preprocessing unit, cluster analysis unit, strategy adjustment unit and result display unit. The data preprocessing unit is responsible for obtaining the sampling data from the sampling management module and performing preprocessing operations such as data cleaning, conversion and feature selection; the cluster analysis unit uses the K-means cluster analysis algorithm to perform cluster analysis on the preprocessed data to identify high-risk food areas; the strategy adjustment unit dynamically adjusts the sampling strategy based on the cluster analysis results; the result display unit is responsible for displaying the analysis results and strategy adjustment plans to users in the form of charts, reports, etc.
[0037] The data preprocessing unit obtains the sampling data from the sampling management module, including information such as food name, food additive name, food additive batch number, food production date, food expiration date, food batch number, and sampling results. Subsequently, the data preprocessing unit performs the following operations: Remove duplicate data. For duplicate data records, only one record is retained to avoid affecting the cluster analysis results. Handle missing values. For missing data, appropriate filling methods are used according to the nature of the data, such as mean filling, median filling, or mode filling. Convert data types that do not meet the requirements of the K-means cluster analysis algorithm, such as converting date types to numeric types. Feature selection. According to the needs of cluster analysis, select features that have an important impact on the clustering results for cluster analysis to improve the accuracy and efficiency of cluster analysis.
[0038] In this embodiment, the read_csv function in the Pandas library is used to read the inspection data file named inspection_data.csv, and the read data is stored in the variable data. In order to avoid the influence of duplicate data on subsequent analysis, the drop_duplicates function in the Pandas library is used to remove duplicate data rows in data.
[0039] For missing values in numeric columns (such as int64 and float64 types), use the mean of the corresponding column to fill the missing values. Traverse all numeric columns, and for each column, use the fillna function and mean method to fill the missing values. For missing values in categorical columns (such as object type), use the mode of the corresponding column to fill the missing values. Traverse all categorical columns, and for each column, use the fillna function and mode method (take the first mode) to fill the missing values.
[0040] For date type columns (such as "Production Date" and "Expiration Date"), convert them to numeric types in the form of Unix timestamp (seconds). Specifically, use the to_datetime function in the Pandas library to convert the date string to a datetime object, then use astype(int) to convert the datetime object to a timestamp (milliseconds), and finally divide it by 1e9 to convert it to seconds.
[0041] Select features from the data that have an important impact on the clustering results. The features selected in this embodiment include "food name", "food additive name", "production date", "expiration date" and "sampling results". For categorical features (such as "food name", "food additive name" and "sampling results"), use the get_dummies function in the Pandas library for one-hot encoding to convert them into numerical features. During the encoding process, use the drop_first=True parameter to avoid redundant encoding columns.
[0042] In order to eliminate the dimensional differences between different numerical features, the StandardScaler class in the Scikit-learn library is used to standardize the numerical features. First, the select_dtypes function is used to select the column names of all numerical features; then, the fit_transform method of StandardScaler is used to standardize the selected numerical features.
[0043] The cluster analysis unit uses the K-means cluster analysis algorithm to perform cluster analysis on the preprocessed data. The K-means cluster analysis algorithm is a commonly used unsupervised learning algorithm that can divide the data set into K clusters so that the data points within the clusters are as similar as possible, while the data points between clusters are as different as possible. The steps of the K-means cluster analysis algorithm include: Determine the optimal number of clusters K, and use the elbow method to determine the optimal number of clusters K. The elbow method is a method of determining the optimal K value by drawing a K-SSE curve (the relationship curve between the K value and the total intra-cluster error sum of squares SSE). When the K value is small, the SSE decreases faster as the K value increases; when the K value increases to a certain extent, the SSE decreases gradually, and the corresponding K value is the optimal number of clusters.
[0044] Initialize the centroid and randomly select K data points as the initial centroid.
[0045] Assign data points to clusters by calculating the distance from each data point to each centroid and assigning the data point to the cluster to which the centroid is closest.
[0046] Update the centroid and calculate the mean of all data points in each cluster as the new centroid.
[0047] Repeat the iteration, repeatedly assigning data points to clusters and updating centroids until the centroids no longer change or the preset number of iterations is reached.
[0048] Evaluate the clustering results and use the silhouette coefficient to evaluate the quality of the clustering results. The silhouette coefficient is a common indicator for evaluating clustering effects, and its value range is [-1,1]. The closer the silhouette coefficient is to 1, the better the clustering effect is; the closer it is to -1, the worse the clustering effect is. When the silhouette coefficient does not reach the preset threshold, optimize the clustering algorithm strategy, including reselecting the K value, reselecting the centroid, and adjusting the number of iterations.
[0049] Mark high-safety risk food areas. Based on the clustering results, clusters containing unqualified food exceeding a preset proportion will be marked as high-safety risk food areas.
[0050] In this embodiment, an empty list sse is first defined to store SSE (Sum of Squared Errors) under different K values. Then, the value range of K is set to 1 to 10, that is, k_range = range(1,11).
[0051] Next, for each value of K, do the following: Create a KMeans clusterer instance, set n_clusters=k and random_state=42 to ensure the reproducibility of the results. Use the fit method to cluster the preprocessed data X. Add the clustered inertia_ values to the sse list.
[0052] After completing the above operations, use the matplotlib library to draw the elbow plot. Specifically, set the graph size to 10x6 inches, draw a line graph between k_range and sse, and set the X-axis label to "Number of clusters (k)", the Y-axis label to "SSE", and the graph title to "Elbow Method For Optimal k". By observing the elbow plot, select the K value corresponding to the point where the SSE decreases significantly slower as the optimal number of clusters.
[0053] According to the optimal number of clusters optimal_k determined in step 1, create a new KMeans clusterer instance, use the fit_predict method to cluster the preprocessed data, and obtain the clustering results clusters.
[0054] The silhouette coefficient is used as the evaluation index. Specifically, the silhouette_score function is used to calculate the silhouette coefficient between the data X and the clustering result clusters, and then print it out. The value range of the silhouette coefficient is [-1, 1]. The larger the value, the better the clustering effect.
[0055] The contour coefficient calculation process in this embodiment is as follows: For the i-th sample point in the data set, the silhouette coefficient is calculated as:
[0056] in It is the average distance from the i-th sample point to all other sample points in the cluster to which it belongs, reflecting the compactness within the cluster; It is the minimum average distance from the i-th sample point to all other clusters, that is, the average distance from the i-th sample point to all sample points of its nearest neighbor cluster, reflecting the separation degree between clusters; The silhouette coefficient of the entire data set is the average of the silhouette coefficients of all sample points, that is,
[0057] Where N is the total number of sample points in the dataset.
[0058] The closer the silhouette coefficient S of the entire data set is to 1, the better the clustering effect is; the closer it is to -1, the worse the clustering effect is.
[0059] In order to identify high-risk food areas, the unqualified food ratio threshold high_risk_threshold=0.05 is set. That is, the clusters with unqualified food ratio exceeding 5% are high-risk areas.
[0060] First, calculate the proportion of unqualified food in each cluster based on the clustering result clusters and the sampling result column sampling result_unqualified (convert it to integer). Then, use the np.where function and np.bincount function to find the cluster index where the proportion of unqualified food exceeds the threshold, that is, the cluster index high_risk_clusters of the high-risk area.
[0061] Finally, in order to visualize the clustering results or perform further analysis, the present invention adds the clustering results clusters as a new column Cluster to the original data data.
[0062] The strategy adjustment unit dynamically adjusts the sampling strategy based on the results of K-means cluster analysis. The specific steps are as follows: Determine the adjustment coefficient: Determine the adjustment coefficient based on the characteristics of high-risk food areas and low-risk food areas. Calculate the adjusted sampling frequency and sampling quantity: Calculate the adjusted sampling frequency and sampling quantity based on the adjustment coefficient and the original sampling frequency and sampling quantity. For high-risk food areas, increase the sampling frequency and sampling quantity. Update the sampling strategy: Incorporate the adjusted sampling frequency and sampling quantity into the sampling strategy and update the sampling plan.
[0063] For high safety risk food areas ,in is the adjusted sampling frequency or number of samplings, is the sampling frequency or number of sampling before adjustment, is the adjustment coefficient. Take 0.5.
[0064] The intelligent analysis module further analyzes the distribution of food in high-risk food areas and the impact of food additives on food failure, and adjusts the sampling strategy accordingly. The specific steps are as follows: Identify food additives in high-risk food areas and use the results of K-means cluster analysis to identify the main food additives contained in foods in high-risk food areas.
[0065] Analyze the sampling records of unqualified foods, and count the frequency of occurrence and unqualified rate of each food additive in unqualified foods.
[0066] A judgment threshold is set. When the frequency of occurrence of a certain food additive in unqualified food exceeds the threshold, it is considered that the food additive has a greater impact on the unqualified food. In this embodiment, the threshold is the frequency of occurrence of 0.2.
[0067] Dynamically update the sampling inspection strategy, include newly added high-risk food additives and their related foods in the key sampling inspection scope, and continuously adjust the sampling inspection strategy based on actual sampling inspection results.
[0068] In the interactive query module, consumers use terminal devices to scan the traceability code on the food packaging to obtain information about all additives contained in the food and the random inspection results of the food.
[0069] Specifically, the interactive query module consists of four parts: a code scanning unit, an information query unit, an information display unit, and a user feedback unit. The code scanning unit is responsible for receiving information obtained by consumers scanning the traceability code on the food packaging through a terminal device (such as a smart phone). The information query unit retrieves detailed information about the corresponding food and its additives from the database management system based on the information obtained by the code scanning unit. The information display unit displays the queried information to consumers in an intuitive and easy-to-understand manner, including food name, production date, expiration date, type and amount of additives, sampling results, etc. The user feedback unit allows consumers to evaluate and provide feedback on the query results so that the system can be continuously optimized and improved.
[0070] Consumers use terminal devices to scan the traceability code on food packaging. The scanning unit sends the scanned traceability code information to the information query unit.
[0071] After receiving the traceability code information, the information query unit communicates with the database management system. The database management system retrieves the detailed information of the corresponding food and its additives according to the traceability code, including food additive information (type, dosage, batch number, etc.), basic food information (name, production date, expiration date, etc.), sampling results, etc.
[0072] The information display unit receives the information returned by the database management system and displays it on the terminal device in the form of charts, text, etc. The displayed information includes but is not limited to: food name, production date, expiration date, additive list (including additive name, dosage, batch number and safety certification document number, etc.), sampling results (including sampling time, sampling items, sampling results, etc.).
[0073] Consumers can view the query results and evaluate the accuracy and completeness of the information. The user feedback unit collects consumers' comments and suggestions for subsequent optimization and improvement of the system.
[0074] 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 self-service query and traceability system for additives, characterized in that: The system comprises: A food additive management module, which is used to automatically generate a unique shipping code in the production process of food additives and print the shipping code on the surface of the food additive packaging; The food production integration module, during the food processing and manufacturing stage, automatically associates and generates a traceability code by scanning the shipping code provided by the food additive management module, and prints the traceability code on the surface of the food packaging; The sampling management module conducts sampling inspections on food according to the preset sampling inspection strategy and records the sampling inspection information and results to the cloud database; The intelligent analysis module uses the K-means cluster analysis algorithm to analyze the sampling data of food and its additives[1] and dynamically adjust the sampling strategy based on the analysis results; In the interactive query module, consumers use terminal devices to scan the traceability code on the food packaging to obtain information about all additives contained in the food and the sampling results of the batch of food.
2. The additive self-service query and traceability system as claimed in claim 1, characterized in that: The information in the shipping code includes the name of the food additive, the production date of the food additive, the expiration date of the food additive, the batch number of the food additive, the number of the food additive safety certification document and the distribution destination of the food additive; the information contained in the traceability code includes the information in the shipping code, the name of the food, the production date of the food, the expiration date of the food, the batch number of the food, the number of the food safety certification document, the food sampling information and results and the distribution destination of the food.
3. The additive self-service query and traceability system as claimed in claim 2, characterized in that: The shipping code and traceability code are connected to a cloud database; After the distribution destination of food additives is determined, the distribution destination of food additives is updated to the cloud database; After the food distribution destination is determined, the food distribution destination is updated to the cloud database; After the sampling management module completes the sampling, it updates the sampling information and results of the batch of food to the cloud database.
4. The additive self-service query and traceability system as claimed in claim 2, characterized in that: Before generating the traceability code, verify whether the shipping code and food additive information are consistent, and the system records the correspondence between food additives and food.
5. The additive self-service query and traceability system as claimed in claim 1, characterized in that: The K-means clustering analysis algorithm steps include: Obtain sampling data from the sampling management module and perform data preprocessing; Use the elbow method to determine the optimal number of clusters K; Initialize a random centroid, iteratively assign data points to the cluster to which the nearest centroid belongs, and update the centroid until it is stable or the number of iterations is reached; Use the silhouette coefficient to evaluate the clustering results and optimize the algorithm strategy until the preset silhouette coefficient threshold is met; Based on the clustering results, high-risk food areas are marked.
6. The additive self-service query and traceability system as claimed in claim 5, characterized in that: The data preprocessing includes removing duplicate data, processing missing values, converting data types and feature selection.
7. The additive self-service query and traceability system as claimed in claim 5, characterized in that: The elbow method calculates the total intra-cluster error sum of squares under different K values, and selects the K value corresponding to the point where the SSE curve decreases sharply and then tends to be flat as the optimal number of clusters.
8. The additive self-service query and traceability system as claimed in claim 5, characterized in that: For the i-th sample point in the data set, the silhouette coefficient calculation formula is: in is the average distance from the i-th sample point to all other sample points in its cluster. It is the minimum average distance from the i-th sample point to all other clusters, that is, the average distance from the i-th sample point to all sample points in its nearest neighbor cluster; The silhouette coefficient of the entire data set is the average of the silhouette coefficients of all sample points, that is, Where N is the total number of sample points in the dataset.
9. The additive self-service query and traceability system as claimed in claim 5, characterized in that: The dynamic adjustment of the sampling inspection strategy includes judging the clusters where the proportion of unqualified food exceeds a preset proportion as high safety risk food areas based on the cluster analysis results, and increasing the frequency and quantity of sampling inspections in the high safety risk food areas.
10. The additive self-service query and traceability system as claimed in claim 9, characterized in that: The dynamically adjusted sampling strategy further includes analyzing the impact of food additives on food unqualifiedness based on the distribution of food additives in high safety risk food areas, and increasing the sampling frequency of foods containing the food additive when the frequency of occurrence of a certain food additive is greater than a preset threshold.
Citation Information
Patent Citations
Feed additive self-service querying and tracing system and method
CN105046506A
Food production supervision and tracing system and method
CN112990653A
Food risk factor correlation analysis method based on FP-Growth algorithm
CN117592867A
Cited By
Lightweight integrated data chain tracing management method and system
CN120896754A
A lightweight integrated data link traceability management method and system
CN120896754B