A method and system for supervising food safety of a public canteen
By using four-code association and blockchain evidence storage technology, combined with smart devices and AI algorithms, the problems of data silos and traceability difficulties in the supervision of food safety in public canteens have been solved, achieving efficient traceability and real-time control throughout the entire process, and improving the efficiency and accuracy of supervision.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BADOU DIGITAL TECHNOLOGY (CHANGCHUN) CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-10
AI Technical Summary
Food safety supervision in public canteens suffers from problems such as data silos, difficulty in ensuring data authenticity, lagging supervision, and difficulty in traceability. Existing smart canteen systems have failed to build an integrated supervision system covering the entire process, thus failing to meet the requirements for efficient food safety supervision.
The data link adopts a four-code association, and realizes the connection of the entire data link through the coding rules of person code, menu code, organization code and event code. Blockchain notarization technology is used to ensure that the data is tamper-proof. Combined with smart devices and AI algorithms, real-time monitoring and analysis are carried out to achieve full-process automated management.
It has achieved efficient traceability and real-time control of food safety across the entire chain, improved the credibility of data and regulatory efficiency, realized the shift from post-event accountability to pre-event prevention, provided personalized nutrition management and anti-waste management, and improved the utilization efficiency of regulatory resources.
Smart Images

Figure CN122367696A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food safety supervision technology, and in particular to a method and system for supervising food safety in public canteens. Background Technology
[0002] Food safety is a crucial issue concerning people's livelihood, and the supervision of food safety in public canteens in schools, enterprises, and institutions is directly related to public health and social stability. In actual operation, public canteens are generally characterized by high customer turnover, concentrated and flexible meal times, and diverse service scenarios. At the same time, the sources of food suppliers are scattered, and the data formats and standardization levels vary greatly, resulting in inefficiency and insufficient accuracy in areas such as food verification, inventory management, processing control, consumer settlement, and traceability management. There is also a lack of efficient collaboration mechanisms between regulatory departments and operating entities, and there is still considerable room for improvement in the level of service refinement and management standardization.
[0003] Traditional canteen management relies primarily on manual records, paper ledgers, and regular on-site inspections, which have the following prominent drawbacks: Data silos: Data from procurement, inventory, processing, and sample retention are independent of each other, making it impossible to form a complete traceability chain. For example, sample retention records cannot correspond to specific batches of ingredients; Data authenticity is difficult to guarantee: Morning inspection, sample retention, and disinfection records rely on manual entry, which is susceptible to being added or falsified, making it impossible for regulatory authorities to verify the authenticity of the data; Supervision lags: Video surveillance is only used for post-event review and cannot detect violations or equipment malfunctions in real time; Traceability is difficult: When problems occur, multiple ledgers need to be manually reviewed, which is inefficient and makes it difficult to accurately pinpoint the responsible party.
[0004] In recent years, although some smart canteen supervision systems have emerged, most of them only focus on a single supervision link, the data of different systems are not interconnected, and they have not built a whole-process integrated supervision system for the operational characteristics of public canteens, which cannot meet the supervision requirements of food safety of "prevention first, risk management, full controllability, and social co-governance". Summary of the Invention
[0005] This application provides a method and system for supervising food safety in public canteens, addressing the shortcomings of existing technologies such as data silos, difficulty in traceability, and lagging supervision, and achieving end-to-end data connectivity, efficient traceability, and real-time control.
[0006] This application provides a method for supervising food safety in public canteens, including the following steps: S1. For the four data entities in the operation of public canteens—personnel, food, organization, and events—formulate corresponding coding rules for personnel codes, food codes, organization codes, and event codes respectively. S2. Collect data in real time to generate corresponding codes, and establish the association between the dish code and the person code, organization code, and event code using the dish code as the connection node; S3. Store the four types of data entities, their codes, and their relationships in a unified manner, and store some key related data on the blockchain. S4. Receive a query request and output all data entity information associated with any type of code carried in the request.
[0007] The beneficial effects of the above embodiments are as follows: This supervision method breaks the data silo problem in each link of traditional canteen supervision, forms a four-code associated data link with the food code as the core, realizes the full-link connection of personnel, institutions and event data, and can quickly obtain the complete evidence chain by querying any dimension, realizing efficient traceability of the whole link; and the key data is stored on the chain for evidence, which cannot be tampered with individually, thus improving the credibility of the data.
[0008] Based on the above embodiments, this application can be further improved as follows: In one embodiment of this application, in step S1: The personnel code includes a type identifier, timestamp, organization code, serial number, and check digit, and is used to identify employees, supervisors, or diners. The menu code includes the ingredient batch code, dish code, and meal code, which respectively identify the ingredient batch, single dish, and specific meal. The ingredient batch code includes the type identifier, timestamp, supplier code, serial number, and check digit; the dish code includes the type identifier, timestamp, canteen code, serial number, and check digit; and the meal code includes the type identifier, timestamp, canteen code, meal code, and check digit. The organization code includes a type identifier, subtype, organization number, and check digit, which is used to identify the supplier, canteen, regulatory unit, or equipment entity. The event code includes a type identifier, timestamp, event type, serial number, and check digit, which are used to identify the corresponding event.
[0009] Technical benefits: Standardized coding rules enable unified identification of multi-source heterogeneous data. The code has a built-in check bit to prevent tampering, and it also supports data interoperability across regions and systems.
[0010] In one embodiment of this application, step S2 predefines association rules, and when new data is generated, the binding operation is automatically executed, including: Morning check abnormality rules: When abnormal data is collected during the morning check of personnel, the person code is automatically bound to the event code, and the person code is marked as a risk status; Operating rules for personnel at risk: When personnel at risk handle ingredients, their personal codes will be automatically linked to the batch codes of the raw materials, and the personal codes of personnel at risk will be automatically associated when the dish codes are generated; Anomaly detection rules: When an ingredient is detected as abnormal, the batch code of the ingredient is automatically bound to the event code and the supplier organization code, and the batch of ingredient is marked as abnormal. Sample retention record rules: When a sample is placed in the sample retention cabinet, the dish code is automatically bound to the sample retention event code, the sample retention personnel code, and the sample retention cabinet organization code; Consumption record rules: When a student picks up a meal, the student's ID is automatically linked to the dish's ID, generating a consumption event code.
[0011] Technical benefits: It enables automatic data linking at all stages of the entire process from food procurement to consumer settlement, forming a complete chain of responsibility without human intervention and preventing data omissions or human fraud.
[0012] In one embodiment of this application, the method further includes risk warning and closed-loop handling steps: Real-time monitoring of four types of data entities and their relationships; automatic generation of corresponding event codes when abnormal data is detected. Automatically trigger tiered alarms based on event type, simultaneously generate rectification work orders and push them to the corresponding responsible parties; Record the data of the entire rectification process, bind the rectification results with the corresponding event codes, and store them on the blockchain to complete the closed-loop processing.
[0013] Technical benefits: Enables real-time identification and automatic handling of food safety risks, shifting from traditional post-event accountability to pre-event prevention and in-event control, and improving the speed of risk response.
[0014] In one embodiment of this application, the method further includes a nutritional analysis and intervention step: A pre-built nutritional database of dishes is used to store nutritional data for various dishes. Based on the health record information associated with the diners' QR codes, a recommended menu is generated. By combining the food codes and meal weight data associated with the consumption records, a personal nutrition intake report is generated and pushed to the user.
[0015] Technological benefits: Enables precise nutrition management at the individual level, transforming traditional extensive meal planning into personalized nutrition services.
[0016] In one embodiment of this application, the method further includes an anti-waste management step: The weight of food taken by diners and the weight remaining after the meal are recorded by intelligent weighing equipment; The weight of food taken and the remaining weight are linked to the corresponding dish codes and diners' codes to calculate the individual waste rate and the food waste rate; When an individual's waste rate exceeds a threshold consecutively, a reminder is sent, and a list of high-waste dishes is generated based on the food waste rate to guide recipe optimization.
[0017] Technical effects: It enables precise quantification of anti-waste management, provides data support for anti-waste assessment, and reduces the food waste rate in canteens.
[0018] In one embodiment of this application, the method further includes a dynamic risk classification step: A risk scoring model is constructed based on the compliance rate of morning inspections and the frequency of personnel violations associated with the human code, the pass rate of pesticide residues and the completeness rate of sample retention associated with the vegetable code, the online rate of equipment and the closed-loop rate of rectification associated with the institution code, and the frequency, severity and recidivism rate of events associated with the event code. Regularly calculate the risk score of the canteen and classify it into red, yellow and green risk levels. Adjust the frequency of supervision and the priority of spot checks dynamically according to the risk level.
[0019] Technical effects: Enables precise allocation of regulatory resources, transforms traditional random inspections into data-driven hierarchical supervision, and improves regulatory efficiency.
[0020] This application also provides a public canteen food safety supervision system, including: The terminal perception layer includes multiple detection and monitoring devices used to collect raw data of four types of data entities: personnel, dishes, institutions, and events. The central data layer includes a unified access module, a blockchain data platform, and an AI algorithm module, which are used to realize data transmission processing, relationship building, evidence storage, and data analysis. The platform application layer includes a smart supervision platform for regulatory authorities, a traceability platform for canteen operators, and a home-school co-governance platform for the public, which provides business functions and query portals for the corresponding roles.
[0021] Technical effects: Construct an integrated regulatory system covering the entire chain of "perception-governance-application" to achieve a complete ecosystem of real data collection by devices, unified governance by the central platform, closed-loop supervision by the platform, and transparent co-governance between families and schools. Attached Figure Description
[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0023] Figure 1 This is a flowchart illustrating the steps of a method for supervising food safety in a public canteen, as described in this application. Figure 2 This is a block diagram of the architecture of a public canteen food safety supervision system according to an embodiment of this application. Detailed Implementation
[0024] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0025] Example: like Figure 1 As shown in the figure, this application provides a method for supervising food safety in public canteens, including the following steps: S1. For the four types of data entities in the operation of public canteens—personnel, food, organization, and events—formulate corresponding coding rules for personnel codes, food codes, organization codes, and event codes respectively.
[0026] In this embodiment, the system generates unique codes for personnel, dishes, organizations, and events during the canteen's operation. The code format adopts a segmented structure, including a type identifier, timestamp, organization identifier, serial number, and check digit, ensuring the uniqueness and tamper-proof capability of the code. Specifically: 1. Personal Code Encoding Rules: The personnel code is used to uniquely identify canteen staff, supervisors, and diners. The personnel code format is: P + YYYYMMDDHHMMSS + Institution Code + 4-digit serial number + 2-digit check digit. For example, P20241015073000123400012A indicates that on October 15, 2024 at 07:30, the first person registered that day at the canteen with institution code 001234, with check digit 2A.
[0027] 2. Menu code rules: The food codes use a three-level structure, including the raw material batch code, the dish code, and the meal number code. The raw material batch code format is: R + YYYYMMDD + supplier code + 4-digit serial number + 2-digit check digit, used to uniquely identify a batch of ingredients. For example, R2024101200567800013F indicates: ingredients received on October 12, 2024, supplier code 005678, the first batch of ingredients on that day. The dish code format is: D + YYYYMMDD + cafeteria code + 4-digit serial number + 2-digit check digit, used to uniquely identify a single dish. For example, D202410150123400012B indicates: dishes served on October 15, 2024, cafeteria code 012340, the first dish of that day. The meal code format is: M + YYYYMMDD + cafeteria code + meal code + 2 check digits, used to uniquely identify a meal. Meal code 1 represents breakfast, 2 represents lunch, and 3 represents dinner. For example, M202410150123401L7C means: October 15, 2024, cafeteria code 012340, lunch.
[0028] 3. Organization code encoding rules: Organization codes are used to uniquely identify organizations or equipment such as suppliers, schools, canteens, and sample retention cabinets. The format of an organization code is: O + subtype + 6-digit organization number + 2-digit check digit. Subtype S represents a supplier, C represents a canteen, E represents equipment, and D represents a regulatory body. For example, OS0012345A represents supplier number 001234; OE0056782C represents equipment number 005678.
[0029] 4. Event code encoding rules: Event codes are used to uniquely identify events such as morning inspection anomalies, pesticide residue exceeding limits, sample retention records, and temperature anomalies. The event code format is: E + YYYYMMDDHHMMSS + event type + 4-digit serial number + 2-digit check digit. Event type codes include: M1 for morning inspection anomalies, P1 for pesticide residue exceeding limits, S1 for sample retention records, S2 for abnormal temperature in the sample retention cabinet, C1 for processing records, and C2 for consumption records, etc. For example, E20241015113001S100014F indicates: October 15, 2024, 11:30:01, sample retention record event, the first one of the day.
[0030] S2. Real-time data collection generates corresponding codes, and establishes the association between the dish code, person code, organization code, and event code using the dish code as the connection node, forming a data link with four codes.
[0031] In this embodiment, the system predefines association rules. When new data is generated, the association rule engine automatically performs the binding operation. For example, data collection, encoding generation, and association relationships can be performed synchronously with the process, as detailed below: 1. Personnel data collection and QR code generation: When canteen staff are hired, the administrator enters their basic information in the system backend, and the system automatically generates a unique personal code, which is then linked to their facial features and work card information.
[0032] Morning Check Abnormality Rules: Before starting work each day, employees undergo a morning check at the morning check machine. The machine confirms the employee's identity through facial recognition and automatically collects data such as body temperature and hand images. If the body temperature exceeds 37.3℃ or a hand wound is detected, the system automatically generates a morning check abnormality event code, marks the employee's code as a risk status, and binds the event code to the employee's code.
[0033] The access control system is linked to the morning inspection data. When employees swipe their cards or use facial recognition to enter the kitchen, the access control system identifies the personnel. If the personnel's ID is in a risky state, the access control system issues a prompt and records the entry time, but does not forcibly block them, so that the administrator can decide whether to allow them to enter based on the actual situation.
[0034] 2. Ingredient data collection and menu code generation: When ingredients arrive, the warehouse manager scans the traceability code on the supplier's packaging. The system automatically generates a raw material batch code, records the supplier information, production date, and shelf life, and binds the raw material batch code to the supplier's organization code.
[0035] The warehouse manager uses a pesticide residue detector to sample and test food ingredients. The detector automatically uploads the test results to the system. If the test fails, the system generates a pesticide residue exceeding the limit event code and binds the event code to the raw material batch code. At the same time, the system automatically marks the raw material batch code as abnormal.
[0036] When picking up materials, the batch code of the raw materials is scanned at the operating table. The system records the person's code and binds the person's code to the batch code of the raw materials.
[0037] When a chef begins preparing a dish, they select the dish name at the worktable. The system generates a dish code and binds it to the batch codes of the ingredients used and the chef's code. Simultaneously, a processing record event code is generated and associated with the dish code.
[0038] 3. Sample data collection and event code generation: After the dishes are cooked, the chef places samples into a sample retention cabinet. The cabinet is equipped with an RFID reader and a temperature sensor. When placing the sample, the chef scans the dish code, and the system automatically records the retention time, the person's code, and the cabinet number, generating a retention record event code. This event code is then linked to the dish code, the person's code, and the cabinet's organization code.
[0039] The temperature sensor in the sample retention cabinet collects temperature data every 5 minutes and uploads it to the system in real time. The system generates a temperature curve and records temperature changes. If the temperature exceeds a preset threshold, the system automatically generates a temperature anomaly event code, binds the event code to the sample retention cabinet's mechanism code, and simultaneously sends an alert to the administrator.
[0040] The sample retention cabinet door is equipped with a magnetic sensor to record the time of door opening and closing and the identity of the operator. If unauthorized opening is detected, the system automatically generates an illegal opening event code and sends an alarm.
[0041] 4. Consumption data collection and event code generation: When students collect their meals, they use RFID trays with their personal identification codes to retrieve their food from a smart weighing device. The weighing device automatically identifies the student's personal identification code corresponding to the tray, records the food item code and the weight of the meal, generates a consumption record event code, and binds the event code to the food item code and the student's personal identification code.
[0042] When students return their meals, the anti-food waste equipment identifies their plates, records the remaining weight, generates a waste record event code, binds the event code to the dish code and the student's code, and calculates the waste rate.
[0043] S3. Store the four types of data entities, their codes, and their relationships in a unified manner, and store key related data on the blockchain. In this embodiment, the system generates hash values for key data and stores them on the blockchain. The key associated data stored on the blockchain includes: the binding relationship between person codes and event codes, the binding relationship between raw material batch codes and test results, the binding relationship between dish codes and raw material batch codes, the binding relationship between sample retention records and temperature curves, and the binding relationship between consumption records and dish codes, etc.
[0044] The on-chain data adopts a consortium blockchain architecture, with supplier nodes, school nodes, and regulatory agency nodes jointly maintaining the same ledger. No party can unilaterally modify the on-chain data, ensuring the authenticity and immutability of the evidence.
[0045] S4. Receive a query request and, based on any type of code carried in the request, output information about all other data entities associated with that code.
[0046] Furthermore, in step S4, in addition to receiving query requests, this method also includes risk warning and closed-loop handling functions: The system monitors four types of data entities and their relationships in real time. When abnormal data is detected, the system automatically generates corresponding event codes. It automatically triggers tiered alarms based on event type, generates rectification work orders, and pushes them to the corresponding responsible parties. It records data throughout the entire rectification process, binds the rectification results with the corresponding event codes, and stores them on the blockchain for evidence, thus completing the closed-loop processing.
[0047] This enables real-time identification and automatic handling of food safety risks, shifting from traditional post-event accountability to pre-event prevention and in-event control, thereby improving the speed of risk response.
[0048] Furthermore, in step S4, in addition to receiving query requests, this method also includes nutritional analysis and intervention functions: A pre-built nutritional database of dishes is constructed to store nutritional data for various dishes; the nutritional database includes the calorie, protein, fat, and carbohydrate content of each dish.
[0049] Based on the health record information linked to the diners' QR codes, recommended menus are generated. This health record information includes the student's age, gender, height, weight, allergens, and health goals, entered by parents through a parent-teacher collaboration mini-program and linked to the student's QR code. The system generates personalized healthy menus based on a nutritional database of dishes and the student's health record information, and pushes them to parents through the mini-program. For example, for overweight students, the system recommends low-calorie, low-fat dish combinations and notes that high-calorie dishes are not recommended.
[0050] By combining the food codes and meal weight data linked to the student's consumption records, a personal nutrition intake report is generated and sent to parents. When students pick up their meals, the system records the actual food items and weight. After the meal, the system compares the actual nutrient intake with the recommended intake, generating a nutrition analysis report which is then sent to parents. The report includes: today's protein, fat, and carbohydrate intake, a comparison with recommended values, an assessment of nutritional balance, and suggestions for dinner supplements. This achieves precise, individual-level nutrition management, transforming traditional, haphazard meal planning into personalized nutrition services.
[0051] Furthermore, in step S4, in addition to receiving query requests, this method also includes an anti-waste management function: The weight of food taken by diners and the weight remaining after the meal are recorded by intelligent weighing equipment; The weight of food taken and the remaining weight are linked to the corresponding dish codes and diners' codes to calculate the individual waste rate and the food waste rate; When an individual's waste rate exceeds a threshold consecutively, a reminder is sent, and a list of high-waste dishes is generated based on the food waste rate to guide recipe optimization.
[0052] In this embodiment, the system implements individual-level anti-waste management through RFID trays and intelligent weighing equipment. When students take their meals, the system records the weight of the food they take. When returning the food, the system records the remaining weight. The system automatically calculates the waste rate for each student, generating a waste behavior map. When a student's waste rate continuously exceeds a threshold, the system sends a reminder via a home-school co-governance mini-program, suggesting that students take only what they need. The system also simultaneously calculates the waste rate for each dish, generating a list of high-waste dishes, which is sent to cafeteria management personnel as a basis for menu adjustments.
[0053] Furthermore, in step S4, in addition to receiving query requests, this method also includes a dynamic risk classification function: A risk scoring model is constructed based on the compliance rate of morning inspections and the frequency of personnel violations associated with the human code, the pass rate of pesticide residues and the completeness rate of sample retention associated with the vegetable code, the online rate of equipment and the closed-loop rate of rectification associated with the institution code, and the frequency, severity and recidivism rate of events associated with the event code. Regularly calculate the risk score of canteens, classifying them into red, yellow, and green risk levels. The frequency of supervision and the priority of spot checks are dynamically adjusted based on the risk level. High-risk canteens are automatically added to the priority inspection list, and the system increases the frequency of inspections; low-risk canteens have their inspection frequency reduced. This achieves precise allocation of regulatory resources, transforming traditional random inspections into data-driven tiered supervision, thereby improving regulatory efficiency.
[0054] Example 2: like Figure 2 As shown, a public canteen food safety supervision system is used to implement the supervision method shown in Example 1, including: The terminal sensing layer includes multiple detection and monitoring devices used to collect raw data from four types of data entities. Details are shown in Table 1 below:
[0055] The central data layer, comprising a unified access module, a blockchain data platform, and an AI algorithm module, is used for data transmission and processing, relationship building, evidence storage, and data analysis. Specifically: (1) The unified access module provides data transmission processing and relationship building services, including the following functions: 1. Unified Device and System Access (IoT Access Layer): Access targets: RFID tags / readers, pesticide residue detectors, AI cameras, RFID sample retention cabinets, weighing / self-service catering lines, face recognition / card binding terminals, temperature and humidity / gas / smoke detectors and other sensing devices, as well as business systems such as WMS / ERP / QMS.
[0056] Access method: Through a unified access gateway, protocols such as HTTP / MQTT / RTSP / serial port to gateway are adapted to convert heterogeneous data into a unified "event standard" and enter the real-time event bus.
[0057] Device online health: Unified management of device registration, heartbeat monitoring, offline alarms, firmware and maintenance records, supporting the assessment of device online rate and data reporting rate by the regulatory side.
[0058] 2. Data Cleaning and Governance (ETL + Data Quality): Standardization: Field alignment, unit conversion, and unified format (one structure for detection / temperature control / weighing / consumption / behavioral events).
[0059] Quality rules: deduplication, threshold verification (pesticide residues, sample retention temperature, morning body temperature), missing field completion (automatic completion of SchoolID / CanteenID / PersonID, etc.).
[0060] Quality score (DQ): Scores are given for the completeness, accuracy, and timeliness of key topics. Data that does not meet the standards will not be included in AI training or regulatory metrics.
[0061] 3. Unified coding system (four types of primary codes, for example only): PersonID: A unified identity code for students / faculty / employees / supervisors, which can be mapped to student ID / employee ID / health certificate number.
[0062] DishID / MenuID / IngredientBatchID: A three-level binding system for dishes, meals, and ingredient batches, achieving "one code per meal, same source for the same meal".
[0063] Organization ID / School ID / Canteen ID / Vendor ID: Unique identifier across the entire supply chain from administrative level to school to canteen to supplier.
[0064] Event ID: A unified event number for pesticide residues, sample retention, morning inspection, violations, patrols, rectification, etc., which facilitates cross-school and cross-regional retrieval and closed-loop tracking.
[0065] 4. Theme Library & Indicator Library (Business Asset Layer): Theme library: Food batch theme (procurement → acceptance → pesticide residues → warehousing → outbound → recipe association), dish / meal theme (dish → batch → responsible person → sample retention), personnel theme (health certificate → morning check → training → violation), environment / equipment theme (temperature and humidity curve → equipment online → alarm), event theme (abnormality → rectification → review → cancellation).
[0066] Indicator library: pesticide residue pass rate, sample retention integrity rate, morning inspection compliance rate, behavior violation rate, rectification closure rate, equipment online rate, waste rate, inventory turnover days, etc., with unified management of caliber and version.
[0067] External output: Provides standard thematic data and unified metrics to the 3 platforms and various business systems through the data service API gateway.
[0068] (2) The blockchain data platform provides data storage and prevents tampering of key data. Its functions include: 1. Key Evidence on the Blockchain: Core compliance evidence such as pesticide residue test results, sample retention records (including temperature curves), morning inspection photos, and inspection and rectification records are hashed and uploaded to the blockchain to address regulatory concerns about companies' self-reported data. This includes, but is not limited to: Pesticide residue results are uploaded to the blockchain: This ensures the authenticity and accuracy of test data and prevents missed detections and false reporting.
[0069] Sample retention records are uploaded to the blockchain: ensuring that storage for 48 hours and temperature compliance are verifiable, and enabling rapid traceability in the event of a food safety incident.
[0070] Uploading morning health check photos to the blockchain: forming a reliable chain of evidence for personnel health records.
[0071] Inspection & Rectification on the Blockchain: The entire process of evidence collection, rectification, review, and cancellation is non-repudiable.
[0072] 2. Traceability and Evidence Preservation: For each dish, an immutable hash value is generated for key details such as the source of ingredients, the chef handling the dish, and disinfection / cleaning records, establishing a chain of responsibility "from batch to table." This includes, but is not limited to: Food source verification: Supplier qualifications, batch numbers, and test reports can be verified.
[0073] Processing responsibility record keeping: The menu / dish / batch is linked to the responsible person.
[0074] Disinfection and inspection evidence: Disinfection records and inspection evidence are authentic and complete.
[0075] (3) The AI algorithm module provides data analysis, including the following functions: 1. Dietary nutrition analysis: By leveraging AI technology, the Bill of Materials (BOM) of recipes is precisely broken down, and the detailed nutritional components of each dish are calculated. Through big data analysis and machine learning models, raw data is transformed into actionable insights, providing users with intelligent services throughout the entire process from evaluation to optimization.
[0076] Nutrition Report: AI algorithms connect to authoritative nutrition databases to automatically calculate and generate quantitative reports containing dozens of nutritional indicators (such as calories, protein, fat, carbohydrates, vitamins, minerals, dietary fiber, etc.) based on the recipe's Bill of Materials (BOM).
[0077] Personal profile: Based on users' long-term dietary data, combined with their voluntarily provided demographic information (such as age and gender), physiological indicators (such as height and weight), health goals (such as fat loss, muscle gain, and blood sugar control), dietary habits and taboos, a dynamically updated personal nutritional profile is constructed using machine learning models.
[0078] Meal Adjustment: Based on issues identified in the "Nutrition Report" and needs defined in the "Personal Profile," constraint satisfaction algorithms and optimization models are used to generate real-time, personalized meal adjustment plans for each user. Alternatively, based on broader sales data, dietary optimization can be performed for the entire workforce.
[0079] 2. Anomaly Alarm Engine: Subscribe to key events / indicators in the middle platform in real time, and issue alerts and promote rectification and closure upon detecting anomalies.
[0080] Food safety alerts: Sample retention cabinet temperature >10℃, pesticide residue exceeding standards / untested entry into storage, abnormal body temperature during morning inspection or missed inspection before starting work, cold storage exceeding threshold / power outage, etc.
[0081] Behavioral alerts: AI cameras can detect violations such as not wearing a hat / mask, smoking, using a mobile phone, strangers entering, rodent infestation / foreign object intrusion, and leaving one's post without permission.
[0082] Closed-loop processing: Alarm → Order dispatch → Rectification → Review → Account closure → On-chain evidence storage.
[0083] 3. Risk scoring model (school / cafeteria level): Based on indicators such as pesticide residues, sample retention, morning inspection, behavioral violations, rectification time, and equipment online rate, along with event frequency, severity, and recidivism rate, the system outputs a school / canteen risk index (0-100) and a red, yellow, and green classification, and provides explanations for the main risk factors to support the regulatory authorities' risk heat map and red / black list.
[0084] 4. Prediction Model: Waste prediction: Combining data on weighing and sales with leftover food, predict the waste rate of future meals / dishes and provide a list of high-waste dishes.
[0085] Procurement demand forecasting: Combining customer flow, menu / BOM, inventory and expiration date, outputting recommended procurement quantities and replenishment times to guide precise meal preparation.
[0086] Risk trend prediction: Based on historical risk indices and violation trends, high-risk windows can be identified in advance to guide key inspections.
[0087] The platform application layer includes a smart supervision platform for regulatory authorities, a traceability platform for canteen operators, and a home-school co-governance platform for the public, providing corresponding business functions and query portals for their respective roles. Among these: (1) A smart supervision platform, designed for collaborative departments such as the Food Safety Office, Education Bureau, Market Supervision Administration, and Health Commission. Its functions include: 1. Tiered supervision: Risk Heatmap: Based on an AI risk scoring model, it outputs red, yellow, and green levels for SchoolID / CanteenID, with city, school, and location indicators for provinces, districts, and towns.
[0088] Automatically generated red and black lists: real-time dynamic ranking based on indicators such as severity of violations, frequency, rectification time, and equipment online rate.
[0089] Priority recommendation for spot checks: The system provides a "list of key spot checks this week" and an explanation of the reasons based on risk trend predictions.
[0090] 2. Collaborative enforcement (online task assignment, time-limited rectification, and on-chain case closure): Automatically assign rectification tasks: sourced from a database of events such as excessive pesticide residues, abnormal sample retention, behavioral violations, and inspection issues; generate "rectification work orders" with one click.
[0091] Time-limited rectification and review: Schools / enterprises upload rectification photos / videos / records, and regulators conduct remote reviews.
[0092] Account cancellation and evidence preservation: Evidence before and after rectification is generated and uploaded to the blockchain to ensure that "rectification is genuine, the process is traceable, and responsibility cannot be denied".
[0093] 3. Full-chain supervision of enterprises / personnel / foods (assetization of supervised entities): Enterprise Archives: Complete archives of schools / canteens / catering companies within the jurisdiction, including license status, contract information, and equipment coverage.
[0094] Employee Health and Training Record Database: Automatically generates PersonID health certificates, morning check compliance, and violation records based on morning check machine / training and examination data.
[0095] Food and supplier supervision: Recipe-batch-supplier linkage, supplier blacklist / access score linked to procurement supervision.
[0096] (2) A traceability platform for canteens / catering businesses, such as school kitchen managers, catering companies, canteen contractors, warehouse managers / chefs / quality inspectors, etc. Functions include: 1. Food Management and Traceability (Automatic Linking from Recipe to Batch): Daily recipe upload / meal planning: Generate menu codes and automatically retrieve the daily batch of ingredients.
[0097] Recipe-Batch Binding: Plates and dishes are automatically linked, forming "one code per meal, same source for the same meal".
[0098] External traceability output: Generate traceability QR code with one click (for verification by home and school / supervisory departments).
[0099] 2. Temperature, humidity, and equipment monitoring (key risk points are controllable in real time): Equipment online and health dashboard: online rate of sample storage cabinets / cold storage / weighing lines / pesticide residue meters / cameras, fault dispatch, maintenance records.
[0100] Environmental and temperature control monitoring: Real-time display of temperature curves in cold storage, processing room, and sample retention cabinet; automatic alarm push to mobile device when thresholds are exceeded.
[0101] Abnormal freezing strategy: Batches exceeding the temperature limit will be automatically frozen and prohibited from being issued or shipped, to avoid "processing with defects".
[0102] 3. Pesticide residue testing, sample retention, morning inspection, and training (automated compliance record keeping): Closed-loop rapid pesticide residue testing: arrival of goods → generation of testing work order → return of results → release of qualified goods / freezing of goods exceeding the standard → upload of results to the blockchain.
[0103] Sample retention closed loop: Recipe automatically generates sample retention task → Sample retention cabinet is scanned / RFID registered → Temperature control curve is uploaded to the blockchain → Expiration reminder for destruction.
[0104] Personnel morning inspection closed loop: those who fail the morning inspection are automatically locked out of their posts and not allowed to work; morning inspection evidence is uploaded to the blockchain.
[0105] Food safety training and assessment: job-level question bank, monthly assessment, retraining after violations; results are uploaded to the blockchain for regulatory spot checks.
[0106] (3) A home-school co-governance platform, accessible to students' parents, school parent committees, and the general public (visible according to access permissions). Functions include: 1. Transparent kitchen (making key risk points transparent): Mobile live streaming / replay: Parents can view real-time footage or recorded broadcasts of key points such as preliminary processing, cooking, washing and disinfection, and sample retention.
[0107] Risk event linkage alerts: If a violation of behavior or temperature control exceeding the threshold is triggered, parents can see the status "processed / rectified" on the parent's end, enhancing trust.
[0108] 2. Daily food traceability (every meal is traceable): Menu and dish details: Displays the dishes of the day based on dish codes.
[0109] One code per meal for traceability: Click on a dish to view the batch number of raw materials, place of origin, supplier, pesticide residue results, and sample retention records.
[0110] Blockchain verification: Parents can verify key evidence such as pesticide residues, samples, and morning tests with one click and see the "credible / abnormal" results.
[0111] 3. AI-powered Healthy Diet Report (Eating Healthily): Data source: Personal intake and consumption details generated by intelligent weighing and settlement station + facial recognition payment terminal.
[0112] Report content: Weekly / monthly trends in calories, protein, fat, carbohydrates, and the proportion of vegetables / meat; allergen / dietary restrictions.
[0113] Achievement Tips: Based on the nutritional standards for students' age groups, provide simple and understandable conclusions and suggestions such as "too oily / too salty / insufficient vegetables".
[0114] 4. Feedback and Supervision (Parental Participation in the Closed-Loop Governance): Feedback / Complaint Portal: Rate or submit complaints about food, ambiance, and service online.
[0115] The closed-loop process is visible: complaints automatically flow into the school / supervisory processing chain, and parents can track the processing progress and results.
[0116] High-risk cases are directly escalated to regulatory oversight: serious complaints or multiple concentrated complaints are automatically upgraded to inspection tasks.
[0117] The technical solutions described in the embodiments of this application above have at least the following technical effects or advantages: 1. Complete evidence chain: The person code, dish code, organization code, and event code are interconnected, and a complete evidence chain can be obtained from any dimension, solving the problem of data silos in traditional systems.
[0118] 2. Highly efficient traceability: In the event of a food safety incident, the system quickly outputs a complete chain of evidence, eliminating the need for manual review of records or phone inquiries, thus significantly improving traceability efficiency.
[0119] 3. Data trustworthiness: Key data is stored on the blockchain and cannot be tampered with; the encoding includes a check bit, making tampering easy to detect.
[0120] 4. Clear responsibility: All operations are recorded and linked, and the determination of responsibility is based on evidence, avoiding shirking responsibility and disputes.
[0121] 5. Prevention First: Automatic early warning for abnormal morning inspections, automatic tracking of pesticide residue exceeding standards, and automatic alarm for abnormal sample retention cabinets, realizing the transformation from passive response to proactive prevention.
[0122] 6. Refined Management: Individual-level nutrition analysis and anti-waste management enable a shift from a "one-size-fits-all" approach to a "one-person-one-policy" refined service.
[0123] 7. Intelligent supervision: The risk scoring model automatically classifies risks and dynamically adjusts the frequency of supervision to improve the efficiency of supervision resource utilization.
[0124] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for supervising food safety in public canteens, characterized in that, Includes the following steps: S1. For the four data entities in the operation of public canteens—personnel, food, organization, and events—formulate corresponding coding rules for personnel codes, food codes, organization codes, and event codes respectively. S2. Collect data in real time to generate corresponding codes, and establish the association between the dish code and the person code, organization code, and event code using the dish code as the connection node; S3. Store the four types of data entities and their corresponding codes and relationships in a unified manner, and perform blockchain notarization on some of the related data; S4. Receive a query request and output all data entity information associated with the arbitrary code carried in the request.
2. The regulatory method according to claim 1, characterized in that: In step S1: The person code includes a type identifier, timestamp, organization code, serial number, and check digit, and is used to identify employees, supervisors, or diners. The menu code includes a raw material batch code, a dish code, and a meal code, which respectively identify the batch of ingredients, a single dish, and a specific meal. The raw material batch code includes a type identifier, a timestamp, a supplier code, a serial number, and a check digit; the dish code includes a type identifier, a timestamp, a canteen code, a serial number, and a check digit; and the meal code includes a type identifier, a timestamp, a canteen code, a meal code, and a check digit. The organization code includes a type identifier, subtype, organization number, and check digit, which is used to identify the supplier, canteen, regulatory unit, or equipment entity. The event code includes a type identifier, a timestamp, an event type, a serial number, and a check digit, which are used to identify the corresponding event.
3. The regulatory method according to claim 2, characterized in that: In step S2, predefined association rules are used to automatically perform the binding operation when new data is generated. These association rules include: Morning check abnormality rules: When abnormal data is collected during the morning check of personnel, the person code is automatically bound to the event code, and the person code is marked as a risk status; Operating rules for personnel at risk: When personnel at risk handle ingredients, their personal codes will be automatically linked to the batch codes of the raw materials, and the personal codes of personnel at risk will be automatically associated when the dish codes are generated; Anomaly detection rules: When an ingredient is detected as abnormal, the batch code of the ingredient is automatically bound to the event code and the supplier organization code, and the batch of ingredient is marked as abnormal. Sample retention record rules: When a sample is placed in the sample retention cabinet, the dish code is automatically bound to the sample retention event code, the sample retention personnel code, and the sample retention cabinet organization code; Consumption record rules: When a student picks up a meal, the student's ID is automatically linked to the dish's ID, generating a consumption event code.
4. The regulatory method according to claim 1, characterized in that: It also includes risk warning and closed-loop handling procedures: Real-time monitoring of four types of data entities and their relationships; when abnormal data is detected, corresponding event codes are automatically generated. Automatically trigger tiered alarms based on event type, simultaneously generate rectification work orders and push them to the corresponding responsible parties; Record the data of the entire rectification process, bind the rectification results with the corresponding event codes, and store them on the blockchain to complete the closed-loop processing.
5. The regulatory method according to claim 1, characterized in that: It also includes nutritional analysis and intervention steps: A pre-built nutritional database of dishes is used to store nutritional data for various dishes. Based on the health record information associated with the diners' QR codes, a recommended menu is generated. By combining the food codes and meal weight data associated with the consumption records, a personal nutrition intake report is generated and pushed to the user.
6. The regulatory method according to claim 1, characterized in that: It also includes anti-waste management steps: The weight of food taken by diners and the weight remaining after the meal are recorded by intelligent weighing equipment; The weight of food taken and the remaining weight are linked to the corresponding dish codes and diners' codes to calculate the individual waste rate and the food waste rate; When an individual's waste rate exceeds a threshold consecutively, a reminder is sent, and a list of high-waste dishes is generated based on the food waste rate to guide recipe optimization.
7. The regulatory method according to claim 1, characterized in that: It also includes a dynamic risk grading step: A risk scoring model is constructed based on the compliance rate of morning inspections and the frequency of personnel violations associated with the human code, the pass rate of pesticide residues and the completeness rate of sample retention associated with the vegetable code, the online rate of equipment and the closed-loop rate of rectification associated with the institution code, and the frequency, severity and recidivism rate of events associated with the event code. Regularly calculate the risk score of the canteen and classify it into red, yellow and green risk levels. Adjust the frequency of supervision and the priority of spot checks dynamically according to the risk level.
8. A public canteen food safety supervision system, characterized in that, The regulatory method described in any one of claims 1-7 includes: The terminal perception layer includes multiple detection and monitoring devices used to collect raw data of four types of data entities: personnel, food, institutions, and events. The central data layer includes a unified access module, a blockchain data platform, and an AI algorithm module, which are used to realize data transmission processing, relationship building, evidence storage, and data analysis. The platform application layer includes a smart supervision platform for regulatory authorities, a traceability platform for canteen operators, and a home-school co-governance platform for the public, which provides business functions and query portals for the corresponding roles.