A collaborative learning method and system based on edge sample intelligent grading and cloud intelligent decision

By employing a collaborative learning approach that combines intelligent grading of edge samples with intelligent decision-making in the cloud, the system addresses the issues of performance degradation and high maintenance costs of AI models in specific scenarios. This approach enables autonomous evolution and efficient iteration, thereby enhancing the robustness and automation of the system.

CN121170549BActive Publication Date: 2026-02-10QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511706026.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-10
Estimated Expiration
2045-11-20

AI Technical Summary

Technical Problem

In cloud-edge collaborative scenarios, AI models have poor scene adaptability, low evolution efficiency, and high costs. Existing technologies lack intelligent management, resulting in performance degradation and excessive maintenance costs for models in specific scenarios.

Method used

By employing a collaborative learning approach that combines intelligent classification of edge samples with intelligent decision-making in the cloud, difficult samples are screened and classified in real time. The cloud then makes intelligent training decisions based on the global state, enabling online updates and optimization of the model.

Benefits of technology

It enables AI models to autonomously evolve and iterate efficiently in specific scenarios, reduces data transmission and storage costs, improves the robustness and automation level of the system, and reduces reliance on manual operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121170549B_ABST
    Figure CN121170549B_ABST
Patent Text Reader

Abstract

The application relates to a collaborative learning method and system based on edge sample intelligent grading and cloud intelligent decision-making, and belongs to the technical field of edge intelligence and big data processing, and comprises the following steps: (1) AI model real-time inference and difficult sample preliminary screening; (2) edge end sample intelligent grading; (3) data uploading with priority labels; (4) cloud server state aggregation; (5) running cloud intelligent training decision algorithm; (6) model on-demand training and version management; and (7) model online updating and closed-loop feedback. The application realizes scene self-adaptation and self-evolution of an AI model, significantly improves the efficiency and economy of model iteration, enhances the robustness and rapid response capability of the system, and improves the automation and intelligent level of the system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of edge intelligence and big data processing, and in particular to a collaborative learning method and system based on edge sample intelligent grading and cloud intelligent decision-making. BACKGROUND

[0002] With the rapid development of artificial intelligence technology and the wide application of deep learning models, intelligent systems represented by real-time video analysis have played a crucial role in fields such as security monitoring, smart cities, and industrial automation. In order to meet the low-latency processing needs of massive video data, cloud-edge collaboration has become the mainstream computing architecture. Under this architecture, AI inference tasks are usually deployed on edge computing nodes close to data sources to achieve fast response, while model training and optimization tasks are undertaken by cloud servers with more resources.

[0003] However, in actual cloud-edge collaboration application scenarios, the full life cycle management of AI models (such as YOLO target detection models) deployed on the edge faces serious challenges. Typically, these models are pre-trained on general, standardized datasets, and although they have some generalization ability, their performance often declines significantly due to "scenario drift" after being deployed to specific, complex real-world scenarios. This approach is difficult to adapt to the dynamics and complexity of real-world scenarios, leading to the following problems:

[0004] (1) Poor scene adaptability and performance bottlenecks: General models lack targeted learning of subtle features of specific scenarios (such as indoor special lighting, partially occluded targets, and atypical poses), resulting in low recognition accuracy, frequent missed and false detections, and performance bottlenecks in actual applications.

[0005] (2) Static degradation of model capabilities: Once an AI model is deployed, its capabilities are fixed. As real-world scenarios continue to change (such as changes in environmental layout and the emergence of new activity patterns), the model's performance will inevitably degrade, and its matching degree with the real-world scenario will become increasingly low.

[0006] (3) Inefficient and costly operation mode: To address the above problems, the current mainstream solution is a passive, manual operation mode: model recognition errors are discovered by humans, and then data is manually collected and labeled, and model retraining is performed by algorithm engineers in an offline environment. Finally, the model on the edge is updated through downtime or complex release processes. This mode not only has a long response cycle and low efficiency, but also requires a large amount of human and computing resource costs, making it difficult to scale.

[0007] Although some cloud-edge collaborative closed-loop training schemes have appeared in the prior art, such as uploading edge-end data to the cloud for model fusion or ensemble learning. But these schemes still mostly stay at the level of "data carrier", lack of intelligent management of data and training process, and have the following deep-seated defects:

[0008] (1) Blindness of data flow: The edge usually "blindly" uploads all poorly recognized samples or all data to the cloud, which contains a large number of "garbage" samples with limited value for model improvement (such as poor image quality, repeated scene, etc.), which greatly wastes valuable network bandwidth and cloud storage resources.

[0009] (2) Extensive training decision: The retraining of the cloud usually relies on artificial experience or fixed time period to trigger, lacks intelligent, cost-aware judgment of training timing and training intensity, often leads to ineffective training or insufficient training, causing serious waste of computing resources or lag of model update.

[0010] Therefore, an intelligent system capable of realizing AI model scene adaptation and autonomous evolution is urgently needed. The system not only needs to build a data and model collaborative closed loop, but also needs to introduce intelligent decision-making capability in this closed loop to solve the core pain points of high cost, low efficiency and insufficient automation of model iteration in the prior art, and provide a new solution for long-term, stable and efficient operation of the cloud-edge collaborative AI system. SUMMARY

[0011] In view of the deficiencies of the prior art, the present application proposes a collaborative learning method and system based on edge sample intelligent grading and cloud intelligent decision-making, aiming to solve the problems of poor scene adaptability, low evolution efficiency and high cost of AI model in cloud-edge collaborative scenarios.

[0012] In the present method, the present application creatively proposes a double-loop collaborative mechanism including edge sample intelligent grading and cloud intelligent decision-making. By evaluating and grading the intrinsic value of the samples to be learned in real time at the edge, and uploading high-quality "intelligence" to the cloud; the cloud decision-making agent intelligently plans and executes the optimal model training strategy according to the received intelligence information combined with cost-benefit analysis, and finally downgrades the optimized model capability to the edge. The system realizes the autonomous evolution of AI model in a specific scene with low cost and high efficiency.

[0013] The application is suitable for real-time video analysis scenarios that require AI models to continuously learn and optimize. More specifically, the application proposes a collaborative learning system that combines edge sample intelligent grading and cloud intelligent decision-making, aiming to address the core challenge of performance degradation of general AI models in specific deployment scenarios, and to realize the automation and intelligent management of the entire life cycle of the model, demonstrating the great potential of the new generation of intelligent systems in scenario adaptation and continuous evolution.

[0014] The technical solutions of the application are:

[0015] A collaborative learning method based on edge sample intelligent grading and cloud intelligent decision-making, comprising:

[0016] (1) AI model real-time inference and difficult sample preliminary screening;

[0017] Deploy and run the main AI model on the edge computing node to process and analyze real-time video data streams. Real-time video data streams refer to a series of continuous and independent image frames formed after real-time acquisition by a video acquisition device and online decoding and frame extraction. The main AI model performs a target detection task for each input image. According to the preset preliminary screening rules, samples with poor AI model output results are identified as difficult samples;

[0018] (2) Edge sample intelligent grading;

[0019] Intelligently grade each difficult sample screened out. By extracting and analyzing the multi-dimensional feature vector of the difficult sample, the potential learning value of the difficult sample is quantitatively evaluated and a priority level label is assigned;

[0020] (3) Data upload with priority label;

[0021] Upload the difficult sample after intelligent grading together with its corresponding priority level label to the cloud server for storage and aggregation;

[0022] (4) Cloud server state aggregation;

[0023] The cloud server continuously receives and aggregates data from one or more edge computing nodes. The background service regularly calculates and updates the global state vector of the system, which includes the cumulative number of samples of each priority level, the time since the last successful training, the current model performance, the sample diversity, and the cloud resource load;

[0024] (5) Run cloud intelligent training decision algorithm;

