A food inspection data quality screening system

By employing hierarchical storage, sliding window dynamic monitoring, and machine learning algorithms, the problems of storage fragmentation and delayed early warning in the food inspection data quality screening system have been solved. This has enabled efficient identification and accurate judgment of food inspection data, improving the scientific nature of risk trend analysis and the timeliness of early warning.

CN120746386BActive Publication Date: 2026-02-03SHENZHEN SIMATE INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510906557.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2026-02-03
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

Existing food inspection data quality screening systems suffer from fragmented traditional storage architectures and static analysis models, making it difficult to make precise use of historical data. This results in low efficiency of correlation analysis and delayed early warnings, especially when facing dynamic scenarios where they cannot accurately identify risk trends.

Method used

A food inspection data quality screening system is constructed by adopting a hierarchical storage structure, a sliding window dynamic monitoring mechanism, a machine learning regression algorithm, and a deviation value dynamic counting mechanism. This system enables standardized data classification, time-series management, and anomaly identification. A comprehensive threshold is generated by weighting historical and current anomaly averages for real-time analysis and early warning.

Benefits of technology

It has enabled efficient identification and accurate judgment of food inspection data, improved the timeliness and scientific nature of anomaly detection, solved the problem of delayed early warning, and built a full-process control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120746386B_ABST
    Figure CN120746386B_ABST
Patent Text Reader

Abstract

The application discloses a food inspection data quality screening system and relates to the technical field of big data analysis.The hierarchical storage structure is constructed through a data preprocessing module, food inspection data is stored in a structured manner in a main layer and a secondary layer, historical period data is integrated to form a screening library, a sliding window dynamic monitoring mechanism is adopted in an abnormality screening module, a screening period is taken as a step to cover multi-period data sets, a comprehensive threshold value is generated by weighted fusion of historical and current abnormal mean values, safety and quality abnormalities are accurately identified, and detection timeliness is improved, a real-time analysis module is combined with a machine learning regression algorithm and an abnormality ratio prediction model to predict abnormal data, a warning count module is based on a deviation value to dynamically adjust a monitoring gravity center, the monitoring emphasis direction is flexibly switched according to the deviation value of the abnormality, and a whole-process management and control system from data storage, abnormality screening to accurate early warning is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, specifically a food inspection data quality screening system. Background Technology

[0002] Food inspection data serves as a core basis for food safety and quality control, and its accuracy and completeness directly impact public health and industrial development. Through the systematic collection, analysis, and application of inspection data, potential safety hazards such as microbial contamination and chemical residues can be effectively identified, and quality characteristics such as nutritional components and sensory indicators can be accurately monitored. This provides scientific support for regulatory authorities to formulate risk warning strategies and for enterprises to optimize production processes. Furthermore, standardized food inspection data helps build a food quality traceability system, improves supply chain transparency, protects consumers' right to know, and promotes the standardization and regulation of the food industry. It holds irreplaceable strategic significance for maintaining market order and enhancing public consumer confidence.

[0003] Currently, food inspection data quality screening systems suffer from fragmented traditional storage architectures and static analysis models, making it difficult to make precise use of historical data. On the one hand, massive amounts of inspection data lack hierarchical management, resulting in low efficiency in correlation analysis and an inability to form risk trend maps. On the other hand, existing models rely on fixed thresholds or simple averages, which are not accurate enough in predicting future abnormal data. Especially when facing dynamic scenarios such as raw material fluctuations and process changes, early warning lags are common. Therefore, there is an urgent need for a food inspection data quality screening system with in-depth analysis of historical data. Summary of the Invention

[0004] The purpose of this invention is to provide a food inspection data quality screening system to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a food inspection data quality screening system, which includes a data preprocessing module, an anomaly screening module, a real-time analysis module, a monitoring focus judgment module, and an early warning counting module;

[0006] The data preprocessing module is used to set the food inspection data quality screening cycle and divide the acquired food inspection data into safety test data and quality characteristic data.

[0007] The inspection data classification unit is used to read data information from the National Food Safety Standards to construct an inspection data comparison database. Based on the inspection data comparison database, the collected food inspection data is classified. Specifically, the detection data involving microorganisms, chemical contaminants, and illegal additives in the food inspection data are classified as safety detection data; and the detection data containing nutritional components, sensory physical indicators, and ingredient authenticity are classified as quality characteristic data.

[0008] The microorganisms include biomarker data and hygiene indicator bacteria; the chemical pollutants include pesticide and veterinary drug residues, heavy metals, and environmental pollution; the illegal additives include non-edible substances and additives exceeding the permitted scope.

[0009] The nutritional components include basic nutrients, micronutrients, and functional components; the sensory physical indicators include appearance and texture, and subsequently flavor indicators; the authenticity of the ingredients includes adulteration detection and origin traceability.

[0010] The time-series data partitioning unit is used to divide the partitioned food inspection data according to the set food inspection data quality screening cycle, forming a food inspection dataset that is partitioned according to a continuous time series and has temporal continuity.

