Cloud edge end collaborative model updating method and device, electronic equipment and storage medium
By combining model scoring with human feedback using a test set, the problem of model performance degradation and user demand deviation in the power cloud-edge-device collaborative architecture is solved. This enables regular monitoring and timely updates of the model, ensuring that the model remains efficient in changing environments.
Patent Information
- Application Number
- CN202310789600.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-06-29
AI Technical Summary
Under the existing power cloud edge-device collaborative architecture, the model's performance degrades when facing new data sources and lacks an effective update method, resulting in the model's inability to remain effective and a discrepancy between user needs and developer needs.
By acquiring the original scene test set, using the image recognition model for inference, calculating the model score MS and the human feedback score HFS, and updating the model after the comprehensive score, the monitoring cycle and threshold are set to ensure that the model performance is updated in a timely manner.
It enables regular monitoring and timely updates of model performance, solves the problem of model performance degradation in changing environments, reduces model drift and bias, and improves model adaptability and accuracy.
Smart Images

Figure CN116700760B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power automation technology, and specifically relates to a method, apparatus, electronic device and storage medium for updating a cloud-edge-device collaborative model. Background Technology
[0002] The energy sector is constantly evolving towards sustainable energy and new technologies. With the increasing demand for smarter power networks, the power cloud-edge-device collaborative architecture is being used more and more widely. This architecture divides the power system into three layers: cloud, edge, and terminal, and achieves real-time monitoring, analysis, and control of the power system through data acquisition, transmission, processing, and analysis. This architecture can help the power system transform from traditional centralized management to a decentralized, personalized approach to adapt to the continuous changes in the electricity market and the evolving needs of users.
[0003] At the power cloud level, cloud computing technology can store and process massive amounts of data in the power system, enabling centralized data management and analysis. Based on big data technology, historical data in the power system can be analyzed and mined to identify potential problems and provide decision-making support for the system's operation and management. Simultaneously, cloud-based data services enable secure sharing and efficient utilization of data from multiple parties.
[0004] At the power edge and terminal levels, IoT technology enables seamless connectivity between various sensors and terminal devices and the cloud, facilitating real-time data collection and transmission. This helps power systems understand changes in various indicators in a timely manner, making power system monitoring and control more accurate and effective. Furthermore, edge-based AI models can quickly respond to business analysis needs, conserving network and computing resources.
[0005] However, due to the complexity of cloud-edge-device collaborative architectures, limited hardware resources, and constantly evolving application requirements, building and maintaining these models is becoming increasingly challenging. AI model lifecycle management on cloud-edge-device collaborative architectures is crucial to ensuring that AI models are effectively updated, deployed, and maintained throughout their entire lifecycle.
[0006] A major challenge in managing the lifecycle of AI models is ensuring their effectiveness in a constantly changing environment. Models can degrade over time, especially with the emergence of new data sources, which can lead to significant biases in their inferences. Another challenge is the often-existing gap between the developers of AI models and the users who utilize them (such as frontline engineers and managers). This mismatch in needs can result in models that fail to meet real-world requirements or even provide incorrect, biased analytical results. Summary of the Invention
[0007] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for updating a cloud-edge-device collaborative model, in order to solve the technical problem that the performance and availability of the model decrease with the introduction of new data sources in the existing power cloud-edge-device collaborative model due to the lack of an effective model update method.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] In a first aspect, the present invention provides a method for updating a cloud-edge-device collaborative model, comprising:
[0010] Obtain the original scene test set; use the image recognition model deployed in the cloud-edge-device collaborative system to perform inference on the original scene test set and obtain the original inference results;
[0011] The image recognition model at time t is tested, and the model score MS of the image recognition model is obtained; the human feedback score HFS of the image recognition model at time t is obtained based on the original inference results.
[0012] A comprehensive score is calculated based on the model score (MS) and the human feedback score (HFS).
[0013] The overall score is compared with the threshold, and the image recognition model is updated based on the comparison results.
[0014] A further improvement of this invention is that the step of obtaining the original scene test set and using an image recognition model deployed in a cloud-edge-device collaborative system to perform inference on the original scene test set to obtain the original inference result specifically includes:
[0015] At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the pre-acquired original scene test set to obtain the original inference results.
[0016] A further improvement of this invention is that the step of detecting the image recognition model at time t and obtaining the model score MS of the image recognition model specifically includes:
[0017] At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status;
[0018] The formula for calculating the model score MS is:
[0019] For object detection models, the calculation method is as shown in formula (1):
[0020]
[0021] For non-target detection models, the calculation method is as shown in formula (2):
[0022]
[0023] A further improvement of this invention is that the step of obtaining the human feedback score (HFS) of the image recognition model at time t based on the original inference results specifically includes:
[0024] X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period.
[0025] The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset.
[0026] Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results and corresponding performance indicators. Among the X2 inference images with recognition results, X3 inference images with better recognition results are selected by the survey subjects. The selected X3 inference images with recognition results and corresponding performance indicators are added to the inference archive dataset.
[0027] Calculate the Human Feedback Score (HFS) based on the inference archive dataset:
[0028]
[0029] A further improvement of this invention is that the step of comparing the comprehensive score with the threshold and updating the image recognition model based on the comparison result specifically includes:
[0030] If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
[0031] A further improvement of this invention is that, in the step of calculating the comprehensive score based on the model score (MS) and the human feedback score (HFS), the formula for calculating the comprehensive score is:
[0032]
[0033] Where β is a coefficient.
[0034] Secondly, the present invention provides an update device for a cloud-edge-device collaborative model, comprising:
[0035] The original inference module is used to obtain the original scene test set; the image recognition model deployed in the cloud-edge-device collaborative system is used to infer the original scene test set to obtain the original inference result.
[0036] The monitoring and inference module is used to detect the image recognition model at time t and obtain the model score MS of the image recognition model; and to obtain the human feedback score HFS of the image recognition model at time t based on the original inference results.
[0037] The calculation module is used to calculate the overall score based on the model score (MS) and the human feedback score (HFS).
[0038]
[0039] Where β is a coefficient;
[0040] The update module compares the comprehensive score with the threshold and updates the image recognition model based on the comparison results.
[0041] A further improvement of this invention is that: the original inference module acquires the original scene test set; the step of using an image recognition model deployed in the cloud-edge-device collaborative system to infer the original scene test set and obtain the original inference result specifically includes:
[0042] At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the pre-acquired original scene test set to obtain the original inference results.
[0043] A further improvement of this invention is that the step of the monitoring and inference module detecting the image recognition model at time t and obtaining the model score MS of the image recognition model specifically includes:
[0044] At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status;
[0045] The formula for calculating the model score MS is:
[0046] For object detection models, the calculation method is as shown in formula (1):
[0047]
[0048] For non-target detection models, the calculation method is as shown in formula (2):
[0049]
[0050] A further improvement of this invention is that the step of the monitoring inference module obtaining the human feedback score (HFS) of the image recognition model at time t based on the original inference results specifically includes:
[0051] X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period.
[0052] The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset.
[0053] Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results and corresponding performance indicators. Among the X2 inference images with recognition results, X3 inference images with better recognition results are selected by the survey subjects. The selected X3 inference images with recognition results and corresponding performance indicators are added to the inference archive dataset.
[0054] Calculate the Human Feedback Score (HFS) based on the inference archive dataset:
[0055]
[0056] A further improvement of this invention is that the step of updating the module by comparing the comprehensive score with the threshold and updating the image recognition model based on the comparison result specifically includes:
[0057] If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
[0058] A further improvement of this invention is that the formula for calculating the comprehensive score is:
[0059]
[0060] Where β is a coefficient.
[0061] Thirdly, the present invention provides an electronic device including a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the cloud-edge-device collaborative model update method described above.
[0062] Fourthly, the present invention provides a computer-readable storage medium storing at least one instruction, which, when executed by a processor, implements the cloud-edge-device collaborative model update method.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] This invention provides a method for updating a cloud-edge-device collaborative model, comprising: acquiring an original scene test set; using an image recognition model deployed in a cloud-edge-device collaborative system to infer the original scene test set and obtain original inference results; detecting the image recognition model at time t and obtaining the model score MS; obtaining the human feedback score HFS of the image recognition model at time t based on the original inference results; calculating a comprehensive score based on the model score MS and the human feedback score HFS; comparing the comprehensive score with a threshold, and updating the image recognition model according to the comparison results. This invention sets a monitoring cycle, enabling regular monitoring of model performance during model usage; and timely detection and training updates when model performance declines, promptly correcting model drift and bias issues, and maintaining model performance to cope with image recognition from new data sources.
[0065] Furthermore, in addition to considering the single dimension of model performance, this invention integrates model application evaluation indicators based on human feedback and uses a fusion weighting method to comprehensively evaluate model performance and application status, making the model update strategy of this invention more comprehensive and accurate.
[0066] Furthermore, this invention uses a model update method under a power cloud edge-device collaborative architecture based on machine learning operations, which solves the problem that existing strategies cannot keep models effective in constantly changing environments, as well as the demand discrepancy between the development of artificial intelligence models and the users who utilize these models. Attached Figure Description
[0067] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0068] Figure 1 A diagram illustrating the steps involved in machine learning operations;
[0069] Figure 2 A schematic diagram illustrating the overall strategy for model lifecycle management;
[0070] Figure 3 This is a flowchart illustrating the model update method.
[0071] Figure 4 This is a flowchart illustrating the update method of a cloud-edge-device collaborative model according to the present invention.
[0072] Figure 5 This is a schematic diagram of the structure of an update device for a cloud-edge-device collaborative model according to the present invention;
[0073] Figure 6 This is a schematic diagram of the structure of an electronic device according to the present invention. Detailed Implementation
[0074] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0075] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this invention is for describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0076] Explanation of relevant terms:
[0077] Power cloud-edge-device collaboration: This approach organically combines cloud, edge, and terminal devices within the power system. Through data acquisition, transmission, storage, and processing, it enables comprehensive perception, intelligent analysis, and precise control of power information.
[0078] Model lifecycle management: Comprehensive management and monitoring of the entire model development, deployment, operation and maintenance, and update process to ensure the stability, reliability and sustainability of the model.
[0079] MLOPs: Machine Learning Operations, which streamline the end-to-end model development process by establishing a workflow for development, validation, deployment, testing, and feedback.
[0080] Human feedback: Collect feedback from end users and domain experts on model application through interactive survey systems, questionnaires, interviews, and other methods.
[0081] To address the challenges in model lifecycle management in traditional power cloud-edge-device collaboration due to the complexity of the collaboration structure, limited hardware resources, and constantly changing application requirements, this invention provides a cloud-edge-device collaboration model lifecycle management method that integrates MLOps and human feedback. This method aims to solve the problems of declining model performance and availability caused by the lack of effective model lifecycle management strategies and the absence or lag in feedback on model application effects in existing power cloud-edge-device collaboration models.
[0082] 1. Model management methods based on machine learning operations
[0083] The models in power cloud-edge-device collaboration need to process large amounts of real-time data, thus typically requiring deployment on near-edge devices, which places high demands on model optimization. Secondly, the number of near-edge devices required is significantly greater than in cloud deployment, posing higher requirements for model deployment and management. Furthermore, long-term model maintenance and updates based on business feedback are also necessary. To address these challenges, this invention proposes a DevOps-based MLOps framework.
[0084] DevOps is a set of processes, methods, and systems that promote a high degree of collaboration between development and IT operations, thereby improving the reliability, stability, resilience, and security of the production environment while enabling high-frequency deployments.
[0085] DevOps is widely used in software development. As a development philosophy, it emphasizes collaboration, communication, and integration between software development (Dev) and IT operations (Ops) teams to shorten system development cycles and accelerate the delivery of reliable and high-quality software products. Machine Learning Operations (MLOps) applies DevOps principles and best practices to the AI model development workflow. It focuses on simplifying the end-to-end model development process, establishing a workflow for development, validation, deployment, testing, and feedback to improve model accuracy and effectiveness, and providing a mechanism for further refining the model based on feedback to better suit the specific needs of the target application.
[0086] Please see Figure 1As shown, the first step in MLOps is design and analysis. This stage involves gaining a deep understanding of the domain expertise of the data being analyzed, considering the nature and specificity of the data and application, and selecting an appropriate model structure. For example, for given input data features, a particular type of neural network may be better suited than others. The second step is data acquisition and preparation. This step includes ensuring the data is formatted correctly, cleaning the data, and properly structuring the data. The third step is building and training the model. In this step, the model is built and trained on the prepared dataset to obtain a high-quality model that is scalable, optimizable, and adaptable. The fourth step is model testing before deployment. At this stage, the model is tested for effectiveness, correctness, and usability. The fifth step is model deployment; the model deployment process involves actually applying the model to a production environment. This process includes connecting to cloud or edge computing resources and integrating with other relevant infrastructure to ensure the model can be deployed on target devices. The sixth step is model monitoring and improvement after deployment; the model's inference performance is monitored, and the model is optimized as needed. Continuous monitoring helps diagnose model and data input problems and identifies potential errors early, ensuring that model performance aligns with design goals. Optimization is an ongoing process to improve model performance in production. This is typically accomplished by optimizing the model based on user feedback, new data, and performance degradation.
[0087] 2. Model evaluation based on performance metrics
[0088] In the field of machine learning, commonly used evaluation metrics are used to measure model performance and accuracy. Among these, commonly used image model evaluation metrics include accuracy, precision, recall, and F1 score. These metrics not only provide a comprehensive evaluation of model performance but also allow for the selection of different combinations to suit various applications. Precision is suitable for datasets that emphasize positive examples, while recall is suitable for datasets that emphasize negative examples. Image model evaluation is based on four parameters:
[0089] True Positive (TP): The prediction is positive and the actual result is positive, meaning the algorithm's prediction is correct.
[0090] False Positive (FP): The prediction is positive, but the actual result is negative, meaning the algorithm made a prediction error.
[0091] True Negative (TN): The predicted case was negative, and the case was actually negative, meaning the algorithm's prediction was correct.
[0092] False Negative (FN): The prediction was negative, but the actual result was positive, meaning the algorithm made a prediction error.
[0093] Table 1 Model Performance Evaluation Indicators
[0094]
[0095]
[0096] By comprehensively considering these indicators in Table 1, the performance of the model can be evaluated more accurately.
[0097] Depending on the application scenario, they can be divided into object detection models and non-object detection models, and the scoring formulas for the two are slightly different.
[0098] For object detection models, the model score weights are calculated as shown in formula (1). If there are special requirements for object detection models, the weights can be adjusted accordingly.
[0099]
[0100] For non-target detection models, the model score is calculated as shown in formula (2). If there are special requirements in non-target detection models, the corresponding indicator weights can be adjusted accordingly.
[0101]
[0102] 3. Model management strategy that integrates machine learning operations and human feedback
[0103] 3.1 Overall Strategy
[0104] Due to the nature of cloud-edge-device model applications, models within the same domain often require further modifications depending on the objectives, environment, and even application time. In this situation, each update to the domain model version may mean a series of model modifications and updates, making MLOps management complex and inefficient, with a large amount of resources being used for redundant development and management.
[0105] Combining MLOps with human feedback can facilitate the management of machine learning models across cloud-edge architectures, integrating domain expertise and frontline employee feedback into the iterative process. This allows models to improve over time by incorporating feedback from domain experts and frontline staff, resulting in highly adaptable and reliable models.
[0106] Please see Figure 1As shown, model lifecycle management can be divided into model design and requirements analysis, data collection and cleaning, model training, model testing, model deployment and model monitoring. The last stage is to update the model using feedback data. By incorporating weighted feedback data into the model update algorithm, the model can be updated in real time to ensure that the model remains accurate and effective under changing environmental conditions.
[0107] 3.2 Model Data, Training, and Deployment Strategies
[0108] Data collected in cloud-edge-device collaboration includes edge devices such as sensors, smart meters, and IoT devices; cloud devices such as edge servers and data nodes; and cloud devices such as business systems and data platforms, as well as user and human feedback data collected through other channels. This raw data needs to be cleaned and normalized to transform it into a dataset suitable for model training. Data validation techniques are then applied to verify the data quality, ensuring the accuracy and reliability of the data used for model training and evaluation. By adopting these data management and quality assurance practices, the power cloud-edge system can maintain high-quality data for model training and evaluation, resulting in more accurate and reliable prediction and control strategies. Following data management practices also enhances model security and interpretability, making it more suitable for real-world applications. Utilizing pre-trained models or knowledge transfer from related tasks reduces training time and improves model performance, especially when data for the target task is limited. Deploying models according to the MLOps pipeline reduces manual intervention, minimizes errors, and ensures deployment consistency. Continuous monitoring of the performance of deployed models in real-world scenarios monitors model inference performance.
[0109] 3.3 Model Update Method Integrating Model Performance Metrics and Human Feedback
[0110] The most important step is to define feedback requirements, identify the stakeholders involved in model development, the types of feedback to be collected, and the domain experts and users providing feedback. The feedback design should be adaptable to evolving business needs. The next stage is collecting feedback from human users or experts; high-quality feedback data can capture user experience and reactions to model predictions. When selecting the most suitable model for a specific power cloud-edge system, performance metrics, complexity, and interpretability should be considered, and human expert feedback should be incorporated into the model training process. This feedback can improve the learning strategy by guiding the algorithm to achieve better policies and avoiding potential problems. Update methods include... Figure 3 As shown.
[0111] This requires establishing a high degree of trust and cooperation with the feedback providers to encourage their participation in the feedback process. After collecting feedback through surveys, user ratings, or other data collection methods, the data should be processed promptly, including cleaning and weighting the feedback.
[0112] Example 1
[0113] This invention provides a method for updating a cloud-edge-device collaborative model, comprising the following steps:
[0114] S1. After the image recognition model is deployed in the cloud-edge-device collaborative system, the image recognition model is used to perform inference on the pre-acquired first scene test set, and the inference results are obtained and archived. The inference results include: the inference image with recognition results completed by the model and the corresponding performance indicators. The performance indicators include the performance indicators in Table 1.
[0115] At times S2 and t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period and added to the first scene test set to obtain the second scene test set.
[0116] S21. Use the image recognition model at time t to perform inference on the second scene test set and obtain the inference result; the inference result includes: the inference image with recognition result completed by the model and the corresponding performance index;
[0117] S22. Calculate the model score MS of the image recognition model according to formula (1) or (2) based on the performance index in the reasoning results;
[0118] At times S3 and t, the image recognition model reaches the detection cycle, and at the same time, survey subjects are randomly selected from the user and domain expert database.
[0119] S31. Extract X1 images from the first scene test set, and extract X2 images from the new data generated in the previous detection period.
[0120] S32. Using the image recognition model at time t, perform inference on X1 images extracted from the first scene test set to obtain X1 inference images with recognition results and performance indicators after model recognition is completed; simultaneously, retrieve the inference images with recognition results for the corresponding X1 images stored in step S1, and display the two inference images of the same image on the same screen; obtain the inference image with better recognition effect among the two inference images selected by the survey subject, and add the selected inference image and corresponding performance indicators to the inference archive dataset; if the recognition effects are consistent, store the inference image and corresponding performance indicators recognized in S1 into the inference archive dataset.
[0121] Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images and corresponding performance indicators. X3 inference images with better recognition performance selected by the survey subjects from the X2 inference images are selected. The selected X3 inference images and their corresponding performance indicators are added to the inference archive dataset. For the X2-X3 inference images that the survey subjects believe have poor recognition performance, the corresponding original images are manually annotated and added to the second scene test set.
[0122] S34. Calculate the Human Feedback Score (HFS) based on the reasoning archive dataset;
[0123]
[0124] S4. Calculate the overall score, as shown in formula (3):
[0125]
[0126] The value of β is generally 1. Based on the comparison between the comprehensive score and the threshold, if the score is higher than the threshold, the image recognition model is considered effective and does not need to be updated. If the score is lower than the threshold and the comprehensive score differs from the threshold by less than 10%, the image recognition model is trained and updated using newly generated images in the most recent period. If the comprehensive score differs from the threshold by more than or equal to 10%, the image recognition model is terminated and removed from the platform.
[0127] Example 2
[0128] Please see Figure 4 As shown, the present invention provides a method for updating a cloud-edge-device collaborative model, comprising:
[0129] S1. Obtain the original scene test set; use the image recognition model deployed in the cloud-edge-device collaborative system to perform inference on the original scene test set and obtain the original inference results;
[0130] S2. When the monitoring image recognition model reaches the detection period (reaching the monitoring period at time t), detect the image recognition model at time t and obtain the model score MS of the image recognition model; obtain the human feedback score HFS of the image recognition model at time t based on the original inference results.
[0131] S3. Calculate the comprehensive score based on the model score MS and the human feedback score HFS;
[0132] S4. Compare the comprehensive score with the threshold, and update the image recognition model based on the comparison results.
[0133] In one specific implementation, the steps of obtaining the original scene test set and using an image recognition model deployed in the cloud-edge-device collaborative system to perform inference on the original scene test set to obtain the original inference result specifically include:
[0134] At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the original scene test set obtained in advance to obtain the original inference results.
[0135] In one specific implementation, the step of detecting the image recognition model at time t and obtaining the model score MS of the image recognition model specifically includes:
[0136] At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status;
[0137] The formula for calculating the model score MS is:
[0138] For object detection models, the calculation method is as shown in formula (1):
[0139]
[0140] For non-target detection models, the calculation method is as shown in formula (2):
[0141]
[0142] In one specific implementation, the step of obtaining the human feedback score (HFS) of the image recognition model at time t based on the original inference results specifically includes:
[0143] X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period.
[0144] The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset.
[0145] Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results and corresponding performance indicators. Among the X2 inference images with recognition results, X3 inference images with better recognition results are selected by the survey subjects. The selected X3 inference images with recognition results and corresponding performance indicators are added to the inference archive dataset.
[0146] Calculate the Human Feedback Score (HFS) based on the inference archive dataset.
[0147]
[0148] In one specific embodiment, the step of comparing the comprehensive score with a threshold and updating the image recognition model based on the comparison result specifically includes:
[0149] If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
[0150] In one specific implementation, the formula for calculating the comprehensive score is as follows:
[0151]
[0152] Where β is a coefficient.
[0153] Example 3
[0154] Please see Figure 5 As shown, the present invention provides an update device for a cloud-edge-device collaborative model, comprising:
[0155] The original inference module is used to obtain the original scene test set; the image recognition model deployed in the cloud-edge-device collaborative system is used to infer the original scene test set to obtain the original inference result.
[0156] The monitoring and inference module is used to detect the image recognition model at time t and obtain the model score MS of the image recognition model; and to obtain the human feedback score HFS of the image recognition model at time t based on the original inference results.
[0157] The calculation module is used to calculate the overall score based on the model score (MS) and the human feedback score (HFS).
[0158] The update module compares the comprehensive score with the threshold and updates the image recognition model based on the comparison results.
[0159] In one specific implementation, the steps of the original inference module acquiring the original scene test set and using the image recognition model deployed in the cloud-edge-device collaborative system to infer the original scene test set and obtain the original inference result specifically include:
[0160] At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the original scene test set obtained in advance to obtain the original inference results.
[0161] In one specific implementation, the step of the monitoring and inference module detecting the image recognition model at time t and obtaining the model score MS of the image recognition model specifically includes:
[0162] At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status;
[0163] The formula for calculating the model score MS is:
[0164] For object detection models, the calculation method is as shown in formula (1):
[0165]
[0166] For non-target detection models, the calculation method is as shown in formula (2):
[0167]
[0168] In one specific implementation, the step of the monitoring inference module obtaining the human feedback score (HFS) of the image recognition model at time t based on the original inference results specifically includes:
[0169] X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period.
[0170] The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset.
[0171] Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results and corresponding performance indicators. Among the X2 inference images with recognition results, X3 inference images with better recognition results are selected by the survey subjects. The selected X3 inference images with recognition results and corresponding performance indicators are added to the inference archive dataset.
[0172] Calculate the Human Feedback Score (HFS) based on the inference archive dataset.
[0173]
[0174] In one specific implementation, the step of updating the image recognition model by comparing the comprehensive score with a threshold and updating the model based on the comparison result specifically includes:
[0175] If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
[0176] In one specific implementation, the formula for calculating the comprehensive score is as follows:
[0177]
[0178] Where β is a coefficient.
[0179] Example 4
[0180] Please see Figure 6 As shown, the present invention also provides an electronic device 100 for implementing a cloud-edge-device collaborative model update method; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0181] The memory 101 can be used to store the computer program 103. The processor 102 implements the update method steps of the cloud-edge-device collaborative model described in Embodiment 1 or 2 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0182] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.
[0183] The memory 101 in the electronic device 100 stores multiple instructions to implement a cloud-edge-device collaborative model update method, and the processor 102 can execute the multiple instructions to achieve the following:
[0184] Obtain the original scene test set; use the image recognition model deployed in the cloud-edge-device collaborative system to perform inference on the original scene test set and obtain the original inference results;
[0185] The image recognition model at time t is tested, and the model score MS of the image recognition model is obtained; the human feedback score HFS of the image recognition model at time t is obtained based on the original inference results.
[0186] A comprehensive score is calculated based on the model score (MS) and the human feedback score (HFS).
[0187] The overall score is compared with the threshold, and the image recognition model is updated based on the comparison results.
[0188] Example 5
[0189] If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0190] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0192] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0193] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for updating a cloud-edge-device collaborative model, characterized in that, include: Obtain the original scene test set; The image recognition model deployed in the cloud-edge-device collaborative system is used to perform inference on the original scene test set to obtain the original inference results. The image recognition model at time t is tested, and the model score MS of the image recognition model is obtained; the human feedback score HFS of the image recognition model at time t is obtained based on the original inference results. A comprehensive score is calculated based on the model score (MS) and the human feedback score (HFS). The overall score is compared with the threshold, and the image recognition model is updated based on the comparison results; The steps for detecting the image recognition model at time t and obtaining the model score MS of the image recognition model specifically include: At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status; The formula for calculating the model score MS is: For object detection models, the calculation method is as follows: (1) For non-object detection models, the calculation method is as shown in formula (2): The step of obtaining the human feedback score (HFS) of the image recognition model at time t based on the original inference results specifically includes: X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period. The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset. Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results. Among the X2 inference images with recognition results, X3 inference images with recognition results are selected by the survey subjects with better recognition performance. The selected X3 inference images with recognition results are added to the inference archive dataset. The selected X3 original images are labeled and added to the scene test dataset. Calculate the Human Feedback Score (HFS) based on the inference archive dataset: ; In the step of calculating the comprehensive score based on the model score (MS) and the human feedback score (HFS), the formula for calculating the comprehensive score is as follows: Where β is a coefficient.
2. The update method for the cloud-edge-device collaborative model according to claim 1, characterized in that, The steps of obtaining the original scene test set and using the image recognition model deployed in the cloud-edge-device collaborative system to perform inference on the original scene test set to obtain the original inference result specifically include: At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the pre-acquired original scene test set to obtain the original inference results.
3. The update method for the cloud-edge-device collaborative model according to claim 1, characterized in that, The step of comparing the comprehensive score with the threshold and updating the image recognition model based on the comparison result specifically includes: If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
4. An update device for a cloud-edge-device collaborative model, characterized in that, include: The original inference module is used to obtain the original scenario test set; The image recognition model deployed in the cloud-edge-device collaborative system is used to perform inference on the original scene test set to obtain the original inference results. The monitoring and inference module is used to detect the image recognition model at time t and obtain the model score MS of the image recognition model; and to obtain the human feedback score HFS of the image recognition model at time t based on the original inference results. The calculation module is used to calculate the overall score based on the model score (MS) and the human feedback score (HFS). The update module is used to compare the comprehensive score with the threshold and update the image recognition model based on the comparison results. The steps of the monitoring and inference module to detect the image recognition model at time t and obtain the model score MS of the image recognition model specifically include: At time t, the image recognition model reaches the detection period; X images are extracted from the new data generated in the previous detection period, labeled, and added to the original scene test set; the image recognition model at time t is used to infer the original scene test set after adding X images to obtain the first inference result; the model score MS of the image recognition model is calculated based on the performance indicators in the first inference result; the first inference result includes the mean precision mAP, recall, F1 score, area under the ROC curve AUC, and false positive rate FPR of each category obtained by calculating the inference results and the ground truth evaluation results of all images in the test dataset, as well as the inference time and computing resource utilization obtained by monitoring the running status; The formula for calculating the model score MS is: For object detection models, the calculation method is as follows: (1) For non-object detection models, the calculation method is as shown in formula (2): The monitoring inference module obtains the human feedback score (HFS) of the image recognition model at time t based on the original inference results, specifically including: X1 images are extracted from the original scene test set, and X2 images are extracted from the new data generated in the previous detection period. The image recognition model at time t is used to infer X1 extracted images, resulting in X1 inference images with recognition results and performance metrics. Simultaneously, the inference images with recognition results for the corresponding X1 images in the original inference results are retrieved, and the two inference images of the same image are displayed side-by-side. The inference image with better recognition performance among the two inference images selected by the survey subjects is obtained, and the selected inference image and its corresponding performance metrics are added to the inference archive dataset. The number of times C is recorded that the image recognition model at time t is selected as having better recognition performance when inferring the X1 extracted images. If the recognition results are consistent, the inference image and its corresponding performance metrics from the original inference results are stored in the inference archive dataset. Using the image recognition model at time t, X2 new images are extracted to obtain X2 inference images with recognition results and corresponding performance indicators. Among the X2 inference images with recognition results, X3 inference images with better recognition results are selected by the survey subjects. The selected X3 inference images with recognition results and corresponding performance indicators are added to the inference archive dataset. Calculate the Human Feedback Score (HFS) based on the inference archive dataset: ; In the step of calculating the comprehensive score based on the model score (MS) and the human feedback score (HFS) in the calculation module, the formula for calculating the comprehensive score is as follows: Where β is a coefficient.
5. The update device for the cloud-edge-device collaborative model according to claim 4, characterized in that, The steps of obtaining the original scene test set by the original inference module and using the image recognition model deployed in the cloud-edge-device collaborative system to infer the original scene test set and obtain the original inference result include: At the moment when the image recognition model is initially deployed in the cloud-edge-device collaborative system, the image recognition model is used to infer the original scene test set obtained in advance to obtain the original inference results.
6. The update device for the cloud-edge-device collaborative model according to claim 4, characterized in that, The update module compares the comprehensive score with the threshold and updates the image recognition model based on the comparison results. This process specifically includes: If the overall score is greater than the threshold, continue monitoring for the next cycle; if 90% threshold ≤ overall score ≤ 100% threshold, use newly generated images from the most recent cycle to train and update the image recognition model, and continue monitoring for the next cycle; if the overall score is less than 90% threshold, remove the image recognition model.
7. An electronic device, characterized in that, It includes a processor and a memory, the processor being used to execute a computer program stored in the memory to implement the cloud-edge-device collaborative model update method as described in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the cloud-edge-device collaborative model update method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Inference computing apparatus, model training apparatus, and inference computing system
CN113597618A