[0025] In the cloud server, a training decision agent selects a current optimal training action from a predefined action space according to the current latest global state vector of the system and a preset optimal decision strategy;

[0026] (6) Model on-demand training and version management;

[0027] According to the optimal training action output by the decision agent, the cloud server automatically executes the corresponding model training task; if the decision is "no training", step (6) is skipped; if the decision is "training", the training module is called, the existing model is fine-tuned or retrained using the collected high-value samples, and a new model with a version number is generated;

[0028] (7) Model online updating and closed-loop feedback;

[0029] The newly generated model is trained and distributed to the edge computing node to realize online hot updating of the main AI model, so that the edge computing node obtains stronger recognition capability without interrupting service.

[0030] Further preferably, in step (1), the main AI model is a YOLOv8 model.

[0031] Further preferably, in step (1), the real-time video data stream is processed and analyzed; including:

[0032] The input image frame is preprocessed, including size normalization and numerical normalization;

[0033] The preprocessed image frame is input into the YOLOv8s model for a complete forward calculation;

[0034] The YOLOv8s model finally outputs a tensor containing multiple prediction results;

[0035] Through post-processing operation on the tensor, one or more detection results are finally obtained, each detection result including target position information, target category and a confidence score representing the prediction confidence.

[0036] According to the present application, preferably in step (2), the edge sample is intelligently graded; including:

[0037] (2-1) Multi-dimensional feature vector construction: for each difficult sample preliminarily screened, a multi-dimensional feature vector F is extracted, the multi-dimensional feature vector F including:

[0038] Model confidence : confidence score of the target detection frame output by the main AI model , ;

[0039] image sharpness : quantifying the blurring degree of an image by calculating the normalized Laplacian variance of the image, as shown in the following formula:

[0040] ;

[0041] wherein, is the normalized image, is the variance calculation; Laplacian is the Laplacian operator; target saliency : is the ratio of the area of the target detection frame to the total area of the image, which is used to measure the size of the target, ;

[0042] (2-2) Sample learning value function: by the sample learning value function , a multi-dimensional feature vector F is weighted and aggregated to obtain a comprehensive value score;

[0043] (2-3) Priority classification strategy: according to the output value of the sample learning value function , the priority of the sample is classified.

[0044] According to the present application, the priority classification strategy is realized by setting different value thresholds (V , ), as shown in the following formula:

[0045] ;

[0046] wherein, is the high priority, is the medium priority, is the low priority;

[0047] P refers to the final output result of the priority level assigned to each evaluated difficult sample.

[0048] Further preferably, the value function is as shown in the following formula:

[0049] ;

[0050] wherein, , , are the weight coefficients of the model confidence , image sharpness and target saliency , respectively;

[0051] is an activation function used to convert the image sharpness mapped to the interval [0, 1], wherein, and are tuning parameters;

[0052] According to the present application, preferably, in step (3), the aggregation refers to: the cloud server carries out the process of automatic sorting, routing and collection of the difficult samples with different priority labels from one or more edge nodes through a structured data stream processing and storage mechanism.

[0053] According to the present application, preferably, in step (5), the cloud intelligent training decision algorithm is run; including:

[0054] The goal of the training decision agent is to learn an optimal policy to maximize the long-term cumulative reward; the decision logic of the training decision agent is modeled through a Q-Learning algorithm;

[0055] (5-1) State space and action space:

[0056] State is defined as a vector wherein, , , are the cumulative number of high-priority samples, medium-priority samples and low-priority samples, respectively, is the time since the last training;

[0057] Action space is defined as a discrete set, , , , represent waiting, fast training and complete training, respectively;

[0058] (5-2) Reward function: a reward function is designed to evaluate the immediate reward obtained after performing action in state to move to new state ; the reward function is as follows:

[0059] ;

[0060] wherein, represents the improvement amount of the AI model performance mAP after performing action , and mAP refers to the average precision mean; if is , then ; representing performing an action the cost of consumed computing resources, if then ; representing the time spent ;

[0061] (5-3) Action value function and policy: training the decision agent by learning an action value function to estimate the long-term cumulative reward of performing an action in state ; the update of the Q function follows the Bellman equation as follows:

[0062] ;

[0063] where is the learning rate, is the discount factor, refers to the immediate reward, refers to the maximum expected future return in the next state , and is a placeholder variable used in the max operation;

[0064] The optimal policy of the agent is then: in any state , choose the action that maximizes the value , as follows:

[0065] .

[0066] According to the present application, preferably, in step (7), the model is updated online and closed-loop feedback; including:

[0067] (7-1) Model distribution and loading: the cloud server maintains a model repository to store all versions of the trained model; when a new, better model is generated, the cloud server distributes an update instruction to the edge computing node through a dedicated API interface, the update instruction including the download address and version number of the new model;

[0068] (7-2) Edge hot update: after receiving the update instruction, the edge computing node downloads the new model file to the local from the specified download address; through an atomic model instance replacement operation, the main AI model object in the memory providing service is safely replaced by the newly loaded model instance;

[0069] (7-3) Closed-loop verification: after the model is updated, the edge computing node continues to identify the video stream.

[0070] ​A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above-mentioned collaborative learning method based on edge sample intelligent grading and cloud intelligent decision when executing the computer program.

[0071] A computer readable storage medium, having stored thereon a computer program, the computer program implements the steps of the above-mentioned collaborative learning method based on edge sample intelligent grading and cloud intelligent decision when executed by a processor.

[0072] A collaborative learning system based on edge sample intelligent grading and cloud intelligent decision, comprising:

[0073] A preliminary screening module is configured to perform AI model real-time inference and difficult sample preliminary screening, specifically including: deploying and running a main AI model on an edge computing node to process and analyze real-time video data streams; the real-time video data stream refers to a series of continuous and independent image frames formed after real-time acquisition by a video acquisition device and online decoding and frame extraction; the main AI model performs a target detection task for each input image; and samples with poor AI model output results are identified as difficult samples according to a preset preliminary screening rule;

[0074] An intelligent grading module is configured to perform edge sample intelligent grading, specifically including: performing intelligent grading on each difficult sample preliminarily screened; quantitatively evaluating the potential learning value of the difficult sample and dividing a priority level label by extracting and analyzing a multi-dimensional feature vector of the difficult sample;

[0075] A data uploading module is configured to upload data with priority labels, specifically including: uploading the difficult sample after intelligent grading together with the corresponding priority level label to a cloud server for storage and aggregation;

[0076] A state aggregation module is configured to perform cloud server state aggregation, specifically including: continuously receiving and aggregating data from one or more edge computing nodes by the cloud server; and periodically counting and updating a global state vector of the system by a background service, the global state vector including: cumulative number of each priority sample, time from the last successful training, current model performance, sample diversity, and cloud resource load;

[0077] A cloud intelligent training decision algorithm running module is configured to run a cloud intelligent training decision algorithm, specifically including: selecting a current optimal training action from a predefined action space according to the current latest global state vector of the system and a preset optimal decision strategy by a training decision agent on the cloud server;

[0078] The model on-demand training and version management module is configured to: according to the optimal training action output by the decision agent, the cloud server automatically executes the corresponding model training task; if the decision is 'no training', step (6) is skipped; if the decision is 'training', the training module is called, the existing model is fine-tuned or retrained using the collected high-value samples, and a new model with a version number is generated;

[0079] The online updating and closed-loop feedback module is configured to: the model is online updated and the closed-loop feedback is fed back; specifically, the new model generated is trained and distributed to the edge computing node, realizing online hot updating of the main AI model, so that the edge computing node obtains stronger recognition ability without interrupting service.

[0080] Compared with the prior art, the above technical scheme of the present application can achieve the following beneficial effects:

[0081] 1. Scene adaptation and autonomous evolution of AI model are realized: the present application builds a collaborative learning closed loop of edge analysis, cloud decision and model updating, and gives the AI system the ability of scene adaptation and autonomous evolution. It can continuously learn and adapt to the unique characteristics of a specific deployment environment (such as a specific classroom), dynamically and automatically convert a general AI model into a highly customized special model, and continuously improve and maintain its high recognition performance in a specific scene without human intervention, thereby fundamentally solving the performance degradation problem of traditional static models caused by'scene drift'.

[0082] 2. The efficiency and economy of model iteration are significantly improved: the present application introduces intelligent sample grading at the edge and intelligent training decision strategy in the cloud, which significantly improves the efficiency and economy of AI model iteration. It evaluates the value at the data source, filters out a large number of low-value samples, greatly reduces the data transmission and storage cost between the cloud and the edge, and through cost-benefit trade-off in the cloud, avoids unnecessary and inefficient consumption of computing resources, so that the model can achieve the most efficient performance iteration at the lowest cost, solving the technical pain points of high cost and serious resource waste in the traditional model updating process.

[0083] 3. The robustness and rapid response ability of the system are enhanced: the system architecture of the present application, especially the linkage mechanism of edge intelligent grading and cloud strategy decision, significantly enhances the robustness and rapid response ability of the AI system to environmental changes. The system can sensitively perceive the sudden or unknown situation in the scene (reflected as high-priority P1 samples), and trigger the cloud decision system to conduct rapid and intensive retraining, so that the system can adapt to the scene mutation in a short time, quickly recover and improve its recognition ability, and ensure the long-term availability and reliability of the system in real and variable environment.

[0084] 4. The system's automation and intelligence level is improved: the model updating process traditionally relying on manual discovery and manual triggering is upgraded to a double-loop intelligent system containing data and decision loops. The edge analysis results directly drive the cloud strategic decision, realizing the full-process automation from "problem discovery" to "problem solving", greatly reducing the dependence on manual operation, and providing a feasible technical path for large-scale, low-cost deployment of high-availability AI systems. BRIEF DESCRIPTION OF DRAWINGS

[0085] Figure 1 A whole process schematic diagram of a collaborative learning method based on edge intelligent grading and cloud strategy optimization is proposed for the present application.

[0086] Figure 2 An architecture and process schematic diagram of an edge AI sample intelligent grading module in the present application.

[0087] Figure 3 An architecture and process schematic diagram of a cloud intelligent training decision module in the present application.

[0088] Figure 4 A relationship diagram of sample learning value function and priority grading in the present application.

[0089] Figure 5 A strategy representation example diagram of a cloud decision agent in the present application.

[0090] Figure 6 A performance index (mAP) curve diagram of a new model on a validation set in an embodiment of the present application.

[0091] Figure 7 A loss function (loss) change curve diagram in the training process in an embodiment of the present application. DETAILED DESCRIPTION

[0092] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0093] In order to facilitate those skilled in the art to understand the present application, the key terms appearing in the specification and claims are explained as follows:

[0094] 1.Edge Intelligence Grading: refers to the process of evaluating the value of AI inference results or raw data generated locally in real-time and multi-dimensionally using one or more models / algorithms on edge computing nodes close to data sources without relying on the cloud, and dividing priority levels for them.

[0095] 2.Sample Learning Value: refers to the potential value of a specific data sample (such as an image) in improving the performance of an AI model. The invention believes that the value depends not only on the model's recognition confidence for the sample, but also on factors such as the data quality (such as clarity) of the sample itself.

[0096] 3.Cloud Intelligent Training Decision: refers to the intelligent strategy of deciding whether to trigger and how to trigger (such as training intensity, rounds) model training tasks on the cloud server based on the real-time state of the data queue with different characteristics (such as priority) gathered from the edge, as well as the historical state of the system (such as the time since the last training).

[0097] 4.Decision Agent: refers to the logical entity in the cloud module of the invention for executing intelligent training decisions. In a preferred embodiment, the agent is modeled by the idea of reinforcement learning (such as Q-Learning), aiming to seek the optimal balance between model performance benefits and computing resource costs.

[0098] 5.Model Online Hot Update: refers to the process of loading new model weights trained by the cloud into memory and safely replacing the running old model instance without interrupting edge AI inference services, aiming to achieve a non-sensory and smooth upgrade of the model.

[0099] 6.Laplacian Operator Variance: a calculation method used in digital image processing to measure image focus and clarity. Its principle is to apply the Laplacian operator (a second-order differential operator) to the image to highlight the edges and details in the image, and then calculate the gray variance of the resulting image. Generally, the larger the variance value, the richer the edges and details of the image, and the clearer the image; on the contrary, the smaller the variance value, the more blurred the image. In this invention, this indicator is used as a key parameter to quantify the multi-dimensional feature of "image clarity".

[0100] 7.YOLOv8 Model: an advanced, real-time, open-source object detection AI model. YOLOv8 model is known for its excellent balance between speed and accuracy, which can directly predict multiple bounding boxes and target class probabilities from a complete image in a single forward propagation. In this invention, yolov8s.pt is used as its official pre-trained small size version, deployed on edge computing nodes as the main AI model for real-time pedestrian detection tasks.

[0101] Embodiment 1

[0102] A collaborative learning method based on edge intelligence hierarchical classification and cloud strategy optimization, as shown in Figure 1 , comprises:

[0103] (1) AI model real-time inference and difficult sample preliminary screening;

[0104] A main AI model is deployed and run on an edge computing node to process and analyze real-time video data streams. The real-time video data stream refers to a series of continuous and independent image frames formed by real-time collection of front-end monitoring cameras and other video acquisition devices and online decoding and frame extraction by video processing tools such as FFmpeg. These image frames are continuously sent into a data pipeline in sequence for subsequent processing. For each input image, the main AI model performs a target detection task. According to a preset preliminary screening rule (for example, below a confidence threshold), samples with poor AI model output results are identified as difficult samples. The poor samples refer to samples in which the main AI model detects a target (for example, identifies a “person”) but the output confidence score is below a preset screening threshold (for example, the threshold can be set to 0.4). The identification process is that the system compares the confidence score of each detection result output by the model with the preset threshold to identify poor samples. Any image frame with a confidence score below the threshold is determined to be a sample in which the model is “not confident” about its own prediction result and is automatically identified as a “difficult sample” by the system.

[0105] (2) Edge sample intelligent classification;

[0106] Referring to Figure 2 , for each difficult sample preliminarily screened, a sample value evaluation model deployed on the edge is used for intelligent classification. The sample value evaluation model quantitatively evaluates the potential learning value of the difficult sample by extracting and analyzing a multi-dimensional feature vector (at least including model confidence, image clarity, target saliency, etc.) of the difficult sample and divides a priority level label; for example, high, medium, and low priority.

[0107] This module first extracts a multi-dimensional feature vector , which at least includes model confidence , image clarity , and target saliency . Subsequently, as shown in Figure 4 , a sample learning value function The feature vector is calculated to obtain a quantitative value score. Finally, the score is compared with a preset threshold and to divide a priority level P (P1, P2 or P3) for the sample.

[0108] (3) Data upload with priority labels;

[0109] The intelligent classified difficult sample is uploaded to the cloud server together with the corresponding priority level label for storage and aggregation; in a preferred embodiment, in order to facilitate subsequent training and manual checking, the system uploads the original picture (for AI training) and the labeled picture with the detection box (for manual analysis) together, and distinguishes them by adding suffixes such as --hardcase-P1-original.jpg or --hardcase-P2-annotated.jpg to the file name.

[0110] (4) Cloud server state aggregation;