[0011] The hierarchical storage construction unit stores food inspection data using a hierarchical storage structure, specifically a main layer and a sub-layer. The sub-layer includes an indicator classification layer and a data item layer. The food inspection data classification results are selected as the main layer. The test data involved in the classification results are selected as the indicator classification layer. The specific test indicator values ​​are selected as the data item layer.

[0012] The screening database generation unit is used to obtain food inspection datasets from various historical food inspection data quality screening cycles to form a food inspection data quality screening database.

[0013] By setting screening cycles and dividing food inspection data into safety and quality characteristic data, and combining the inspection data classification unit with a comparison database built based on national standards to achieve accurate classification, the time-series data division unit forms a time-series continuous dataset according to the cycle, the hierarchical storage construction unit achieves structured storage with a main layer and a sub-layer, and the screening library generation unit integrates historical datasets, thereby realizing standardized classification, time-series management, hierarchical storage, and historical data accumulation of food inspection data. This provides a standardized, orderly, and easily searchable high-quality data foundation for subsequent anomaly screening, real-time analysis, and monitoring and early warning.

[0014] The anomaly screening module is used to set up a sliding window for screening the quality of food inspection data, and to screen for abnormal data in the food inspection data quality screening database through the sliding window.

[0015] The sliding window control unit is used to select the food inspection data quality screening cycle as the reference unit for the sliding step size of the food inspection data quality screening sliding window. When a new food inspection dataset within the current screening cycle is added to the food inspection data quality screening database, the food inspection data quality screening sliding window slides one step to the newly added food inspection dataset; and a food inspection data quality screening sliding window includes multiple food inspection datasets.

[0016] The abnormal data statistics unit is used to read information from each food inspection dataset within the food inspection data quality screening sliding window, and analyze and extract the number of data points with abnormal inspection results in the food inspection dataset information; the number of abnormal data points includes the number of abnormal data points in safety test data and the number of abnormal data points in quality characteristic data; the number of abnormal data points in safety test data is recorded as the number of safety abnormalities, and the number of abnormal data points in quality characteristic data is recorded as the number of quality abnormalities.

[0017] The anomaly detection execution unit is used to detect anomalies in the test results. The detection process involves comparing the test data with the numerical standards in the database, and performing comparative analysis by reading data items from the food inspection dataset. The specific process is as follows:

[0018] When the value of a specific detection indicator in the data item layer exceeds the value standard of the test data comparison database, the test result is judged to be abnormal.

[0019] When the value of a specific detection indicator in the data item layer does not exceed the value standard of the test data comparison database, the test result is judged to be normal.

[0020] The historical average calculation unit is used to obtain the number of safety anomalies and the number of quality anomalies in each historical food inspection data quality screening cycle, and to calculate the average number of safety anomalies and the average number of quality anomalies based on the obtained number of safety anomalies and the number of quality anomalies.

[0021] The current average calculation unit is used to calculate the average number of safety anomalies and the average number of quality anomalies in the food inspection data quality screening sliding window within the current food inspection data quality screening cycle.

[0022] The comprehensive threshold calculation unit is used to obtain the comprehensive safety anomaly threshold for the number of safety anomalies through weighted fusion calculation. Specifically, it uses the average number of safety anomalies obtained by the historical average calculation unit and the average number of safety anomalies obtained by the current average calculation unit to obtain the comprehensive safety anomaly threshold through weighted fusion calculation; and simultaneously processes the average number of quality anomalies to obtain the comprehensive quality anomaly threshold for the number of quality anomalies.

[0023] By setting up a sliding window and using the screening cycle as the step size benchmark, the quality screening library for food inspection data is dynamically monitored. The sliding window control unit achieves continuous coverage of multi-period datasets. The abnormal data statistics unit classifies and extracts the number of safety and quality anomalies. The anomaly judgment execution unit accurately identifies anomalies based on the data item level indicator values ​​compared with national standards. The historical and current average value calculation units obtain the average values ​​of anomalies for the historical and current periods, respectively. Then, the comprehensive threshold calculation unit weights and fuses the values ​​to generate a more scientific comprehensive anomaly threshold. This constructs a full-process anomaly screening mechanism from dynamic data collection, classification statistics, standard comparison to threshold calculation, and achieves efficient identification and accurate judgment of safety and quality anomalies in food inspection data.

[0024] The real-time analysis module is used to analyze the food inspection data in the current food inspection data quality screening cycle based on the abnormal data screening results.

[0025] The real-time data acquisition unit is used to acquire, through the food inspection data quality screening library, the food inspection dataset that has been divided and stored within the current food inspection data quality screening cycle, and is referred to as the real-time food inspection dataset.

[0026] The real-time anomaly statistics unit is used to execute the anomaly judgment execution unit using the real-time food inspection dataset to obtain the number of safety anomalies and the number of quality anomalies within the current food inspection data quality screening cycle; the number of safety anomalies within the current food inspection data quality screening cycle is recorded as the real-time safety anomaly number, and the number of quality anomalies is recorded as the real-time quality anomaly number.

