Food material recognition method and system based on online closed-loop optimization of AI model, and medium
Through an AI model system optimized in an online closed loop, an automated closed-loop process for material identification in the food processing industry has been achieved. This solves the problems of rapid material adaptation and identification complexity, reduces data annotation costs, and improves identification efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI XIXI INTELLIGENT TECH CO LTD
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, material identification models in the food processing industry are difficult to adapt quickly to changes in material categories. The identification process is complex and lacks an automated closed-loop process, resulting in high data labeling costs and low efficiency, which cannot meet the needs for high efficiency, low cost, and rapid response.
An online closed-loop optimization system based on AI models is constructed. Multimodal data is collected through edge computing devices, and the final annotation information is formed by combining human intervention. The server automatically builds training datasets and updates models, realizing online self-iteration and deployment of models, forming an automated closed-loop process from data collection, annotation to deployment.
This enables the model to quickly adapt to changes in materials, reduces data annotation costs, improves recognition efficiency and accuracy, enhances the intelligence level of the production line, and shortens the launch and iteration cycle of new models.
Smart Images

Figure CN122157241A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, system and medium for food material identification based on online closed-loop optimization of an AI model. Background Technology
[0002] In automated production fields, such as the food processing industry, artificial intelligence models, especially visual recognition models, are widely used in product quality inspection, sorting, and weight estimation. However, the application of existing technologies faces many challenges.
[0003] First, many industries are characterized by rapid updates and a wide variety of materials. For example, in the food processing industry, menus or product combinations may change quarterly or even weekly. This makes it difficult for pre-trained general-purpose AI models to quickly adapt to new materials; once new materials appear, the model's performance will significantly decline, or even fail.
[0004] Secondly, many products, especially non-standard products such as food, have extremely complex attributes, making them difficult to identify. Unlike industrial standard parts, the identification of these products requires not only consideration of color and size, but also a comprehensive judgment of multiple attributes such as weight, freshness, shape, and arrangement, which places high demands on data samples and model capabilities.
[0005] More importantly, in existing technologies, the collection of production data and the labeling of model training data are usually separate processes. While cameras, scales, and other equipment on the production line can collect multi-source data such as images and weights in real time, the corresponding labels, such as "qualified" or "unqualified," often need to be obtained through manual sampling or offline labeling afterward. Although some technical solutions propose that operators can locally confirm the model's recognition results to improve machine learning algorithms, this approach does not form an automated closed-loop process. It still relies on manual judgment to drive model updates, and data labeling is costly, inefficient, and fails to guarantee accurate matching between labels and real-time production data, creating "data silos." Furthermore, this solution lacks a complete mechanism for automatically triggering training based on production conditions (such as model performance degradation or the introduction of new materials) and for automatically and safely deploying new models to the production line, failing to meet the urgent needs of modern production for high efficiency, low cost, and rapid response.
[0006] Therefore, there is an urgent need for a material identification method in the field of automated production (especially in the food processing industry) to solve the above pain points. Summary of the Invention
[0007] To address the shortcomings of existing technologies, the purpose of this invention is to provide a food material identification method, system, and medium based on online closed-loop optimization using an AI model.
[0008] The present invention provides a food material identification method based on online closed-loop optimization using an AI model, applicable to a system including edge computing devices and a server-side processing system, comprising the following steps: Multimodal data of food materials are collected on the edge computing device. The AI model currently running on the edge computing device is used to perform online reasoning on the multimodal data to generate preliminary results, and then combined with human intervention to form the final annotation information; The data sample containing the multimodal data and the final annotation information is reported to the server-side processing system; The server-side processing system automatically constructs the training dataset based on a preset strategy; When the server-side processing system responds to a preset automatic trigger condition, it automatically performs model training using the training dataset to obtain an updated AI model; and The updated AI model is sent to the edge computing device, and after online verification on the edge computing device, it replaces the currently running AI model. The updated AI is used to identify multimodal data of food materials and output the identification results.
[0009] Preferably, the online inference to generate preliminary results further includes generating corresponding confidence levels; Furthermore, the process of combining manual intervention to form the final annotation information includes: when the confidence level is lower than a preset threshold or meets a preset sampling rule, triggering a manual review task on the human-computer interaction interface of the edge computing device to form the final annotation information based on the manual review results; when the conditions for triggering the manual review task are not met, the preliminary results are directly used as the final annotation information.
[0010] Preferably, the preset strategy includes at least one of the following: Select based on the SKU type of the food ingredients; The images in the multimodal data are filtered based on their sharpness scores, and data samples with sharpness scores below a preset sharpness threshold are discarded; or Based on the results of manual correction, the corresponding data samples are preferentially included in the training dataset.
[0011] Preferably, the preset automatic triggering conditions include at least one of the following: The number of samples in the training dataset reaches a preset threshold. The performance metrics of the currently running AI model are detected to be below a preset threshold; or Instructions to bring new materials online have been received.
[0012] Preferably, the online verification includes: The updated AI model and the currently running AI model are run in parallel on the edge computing device. If the preset performance indicators of the updated AI model are confirmed to be better than those of the currently running AI model, the replacement is performed; otherwise, the replacement is not performed.
[0013] Preferably, the model training process further includes: Training will automatically terminate when a preset stopping condition is met. The stopping condition includes at least one of the following: model performance convergence, exceeding the resource budget, or detection of performance degradation.
[0014] Preferably, it further includes: By establishing a mapping relationship between the food materials, the AI model types associated with the food materials, and the edge computing devices, automatic matching and management of the food materials, AI models, and edge computing devices can be achieved.
[0015] A food material identification system based on online closed-loop optimization using an AI model, according to the present invention, includes: Edge computing devices, configured for: Collect multimodal data of food materials; The currently running AI model is used to perform online inference on the multimodal data to generate preliminary results, and then combined with human intervention to form the final annotation information; Report data samples containing the multimodal data and the final annotation information; and After receiving the updated AI model, online verification is performed and the currently running AI model is replaced. Based on the updated AI, multimodal data of food materials is identified, and the identification results are output. The server-side processing system, which is communicatively connected to the edge computing device, is configured for: Receive the data sample; Automatically construct training datasets based on preset strategies; Upon responding to a preset automatic triggering condition, the model is automatically trained using the training dataset to obtain the updated AI model; and The updated AI model is then sent to the edge computing device.
[0016] Preferably, the edge computing device further includes a human-computer interaction interface; The edge computing device is configured to combine human intervention, specifically by triggering a manual review task on the human-computer interaction interface when the confidence level of the preliminary result generated by the online inference is lower than a preset threshold or meets a preset sampling rule; and the edge computing device is also configured to use the preliminary result as the final annotation information when the conditions for triggering the manual review task are not met.
[0017] According to the present invention, a computer-readable storage medium is provided thereon storing a computer program, which, when executed by a processor, implements the food material identification method based on AI model online closed-loop optimization.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. This application constructs an automated closed-loop process from data collection, annotation, training to deployment, enabling the AI model to continuously learn and self-optimize during the production process. This allows it to quickly adapt to frequently changing materials in the industry, shortening the deployment and iteration cycle of new models from weeks to days, achieving online self-iteration and rapid response. The rapidly self-iterable AI model is suitable for material recognition in the food processing industry, solving the problem of model failure caused by frequent material changes, and significantly improving model training efficiency and recognition performance.
[0019] 2. This application adopts an online annotation mode of "automatic reasoning + lightweight manual review" to seamlessly integrate data annotation into the production process, replacing the traditional inefficient and costly offline manual annotation. This not only ensures the real-time performance and accuracy of data and labels, but also automatically and efficiently mines high-value training samples, significantly reducing data annotation costs and improving data quality.
[0020] 3. This application establishes a highly automated model lifecycle management system by setting multiple conditions for automatically triggering training and an automatic stopping mechanism, as well as online verification and automatic switching deployment methods. This minimizes manual intervention and improves the intelligence level of the production line while ensuring the smoothness and safety of the model update process. Attached Figure Description
[0021] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the overall architecture of the AI model online closed-loop optimization system provided in the embodiments of this application; Figure 2 This is a schematic diagram illustrating the process of introducing new materials and initial deployment of the model in an embodiment of this application; Figure 3This is a schematic diagram of the closed-loop process of online self-iteration of the model in the embodiments of this application; Figure 4 A flowchart of the online closed-loop optimization method for AI models provided in this application embodiment.
[0022] Explanation of reference numerals in the attached figures: Detailed Implementation
[0023] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0024] Example 1 This embodiment provides a food material identification method and system based on online closed-loop optimization of an AI model. To better understand the technical solution of this application, the following will take the quality inspection task of checking whether the food in the meal box is complete and correctly arranged on an airline meal production line as an example to illustrate this application in detail. This embodiment aims to demonstrate a complete process from meal box data collection, online semi-automatic annotation, cloud-based automatic training to model closed-loop update, so as to achieve continuous self-optimization of the quality inspection model.
[0025] Please see Figure 1 This figure illustrates the overall architecture of the food material identification system based on AI model online closed-loop optimization provided in this application embodiment. As shown in the figure, the system can be logically divided into a platform service layer 10 and an edge execution layer 20. The platform service layer 10 can be deployed in the cloud or data center, mainly responsible for data processing, model training, and global management. Internally, it may include an intelligent production platform 11 for business management and a server-side processing system 12, which is the core of this application. Correspondingly, the edge execution layer 20 is deployed on the production site and consists of one or more edge computing devices, such as edge computing device A 21 and edge computing device B 22 shown in the figure. The edge computing devices are responsible for real-time data acquisition, model inference, and interaction with on-site personnel. It should be noted that the edge execution layer 20 and the platform service layer 10 are connected via a network, with an uplink data flow 100 for reporting data and a downlink control flow 200 for issuing instructions and models.
[0026] In the airline meal quality inspection scenario of this embodiment, as a specific implementation, the edge computing device A 21 can be an intelligent quality inspection station deployed at the end of the production line. This station may specifically include an industrial control computer with an embedded high-performance computing unit (such as an embedded computer containing a graphics processing unit), a high-definition industrial camera mounted above the production line, and a touch screen for on-site inspectors as a human-machine interface. The server-side processing system 12 is a software platform deployed in the cloud, possessing the capabilities for large-scale data storage, distributed computing, and full lifecycle management of models.
[0027] The following will combine Figure 1 and Figure 4 The working process of this embodiment will be described in detail. Figure 4 The overall flowchart of the online closed-loop optimization method for AI models provided in the embodiments of this application is shown.
[0028] The process begins with data acquisition step S100 on the production line. When a packaged airline meal box flows through the intelligent quality inspection station (i.e., edge computing device A21) via a conveyor belt, a sensor triggers an industrial camera to take a picture of the top of the meal box, thereby acquiring a high-resolution image. Understandably, if needed, other sensors working in conjunction with the camera (such as smart scales and barcode scanners) can simultaneously collect the meal box's weight data, batch information, etc. These multi-source heterogeneous data, including images, weights, and batch numbers, collected at the same time, are integrated into a unified data packet as multimodal data to be processed.
[0029] Subsequently, in step S200, the edge computing device A 21 utilizes its currently running AI model (e.g., a quality inspection model initially version V1.0) to perform online inference on the newly collected multimodal data. Specifically, the model receives the lunchbox image as input, analyzes the type, quantity, and layout of the dishes in the image through its internal convolutional neural network and other structures, and outputs a preliminary result. This preliminary result includes not only a preliminary judgment label (such as "qualified" or "suspected shortage of dishes"), but also a confidence score that quantifies the credibility of the judgment. For example, the model might output {"label": "qualified", "confidence": 0.98} or {"label": "suspected shortage of dishes", "confidence": 0.70}.
[0030] Next, in step S300, the system combines human intervention to form the final annotation information. It should be noted that this step does not always require human intervention, but is intelligently triggered according to preset human intervention rules. In one embodiment of this application, the rules can be set as follows: first, when the confidence level of the model inference is lower than a preset threshold (e.g., 95%), human review is triggered; second, human review is triggered according to a fixed sampling ratio (e.g., randomly selecting 1 lunchbox from every 100 lunchboxes) to verify the accuracy of high-confidence samples.
[0031] When a manual review is triggered, a review task will pop up on the human-machine interface (touchscreen display) of edge computing device A 21. Edge computing device 501 will send a "review request" to on-site personnel 503. This request is typically displayed on the interface as an image of the current meal box, highlighting areas that the model deems problematic. Based on the on-screen prompts and their own judgment, the on-site inspector will provide a review result by clicking buttons such as "Confirm Missing Food" or "Confirm Pass." This "confirmation result" returned by on-site personnel 503 is then received by edge computing device 501.
[0032] In other words, if the inference result of a lunchbox meets the rules for human intervention (e.g., the model judges it as "suspected to be missing vegetables," with a confidence level of 70%, below the 95% threshold), and the on-site inspector clicks the "Confirm Missing Vegetables" button on the interface, then "Confirm Missing Vegetables" becomes the final labeling information for that lunchbox. Conversely, if the model judges it as "qualified," with a confidence level of 98% (above the 95% threshold), and it is not selected by random sampling, the system will skip human review and directly adopt the model's output of "qualified" as the final labeling information for that lunchbox. This semi-automatic labeling mode, which prioritizes automatic inference and supplements it with human review, greatly reduces labeling costs while ensuring labeling accuracy and real-time performance.
[0033] In step S400, the edge computing device A 21 reports the processed data sample to the server processing system 12. The reported data sample is a structured data packet, which includes at least: the original multimodal data (such as a high-resolution image of a lunchbox), the preliminary results generated by the model (including preliminary labels and confidence levels), the final annotation information (whether from manual confirmation or direct adoption of model results), and other related metadata (such as the smallest inventory unit ID of the material, timestamp, device ID, production line number, etc.).
[0034] After receiving the reported data samples, the server-side processing system 12 proceeds to step S500, which automatically constructs a training dataset based on a preset strategy. The server-side processing system 12 internally houses a data lake to store data reported by all edge devices. The dataset construction module filters and organizes data from the data lake according to the strategy. As an optional implementation, a strategy can be set to automatically categorize all samples whose final annotation information was corrected from model errors by human intervention (e.g., the model judged them as "qualified" but a human confirmed they were "missing vegetables") into a dataset called "high-value negative samples." It is understood that these samples are of extremely high value for model improvement.
[0035] Subsequently, in step S600, the server-side processing system 12 continuously monitors various preset automatic triggering conditions to determine whether a new model training needs to be initiated. If the conditions are not met, the process can return to step S500 to continue accumulating data; if the conditions are met, it proceeds to the next step. In this embodiment, a simple triggering condition can be set: when the number of samples in the "high-value negative sample" dataset reaches a preset threshold (e.g., 200), model training is automatically triggered.
[0036] Once the triggering conditions are met, the process proceeds to step S700 to execute model training. The server-side processing system 12 utilizes its computing resources (such as multiple graphics processing unit clusters) and the "high-value negative sample" dataset constructed in step S500 to fine-tune or incrementally train the current online V1.0 model. The goal of the training process is to enable the new model to learn to identify previously misjudged samples, thereby improving its performance. After training is complete, the system obtains an updated AI model, such as version V1.1.
[0037] After the model is trained, it will not be deployed to the production environment immediately. First, the server-side processing system 12 will perform a series of offline evaluations on the new model V1.1, such as calculating its accuracy, recall and other metrics on the reserved test set, to ensure that its performance is not inferior to the old model V1.0.
[0038] After the evaluation is passed, proceed to step S800, where the updated AI model V1.1 is sent to the target edge computing device A21.
[0039] Finally, in step S900, after the new model is validated online on the edge computing device A 21, it replaces the old model. To ensure production stability and security, the new model V1.1 does not immediately take over production tasks after deployment, but first enters a "shadow mode" or parallel online validation phase. In this phase, for each lunchbox flowing through the production line, the old model V1.0 and the new model V1.1 will perform inference simultaneously. The results of V1.0 are used for actual production control, while the results of V1.1 are only recorded for comparison with the results of V1.0 and subsequent possible manual review results. This online validation phase can last for a period of time (e.g., one week). The server-side processing system 12 will continuously analyze and compare the data. If, during the validation period, it is confirmed that the comprehensive performance indicators of the new model V1.1 (such as accuracy on real production data, manual review rate, etc.) are significantly better than the old model V1.0, the system will automatically complete the switch and set V1.1 as the officially running model. Conversely, if the new model's performance is poor, the replacement will not be performed, and an alarm may be triggered to notify the developers to conduct analysis.
[0040] This completes a full online closed-loop optimization process for the model, from data collection, online annotation, automated training to secure deployment. Figure 3 As shown, this "processing-collection-reporting-training-distribution" cycle repeats continuously as production progresses, enabling the AI model to achieve online and automated self-iteration and continuous optimization. This allows it to quickly adapt to the quality inspection requirements of new packages, reduce the rate of manual re-inspection, and improve the accuracy and efficiency of overall quality inspection.
[0041] Example 2 Building upon the system architecture and basic processes of Example 1, this embodiment further elaborates on how the server-side processing system 12 intelligently and proactively determines when to initiate the model training process by monitoring various preset automatic triggering conditions, thereby making model maintenance more forward-looking and efficient. This embodiment takes the intelligent cutting and weight estimation scenario of fresh pork as an example.
[0042] In this scenario, edge computing devices are intelligent cutting stations deployed within the slaughtering and processing workshop. Equipped with cameras and electronic scales, these devices capture real-time images of pork pieces and determine their weight as workers cut the pork. The core task of the AI model is to estimate the weight based on the images or to assess the quality of the cutting process.
[0043] The server-side processing system 12 is internally configured with a multi-dimensional training trigger module, which continuously monitors data and metadata reported from all edge computing devices. In this embodiment, at least the following three types of automatic triggering conditions are configured: Firstly, the triggering condition is based on model performance degradation. This is a passive monitoring and response to the actual performance of the model in the production environment. The server-side processing system 12 continuously calculates and tracks the key performance indicators of the weight estimation model running on all online slicing workstations. These indicators may include "average confidence level" and "human correction rate". For example, the system can set a rule: when the average confidence level of all workstations' reported samples drops from the normal 96% to below 90% within a sliding window of the past 24 hours, or when the human correction rate (i.e., the proportion of samples whose human review results are inconsistent with the model's preliminary results) rises from the usual 2% to above 5%, the performance degradation triggering condition is met. This embodies the specific implementation of the condition "the performance indicators of the currently running AI model are detected to be below a preset threshold" as described in claim 4.
[0044] Secondly, there are triggering conditions based on the introduction of new materials. This is a proactive and forward-looking triggering mechanism. In the food processing industry, new product launches are usually planned. The production management system (which can be used as...) Figure 1 New material information will be pre-entered into the intelligent production platform 11 (a part of which is called "skin-on pork belly"), for example, it is planned to start producing a new minimum inventory unit, "skin-on pork belly," starting next week. This production instruction or material information can be synchronized to the server-side processing system 12. After receiving this "instruction for new material to go online," the server-side processing system 12 will immediately and automatically create a pre-training task. The instruction for this task may be: to filter all historical images and data samples related to "pork belly" and "pork skin" from the historical data lake, combine them into a new training set, and pre-train the model based on the existing model so that the model can learn in advance the visual features that "skin-on pork belly" may have. In this way, when the new material is officially put into production, the model deployed on the production line is already pre-warmed up and has a certain recognition ability, thereby greatly shortening the cold start and adaptation process of the model in the early stage of production. This reflects the specific implementation of the condition "receiving the instruction for new material to go online" as described in claim 4.
[0045] Third, the triggering condition is based on the accumulation of key samples. This mechanism focuses on addressing the most critical flaws in the model. In certain scenarios, some errors are unacceptable. For example, in quality inspection, a diseased piece of meat with lymph nodes might be misclassified as "qualified" with a high confidence level (e.g., confidence level greater than 98%). Such samples can be called "critical negative samples." The server-side processing system 12 can be configured with a specific strategy to collect these samples where the model made high-confidence errors and which were manually corrected. Simultaneously, a specific trigger can be set to immediately initiate a high-priority reinforcement training when these "critical negative samples" accumulate to a certain number in the database (this threshold is usually set relatively low, such as 50). This training will give these critical negative samples very high weights, forcing the model to correct its erroneous judgment logic. This mechanism ensures that the most serious flaws in the model are corrected as quickly as possible, guaranteeing production quality and food safety. This can be considered a special and more refined implementation of the requirement in claim 4 that "the sample size of the training dataset reaches a preset threshold."
[0046] Through the combined application of the aforementioned automatic triggering mechanisms, the system of this application achieves refined, intelligent, and proactive management of the model lifecycle. It can not only passively repair models after performance degradation but also proactively warm up models before new materials are deployed. Furthermore, it can address key defects affecting production quality in a targeted and rapid manner, thereby ensuring that the AI model maintains a high level of stability and reliability under varying production conditions.
[0047] Example 3 This embodiment, building upon embodiments 1 and 2, focuses on two key aspects within the server-side processing system 12: how to automatically construct high-quality training datasets using refined strategies, and how to implement an intelligent training halt mechanism during model training. Optimization of these two aspects aims to enhance the value of training data and maximize computational resource savings while ensuring model performance. This embodiment uses fruit (such as apples) grading and defect detection as its application scenario.
[0048] In this scenario, edge computing devices are deployed on the fruit sorting line. High-speed cameras capture images of each apple flowing over the conveyor belt from multiple angles. The AI model then needs to determine the apple's grade (e.g., first-grade, second-grade) and whether it has any defects (e.g., bruises, rot) based on the images.
[0049] First, regarding the automatic construction of datasets, the dataset management module of the server-side processing system 12 is configured with multiple automation strategies to dynamically and intelligently maintain multiple datasets for different purposes from the massive amounts of reported data. This embodies the preset strategy described in claim 3. As an optional implementation, the strategy may include: One strategy is to select based on the smallest unit type of the target material. For example, the system can automatically create and maintain a dataset A named "Red Fuji Apples," which automatically aggregates all data samples whose associated material ID is identified as "Red Fuji Apples" when the data is reported. Similarly, different datasets such as "Gala Apples" and "Green Apples" can be created. This method of dividing by material type ensures that the most relevant data can be used when training or fine-tuning models for specific varieties.
[0050] Another strategy is to filter data based on quality. For example, the system can automatically create a dataset B called the "fuzzy sample set," with the filtering rule being: automatically aggregating all data samples whose initial inference confidence is below a specific threshold (e.g., 75%). These low-confidence samples are typically "marginal" samples that the model struggles to distinguish. Collecting these samples for training helps improve the model's discriminative ability and robustness. Furthermore, data quality filtering can also include judging image sharpness. For instance, the system can calculate a sharpness score for each reported image and automatically discard images whose sharpness scores are below a preset threshold due to motion blur or focus issues, thus preventing low-quality images from contaminating the training set.
[0051] Another important strategy is to screen data based on correction results obtained through human intervention. The system can automatically create a dataset C called the "High-Value Error Correction Set," which specifically collects all data samples that have been corrected by on-site personnel through a human-computer interaction interface, especially those samples that the model misjudged (e.g., the model judged a first-level result as "qualified," but it was manually corrected to a "failed" defective result). These samples directly expose the knowledge blind spots of the current model and are the most valuable training data. When constructing training tasks, the system can be configured to prioritize the inclusion of samples from the "High-Value Error Correction Set" in training, and even assign them higher training weights.
[0052] Through the aforementioned automated and strategic dataset construction, the system no longer simply piles up all the data for training. Instead, it can intelligently combine the most efficient training data according to different objectives (such as improving the recognition rate of specific varieties, overcoming fuzzy samples, and correcting known errors), thereby enhancing the value of the training data.
[0053] Secondly, regarding the automatic stopping mechanism during model training, this embodies the stopping conditions described in claim 6. Traditional model training often requires manually setting a fixed number of training rounds, which may lead to undertraining or overtraining. The model training module of the server-side processing system 12 of this application is configured with a multi-dimensional automatic stopping mechanism to achieve effective control over computing resources.
[0054] The first stopping condition is based on model performance convergence. During training, the system monitors the model's performance metrics on independent validation sets in real time. If the improvement in this metric is less than a very small threshold (e.g., 0.05%) for several consecutive epochs (e.g., 5 consecutive epochs), the system determines that the model performance has plateaued. At this point, the performance convergence stopping mechanism is triggered, the system automatically terminates training, and saves the model version from the epoch with the best performance.
[0055] The second stopping condition is based on resource budget exhaustion. To control costs, operations personnel can set a resource budget for each automatically triggered training task, such as "2 graphics processing unit hours". The training module will keep track of the time in real time while executing the task. Once the cumulative computing resources used exceed the budget, training will be forcibly stopped regardless of whether the model performance has converged, to ensure that the cost of a single model iteration is controllable.
[0056] The third stopping condition is based on performance degradation detection, i.e., preventing overfitting. During training, the model's loss on the training set usually decreases continuously. However, if its loss on the validation set, after a continuous decrease, starts to increase continuously (e.g., increasing for three consecutive epochs), this is usually a signal that the model is starting to overfit. Once this situation is detected, the system immediately stops training and rolls back to the model version with the lowest validation set loss as the optimal model.
[0057] Through the above mechanism, training costs can be significantly reduced while ensuring model performance, thus achieving effective utilization of computing resources.
[0058] Example 4 This embodiment focuses on how to establish semantic relationships between materials, models, tasks, and equipment, and the flexible and intelligent model distribution and deployment paths achieved based on this. This not only solves the problem of "whether there are new models," but also the intelligent scheduling problem of "what new models, who should receive them, and when." This embodiment uses a cutting, weighing, and mixing production line containing multiple types of fish (such as ribbonfish and squid) as a scenario.
[0059] In this scenario, the edge execution layer 20 may contain a variety of edge computing devices with different functions, such as edge computing device A 21 responsible for cutting and edge computing device B 22 responsible for weighing.
[0060] To achieve intelligent linkage of production factors, the server-side processing system 12 internally constructs and maintains a semantic knowledge base or relational mapping relationship. This knowledge base defines the core entities in the production process and their interrelationships, which embodies the relational mapping relationship described in claim 9. Specifically, the knowledge base may contain the following definitions: 1. Material definition: Create a digital identity for each physical material and describe its attributes. For example: {Material ID: 'F001', Name: 'ribbonfish segment', Visual features: [...], Associated task type: ['cutting', 'weighing']}. 2. AI model type and capability definition: Define different types of AI models and their functions, where the associated object is a higher-level "AI model type" rather than a specific model instance. For example: {Model type: 'weighing model', Capability description: 'estimate weight from image', Applicable material types: ['fish', 'meat']}. Specific model instances are associated with model types, such as {Model ID: 'WM-v2', Version: 'v2', Type: 'Weighing Model', Applicable Materials: ['F001', 'F002']}. 3. Edge Computing Device Capability Definition: Describes the functionality and current status of each edge computing device. For example: {Device ID: 'S07', Device Type: 'Weighing Station', Deployed Model: ['WM-v1'], Supported Task Type: ['Weighing']}.
[0061] Based on this semantic association mapping, the system can achieve highly flexible and automated model distribution and deployment. This application provides multiple paths for distributing updated AI models to edge computing devices: The first path is platform push. This is the most direct method. The system administrator can manually select one or more edge computing devices on the management interface of the server-side processing system 12, then select an updated AI model from the model repository and perform the push operation. The server-side processing system 12 then sends the model file or its download address to the designated device through downlink control flow 200.
[0062] The second approach is task-based updates. This is a "pull" update model that tightly binds model updates to production tasks. For example, when the intelligent production platform 11 issues a new production task to the weighing station S07, the data structure of the task instruction, in addition to material information and quantity, may also include information on the recommended AI model for executing the task. When the edge computing device S07 receives and parses the task, it checks the locally deployed model list. If it finds that the model version recommended for the task is higher than the local version, S07 will automatically download the new model from the model repository of the server-side processing system 12 according to the download address provided in the task instruction, thereby achieving on-demand and real-time deployment of the model.
[0063] The third path is device subscription. This is a more automated "push" mode. Edge computing device S07 can "subscribe" to certain types of model updates from server-side processing system 12 during its initial configuration. For example, device S07 can subscribe to all updates for "model type" "weighing model". Subsequently, whenever a new, evaluated "weighing model" is published to the model repository in server-side processing system 12, the subscription system is triggered, automatically pushing the update notification or the model itself to all devices that have subscribed to that type.
[0064] Through the aforementioned semantic associations and multiple deployment paths, the system achieves decoupling and intelligent linkage between production elements (materials, tasks, models, and equipment), greatly improving the flexibility and automation of production scheduling.
[0065] Furthermore, this embodiment also follows the online verification mechanism described in Embodiment 1 to ensure the security of model updates. Regardless of the path through which the new model is distributed, it will first enter a parallel online verification phase before officially replacing the old model. The system will compare the performance of the new and old models on real production data streams, and will only execute the replacement after confirming that the preset performance indicators of the updated AI model are better than the currently running AI model. If the performance is comparable or worse, the replacement will not be executed, thus providing a solid security barrier for the continuity and stability of production. This provides detailed implementation details for claim 5.
[0066] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A food material identification method based on online closed-loop optimization of an AI model, applied to a system including edge computing devices and server-side processing systems, characterized in that... Includes the following steps: Multimodal data of food materials are collected on the edge computing device. The AI model currently running on the edge computing device is used to perform online reasoning on the multimodal data to generate preliminary results, and then combined with human intervention to form the final annotation information; The data sample containing the multimodal data and the final annotation information is reported to the server-side processing system; The server-side processing system automatically constructs the training dataset based on a preset strategy; When the server-side processing system responds to a preset automatic trigger condition, it automatically performs model training using the training dataset to obtain an updated AI model; and The updated AI model is sent to the edge computing device, and after online verification on the edge computing device, it replaces the currently running AI model. The updated AI model is used to identify multimodal data of food materials and output the identification results.
2. The food material identification method based on online closed-loop optimization of an AI model according to claim 1, characterized in that, The online inference process generates preliminary results, and also includes generating corresponding confidence levels; Furthermore, the step of combining manual intervention to form the final annotation information includes: when the confidence level is lower than a preset threshold or meets a preset sampling rule, triggering a manual review task on the human-computer interaction interface of the edge computing device to form the final annotation information based on the manual review results; If the conditions for triggering a manual review task are not met, the preliminary results will be directly used as the final annotation information.
3. The food material identification method based on online closed-loop optimization of the AI model according to claim 1 or 2, characterized in that, The preset strategy includes at least one of the following: Select based on the SKU type of the food ingredients; The images in the multimodal data are filtered based on their sharpness scores, and data samples with sharpness scores below a preset sharpness threshold are discarded; or Based on the results of manual correction, the corresponding data samples are preferentially included in the training dataset.
4. The food material identification method based on online closed-loop optimization of an AI model according to claim 1 or 2, characterized in that, The preset automatic triggering conditions include at least one of the following: The number of samples in the training dataset reaches a preset threshold. The performance metrics of the currently running AI model are detected to be below a preset threshold; or Instructions to bring new materials online have been received.
5. The food material identification method based on online closed-loop optimization of an AI model according to claim 1, characterized in that, The online verification includes: The updated AI model and the currently running AI model are run in parallel on the edge computing device. If the preset performance indicators of the updated AI model are confirmed to be better than those of the currently running AI model, the replacement is performed; otherwise, the replacement is not performed.
6. The food material identification method based on online closed-loop optimization of an AI model according to claim 1, characterized in that, The model training process also includes: Training will automatically terminate when a preset stopping condition is met. The stopping condition includes at least one of the following: model performance convergence, exceeding the resource budget, or detection of performance degradation.
7. The food material identification method based on online closed-loop optimization of an AI model according to claim 1, characterized in that, Also includes: By establishing a mapping relationship between the food materials, the AI model types associated with the food materials, and the edge computing devices, automatic matching and management of the food materials, AI models, and edge computing devices can be achieved.
8. A food material identification system based on online closed-loop optimization of an AI model, characterized in that, include: Edge computing devices, configured for: Collect multimodal data of food materials; The currently running AI model is used to perform online inference on the multimodal data to generate preliminary results, and then combined with human intervention to form the final annotation information; Report a data sample containing the multimodal data and the final annotation information; as well as After receiving the updated AI model, it performs online verification and replaces the currently running AI model. Based on the updated AI, it identifies the multimodal data of food materials and outputs the identification results. as well as The server-side processing system, which is communicatively connected to the edge computing device, is configured for: Receive the data sample; Automatically construct training datasets based on preset strategies; When a preset automatic triggering condition is met, the model is automatically trained using the training dataset to obtain the updated AI model. as well as The updated AI model is then sent to the edge computing device.
9. The food material identification system based on online closed-loop optimization of an AI model according to claim 8, characterized in that, The edge computing device also includes a human-computer interaction interface; The edge computing device is configured to combine human intervention, specifically by triggering a manual review task on the human-computer interaction interface when the confidence level of the preliminary result generated by the online inference is lower than a preset threshold or meets a preset sampling rule; and the edge computing device is also configured to use the preliminary result as the final annotation information when the conditions for triggering the manual review task are not met.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the food material identification method based on online closed-loop optimization of an AI model as described in any one of claims 1, 2, 5, or 6.