[0111] Referring to Figure 3 , the cloud server (such as a data flow engine such as NiFi) continuously receives and aggregates data from one or more edge computing nodes; the background service regularly calculates and updates the global state vector of the system; the system refers to the "intelligent training decision module" or "decision agent" deployed in the cloud. It is a background service or a script executed at a fixed time, and its only responsibility is to serve as the "brain" of the entire collaborative learning system, continuously observe the state indicators reflecting the global situation, and make the optimal training decision according to these indicators. The global state vector includes: the cumulative number of samples of each priority, the time since the last successful training, the current model performance, the sample diversity, and the cloud resource load;

[0112] Current model performance: refers to the performance score (mAP) of the model currently deployed on the edge in a fixed and small cloud verification set. This indicator can reflect whether the model performance has begun to "degrade".

[0113] Sample diversity: measures the difference between newly collected difficult samples and existing samples. For example, the average distance between the features of new sample images and historical sample features can be calculated to quantify. This indicator can help the system determine whether the new sample brings "new knowledge".

[0114] Cloud resource load: refers to the load of the GPU, CPU and other computing resources of the current cloud training server. This indicator can prevent the start of new non-urgent training tasks in the case of high load of the server itself, thereby avoiding resource conflicts.

[0115] The above features are preferred technical features designed to make the system more intelligent.

[0116] The update process of the state vector is automatically and periodically (e.g., every 10 minutes) performed by the cloud backend service. Although not detailed above, the specific update mechanism is as follows:

[0117] Update of the cumulative number of samples of each priority ( , , ) : These sample pictures have all been automatically sorted by NiFi and stored in designated directories on the cloud server. The backend service regularly scans these directories and updates the , and other state values in real time by counting the number of files under each directory. When a training task is triggered and completed, the sample pictures used for this training can be moved to an archive directory, so that the count is reset or reduced, and a new accumulation begins.

[0118] Update of the time since the last successful training ( ) : The backend service records a timestamp in a persistent storage (such as a simple state file or database entry) to mark the time point of the last successful triggering of a training task. At each decision-making period, the backend service subtracts the recorded timestamp from the current time to dynamically calculate the value of . When a new training task is successfully triggered, the service immediately replaces the old timestamp with the current time, completing the reset.

[0119] (5) Run the cloud intelligent training decision algorithm;

[0120] On the cloud server, a training decision agent selects a currently optimal training action from a predefined action space (e.g., no training, fast training, full training) based on the current latest global state vector of the system and according to a pre-set optimal decision strategy; the decision strategy aims to achieve a long-term balance between model performance improvement (benefit) and computational resource consumption (cost).

[0121] (6) Model on-demand training and version management;

[0122] According to the optimal training action output by the decision agent, the cloud server automatically performs the corresponding model training task; if the decision is "no training", step (6) is skipped; if the decision is "training", the training module is called to fine-tune or retrain the existing model using the collected high-value samples, and after training is completed, a better model file (best.pt) with a new version number is generated. For example, Figure 6 and Figure 7As shown, during the training process, the performance indicator (mAP) of the model will significantly improve, while the loss function (loss) will steadily decrease, proving the effectiveness of the training.

[0123] In step (6), when the cloud-side intelligent decision-making agent outputs the "training" action, the system will automatically execute a clear training process that includes the following core steps:

[0124] 1) Load data and base model: After the training task is started, the system first locates and loads the high-value samples (mainly P1 and P2 levels) that have been collected and labeled according to the preset configuration file. At the same time, the system loads the official pre-trained yolov8s.pt model currently deployed on the edge into the GPU memory as the starting point for this fine-tuning.

[0125] 2) Perform model fine-tuning: The system uses the loaded high-value sample data to iteratively train the base model. In this process, the model learns new features in these "difficult samples" and adapts to specific scenarios (such as classroom monitoring). According to the instructions of the decision-making agent (see Figure 3 , fast training or complete training), the system will automatically perform a preset number of training rounds.

[0126] 3) Performance evaluation and optimal model saving: After each round of training ends, the system automatically uses the validation set to evaluate the performance of the current model (calculates mAP, etc.). The system continuously tracks the model state with the best performance on the validation set and automatically saves it as a best.pt (custom name) file.

[0127] 4) Versioned archiving: After the training is completed, the final generated best.pt new model, along with the logs, performance charts, and configuration files of this training, will be saved in a dedicated directory with a unique experiment name. In this way, the system not only generates a new model with better performance, but also automatically creates a new version that can be traced and managed.

[0128] (7) Model online updating and closed-loop feedback;

[0129] The new model generated by training is stored in the cloud-side model repository. The cloud-side issues an update instruction to the edge node through the API. After receiving the instruction, the edge node downloads the new model and safely replaces the running AI model instance in memory with the new model instance without interrupting existing services, completing the online upgrade of capabilities.

[0130] After the model is updated, the edge node will immediately use the more powerful new model for real-time inference. For the same scene that was previously identified poorly, the optimized model can significantly improve the accuracy and recall rate of identification, successfully identifying previously missed targets. This improvement in effect intuitively verifies the success of the entire collaborative learning closed loop at the business level, and the system has thus completed a complete, low-cost, and automated self-evolution.

[0131] Embodiment 2

[0132] The collaborative learning method based on edge intelligent grading and cloud strategy optimization according to Embodiment 1 is different in that:

[0133] In step (1), the main AI model is a YOLOv8 model.

[0134] In step (1), the real-time video data stream is processed and analyzed; including:

[0135] The input image frame is preprocessed, including: size normalization (e.g., scaling to 640x640 pixels), and numerical normalization (converting pixel values from the 0-255 range to the 0-1 range); to meet the model input requirements.

[0136] The preprocessed image frame is sent to the YOLOv8s model for a complete forward calculation (identification);

[0137] The YOLOv8s model finally outputs a tensor containing multiple prediction results;

[0138] Through decoding and non-maximum suppression post-processing operations on the tensor, one or more detection results are finally obtained, each including the position information (bounding box coordinates) of the target, the target class (e.g., "person"), and a confidence score representing the prediction confidence.

[0139] In step (2), edge sample intelligent grading; refer to Figure 2 and Figure 4 , including:

[0140] (2-1) Multi-dimensional feature vector construction: for each difficult sample preliminarily screened out, a multi-dimensional feature vector F is extracted, which aims to quantify the learning value of the sample from multiple dimensions. The multi-dimensional feature vector F includes:

[0141] Model confidence : the confidence score of the target detection box output by the main AI model , ;

[0142] After the main AI model (such as YOLOv8s) finishes processing and analyzing each frame of image, its output result is a set containing one or more detection instances. For each detection instance, its output information must contain three core elements: target position, target category, and confidence score. 1. Target position: usually represented by the coordinates of the bounding box; 2. Target category: refers to what object the model recognizes (for example, "person"); Confidence score: a floating-point number between 0 and 1, quantitatively representing the model's confidence in its own judgment (i.e., "this box is this category"). The higher the score, the more confident the model is.

[0143] Image sharpness Image sharpness is quantified by calculating the normalized Laplacian variance of the image, as shown below:

[0144]

[0145] where, is the normalized image, which is a common and necessary preprocessing step before the AI model processes the image. The normalized image ( ) refers to a series of standardized preprocessing that the original image undergoes before being input into the main AI model (such as YOLOv8) or used for feature calculation (such as sharpness calculation).