[0027] The anomaly ratio calculation unit is used to sum up the number of safety anomalies in the food inspection data quality screening database for each historical food inspection data quality screening period, and at the same time sum up the number of quality anomalies; the sum of the number of safety anomalies is divided by the sum of the number of quality anomalies to obtain the ratio of the number of safety anomalies to the number of quality anomalies.

[0028] The formula for calculating the ratio of the number of safety anomalies to the number of quality anomalies is as follows:

[0029] ;

[0030] In the formula, E sq The ratio of safety anomalies to quality anomalies is represented by: k = k-th food inspection data quality screening cycle; m = m-th number of historical food inspection data quality screening cycles included in the ratio calculation; A k P represents the number of safety anomalies up to the k-th food inspection data quality screening cycle; k This represents the number of quality anomalies up to the kth food inspection data quality screening cycle.

[0031] The anomaly prediction unit is used to obtain the number of data points with abnormal test results in each historical food inspection data quality screening cycle according to the food inspection data quality screening library, and to predict the total number of data points with abnormal test results in the current food inspection data quality screening cycle through machine learning regression algorithm, which is denoted as the predicted number of abnormal test data points.

[0032] For machine learning regression algorithm prediction, we choose the neural network regression prediction formula, and the calculation formula is as follows:

[0033] Y = f(w × H + b);

[0034] In the formula, Y represents the predicted number of abnormal data points, specifically the predicted total number of abnormal data points in the current food inspection data quality screening cycle; f represents the activation function; w represents the weight matrix, specifically the parameter matrix connecting the input layer and the hidden layer, and the hidden layer and the output layer, which is obtained through training with historical abnormal data to learn the nonlinear relationship of abnormal patterns; H represents the number of abnormal data points in each historical food inspection data quality screening cycle; and b represents the bias term, a parameter used to adjust the activation threshold of neurons.

[0035] The classification prediction unit is used to calculate the predicted number of safety anomalies and the predicted number of quality anomalies based on the ratio of the number of safety anomalies to the number of quality anomalies, according to the number of predicted abnormal data points.

[0036] The standard anomaly calculation unit is used to calculate the standard number of safety anomalies in the current food inspection data quality screening cycle by weighted fusion calculation based on the comprehensive safety anomaly threshold and the predicted number of safety anomalies; and to calculate the standard number of quality anomalies in the current food inspection data quality screening cycle by weighted fusion calculation based on the comprehensive quality anomaly threshold and the predicted number of quality anomalies.

[0037] The deviation calculation unit is used to subtract the real-time safety anomaly quantity from the standard safety anomaly quantity to obtain the deviation value of the number of safety anomalies within the current food inspection data quality screening cycle; and to subtract the real-time quality anomaly quantity from the standard quality anomaly quantity to obtain the deviation value of the number of quality anomalies within the current food inspection data quality screening cycle.

[0038] The real-time data acquisition unit extracts the current period dataset from the screening database. The real-time anomaly statistics unit, in conjunction with the anomaly judgment execution unit, generates the real-time safety and quality anomaly count. The anomaly ratio calculation unit integrates historical period anomaly data, sums them, and obtains the safety and quality anomaly ratio. The anomaly prediction unit uses a machine learning regression algorithm to predict the total number of anomaly data points in the current period. The classification prediction unit splits the anomaly data according to the anomaly ratio to obtain the predicted safety and quality anomaly count. The standard anomaly calculation unit then weights and fuses the comprehensive anomaly threshold and the predicted values ​​to generate the standard anomaly count. Finally, the deviation calculation unit obtains the deviation value of safety and quality anomalies. This constructs a full-chain real-time analysis system from real-time data acquisition, anomaly statistics, historical trend analysis, predictive modeling, and deviation calculation, providing data basis for accurately judging the current period's data anomaly trend and subsequent monitoring focus.

[0039] The monitoring focus judgment module is used to make judgments based on the analysis results of food inspection data and select the food inspection data that needs to be monitored.

[0040] The safety-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies exceeds the deviation value of the number of quality anomalies, determine that there are more data points with safety detection data anomalies in the remaining food inspection data quality screening cycle, and issue a safety detection data focus monitoring instruction;

[0041] The quality-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies does not exceed the deviation value of the number of quality anomalies, determine that there are more data points with abnormal quality characteristic data in the remaining food inspection data quality screening cycle, and issue a quality characteristic data focus monitoring instruction.

[0042] By using a safety-focused monitoring instruction generation unit and a quality-focused monitoring instruction generation unit, differentiated monitoring decisions are implemented based on the comparison of deviations in the number of safety and quality anomalies: when the safety anomaly deviation exceeds the quality anomaly deviation, the safety-focused monitoring instruction generation unit determines that the safety test data has a higher risk of anomaly in the remaining period and issues a targeted monitoring instruction; conversely, the quality-focused monitoring instruction generation unit determines that the quality characteristic data anomaly is more prominent and triggers a corresponding monitoring instruction, thereby achieving the goal of dynamically adjusting the monitoring focus based on real-time data anomaly characteristics and improving the accuracy of food inspection data quality control.