[0146] This process at least includes: 1. Grayscale conversion: in order to calculate the sharpness, the three-channel color image (RGB) needs to be converted into a single-channel grayscale image first. This can eliminate the interference of color information, so that the subsequent operator can focus more on the brightness, edge and texture changes of the image; 2. Numerical normalization: convert the pixel values of the image from the original integer range (usually 0-255) to a standard, smaller floating-point number range (for example, 0-1). Therefore, is a standardized, mathematically suitable image data representation obtained after the original image has undergone grayscale conversion and numerical normalization. is the variance calculation; The higher the value, the sharper the image. Laplacian is a very classic and important differential operator in the field of digital image processing and computer vision, specifically a second-order differential operator. In the embodiments of the present invention, the Laplacian operator is applied to the normalized image ​The Laplacian operator is applied to the original image, obtaining a new image on which only the edges and details are highlighted. Then, the variance of the new image can be calculated. There are two cases for the variance: 1. If the original image is clear, it has more edges and details, and the new image obtained after applying the operator has more bright spots and strong contrast, and the variance value is large; 2. If the original image is blurred, it has fewer edges and details, and the new image obtained after applying the operator is very dark and smooth, and the variance value is small. Therefore, by calculating the variance of the Laplacian operator, a quantitative value can be obtained to accurately judge the clarity of the original image, thereby providing a reliable input feature for the "sample learning value evaluation model" of the application.

[0147] Target saliency : refers to the ratio of the area of the target detection frame to the total area of the image, and is used to measure the size of the target, ;

[0148] Image refers to an image frame that has been preprocessed (especially size normalization) and is about to be sent into the sample value evaluation model for analysis. In the embodiments of the application, in order to ensure consistency of calculation, all original image frames extracted from a video stream and having different sizes are first scaled and placed on a fixed resolution canvas. Therefore, the "total area of the image" refers to the total pixel area of the fixed resolution canvas (for example, 854 * 480). The "area of the target detection frame" refers to the pixel area covered by the detection frame on the canvas. By calculating the ratio of the two, a standardized "target saliency" feature value that is not affected by the resolution of the original video can be obtained, which is used for subsequent value evaluation.

[0149] (2-2) Sample learning value function: the sample learning value function is used to aggregate the multi-dimensional feature vector F by weighting , and obtain a comprehensive value score;

[0150] (2-3) Priority classification strategy: according to the output value of the sample learning value function , the priority of the sample is classified.

[0151] The priority classification strategy is realized by setting different value thresholds (V1, V2, V3) , , as follows:

[0152] ;

[0153] Among them, is high priority, is medium priority, is low priority;

[0154] Value threshold and These are the key decision boundaries used in this invention to divide different priority intervals. These two values ​​are configurable hyperparameters; their specific values ​​are not fixed but can be empirically adjusted and optimized based on the needs of the actual deployment scenario, data distribution, and the setting of the weight coefficients w in the adopted value function V(F). For example:

[0155] Suppose that in V(F), weights are set Therefore, we can assume three scenarios:

[0156] An ideal high-value sample ( Its characteristics may include: confidence level Extremely low (e.g., 0.1), image sharpness Very high ( Approximately 1 (counted as 1)), target size Moderate (e.g., 0.2). The V(F) value for this sample can be calculated and is approximately 1.38.

[0157] A typical medium-value sample ( Its characteristics may include: confidence level Lower (e.g., 0.3), image sharpness Very high ( Approximately 1), target size Moderate (e.g., 0.2). The V(F) for this sample can be calculated and is approximately equal to 1.18.

[0158] A low-value sample ( Its characteristics may include: confidence level Lower (e.g., 0.3), but the image is very blurry. (Close to 0). The V(F) value for this sample can be calculated and is approximately 0.68.

[0159] Based on the calculation example above, we can then... and Set a reasonable set of example values:

[0160] It can be set to 1.25 to filter out the samples with the highest learning value. It can be set to 0.8 to distinguish between medium-value and low-value samples.

[0161] therefore, and The range of values ​​is related to the output range of the value function V(F), and together they constitute the core mechanism for quantifying and classifying the learning value of samples in this invention.

[0162] P refers to the final output result of the priority level assigned to each evaluated difficult sample. It is a classification label that identifies the value and urgency of the sample for cloud model training. In embodiments of the present invention, the value set of P is {P1, P2, P3}, representing high, medium, and low priority levels, respectively.

[0163] This grading strategy converts complex rules into a continuous value-based, quantifiable, and more generalizable grading model.

[0164] Value function is as follows:

[0165] ;

[0166] wherein, , , are the weight coefficients of model confidence , image clarity , and target saliency , respectively;

[0167] Weight coefficients are key parameters in the present invention for adjusting and balancing the contribution of different features to the final "sample learning value". They are configurable hyperparameters, and their value range can theoretically be any positive real number. In practical applications, the absolute value size is not important, but the relative proportion between them is more important. For example:

[0168] In the experimental scenario of the present invention, = 1.0 (model confidence weight), which means that confidence is considered the most important basic measurement indicator. A sample with very low confidence (c close to 0), its contribution to this item is close to 1.0, indicating that it has a high basic value.

[0169] = 0.5 (image clarity weight), and clarity is an important bonus item, but its importance is slightly lower than that of confidence. Therefore, it can be given a medium-sized positive weight. A clear picture (c close to 1) can get a value bonus of about 0.5, while a fuzzy picture (c close to 0) does not have this bonus. This ensures that the system will prefer clear pictures for training.

[0170] ​​= 0.1 (Target Salience Weight), target salience (i.e., area) is used here as a slight penalty. It can be given a small negative weight. Because a very large target occupying most of the image area is usually easy to identify, its learning value is relatively limited. By introducing this small negative weight, the system slightly reduces the priority of such overly "simple" samples, thus focusing more on learning medium-sized or more difficult-to-identify targets. This is used to balance the contribution of different features to the final value score; This indicates that the lower the confidence level, the higher the value. It is an activation function (such as the Sigmoid function) used to adjust image sharpness. Mapped to the interval [0, 1] ,in, and To adjust the parameters; to adjust the parameters and These are the key hyperparameters used in this invention for finely controlling the shape of the sharpness scoring function σ(b). Together, they define how the system transforms a continuous, physically meaningful sharpness value (Laplace operator variance b) into a standardized value score representing "sharpness confidence" ( (The range is between 0 and 1).

[0171] for It defines the center point or activation threshold of the Sigmoid function. Technically, it represents the set critical point of "acceptable minimum sharpness." When the sharpness value b of an image is exactly equal to... hour, The output value is exactly 0.5; when Much larger hour, The output approaches 1 (indicating very clear); when much smaller hour, The output approaches 0 (indicating very blurry). The value range is positive real numbers, and its specific value should be determined by statistical analysis of the sharpness values ​​of a batch of samples, based on factors such as lighting conditions and camera quality in the actual scene. For example, suppose that in a scene, when the variance of the Laplacian operator is below 100, the image is usually too blurry for the human eye or the model, while it becomes clear and usable when it is above 100. In this case, a sample value can be set. = 100, defining the boundary between "clear" and "fuzzy" here.

[0172] for , Controlling the Sigmoid function curve at the center point The steepness of the vicinity, i.e. the width of the transition zone. A larger value will make the function curve very steep, forming a "step-like" effect. This means that the system is very "harsh" and "black-and-white" in judging the sharpness, only pictures with sharpness significantly above will get a high score. A smaller value will make the function curve very flat, with a wide transition zone. This means that the system is more "lenient" in judging the sharpness, i.e. even if the sharpness value fluctuates around , the final score will change smoothly. The value range of k is positive real number. For example, to achieve a smooth but effective transition, an example value = 0.1 can be set for k. This value can ensure that when the picture sharpness fluctuates around the center point = 100, its value score will also transition from around 0.5 to 0 or 1 accordingly, without sudden changes.

[0173] In summary, by jointly adjusting the two parameters and , the present application can flexibly and accurately define how to convert the physical image sharpness into a standardized learning value score that is meaningful for AI model training in a specific scenario.

[0174] In step (3), aggregation is not a complex calculation process, but refers to the process of automatically sorting, routing and collecting suspicious samples with different priority labels from one or more edge nodes by a structured data stream processing and storage mechanism in the cloud server.

[0175] The aggregation process is as follows:

[0176] 1) Unified reception: deploy an HTTP listening endpoint (provided by the ListenHTTP processor of NiFi in the experiments of the present application) in the cloud as the only entrance for data reporting from all edge nodes. The edge nodes send suspicious sample pictures with priority labels P1, P2, P3, etc. to this endpoint through POST requests.

[0177] 2) Attribute extraction and routing: in the experiments of the present application, when a sample picture enters NiFi, the system will first extract key attributes from its metadata, especially the file name. Then, a RouteOnAttribute processor (which will route based on attributes) will check the file name of each file according to the pre-set rules.

[0178] 3) Sorting and Aggregation: RouteOnAttribute processor dispatches data streams to different processing paths according to the inspection results, achieving automated sorting and aggregation. In the experiments of the present invention:

[0179] If the file name contains --hardcase-P1-original, the file is routed to the "high-priority original sample" path.

[0180] If the file name contains --hardcase-P2-annotated, the file is routed to the "medium-priority annotated sample" path. And so on.

[0181] 4) Structured Storage: At the end of each processing path, there is a PutFile processor. This processor is responsible for storing the sorted sample pictures into a pre-planned, structured directory on the server. In the experiments of the present invention:

[0182] High-priority original samples are uniformly stored (aggregated) in the / mnt / hardcase / classroom_dataset / images / p1 / folder.

[0183] Medium-priority original samples are uniformly stored (aggregated) in the / mnt / hardcase / classroom_dataset / images / p2 / folder. And so on.

[0184] Through the above pipeline of receiving -> routing -> sorting -> storage, the present invention can automatically and structurally aggregate scattered and difficult samples from different edges, different times, and with different priority labels to the designated storage location of the cloud server, providing a neat and orderly data foundation for subsequent online annotation, model training, and intelligent decision-making. For the convenience of subsequent analysis and manual verification, the original samples and annotated samples with model inference results can be selectively uploaded together.

[0185] In step (5), run the cloud intelligent training decision algorithm; including:

[0186] The core of this algorithm is a training decision agent based on reinforcement learning, aiming to solve the Markov Decision Process (MDP) problem. The goal of the training decision agent is to learn an optimal policy to maximize long-term cumulative rewards; in a preferred embodiment, the decision logic of the training decision agent is modeled through the Q-Learning algorithm;

[0187] (5-1) State space and action space:

[0188] State is defined as a vector wherein, , , are the cumulative number of high-priority samples, medium-priority samples, and low-priority samples, respectively, is the time since the last training;

[0189] action space is defined as a discrete set, , , , represent waiting, fast training, and full training, respectively;

[0190] (5-2) Reward function: To guide the agent learning, a reward function is designed to evaluate the immediate reward obtained after performing action in state to a new state ; the reward function is as follows:

[0191] ;

[0192] wherein, represents the improvement in the performance mAP of the AI model (specifically, the main AI model deployed on the edge node and continuously learned and optimized in the cloud. In the preferred embodiment of the present application, it is the YOLOv8s model.) after performing action ; mAP refers to the mean average precision; mAP (mean Average Precision) is the most authoritative and commonly used core quantitative indicator for evaluating the performance of a model in the field of object detection. It is not just a simple "accuracy rate", but a comprehensive evaluation of the precision (i.e., how many of all the frames predicted by the model are really drawn correctly) and recall (i.e., how many of all the targets that should be found are successfully found by the model) of the model. The mAP score is a value between 0 and 1, and the higher the score, the better the comprehensive performance of the model, i.e., both accurate and complete. In the present application, is the mAP score measured on a fixed cloud validation set after training the new model, minus the mAP score of the old model on the validation set before training, thereby obtaining a quantitative "performance improvement value". If is , then ; represents the computational resource cost (such as GPU hours) consumed by performing action , if is , then ; representing performing an action time spent; weight coefficient , , are the core of the reward function of the present invention, which are configurable hyperparameters to define and balance the relationship between "model performance gain" and "resource consumption cost", thus guiding the decision agent to learn an optimal policy that meets the expectation. Their value range is positive real number, and their relative proportion is more important than the absolute value.

[0193] For example:

[0194] The goal of the present invention is to enable the "gain" of model performance to be numerically compared and weighed with the "cost" of resources.

[0195] = 100 (performance gain weight): The amount of mAP improvement is usually a small number (e.g., 0.1). By setting a large weight (e.g., 100), it is amplified into a significant reward score. For example, an mAP improvement of 0.1 can bring a positive reward of 100 * 0.1 = +10.

[0196] = 5 (computation cost weight): Assuming that is the number of GPU hours used for training, and the cost per GPU hour is estimated to be 5 units. This weight makes it bring a negative reward of -5 * 1 = -5 for performing a training that takes 1 hour.

[0197] = 0.1 (time cost weight): Time itself is also a cost. By giving it a small negative weight, it is used to encourage the agent to choose actions that take less time when other conditions are similar. For example, a training that takes 1 hour will additionally bring a slight penalty of -0.1 * 1 = -0.1.

[0198] With the above value settings, the reward function can perform a cost-benefit analysis: if a training brings more than 0.05 mAP improvement (gain > +5), it can offset the 1-hour GPU cost (cost = -5), thus obtaining a positive total reward to encourage the agent to make more similar "high-return investments" in the future. On the contrary, if a training only brings a negligible performance improvement, the total reward will be negative, thus "punishing" this decision and making the agent learn to avoid such "inefficient investment".

[0199] (5-3) Action value function and policy: training a decision agent by learning an action value function To estimate the state Next action The long-term cumulative reward; the update of the Q function follows the Bellman equation, as follows:

[0200] ;

[0201] in, For learning rate, As a discount factor, This refers to immediate rewards. The next state refers to The maximum expected future return, This refers to a placeholder variable used in the max operation;

[0202] First, this formula is the core of the Q-Learning algorithm, namely the iterative form of the Bellman equation. It describes how a decision-making agent modifies its "past" cognition (old) based on "reality" (immediate reward R + best prediction of the future). (Value), thereby continuously learning and improving.

[0203] For R: Here, "R" stands for Immediate Reward. It is a specific, quantifiable numerical value used to evaluate the "short-term gain or cost" that a decision-making agent immediately gains after performing an action a in state s. For example, if the agent decides to perform "full training" (action a), and the model performance (ΔmAP) improves significantly after training while the computational cost (C(a)) is not high, then the reward function will calculate a large positive number as the R value (e.g., +15). Conversely, if the performance improvement after training is minimal, the R value may be negative (e.g., -3).

[0204] for It is the next state. The maximum expected future return. The meaning is: based on the agent's current experience, if a new state is reached in the future... And in the new state, a certain action was selected. So, from the start of the task until its end, how much long-term benefit can be obtained in total? The meaning is: in the new state Next, the agent will review all possible next steps. (e.g., waiting, rapid training, full training), and identify those that will bring long-term benefits. The option to maximize. Simply put, it is an estimate of the long-term value of choosing the optimal action after entering the next state based on the agent's existing knowledge. It shows that the agent does not only look at the immediate reward R.

[0205] for `<max>` is a placeholder variable used in the `max` operation. It represents all the possible, selectable alternative actions the agent faces when the system enters the next state `s'`. Specifically, it refers to... The range of values ​​and The (actions) are exactly the same: waiting, fast training, and full training. Its purpose is to... At that time, the program will perform an internal simulation: it will assume that... In this state, what happens if we choose to wait? What happens if we choose fast training? What happens if we choose full training? Then, it will find the action with the largest Q value from these deduction results and use this largest Q value as the result of the entire max expression.

[0206] Through the coordinated work of these three parts, the Q-learning algorithm ensures that every decision made by the agent is the optimal judgment that integrates the "immediate actual benefit (R)" and the "long-term planning for the future (max Q)".