[0043] The early warning counting module sets an early warning counter based on the selected focus monitoring results of the food inspection data, and uses the early warning counter to screen and issue early warnings for the quality of the food inspection data;

[0044] The counter initialization unit is used to set the safety anomaly warning counter and the quality anomaly warning counter. The initial value of the safety anomaly warning counter is the deviation value of the number of safety anomalies; the initial value of the quality anomaly warning counter is the deviation value of the number of quality anomalies.

[0045] The counting adjustment unit is used for: in the current remaining food inspection data quality screening cycle, when a newly generated abnormal data point is identified as safety detection data, decrementing the safety abnormality warning counter by one; when a newly generated abnormal data point is identified as quality characteristic detection data, decrementing the quality abnormality warning counter by one; generating and issuing a warning signal when any warning counter value reaches zero; and adjusting the value of another warning counter by the ratio of the number of safety abnormalities to the number of quality abnormalities when the value of any warning counter is negative. Specifically, the absolute value of the negative warning counter value is divided by the ratio before the warning signal was issued to obtain the adjustment value of the warning counter to be adjusted, and the adjustment is completed by adding the adjustment value to the warning counter to be adjusted.

[0046] Based on the monitoring focus and judgment results, an early warning counter is set to achieve data quality screening and early warning. The counter initialization unit sets the initial values ​​of the safety anomaly early warning counter and the quality anomaly early warning counter to the deviation values ​​of the number of safety and quality anomalies, respectively. The counting adjustment unit decrements the corresponding counter by one according to the type of anomaly during the remaining screening cycle. When the counter reaches zero, an early warning signal is triggered. If the counter has a negative value, the adjustment value is calculated by the ratio of the number of safety and quality anomalies to calibrate the other counter. This constructs a multi-mechanism early warning system based on dynamic counting of deviation values, real-time response to anomaly types, and cross-dimensional ratio calibration, realizing quantitative monitoring and early warning of the risk of abnormal food inspection data quality.

[0047] The output of the data preprocessing module is electrically connected to the input of the anomaly screening module; the output of the anomaly screening module is electrically connected to the input of the real-time analysis module; the output of the real-time analysis module is electrically connected to the input of the monitoring-focused judgment module; and the output of the monitoring-focused judgment module is electrically connected to the input of the early warning counting module.

[0048] Compared with the prior art, the beneficial effects of the present invention are:

[0049] 1. This invention constructs a hierarchical storage structure through a data preprocessing module. It stores food inspection data in a structured manner, with the main layer classified according to safety and quality characteristics, and the secondary layers being the indicator classification layer and the data item layer. It integrates historical periodic data to form a screening library, solving the problem of inefficient correlation analysis caused by fragmentation in traditional storage. It achieves standardized data classification and time-series management, laying the foundation for risk trend analysis.

[0050] 2. This invention utilizes the sliding window dynamic monitoring mechanism of the anomaly screening module to cover multi-period datasets with the screening cycle as the step size. It combines historical and current anomaly averages to generate a comprehensive threshold, breaking through the limitations of traditional static thresholds, accurately identifying safety anomalies and quality characteristic anomalies, and improving the timeliness and scientific nature of anomaly detection.

[0051] 3. This invention integrates machine learning regression algorithms and anomaly ratio prediction models through a real-time analysis module, combined with the deviation value dynamic counting mechanism of the early warning counting module, to achieve forward-looking prediction of abnormal data in the current period. Based on the safety and quality abnormal deviation values, the monitoring focus is dynamically adjusted to solve the problem of lagging early warning in existing technologies and to build a full-process control system. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the structure of a food inspection data quality screening system according to the present invention. Detailed Implementation