[0207] Optimal strategy of proxy That is: in any state Next, choose the option that enables value maximization action As shown below:

[0208] ;

[0209] In one specific embodiment of the present invention, a fixed policy table is predefined. This table is a concrete representation of the optimal policy obtained after the Q-Learning algorithm converges under a specific reward function. The fixed policy table refers to the optimal policy obtained after the Q-Learning algorithm has been sufficiently trained and learned. It is engineered as a set of explicit and directly queryable decision rules. This strategy table defines the unique optimal action 'a' that the decision agent should perform in any given system state S.

[0210] For ease of understanding, the lookup table is shown in Table 1:

[0211] Table 1

[0212]

[0213] Where T_p1 is the high-priority sample quantity threshold for triggering "full training", i.e. when the system accumulates at least 10 P1-level samples, it is considered that there is enough high-value new knowledge worth a deep learning; T_p2 is the medium-priority sample quantity threshold for triggering "quick training", i.e. when P1 samples are insufficient, but regular P2 samples accumulate to 50, it is worth a consolidating fine-tuning training. T_time is the longest time interval threshold for triggering "maintenance training", which can be set to 24 (hours) to ensure that the model capability will not be "outdated" due to long-time non-updating.

[0214] The execution logic of the query table is shown in Figure 5 ;

[0215] In step (7), the model is updated online and closed-loop feedback; including:

[0216] (7-1) Model distribution and loading: the cloud server maintains a model repository to store all versions of the trained model; when a new and better model is generated, the cloud server distributes an update instruction to the edge computing node through a dedicated API interface, and the update instruction includes the download address and version number of the new model;

[0217] (7-2) Edge hot update: after the edge computing node receives the update instruction, it downloads the new model file from the specified download address to the local; through an atomic model instance replacement operation, the main AI model object in the memory providing service is safely replaced by the newly loaded model instance; the whole process does not need to restart the service, which guarantees the continuity of the business. (The "atomic model instance replacement operation" is realized through a two-step mechanism of "background loading and instantaneous switching". 1) Background loading: when receiving the update instruction, the system will not immediately touch the old model providing service. It will completely load and initialize the new model file (best.pt) in a temporary and independent memory space in the background. This process is time-consuming, but completely isolated from the main service and does not affect any ongoing recognition task.

[0218] 2) Instantaneous switching: only when the new model is completely ready, the system will perform the most core replacement operation: a global variable (such as MODEL) pointing to the AI model is switched from the memory address pointing to the old model to the memory address pointing to the new model. In Python, this "reference switching" action is atomic, i.e. non-interruptible. This means that all subsequent recognition requests will seamlessly start using the new model, while all requests before this switching instant will normally complete their tasks using the old model.

[0219] (7-3) Closed-loop verification: After model update, the edge computing node continues to identify the video stream. The new identification result (e.g., the previously missed target is now detected with high confidence) is returned or presented through the regular business process, thereby verifying the effectiveness of the entire collaborative learning closed loop at the business level.

[0220] In the present application, Figure 5 The decision tree shown is a concrete and executable embodiment of the optimal strategy obtained after the convergence of the Q-Learning algorithm under a specific reward function.

[0221] The present embodiment further illustrates the beneficial effects that can be achieved by the above technical solutions through specific experimental data.

[0222] Referring to Figure 6 and Figure 7 These two figures show the detailed quantitative indicators recorded in a complete collaborative learning closed loop in the present embodiment, which are automatically generated by the YOLOv8 training framework in the verification stage and used to evaluate the performance of the optimized model.

[0223] Figure 6 The figure shows the average precision mean (mAP) change curve of the model on the validation set. As can be seen, with the increase of training rounds (epochs), the key performance indicators mAP50 and mAP50-95 are steadily improved from the initial low level. This indicates that the model has effectively and quantitatively improved its generalization ability and overall performance on unseen validation data by learning the high-value difficult samples selected by the present application.

[0224] Figure 7 The figure shows the loss function (Loss) change curve during training. The figure shows key indicators such as positioning loss (box_loss) and classification loss (cls_loss). All loss curves show a steady downward trend and eventually converge, indicating that the model's learning process is stable and effective, and it has successfully learned from new training data how to more accurately locate and classify targets, correcting its original "knowledge blind spot".

[0225] Embodiment 3

[0226] A computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the collaborative learning method based on edge intelligence grading and cloud strategy optimization of embodiments 1 or 2 when executing the computer program.

[0227] Embodiment 4

[0228] A computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the collaborative learning method based on edge intelligence grading and cloud strategy optimization according to any one of embodiments 1-2.

[0229] Embodiment 5

[0230] A collaborative learning system based on edge intelligence grading and cloud strategy optimization, comprising:

[0231] The preliminary screening module is configured to perform real-time inference of an AI model and preliminary screening of difficult samples, and specifically includes: deploying and running a main AI model on an edge computing node to process and analyze real-time video data streams; the real-time video data streams are a series of continuous and independent image frames formed after online decoding and frame extraction by a video acquisition device; the main AI model performs a target detection task for each input image; and samples with poor AI model output results are identified as difficult samples according to a preset preliminary screening rule.

[0232] The intelligent grading module is configured to perform intelligent grading of edge samples, and specifically includes: performing intelligent grading on each difficult sample screened out; quantitatively evaluating the potential learning value of the difficult sample and dividing a priority level label by extracting and analyzing a multi-dimensional feature vector of the difficult sample.

[0233] The data uploading module is configured to upload data with priority labels, and specifically includes: uploading the difficult samples after intelligent grading together with their corresponding priority level labels to a cloud server for storage and aggregation.

[0234] The state aggregation module is configured to perform cloud server state aggregation, and specifically includes: continuously receiving and aggregating data from one or more edge computing nodes by the cloud server; and periodically counting and updating a global state vector of the system by a background service, wherein the global state vector includes: cumulative number of samples of each priority level, time from the last successful training, current model performance, sample diversity, and cloud resource load.

[0235] The cloud intelligent training decision algorithm running module is configured to run a cloud intelligent training decision algorithm, and specifically includes: selecting a current optimal training action from a predefined action space according to the latest global state vector of the system and a preset optimal decision strategy by a training decision agent on the cloud server.

[0236] The model on-demand training and version management module is configured to: according to the optimal training action output by the decision agent, the cloud server automatically executes the corresponding model training task; if the decision is “not training”, step (6) is skipped; if the decision is “training”, the training module is called, the existing model is fine-tuned or retrained using the collected high-value samples, and a new model with a version number is generated;

[0237] The online updating and closed-loop feedback module is configured to: model online updating and closed-loop feedback; specifically including: training the generated new model, and issuing it to the edge computing node to realize online hot updating of the main AI model, so that the edge computing node obtains stronger recognition capability without interrupting service.