[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Example 1: As Figure 1 As shown, the present invention provides a technical solution, a food inspection data quality screening system, which includes a data preprocessing module, an anomaly screening module, a real-time analysis module, a monitoring focus judgment module, and an early warning counting module.

[0055] The data preprocessing module is used to set the food inspection data quality screening cycle and divide the acquired food inspection data into safety test data and quality characteristic data.

[0056] The inspection data classification unit is used to read data information from the National Food Safety Standards to construct an inspection data comparison database. Based on the inspection data comparison database, the collected food inspection data is classified. Specifically, the detection data involving microorganisms, chemical contaminants, and illegal additives in the food inspection data are classified as safety detection data; and the detection data containing nutritional components, sensory physical indicators, and ingredient authenticity are classified as quality characteristic data.

[0057] The time-series data partitioning unit is used to divide the partitioned food inspection data according to the set food inspection data quality screening cycle, forming a food inspection dataset that is partitioned according to a continuous time series and has temporal continuity.

[0058] The hierarchical storage construction unit stores food inspection data using a hierarchical storage structure, specifically a main layer and a sub-layer. The sub-layer includes an indicator classification layer and a data item layer. The food inspection data classification results are selected as the main layer. The test data involved in the classification results are selected as the indicator classification layer. The specific test indicator values ​​are selected as the data item layer.

[0059] The screening database generation unit is used to obtain food inspection datasets from various historical food inspection data quality screening cycles to form a food inspection data quality screening database.

[0060] The anomaly screening module is used to set up a sliding window for screening the quality of food inspection data, and to screen for abnormal data in the food inspection data quality screening database through the sliding window.

[0061] The sliding window control unit is used to select the food inspection data quality screening cycle as the reference unit for the sliding step size of the food inspection data quality screening sliding window. When a new food inspection dataset within the current screening cycle is added to the food inspection data quality screening database, the food inspection data quality screening sliding window slides one step to the newly added food inspection dataset; and a food inspection data quality screening sliding window includes multiple food inspection datasets.

[0062] The abnormal data statistics unit is used to read information from each food inspection dataset within the food inspection data quality screening sliding window, and analyze and extract the number of data points with abnormal inspection results in the food inspection dataset information; the number of abnormal data points includes the number of abnormal data points in safety test data and the number of abnormal data points in quality characteristic data; the number of abnormal data points in safety test data is recorded as the number of safety abnormalities, and the number of abnormal data points in quality characteristic data is recorded as the number of quality abnormalities.

[0063] The anomaly detection execution unit is used to detect anomalies in the test results. The detection process involves comparing the test data with the numerical standards in the database, and performing comparative analysis by reading data items from the food inspection dataset. The specific process is as follows:

[0064] When the value of a specific detection indicator in the data item layer exceeds the value standard of the test data comparison database, the test result is judged to be abnormal.

[0065] When the value of a specific detection indicator in the data item layer does not exceed the value standard of the test data comparison database, the test result is judged to be normal.

[0066] The historical average calculation unit is used to obtain the number of safety anomalies and the number of quality anomalies in each historical food inspection data quality screening cycle, and to calculate the average number of safety anomalies and the average number of quality anomalies based on the obtained number of safety anomalies and the number of quality anomalies.

[0067] The current average calculation unit is used to calculate the average number of safety anomalies and the average number of quality anomalies in the food inspection data quality screening sliding window within the current food inspection data quality screening cycle.

[0068] The comprehensive threshold calculation unit is used to obtain the comprehensive safety anomaly threshold for the number of safety anomalies through weighted fusion calculation. Specifically, it uses the average number of safety anomalies obtained by the historical average calculation unit and the average number of safety anomalies obtained by the current average calculation unit to obtain the comprehensive safety anomaly threshold through weighted fusion calculation; and simultaneously processes the average number of quality anomalies to obtain the comprehensive quality anomaly threshold for the number of quality anomalies.

[0069] The real-time analysis module is used to analyze the food inspection data in the current food inspection data quality screening cycle based on the abnormal data screening results.

[0070] The real-time data acquisition unit is used to acquire, through the food inspection data quality screening library, the food inspection dataset that has been divided and stored within the current food inspection data quality screening cycle, and is referred to as the real-time food inspection dataset.

[0071] The real-time anomaly statistics unit is used to execute the anomaly judgment execution unit using the real-time food inspection dataset to obtain the number of safety anomalies and the number of quality anomalies within the current food inspection data quality screening cycle; the number of safety anomalies within the current food inspection data quality screening cycle is recorded as the real-time safety anomaly number, and the number of quality anomalies is recorded as the real-time quality anomaly number.

[0072] The anomaly ratio calculation unit is used to sum up the number of safety anomalies in the food inspection data quality screening database for each historical food inspection data quality screening period, and at the same time sum up the number of quality anomalies; the sum of the number of safety anomalies is divided by the sum of the number of quality anomalies to obtain the ratio of the number of safety anomalies to the number of quality anomalies.

[0073] The anomaly prediction unit is used to obtain the number of data points with abnormal test results in each historical food inspection data quality screening cycle according to the food inspection data quality screening library, and to predict the total number of data points with abnormal test results in the current food inspection data quality screening cycle through machine learning regression algorithm, which is denoted as the predicted number of abnormal test data points.

[0074] The classification prediction unit is used to calculate the predicted number of safety anomalies and the predicted number of quality anomalies based on the ratio of the number of safety anomalies to the number of quality anomalies, according to the number of predicted abnormal data points.

[0075] The standard anomaly calculation unit is used to calculate the standard number of safety anomalies in the current food inspection data quality screening cycle by weighted fusion calculation based on the comprehensive safety anomaly threshold and the predicted number of safety anomalies; and to calculate the standard number of quality anomalies in the current food inspection data quality screening cycle by weighted fusion calculation based on the comprehensive quality anomaly threshold and the predicted number of quality anomalies.

[0076] The deviation calculation unit is used to subtract the real-time safety anomaly quantity from the standard safety anomaly quantity to obtain the deviation value of the number of safety anomalies within the current food inspection data quality screening cycle; and to subtract the real-time quality anomaly quantity from the standard quality anomaly quantity to obtain the deviation value of the number of quality anomalies within the current food inspection data quality screening cycle.

[0077] The monitoring focus judgment module is used to make judgments based on the analysis results of food inspection data and select the food inspection data that needs to be monitored.

[0078] The safety-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies exceeds the deviation value of the number of quality anomalies, determine that there are more data points with safety detection data anomalies in the remaining food inspection data quality screening cycle, and issue a safety detection data focus monitoring instruction;

[0079] The quality-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies does not exceed the deviation value of the number of quality anomalies, determine that there are more data points with abnormal quality characteristic data in the remaining food inspection data quality screening cycle, and issue a quality characteristic data focus monitoring instruction.

[0080] The early warning counting module sets an early warning counter based on the selected focus monitoring results of the food inspection data, and uses the early warning counter to screen and issue early warnings for the quality of the food inspection data;

[0081] The counter initialization unit is used to set the safety anomaly warning counter and the quality anomaly warning counter. The initial value of the safety anomaly warning counter is the deviation value of the number of safety anomalies; the initial value of the quality anomaly warning counter is the deviation value of the number of quality anomalies.

[0082] The counting adjustment unit is used for: in the current remaining food inspection data quality screening cycle, when a newly generated abnormal data point is identified as safety detection data, decrementing the safety abnormality warning counter by one; when a newly generated abnormal data point is identified as quality characteristic detection data, decrementing the quality abnormality warning counter by one; generating and issuing a warning signal when any warning counter value reaches zero; and adjusting the value of another warning counter by the ratio of the number of safety abnormalities to the number of quality abnormalities when the value of any warning counter is negative. Specifically, the absolute value of the negative warning counter value is divided by the ratio before the warning signal was issued to obtain the adjustment value of the warning counter to be adjusted, and the adjustment is completed by adding the adjustment value to the warning counter to be adjusted.

[0083] For example, suppose a food company uses a 10-day period as a food inspection data quality screening cycle and inspects bread produced within 30 days: The data preprocessing module divides the data from day 1 to day 10 into safety test data, such as total microbial colony count and lead content, and quality characteristic data, such as protein content and moisture content. It forms three time-series datasets according to the cycle and stores them in a main layer and a sub-layer to build a screening library.

[0084] The anomaly screening module uses a 10-day sliding step. When the window includes datasets from days 1-10 and 11-20, it counts 80 safety anomalies and 50 quality anomalies.

[0085] Based on the average safety anomalies of the previous three cycles: (60+70+80)÷3=70;

[0086] Based on the average quality anomalies of the previous 3 cycles: (40+50+60)÷3=50;

[0087] The overall threshold is calculated using a historical weight of 0.6 and a current weight of 0.4.

[0088] The safety anomaly threshold is calculated as: 70 × 0.6 + (80 ÷ 2) × 0.4 = 54;

[0089] The quality anomaly threshold is calculated as: 50 × 0.6 + (50 ÷ 2) × 0.4 = 40;

[0090] The real-time analysis module acquires the real-time dataset from days 21-30, identifying 60 real-time security anomalies and 40 quality anomalies.

[0091] The total number of historical safety anomalies is calculated as: 60 + 70 + 80 + 60 = 270;

[0092] The total number of quality anomalies is: 40 + 50 + 60 + 50 + 40 = 240;

[0093] The ratio is calculated as: 270 ÷ 240 = 1.125, and the final ratio is 1 / 1.125;

[0094] The machine learning regression algorithm predicts that there are 80 total abnormal data points in the current period. Based on the ratio of 1.125, the number of predicted safe anomalies is calculated as follows:

[0095] 80 × (1.125 ÷ (1 + 1.125)) ≈ 42.35;

[0096] Rounded to the nearest integer, the result is 42.

[0097] The predicted number of quality anomalies is 80-42=38;

[0098] The standard anomaly calculation unit calculates the number of standard safety anomalies based on a comprehensive threshold and predicted values:

[0099] 54 × 0.6 + 42 × 0.4 = 29.76;

[0100] Rounded to the nearest whole number, the result is 30.

[0101] The standard quality defect quantity is calculated as follows:

[0102] 40 × 0.6 + 38 × 0.4 = 39.2;

[0103] The result, rounded to the nearest integer, is 39.

[0104] The deviation value of the number of safety anomalies is calculated as follows:

[0105] 60-30=30;

[0106] The quantity deviation value of quality anomalies is calculated as follows:

[0107] 40-39=1;

[0108] In the monitoring-focused judgment module,

[0109] 30 > 1; therefore, the quality-focused monitoring instruction generation unit determines that there are more abnormal data points in the safety detection data in the current remaining screening cycle, and issues a safety detection data-focused monitoring instruction.

[0110] The warning counting module sets the initial value of the safety anomaly warning counter to 30 and the initial value of the quality anomaly warning counter to 1.

[0111] The output of the data preprocessing module is electrically connected to the input of the anomaly screening module; the output of the anomaly screening module is electrically connected to the input of the real-time analysis module; the output of the real-time analysis module is electrically connected to the input of the monitoring-focused judgment module; and the output of the monitoring-focused judgment module is electrically connected to the input of the early warning counting module.

[0112] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A food inspection data quality screening system, characterized in that: The food inspection data quality screening system includes a data preprocessing module, an anomaly screening module, a real-time analysis module, a monitoring focus judgment module, and an early warning counting module. The data preprocessing module is used to set the food inspection data quality screening cycle and divide the acquired food inspection data into safety test data and quality characteristic data. The data preprocessing module includes a test data classification unit and a time-series data partitioning unit; The inspection data classification unit is used to read data information from the National Food Safety Standards to construct an inspection data comparison database. Based on the inspection data comparison database, the collected food inspection data is classified. Specifically, the detection data involving microorganisms, chemical contaminants, and illegal additives in the food inspection data are classified as safety detection data; and the detection data containing nutritional components, sensory physical indicators, and ingredient authenticity are classified as quality characteristic data. The time-series data partitioning unit is used to divide the partitioned food inspection data according to the set food inspection data quality screening cycle, forming a food inspection dataset that is partitioned according to a continuous time series and has temporal continuity. The anomaly screening module is used to set up a sliding window for screening the quality of food inspection data, and to screen for abnormal data in the food inspection data quality screening database through the sliding window. The data preprocessing module also includes a hierarchical storage construction unit and a screening library generation unit: The hierarchical storage construction unit stores food inspection data using a hierarchical storage structure, specifically a main layer and a sub-layer. The sub-layer includes an indicator classification layer and a data item layer. The food inspection data classification results are selected as the main layer. The test data involved in the classification results are selected as the indicator classification layer. The specific test indicator values ​​are selected as the data item layer. The screening library generation unit is used to obtain food inspection datasets from various historical food inspection data quality screening cycles to form a food inspection data quality screening library. The real-time analysis module is used to analyze the food inspection data in the current food inspection data quality screening cycle based on the abnormal data screening results. The monitoring focus judgment module is used to make judgments based on the analysis results of food inspection data and select the food inspection data that needs to be monitored. The early warning counting module sets an early warning counter based on the selected focus monitoring results of the food inspection data, and uses the early warning counter to screen and issue early warnings for the quality of the food inspection data; The output of the data preprocessing module is electrically connected to the input of the anomaly screening module; the output of the anomaly screening module is electrically connected to the input of the real-time analysis module; the output of the real-time analysis module is electrically connected to the input of the monitoring-focused judgment module; and the output of the monitoring-focused judgment module is electrically connected to the input of the early warning counting module.

2. The food inspection data quality screening system according to claim 1, characterized in that: The anomaly screening module includes a sliding window control unit and an anomaly data statistics unit; The sliding window control unit is used to select the food inspection data quality screening cycle as the reference unit for the sliding step size of the food inspection data quality screening sliding window. When a new food inspection dataset within the current screening cycle is added to the food inspection data quality screening database, the food inspection data quality screening sliding window slides one step to the newly added food inspection dataset; and a food inspection data quality screening sliding window includes multiple food inspection datasets. The abnormal data statistics unit is used to read information from each food inspection dataset within the food inspection data quality screening sliding window, and analyze and extract the number of data points in the food inspection dataset where the inspection results are abnormal. The number of abnormal data points includes the number of abnormal data points in security detection data and the number of abnormal data points in quality characteristic data. The number of abnormal data points in the safety test data is recorded as the number of safety abnormalities, and the number of abnormal data points in the quality characteristic data is recorded as the number of quality abnormalities.

3. The food inspection data quality screening system according to claim 2, characterized in that: The anomaly screening module also includes an anomaly determination execution unit and a historical average calculation unit; The anomaly detection execution unit is used to detect anomalies in the test results. The detection process involves comparing the test data with the numerical standards in the database, and performing comparative analysis by reading data items from the food inspection dataset. The specific process is as follows: When the value of a specific detection indicator in the data item layer exceeds the value standard of the test data comparison database, the test result is judged to be abnormal. When the value of a specific detection indicator in the data item layer does not exceed the value standard of the test data comparison database, the test result is judged to be normal. The historical average calculation unit is used to obtain the number of safety anomalies and the number of quality anomalies in each historical food inspection data quality screening cycle, and to calculate the average number of safety anomalies and the average number of quality anomalies based on the obtained number of safety anomalies and the number of quality anomalies.

4. The food inspection data quality screening system according to claim 3, characterized in that: The anomaly screening module also includes a current mean calculation unit and a comprehensive threshold calculation unit; The current average calculation unit is used to calculate the average number of safety anomalies and the average number of quality anomalies in the food inspection data quality screening sliding window within the current food inspection data quality screening cycle. The comprehensive threshold calculation unit is used to obtain the comprehensive safety anomaly threshold for the number of safety anomalies through weighted fusion calculation. Specifically, it uses the average value of the number of safety anomalies obtained by the historical average calculation unit and the average value of the number of safety anomalies obtained by the current average calculation unit to obtain the comprehensive safety anomaly threshold through weighted fusion calculation; and simultaneously processes the average value of the number of quality anomalies to obtain the comprehensive quality anomaly threshold for the number of quality anomalies.

5. A food inspection data quality screening system according to claim 4, characterized in that: The real-time analysis module includes a real-time data acquisition unit, a real-time anomaly statistics unit, and an anomaly ratio calculation unit. The real-time data acquisition unit is used to acquire, through the food inspection data quality screening library, the food inspection dataset that has been divided and stored within the current food inspection data quality screening cycle, and is referred to as the real-time food inspection dataset. The real-time anomaly statistics unit is used to execute the anomaly judgment execution unit using the real-time food inspection dataset to obtain the number of safety anomalies and the number of quality anomalies within the current food inspection data quality screening cycle; the number of safety anomalies within the current food inspection data quality screening cycle is recorded as the real-time safety anomaly number, and the number of quality anomalies is recorded as the real-time quality anomaly number. The anomaly ratio calculation unit is used to sum up the number of safety anomalies in the food inspection data quality screening database for each historical food inspection data quality screening period, and at the same time to sum up the number of quality anomalies; the sum of the number of safety anomalies is divided by the sum of the number of quality anomalies to obtain the ratio of the number of safety anomalies to the number of quality anomalies.

6. The food inspection data quality screening system according to claim 5, characterized in that: The real-time analysis module also includes an anomaly prediction unit, a classification prediction unit, a standard anomaly calculation unit, and a deviation calculation unit; The anomaly prediction unit is used to obtain the number of data points with abnormal test results in each historical food inspection data quality screening cycle according to the food inspection data quality screening library, and to predict the total number of data points with abnormal test results in the current food inspection data quality screening cycle through machine learning regression algorithm, which is denoted as the predicted number of abnormal test data points. The classification prediction unit is used to calculate the predicted number of safety anomalies and the predicted number of quality anomalies based on the ratio of the number of safety anomalies to the number of quality anomalies, according to the number of predicted abnormal data points. The standard anomaly calculation unit is used to obtain the standard safety anomaly number for the current food inspection data quality screening cycle by weighted fusion calculation based on the comprehensive safety anomaly threshold and the predicted number of safety anomalies. Based on the comprehensive quality anomaly threshold and the predicted number of quality anomalies, the standard number of quality anomalies for the current food inspection data quality screening cycle is obtained through weighted fusion calculation. The deviation calculation unit is used to subtract the real-time safety anomaly quantity from the standard safety anomaly quantity to obtain the deviation value of the number of safety anomalies within the current food inspection data quality screening cycle; and to subtract the real-time quality anomaly quantity from the standard quality anomaly quantity to obtain the deviation value of the number of quality anomalies within the current food inspection data quality screening cycle.

7. A food inspection data quality screening system according to claim 6, characterized in that: The monitoring focus judgment module includes a safety-focused monitoring instruction generation unit and a quality-focused monitoring instruction generation unit; The safety-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies exceeds the deviation value of the number of quality anomalies, determine that there are more data points with safety detection data anomalies in the remaining food inspection data quality screening cycle, and issue a safety detection data focus monitoring instruction; The quality-focused monitoring instruction generation unit is used to: when the deviation value of the number of safety anomalies does not exceed the deviation value of the number of quality anomalies, determine that there are more data points with abnormal quality characteristic data in the remaining food inspection data quality screening cycle, and issue a quality characteristic data focus monitoring instruction.

8. The food inspection data quality screening system according to claim 7, characterized in that: The early warning counting module includes a counter initialization unit and a count adjustment unit; The counter initialization unit is used to set the safety anomaly warning counter and the quality anomaly warning counter. The initial value of the safety anomaly warning counter is the deviation value of the number of safety anomalies; the initial value of the quality anomaly warning counter is the deviation value of the number of quality anomalies. The counting adjustment unit is used to: in the current remaining food inspection data quality screening cycle, when a newly generated abnormal data point is identified as safety detection data, decrement the safety abnormality warning counter by one; when a newly generated abnormal data point is identified as quality characteristic detection data, decrement the quality abnormality warning counter by one; when the value of any warning counter reaches zero, generate and issue a warning signal; when the value of any warning counter is negative, adjust the value of another warning counter by the ratio of the number of safety abnormalities to the number of quality abnormalities, specifically by dividing the absolute value of the negative warning counter by the ratio before issuing the warning signal, to obtain the adjustment value of the warning counter that needs to be adjusted, and then add the adjustment value to the warning counter that needs to be adjusted to complete the adjustment.

Citation Information

Patent Citations

  • Food production information risk analysis and prediction system

    CN118674275A

  • Food safety risk early warning method and system

    CN119785566A