[0238] Those skilled in the art can easily understand that the above description is only a preferred embodiment of the present application, and is not intended to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A collaborative learning method based on intelligent classification of edge samples and intelligent decision-making in the cloud, characterized in that, include: (1) Real-time inference of AI model and preliminary screening of difficult samples; The main AI model is deployed and run on edge computing nodes to process and analyze real-time video data streams. Real-time video data streams refer to a series of continuous and independent image frames formed by video acquisition devices in real time, online decoding and frame extraction. For each input image frame, the main AI model performs an object detection task. According to the preset preliminary screening rules, samples with poor AI model output results are identified as difficult samples. (2) Intelligent classification of edge samples; For each difficult sample initially selected, intelligent classification is performed; by extracting and analyzing the multi-dimensional feature vectors of the difficult samples, the potential learning value of the difficult samples is quantitatively evaluated, and a priority level label is assigned. (3) Uploading data with priority tags; The problematic samples, after being intelligently classified, along with their corresponding priority level tags, are uploaded to the cloud server for storage and aggregation. (4) Cloud server status aggregation; The cloud server continuously receives and aggregates data from one or more edge computing nodes; The backend service periodically collects and updates the system's global state vector, which includes: the cumulative number of samples of each priority, the time since the last successful training, the current model performance, sample diversity, and cloud resource load. (5) Run cloud-based intelligent training and decision-making algorithms; On a cloud server, a training decision agent selects the current optimal training action from a predefined action space based on the latest global state vector of the system and a preset optimal decision strategy. (6) Model training on demand and version management; According to the optimal training action output by the decision agent, the cloud server automatically executes the corresponding model training task; if the decision is "do not train", then skip step (6); if the decision is "train", then call the training module, use the collected high-value samples to fine-tune or retrain the existing model, and generate a new model with a version number. (7) Online model update and closed-loop feedback; The newly generated model is distributed to edge computing nodes to enable online hot updates of the main AI model, allowing edge computing nodes to gain stronger recognition capabilities without interrupting service.

2. The collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to claim 1, characterized in that, In step (1), the main AI model is the YOLOv8 model; In step (1), the real-time video data stream is processed and analyzed, including: The input image frames are preprocessed, including: size normalization and numerical normalization; The preprocessed image frame is fed into the YOLOv8s model for a complete forward computation; The YOLOv8s model ultimately outputs a tensor containing multiple predictions; By performing post-processing operations on this tensor, one or more detection results are obtained. Each detection result includes the target's location information, the target category, and a confidence score that indicates the reliability of the prediction.

3. The collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to claim 1, characterized in that, In step (2), intelligent classification of edge samples includes: (2-1) Construction of Multidimensional Feature Vectors: For each problematic sample initially selected, a multidimensional feature vector F is extracted. The multidimensional feature vector F includes: Model confidence : Confidence score of the object detection box output by the main AI model , ; Image clarity The degree of blur in an image is quantified by calculating the variance of the normalized Laplacian operator, as shown below: ; in, The image after normalization. For variance calculation; Laplacian is the Laplacian operator; target significance. : It refers to the ratio of the area of ​​the target detection box to the total area of ​​the image, and is used to measure the size of the target. ; (2-2) Learning the value function from samples: Learning the value function from samples We perform weighted aggregation on the multidimensional feature vector F to obtain a comprehensive value score. (2-3) Priority-based ranking strategy: learning the value function based on samples The output value is used to prioritize the samples.

4. The collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to claim 1, characterized in that, Priority tiering strategies use different value thresholds ( , This can be achieved as follows: ; in, As a high priority, Medium priority Low priority; P refers to the final output result that assigns a priority level to each evaluated difficult sample; value function As shown below: ; in, , , Model confidence scores Image clarity and target salience Weighting coefficients; It is an activation function used to adjust image sharpness. Mapped to the interval [0, 1] ,in, and To adjust the parameters.

5. The collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to claim 1, characterized in that, In step (3), aggregation refers to the process by which the cloud server automatically sorts, routes and aggregates difficult samples with different priority labels from one or more edge nodes through a structured data stream processing and storage mechanism.

6. The collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to claim 1, characterized in that, In step (5), the cloud-based intelligent training decision algorithm is run; including: The goal of training a decision agent is to learn an optimal policy. To maximize long-term cumulative rewards; the decision logic of the training decision agent is modeled using the Q-Learning algorithm; (5-1) State space and action space: state Defined as a vector ,in, , , These represent the cumulative number of high-priority, medium-priority, and low-priority samples, respectively. This refers to the time since the last training session; Action space Defined as a discrete set, , , , These represent waiting, rapid training, and full training, respectively. (5-2) Reward Function: Design a reward function. Used to evaluate in state Next action Later transitioned to a new state The immediate reward obtained; the reward function is as follows: ; in, Indicates the execution of an action The improvement in mAP (mean accuracy) of the AI ​​model performance after the model is launched. for ,but ; Indicates the execution of an action The cost of computing resources consumed, if for ,but ; Indicates the execution of an action The time spent; (5-3) Action Value Function and Policy: Training the decision agent by learning an action value function To estimate the state Next action The long-term cumulative reward; the update of the Q function follows the Bellman equation, as follows: ; in, For learning rate, As a discount factor, This refers to immediate rewards. The next state refers to The maximum expected future return, This refers to a placeholder variable used in the max operation; Optimal strategy of proxy That is: in any state Next, choose the option that enables value maximization action As shown below: 。 7. A collaborative learning method based on intelligent classification of edge samples and cloud-based intelligent decision-making according to any one of claims 1-6, characterized in that, In step (7), the model is updated online and feedback is closed; including: (7-1) Model delivery and loading: The cloud server maintains a model repository to store all versions of the trained model; when a new and better model is generated, the cloud server sends an update instruction to the edge computing node through a dedicated API interface. The update instruction includes the download address and version number of the new model. (7-2) Edge-end hot update: After receiving the update instruction, the edge computing node downloads the new model file from the specified download address to the local machine; through an atomic model instance replacement operation, the main AI model object that is currently providing services in memory is safely replaced with the newly loaded model instance; (7-3) Closed-loop verification: After the model is updated, the edge computing nodes continue to identify the video stream.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the collaborative learning method based on edge sample intelligent classification and cloud intelligent decision-making as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the collaborative learning method based on edge sample intelligent classification and cloud intelligent decision-making as described in any one of claims 1-7.

10. A collaborative learning system based on intelligent classification of edge samples and intelligent decision-making in the cloud, characterized in that, include: The preliminary screening module is configured for: real-time inference of the AI ​​model and preliminary screening of difficult samples; specifically, it includes: deploying and running the main AI model on edge computing nodes to process and analyze real-time video data streams; real-time video data streams refer to a series of continuous and independent image frames formed by real-time acquisition of video data by video acquisition devices, followed by online decoding and frame extraction; for each input image frame, the main AI model performs a target detection task; according to preset preliminary screening rules, samples with poor AI model output results are identified as difficult samples; The intelligent grading module is configured as follows: intelligent grading of edge samples; specifically, it includes: intelligent grading of each difficult sample initially selected; quantitatively evaluating the potential learning value of the difficult sample by extracting and analyzing the multi-dimensional feature vector of the difficult sample, and assigning a priority level label. The data upload module is configured to upload data with priority tags; specifically, it includes uploading the intelligently graded difficult samples, along with their corresponding priority level tags, to the cloud server for storage and aggregation. The state aggregation module is configured as: cloud server state aggregation; specifically, it includes: the cloud server continuously receiving and aggregating data from one or more edge computing nodes; the background service periodically statistically analyzing and updating the system's global state vector, which includes: the cumulative number of samples of each priority, the time since the last successful training, the current model performance, sample diversity, and cloud resource load; The cloud-based intelligent training decision algorithm running module is configured to run the cloud-based intelligent training decision algorithm. Specifically, on the cloud server, a training decision agent selects the current optimal training action from a predefined action space based on the latest global state vector of the system and a preset optimal decision strategy. The model on-demand training and version management module is configured to: automatically execute the corresponding model training task on the cloud server based on the optimal training action output by the decision agent; if the decision is "do not train", skip it; if the decision is "train", call the training module, use the collected high-value samples to fine-tune or retrain the existing model, and generate a new model with a version number. The online update and closed-loop feedback module is configured as follows: online model update and closed-loop feedback; specifically, it includes: the newly generated model is distributed to the edge computing nodes to realize online hot update of the main AI model, so that the edge computing nodes can obtain stronger recognition capabilities without interrupting services.

Citation Information

Patent Citations

  • AI robot intelligent target identification and tracking platform based on deep learning

    CN120070496A

  • Data-driven learning model combination optimization method based on edge cloud collaboration

    CN120128577A