Model optimization method and system and storage medium
By training, evaluating, deploying and monitoring models in the model optimization method, the problem of low model optimization efficiency is solved, real-time data reflow and optimization after the model is deployed online are realized, and the optimization efficiency of the model is improved.
Patent Information
- Application Number
- CN202410694531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-24
AI Technical Summary
The efficiency of model optimization in the existing technology is low, mainly due to the isolation of training and application environments, which makes it difficult for the model to reflow online data in real time and cannot effectively expand the training set, thus affecting the optimization of the model.
Train the target model through the training data set, conduct evaluation, test and deploy to the service, monitor the running results and update the training data set, generate a new model to replace the old model, cover the entire process of model generation and optimization, and realize real-time data reflow after the model is deployed online. and optimization.
It improves the efficiency of model optimization, allowing developers to efficiently generate high-precision models, obtain difficult case data in real time after the model is deployed online, and add it to the original training data set for optimization, which reduces the isolation between the online environment and the training environment, and achieves Real-time data collection and model optimization.
Smart Images

Figure CN118690148A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model optimization method, system and storage medium. Background Art
[0002] The conventional model training process generally includes data labeling, model training, model tuning, and model online. The isolation of the online environment and the training environment will cause the separation of training and application. If it is necessary to collect useful online data to expand the model training set to optimize the model, many additional operations are required, resulting in low model optimization efficiency. Summary of the invention
[0003] The embodiments of the present application provide a model optimization method, system and storage medium to solve the problem of low optimization efficiency of the model in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a method for optimizing a model, the method comprising:
[0005] According to the training data set, at least one first target model is obtained by training;
[0006] Performing an evaluation test on the at least one first target model, and adding the at least one first target model that meets expectations into a model warehouse to generate at least one second target model;
[0007] Selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service;
[0008] Monitor the operation result of the service, and obtain a first detection result of the target data after the target data is detected by the second target model;
[0009] The training data set is updated according to the first detection result, thereby optimizing and updating the first target model, and a new second target model is generated for the service to perform model replacement.
[0010] In some embodiments, the performing an evaluation test on the at least one first target model includes:
[0011] Get the validation dataset;
[0012] The at least one first target model is trained and evaluated based on the validation data set.
[0013] In some embodiments, the step of training and evaluating the at least one first target model according to the validation data set includes:
[0014] According to the validation data set, obtaining model performance data of the at least one first target model under different model hyperparameters;
[0015] Determining target model hyperparameters based on the model performance data;
[0016] Determine the at least one second target model based on the target model hyperparameters and the at least one first target model.
[0017] In some embodiments, the method further comprises: performing an evaluation test on the at least one first target model;
[0018] Obtain the historical data of completed detection in the test data set or target data;
[0019] The first target model is trained and tested according to the historical data detected in the test data set or the target data to test the performance of the at least one first target model.
[0020] In some embodiments, the method further comprises:
[0021] An optimization strategy is configured for the second target model in the model warehouse, wherein the optimization strategy is used to limit the output result of the second target model, and different optimization strategy parameters are configured for different second target models;
[0022] The second target model outputs a first detection result based on an optimization strategy.
[0023] In some of the embodiments, the model warehouse is provided with different categories of second target models, and different second target models support configuration of different optimization strategies.
[0024] In some embodiments, selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service includes:
[0025] Selecting the target data and the second target model to create a monitoring service;
[0026] triggering a pre-release test of the second target model;
[0027] After the pre-release test is completed, the second target model is released to complete the deployment of the second target model.
[0028] In some embodiments, the method further comprises:
[0029] updating the optimization strategy according to the pre-release test results;
[0030] According to the updated optimization strategy, configuring the optimization strategy for the second target model;
[0031] Deploy the second target model configured with the updated optimization strategy to the service.
[0032] In some embodiments, the method further comprises:
[0033] A pre-release page is set up to evaluate the model before it goes online. By comparing and displaying the test results of different optimization strategies, the optimization strategy that meets expectations is determined and updated.
[0034] In some of the embodiments, monitoring the operation result of the service includes:
[0035] According to the binding relationship between the service and the target data, the first detection result is obtained and a statistical page is formed;
[0036] The statistics page includes at least one statistical chart for generating an operation status of the second target model and the first detection result.
[0037] In some embodiments, the method further comprises:
[0038] Jump to target data through the statistics page, and visualize the first detection result under at least one data dimension in the statistics page.
[0039] In some embodiments, the method further comprises:
[0040] Obtain data of the service to generate a service list;
[0041] For target data for which the first detection result has been generated or for test data for which the first detection result needs to be generated, a required service is selected through the service list to perform service binding to generate the required detection result.
[0042] In some embodiments, updating the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement, includes:
[0043] Obtaining a first detection result of the target data for confirmation and update;
[0044] Adding the first detection result or the detection result with an abnormality to the training data set to generate an updated training data set;
[0045] Training the first target model according to the updated training data set to obtain an optimized first target model;
[0046] Performing an evaluation test on the optimized first target model, and adding the optimized first target model to a model warehouse to generate an optimized second target model;
[0047] A related second target model list is obtained from the service, and an optimized second target model is selected for replacement.
[0048] In some embodiments, the method further comprises:
[0049] Acquire a second target model in the model bin;
[0050] The training data set is trained according to the second target model to obtain the at least one first target model.
[0051] In some embodiments, adding the at least one first target model that meets expectations into a model warehouse to generate at least one second target model includes:
[0052] Generating corresponding version information for the at least one second target model newly added to the model warehouse;
[0053] The service obtains corresponding second target model information based on the version information to perform model replacement.
[0054] In a second aspect, an embodiment of the present application provides a model optimization system, the system comprising:
[0055] A model training module, used for training at least one first target model according to a training data set;
[0056] An evaluation and testing module, used to perform an evaluation and test on the at least one first target model, and add the at least one first target model that meets expectations into a model warehouse to generate at least one second target model;
[0057] A model deployment module, used to select a second target model from the model warehouse and bind it to the target data, and deploy the second target model to the service;
[0058] A service monitoring module, used to monitor the operation result of the service and obtain the first detection result of the target data after the target data is detected by the second target model;
[0059] The online data module is used to update the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement.
[0060] In a third aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the model optimization method described in the first aspect are implemented.
[0061] Compared with the prior art, the optimization method, system and storage medium of a model provided in the embodiments of the present application obtain at least one first target model by training according to a training data set; evaluate and test at least one first target model, add at least one first target model that meets expectations to a model warehouse to generate at least one second target model; select a second target model from the model warehouse and bind it to the target data, and deploy the second target model to the service; monitor the operation results of the service, and obtain the first detection result after the target data is detected by the second target model; update the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to replace the model, covering the entire process of model generation and optimization, so that developers can efficiently generate high-precision models for specific tasks, and after the model is deployed and used online, obtain difficult example data in real time, add the original training data set, tune the model, and go online again, that is, the real-time data of the online environment can be added to the training data set at any time and the model training and tuning can be performed, the online environment and the training environment are not isolated, and useful online data can be collected in real time to expand the model training set to optimize the model, thereby improving the optimization efficiency of the model.
[0062] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0064] Figure 1 It is a hardware structure block diagram of a terminal for executing a model optimization method according to an embodiment of the present application;
[0065] Figure 2 is a flow chart of a method for optimizing a model according to an embodiment of the present application;
[0066] Figure 3 is a flow chart of another model optimization method of an embodiment of the present application;
[0067] Figure 4 It is a structural diagram of an optimization system of a model in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0069] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0070] The method embodiments provided in the embodiments of the present application can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 1 is a hardware structure block diagram of a terminal for executing a model optimization method of an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0071] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a model optimization method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0072] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0073] This embodiment provides a method for optimizing a model. Figure 2 is a flow chart of a method for optimizing a model according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0074] Step S210: training at least one first target model according to the training data set.
[0075] In this step, the initial target model and the training data set are obtained, and the initial target model here can be one or more. The multiple initial target models can be target models of different types, or they can be target models of the same type with different model hyperparameters set. After configuring or setting the model hyperparameters of the initial target model, the initial target model is trained to generate a first target model. After setting or configuring different model hyperparameters, the initial target model is trained to generate multiple first target models. The first target model here can be understood as a model obtained after the initial target model after the model hyperparameters of the initial target model are configured or set is trained. The target model here can be a classification model, a detection model, etc., which is not specifically limited here. The model hyperparameters here include but are not limited to learning rate, regularization parameter, number of network layers, number of neurons per layer, number of training rounds, batch size, etc.
[0076] Step S220: perform an evaluation test on at least one first target model, and add at least one first target model that meets expectations into the model warehouse to generate at least one second target model.
[0077] In this step, at least one first target model is evaluated and tested to obtain at least one first target model that meets expectations. Training evaluation is performed on at least one first target model, and at least one first target model that meets expectations is obtained based on the training evaluation results; or, training test is performed on at least one first target model, and at least one first target model that meets expectations is obtained based on the training test results; or, training test and training test are performed on at least one first target model, and at least one first target model that meets expectations is obtained based on the training test results and training test. The model that has been trained and evaluated can be added to the model warehouse, and there is model version management in the model warehouse, that is, each model in the model warehouse has corresponding version information, and a model can be repeatedly added to the model warehouse to form different versions.
[0078] Step S230: select a second target model from the model warehouse and bind it to the target data, and deploy the second target model to the service.
[0079] In this step, a second target model is selected from the model warehouse and bound to the target data, and an optimization strategy is configured for the second target model in the model warehouse. The optimization strategy is used to limit the output result of the second target model. Different second target models are configured with different optimization strategy parameters. The second target model is selected from the model warehouse according to user configuration or user needs, and the optimization strategy corresponding to the second target model is obtained. The second target model is the target model selected from the third target model in the model warehouse according to user configuration or user needs. Different versions of models can have different optimization strategy configurations. For example, the requirement of scene A is a lower missed detection rate, and the requirement of scene B is a higher accuracy rate of defect x. The model categories used in scenes A and B can be the same. Different versions of a model are used, and different versions of models are configured with different optimization strategies. The optimization strategy is set according to the needs of different scenes. The optimization strategy is to improve the accuracy of the output result of the second target model. The optimization strategy here can be the optimization of the basic information of the second target model, and can also be the optimization of the display information of the second target model.
[0080] Step S240, monitoring the running result of the service, and obtaining the first detection result of the target data after being detected by the second target model.
[0081] In this step, the second target model is deployed on the service after setting the optimization strategy, and the service operation status is monitored in real time. According to the operation result or operation status of the monitored service, the first detection result of the target data after being checked by the second target model is obtained.
[0082] Step S250, updating the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement.
[0083] In this step, the training data set is updated according to the first detection result, so as to optimize and update the first target model, and by generating a new second target model for the service to replace the model, the second target model is optimized and updated according to the first detection result, and the optimized and updated second target model is put online again. The online here can be to deploy the optimized and updated second target model to the service, that is, to replace the old second target model in the service with the optimized and updated second target model. The second target model is optimized and updated here, and the difficult case data in the target data is determined according to the first detection result, and the difficult case data is reflowed and added to the training data set, and the corresponding model is retrained to obtain the corresponding model, and the second target model deployed on the service is replaced and updated. The second target model is optimized and updated here, and the optimization strategy for deployment can be adjusted according to the classification structure.
[0084] In this embodiment, at least one first target model is obtained through training according to a training data set; at least one first target model is evaluated and tested, and at least one first target model that meets expectations is added to a model warehouse to generate at least one second target model; a second target model is selected from the model warehouse and bound to the target data, and the second target model is deployed to the service; the running result of the service is monitored to obtain a first detection result after the target data is detected by the second target model; the training data set is updated according to the first detection result, thereby optimizing and updating the first target model, and a new second target model is generated for the service to replace the model, covering the entire process of model generation and optimization, so that developers can efficiently generate high-precision models for specific tasks, and after the model is deployed and used online, difficult example data is obtained in real time, and after adding the original training data set, the model is tuned and put online again, that is, the real-time data of the online environment can be added to the training data set at any time to perform model training and tuning, the online environment and the training environment are not isolated, and useful online data can be collected in real time to expand the model training set to optimize the model, thereby improving the optimization efficiency of the model.
[0085] In some of the embodiments, performing an evaluation test on at least one first target model includes:
[0086] Get the validation dataset;
[0087] Training and evaluating at least one first target model according to the validation data set. In some embodiments, training and evaluating at least one first target model according to the validation data set includes:
[0088] According to the validation data set, obtaining model performance data of at least one first target model under different model hyperparameters;
[0089] Determine the target model hyperparameters based on the model performance data;
[0090] At least one second target model is determined based on the target model hyperparameters and at least one first target model.
[0091] In some of the embodiments, performing an evaluation test on at least one first target model, the method further comprises:
[0092] Obtain the historical data of completed detection in the test data set or target data;
[0093] The first target model is trained and tested according to the historical data detected in the test data set or the target data to test the performance of at least one first target model.
[0094] In this embodiment, the evaluation test may include training evaluation and / or training test according to the analysis requirements. If the model effect of the training evaluation is good, the training test may not be performed; or the model can be evaluated directly through the training test; or training evaluation can be performed first and then training test. The specific number of training evaluation and training test is determined according to the progress of model tuning, and multiple training evaluation and training test can be performed.
[0095] In addition, the validation data set and the test data set can be split from the original data set. Specifically, the labeled data in the original data set can be divided into a training data set, a validation data set, and a test data set in a customized ratio. The three data sets all have labeled data for the wafer image to be tested (detection information such as detection box information and defect type). The training data set is used to train the detection model into a target model, and the validation data set and the test data set are used for training evaluation and training testing, respectively. In addition, the training test can also select the labeled historical data in the target data source for testing.
[0096] In some of these embodiments, the method further comprises:
[0097] An optimization strategy is configured for the second target model in the model warehouse, where the optimization strategy is used to limit the output result of the second target model, and different optimization strategy parameters are configured for different second target models;
[0098] The second target model outputs the first detection result based on the optimization strategy.
[0099] In this embodiment, by setting up a model warehouse, users can create multiple target models of different types or the same type with different model parameters, which is convenient for users to select and replace models, and perform continuous processing by creating services. In addition, different services can be created according to different data sources or according to data dimensions. By binding the target data to be discovered (the target data can be a database of data from different sources or a target data path under different data dimensions, such as according to process dimensions, batch dimensions, and other data dimensions) with the required target model, the data under the target data source can be automatically persisted through the target model. At the same time, an optimization strategy is set to output more accurate results.
[0100] In some of the embodiments, the model warehouse is provided with different categories of second target models, and different second target models support configuration of different optimization strategies.
[0101] In some of the embodiments, selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service includes:
[0102] Select target data and second target model to create monitoring service;
[0103] triggering pre-release testing of a second target model;
[0104] After the pre-release test is completed, the second target model is released and the deployment of the second target model is completed.
[0105] In this embodiment, in order to reduce the inadaptability of the data of the target data source to the target model, the technical solution introduces a pre-release test link. The pre-release test is performed by selecting the data to be processed by the target data source. The optimization strategy can be adjusted in the pre-release, and the prediction results of different optimization strategies can be compared and displayed to obtain an optimization strategy that meets expectations, and the latest optimization strategy can replace the configured optimization strategy.
[0106] In some of these embodiments, the method further comprises:
[0107] Update optimization strategies based on pre-release test results;
[0108] According to the updated optimization strategy, the optimization strategy is configured for the second target model;
[0109] Deploy the second target model configured with the updated optimization strategy to the service.
[0110] In this example, the optimization strategy is updated according to the test results of the pre-release test, where the test results of the pre-release test include the detection results of the second target model. The statistical results of the current second target model are generated according to the results of manual re-judgment and the detection results of the second target model, including the accuracy, the number of each category, the precision and recall rate of each category, and analysis charts. The optimization strategy is updated according to the statistical results, including the update of the parameter values of the optimization strategy. According to the updated optimization strategy, the optimization strategy is reconfigured for the second target model, and the second target model configured with the updated optimization strategy is redeployed to the service, thereby further improving the accuracy of the output results of the online model.
[0111] In some of these embodiments, the method further comprises:
[0112] A pre-release page is provided for model online evaluation, and the test results of different optimization strategies are compared and displayed to determine the optimization strategy that meets expectations and update it. In this embodiment, a pre-release page is provided for model online evaluation and optimization strategy update, and a suitable optimization strategy is selected, thereby further improving the accuracy of the output results of the online model.
[0113] Among them, the pre-release page allows you to test the model and quickly adjust the optimization strategy. On the pre-release page, you can test the model effect. According to the binding relationship of the service, extract historical data that meets the requirements from the online gallery and send it to the model for inference. The inference results and the corresponding indicator accuracy and missed detection rate are displayed on the page. If it is a classification model, the classification results are displayed. If it is a detection model, the detection results with boxes are displayed. You can confirm the model effect by viewing the inference results. If the effect meets expectations, you can publish it online. For example: the optimization strategy settings of the model are displayed on the right side of the pre-release page, and the optimization strategy is visualized on the left side of the page, including the initial strategy and the updated strategy. If the model test effect does not meet expectations, you can continue to adjust the optimization strategy here. After the adjustment is completed, you can apply it to the current model. Refresh the picture on this page and initiate another test to obtain new inference or prediction results. By comparing the model results and indicators (accuracy and missed detection rate) before and after, you can continuously adjust to the appropriate optimization strategy. When the model effect meets expectations, you can click Apply and Save at the optimization strategy. At this time, the optimization strategy parameters of the online model will be officially updated.
[0114] In some of the embodiments, the operation result of the monitoring service includes:
[0115] According to the binding relationship between the service and the target data, the first detection result is obtained and a statistics page is formed;
[0116] The statistics page includes generating at least one statistical chart of the operation status of the second target model and the first detection result.
[0117] Through the visual statistics page of the monitoring service, the operation and detection status of the target model are counted, such as the target model's detection volume, detection success rate, detection time and other model operation efficiency, as well as the accuracy of the prediction results, the prediction results and the prediction results. You can intuitively know / understand the detection status of the target model for the required analysis data, so as to facilitate the determination of the prediction effect of the target model on the data type or determine whether the model needs to be updated. The statistics page includes at least one statistical chart for generating the prediction results, and the overall situation of the prediction results is displayed through the statistical chart, such as the proportion of the number of each defect type predicted through a bar chart or a ring chart.
[0118] In some of these embodiments, the method further comprises:
[0119] Jump to target data through the statistics page, and visualize the first detection result under at least one data dimension in the statistics page.
[0120] In some of these embodiments, the method further comprises:
[0121] Get service data to generate a service list;
[0122] For target data for which the first test result has been generated or for test data for which the first test result needs to be generated, a required service is selected through the service list to perform service binding to generate the required test result.
[0123] In this embodiment, there may be a problem of poor prediction effect of the test data for generating the test results. In this case, re-prediction can be performed by modifying the bound service to obtain better test results and the target model and optimization strategy under the appropriate service binding; of course, for the test data that has not yet been predicted, prediction tests of multiple services can be performed to select a better service for prediction result output and service binding.
[0124] In some embodiments, updating the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement, includes:
[0125] Obtaining a first detection result of the target data for confirmation and update;
[0126] Adding the first detection result or the detection result with an abnormality to the training data set to generate an updated training data set;
[0127] Training the first target model according to the updated training data set to obtain an optimized first target model;
[0128] Performing an evaluation test on the optimized first target model, and adding the optimized first target model to the model warehouse to generate an optimized second target model;
[0129] Obtain a list of related second target models from the service, and select an optimized second target model for replacement.
[0130] In some of these embodiments, the method further comprises:
[0131] Obtain the second target model in the model bin;
[0132] The training data set is trained according to the second target model to obtain at least one first target model.
[0133] In some embodiments, adding at least one first target model that meets expectations to a model warehouse to generate at least one second target model includes:
[0134] Generate corresponding version information for at least one second target model newly added to the model warehouse;
[0135] The service obtains the corresponding second target model information based on the version information to perform model replacement.
[0136] This embodiment also provides a method for optimizing a model. Figure 3 is a flow chart of another model optimization method of an embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:
[0137] Step S302, data import.
[0138] In this step, data can be imported from a local upload or from an online database. Taking the image dataset as an example, importing from an online database means obtaining it from an online gallery. Online data can be understood as real-time capture of image data spit out by the machine. The data is stored in the database, and data can be filtered according to information such as product or layer. Each user needs to create a dataset before importing data. The dataset needs to set the name, version number, and annotation type (image classification or target detection). Finally, image data is imported from the local, or the data dimension corresponding to the online gallery storage dimension is selected for image data import. After the data is imported, the data can be cleaned. Data cleaning is to remove duplicate or similar images. When removing similar images, the threshold can be adjusted to control the deletion ratio, that is, how many pictures are retained. After the data is cleaned, the version of the dataset will be updated.
[0139] Step S304: data labeling.
[0140] In this step, according to the original data set required for the training model, the initial data can be annotated with two types of annotations: image classification and target detection. For annotating image data, users can choose manual annotation or intelligent annotation. If the active learning mode is selected for intelligent annotation, training parameters need to be set (such as the number of iterations, confidence threshold, and filtering of some low-confidence detection boxes), and intelligent annotation with existing partial annotated data is supported (training first and then annotating); if the specified model mode is selected, training parameters need to be set and the model selection model needs to be selected, and intelligent annotation with the model warehouse model (direct annotation) can be supported; the data completed by intelligent annotation is used as intermediate state data, and confirmation is required before the annotated data can be transformed. Among them, the following logic is followed after the completion of intelligent annotation: 1) After the intelligent annotation is completed, the unannotated data obtains the intelligent annotation label; 2) the intelligent annotation label can be added, deleted, or modified; 3) After clicking the picture to confirm, the intelligent annotation will become manual annotation, and the picture will be updated to the annotated data. For image classification data annotation, a defect type can be determined for each image in the initial data, and the annotation information includes the defect type and the detection box used to identify the defect type. For data annotation of target detection, all defect types in the initial data may be annotated, and the annotation information may include all defect types and detection boxes for identifying the locations of all defect types. The annotation information may also include the number of defect types in the initial data.
[0141] Automatic defect detection used in the semiconductor production process includes two categories: image classification and target detection. First, a wafer image may detect multiple defects of different types. Image classification refers to selecting one of multiple defect types as the defect type of this wafer image. Target detection refers to detecting defects in all wafer images (that is, detecting the detection frame type and the number of detection frames).
[0142] Step S306: model training.
[0143] In this step, the first target model is trained using the labeled training data set to obtain the second target model. Before model training, training parameters need to be set. Parameters can be recommended based on the training data of the training data set, such as recommending the data input size of the model by counting the image size in the training data, such as recommending the number of iterations of the model by the number of training data and the number of categories, and finally completing the training of the model according to the set training parameters. The trained model can join the training camp. Further, according to the constraints of the data input size of the model and the image size in the training data, the recommended size of the data input of the model is obtained. As a non-limiting example, the recommended size of the data input of the model is given by counting the size in the training data. First, the average length and width of all pictures of the training data are counted. For example, the average length and width is 500, and the constraint condition of the data input size of the model is that the model can only accept data input of a size that is a multiple of 32. Then the set strategy is to calculate the largest multiple of 32 less than 500 as the recommended size of the data input of the model, that is, the recommended size of the data input of the model is 480. The purpose of this is to give the recommended size of the model input size, which is related to the size of the model. The larger the model, the larger the number of parameters, and the stronger the model's learning ability. If the model input size is larger than the image size (that is, larger than 500), it cannot provide more image information, which will waste computing resources. If the model input size is very small, the image needs to be compressed, which will lose information. The benefit is that the model training speed becomes faster, but the model accuracy will decrease.
[0144] Step S308: Model evaluation test to determine whether the model meets the online requirements.
[0145] In this step, the second target model is subjected to training evaluation and / or training test. Training evaluation is used to evaluate model performance and parameter optimization. Among them, the model performance is evaluated, and the validation set is used to evaluate the generalization ability of the model during the training process, that is, the model's predictive ability for unseen data. By performing performance evaluation on the validation set, the best model hyperparameters are selected or overfitting is prevented. Parameter optimization, by comparing the performance of the model under different hyperparameter settings with a validation set independent of the training set or annotated online data, hyperparameters are tuned to improve model performance and generalization ability. If the model performs poorly on the validation set or annotated online data, you can try to improve model performance by enriching the training data, adjusting the training strategy, adjusting the data enhancement strategy, etc. Enriching the training data includes enriching the training data of the classes with poor indicators on the validation set. Adjusting the data enhancement strategy can help improve the generalization ability of the model, such as rotation, shearing, etc. The indicator calculation and reasoning logic of the training test are the same as those of the training evaluation, but the data source of the training test is rich and will not be used to adjust the training parameters, so the training test is more useful for detecting the generalization of the model. Training evaluation and training test can be used separately or in conjunction. The joint use means: enriching training data, adjusting training strategies, and retraining the model after training evaluation to improve model performance; further use training test to see how the two models before and after optimization perform on large-scale data sets. Observe whether the model effect is truly improved before and after optimization.
[0146] Specifically, a training evaluation page and a training test page can be generated. The page will statistically display the accuracy of the model, missed detection, and false detection, and at the same time display the overall situation of the prediction results through statistical charts, such as displaying the proportion of the number of each defect type predicted through a bar chart or a donut chart, or displaying the difference between the predicted label and the standard defect through a confusion matrix. The confusion matrix can clearly show the model's false detection, misdetection, and missed detection, but this statistical data has hidden problems. For example, the defect in picture 1 should be A, and the defect in picture 2 should be B, but the actual predicted result is completely opposite, but it is still displayed normally in the statistics of the confusion matrix. Therefore, the image index is associated in the confusion matrix to realize the confirmation of the image hierarchy. The value on the confusion matrix represents the element of the number of predicted defects and standard defects. The element is set with an image index, that is, the image corresponding to the statistical value embodied by the element will be associated with the confusion matrix. When the value in the confusion matrix is selected, the corresponding image data will be obtained through the image index for comparison and display. Specifically, the images containing predicted defects and standard defects (verification sets or labeled online data have standard defect types) are compared and displayed.
[0147] When the model does not meet the requirements for online testing during evaluation, data annotation optimization and / or model training hyperparameter optimization are performed. Data annotation optimization includes finding the manual errors that are correctly labeled by the model through the confusion matrix, and adjusting the data annotation or adjusting the size and position of the detection box to make it more suitable for the target. Model training hyperparameter optimization includes analyzing the training evaluation results, trying multiple hyperparameters, and selecting the best one. When the model meets the requirements for online testing, the third target model generated by the training evaluation and training test of the second target model is added to the model warehouse.
[0148] Step S310, adding a model warehouse.
[0149] In this step, the third target model generated by training evaluation and training test of the second target model is added to the model warehouse.
[0150] Version control is set up in the model warehouse:
[0151] 1. A model can be added to the model warehouse repeatedly to form different versions, and different versions can have different optimization strategy configurations. For example, if product A wants a lower missed detection rate, and product B wants a higher precision rate for defect x, and their model categories are the same, then they can share different versions of the same model and configure different optimization strategies.
[0152] 2. Different versions of models can be uploaded to the same service in a replacement manner. The historical model information will be recorded in the service, and you can also quickly select a model in the historical record to replace the current model.
[0153] Step S312, configuring the optimization strategy.
[0154] In this step, the trained model, i.e., the third target model, is added to the model warehouse. Select the model to be deployed, i.e., the fourth target model, from the model warehouse, and configure the optimization strategy. The purpose of the optimization strategy is to improve the accuracy of the classification results under the image classification dimension or the detection results under the target detection dimension. The optimization strategy contains basic model information such as model name, type, and categories contained, model operation parameters such as global confidence threshold, image input size, and detection box IOU threshold, as well as image group settings that can be used to configure the image group capacity and image group number for detection, and advanced settings. The content of the advanced settings corresponds to the model category. Directly update the optimization strategy parameters in the optimization strategy interface of the model, and the online optimization strategy parameters will be automatically updated after saving.
[0155] Among them, for the advanced settings of the image classification model, each picture may have multiple detection frames, that is, there may be multiple defect types. In the end, only one defect type is needed to represent the result of the wafer image to be tested. Therefore, the core of the optimization strategy is which detection frame / which defect type result is used as the final image classification dimension result, which can be inferred from the following contents in the advanced settings: i. Image classification mode: You can choose the detection frame with the maximum confidence or the one closest to the center point or the detection frame with the largest area; ii. Category confidence threshold: Each category can filter out some low-confidence detection frames; iii. Category uncertainty Unce rtain threshold: classify some images with low confidence detection boxes in each category into the [uncertain] category; iv. Category priority, when [Detection mode] = maximum confidence, adjust the category priority by giving the original confidence * weight, so that the images are given priority to more important categories; v. Category detection quantity division: used when the same defect appears in a picture at different times, it has different meanings to the user, such as if class A appears 10 times, this picture is considered to be category B; vi. Defect measurement: used for defects of the same shape, whose meanings to users are different when their sizes are different. As a non-limiting example, the detection mode of the model is based on maximum confidence selection, that is, the detection box with the largest confidence value is selected; the threshold of the Bump_Loss category confidence is 0.3, and the category Uncertain threshold of the Bump_Loss category is 0.5. If the detection box is identified as the Bump_Loss category, and its inference or prediction confidence threshold is 0.4, that is, greater than the category confidence threshold 0.3 but less than its category Uncertain threshold 0.5, then the detection box will be classified as the Uncertain category; when the detection box is identified as other When classifying and bumping the image, the priority of bumping will be assigned to bumping according to the calculation formula, so as to confirm the final inference result of the detection box. If the number of detection boxes of Cu_Residue in an image is greater than 10, the image will no longer be inferred as Cu_Residue, but will be classified as Cu_Residue_New, a new category where the number of Cu_Residue is greater than 10. The defect size can be calculated according to the diagonal, long side, short side or area of the detection box, and can support both adaptive scale and absolute scale measurement methods.
[0156] Among them, for the advanced settings of the target detection model, you only need to set the category confidence threshold and the category uncertainty Uncertain threshold. Category confidence threshold: filter some low-confidence classification results. Category Uncertain threshold: some pictures with low-confidence categories can be classified into the [uncertain] category. As a non-limiting example, only when the picture is identified as the Discolor category and its inference confidence threshold is greater than 0.8, the picture will eventually belong to the Discolor category, otherwise it will be identified as other categories; only when the picture is identified as the PI_Concave category and its inference confidence threshold is less than 0.8, the picture will eventually belong to the Uncertain category; the category confidence threshold of the Pattern_Fail category is 0.8, and the category Uncertain threshold of the Pattern_Fail category is 0.9. If the picture is identified as the Pattern_Fail category and its inference confidence threshold is 0.85, that is, greater than the category confidence threshold 0.8 but less than its category Uncertain threshold 0.9, the picture will be classified as the Uncertain category.
[0157] Step S314, model deployment.
[0158] In this step, the model with the configured optimization strategy, i.e., the fourth target model, is published and launched to the service. It supports publishing to a new service or an existing service. After selecting a service, enter the service editing page. After completing the relevant configuration of the model and product, you can perform a pre-release test. After the test is completed, click Release to complete the model deployment and launch. Deploy the model to a service. A service contains a model and which data needs to pass through the configuration or data dimension of this service (product / layer, etc., corresponding to the data setting of the online gallery). The data that meets the service configuration will pass through the model to obtain the classification result. When the model is launched for the first time, there will be a pre-release page to view the model effect and further adjust the optimization strategy. The service binds the model and product. The product data that meets the service configuration will pass through the service using its online model to obtain the classification result. Bind product: Each business can be bound to a unique service. A service can be bound to multiple businesses. When new data under this business type enters the platform, it will match the corresponding service according to the binding relationship and the set priority order. At the same time, the service can change the bound product. Select the model to be bound in the service and complete the id mapping configuration. The id mapping configuration supports mapping the category name of the selected model to be launched to the business category name. After configuring the id mapping configuration, if the model is published to the service for the first time, it will automatically enter the pre-release page, where you can view the model effect and further adjust the optimization strategy.
[0159] Among them, the pre-release page can be used for model testing and quick adjustment of optimization strategies. The model effect can be tested on the pre-release page. According to the binding relationship of the service, historical data that meets the requirements is extracted from the online gallery and sent to the model for reasoning, and the reasoning results and the corresponding indicator accuracy and missed detection rate are displayed on the page. If it is a classification model, the classification result is displayed, and if it is a detection model, the detection result with a frame is displayed. The model effect can be confirmed by viewing the reasoning result, and if the effect meets expectations, it can be published online. The optimization strategy settings of the model are displayed on the right side of the pre-release page, and the optimization strategy is visualized on the left side of the page, including the initial strategy and the updated strategy. If the model test effect does not meet expectations, the optimization strategy in step S312 can be continued to be adjusted here, and it can be applied to the current model after adjustment. Refresh the picture on this page and initiate a retest to obtain new reasoning or prediction results. By comparing the model results and indicators (accuracy and missed detection rate) before and after, the appropriate optimization strategy is continuously adjusted. When the model effect meets expectations, the application at the optimization strategy can be clicked and saved, and the optimization strategy parameters of the online model will be officially updated.
[0160] Step S316, monitoring service.
[0161] In this step, you can view online data, check the classification results of the online model, manually review the classification results, and view the statistics and monitoring information of the service.
[0162] Among them, for the online gallery. Online data is matched to the corresponding service according to the binding relationship with the service. After using the online model bound to the service, it is continuously inferred. The obtained results will be saved in the database of the online gallery. The data and inference results can be seen from the online gallery page. The online gallery supports filtering according to the time dimension and data dimension to view the results of different business data inferred by different services. The online gallery supports manual re-judgment of the model inference results. You can jump to the online gallery page from the monitoring service page with one click to directly view the corresponding data results. If the model inference result is correct, you can select the corresponding image on the online gallery page and click the label bar on the right to confirm with one click; if the model is wrong, you can manually modify the label and save it to the database. The monitoring service module calculates and analyzes the statistical indicators of the current model based on the manual re-judgment results and the model classification results, including accuracy, the number of each category, the precision and recall rate of each category, and the confusion matrix. The statistical results here can be viewed on the monitoring service page. The online gallery supports modifying labels by using shortcut keys after selecting an image. The online gallery supports adding data to the training data set for retraining, annotating the newly added data, and then entering the service or model deployment page after training to directly edit or replace the old model in the service. The service supports changing models in different states, without having to suspend the service specifically to change the online model, and also supports historical models to be put back online with one click.
[0163] The monitoring service monitors the running status of the service in real time. After the service is started, the online data is matched to the service according to the rules, and the classification results are obtained by inference using the model in the service. The running monitoring and detection results of the service can be filtered by data dimension and time dimension, and the accuracy, missed detection rate, false detection rate indicators and confusion matrix of the model and each category can be viewed. At the same time, the classification results of the batch of data can be directly viewed by entering the online gallery page from the monitoring service page. The following status can be monitored, such as the detection volume, detection success rate and average detection time, etc., and data monitoring, such as accuracy information, can also be performed. Users can obtain model effects based on data monitoring, and can also obtain types with more defects through data monitoring.
[0164] Step S318: data reflow and model optimization.
[0165] In this step, the model continuously infers online data after it goes online, and the results are stored in the database. The online inference results can be displayed from the online gallery page; the results of model inference can be manually re-judged. If the model is misclassified, the label corresponding to the image can be modified; after the re-judgment, the statistical indicators of the current model can be obtained, including accuracy, the number of each category, the precision and recall rate of each category, confusion matrix, etc.; the online gallery can add misclassified pictures to the training data set with one click, and the online gallery can add pictures that the model is uncertain to the training data set with one click. The online gallery can also select any desired pictures to add to the training data set. Go back to step S302 data import, import the newly added data, annotate the newly added data, annotate the newly added data, and then replace the old model in the service with the new model after training to optimize the model. The data in the data set can be trained separately and reasoned together.
[0166] Step S320: model effect statistics.
[0167] In this step, by analyzing the statistical indicators of the online model, the online data will pass through the model to obtain the results of automatic defect classification, and the classification results will be counted. At the same time, the user can manually review the results of automatic defect classification to obtain the true label of the image, and calculate statistical indicators such as accuracy based on the true label and the model classification results. Statistical indicators include the number of defects, defect accuracy, defect percentage, etc.
[0168] Step S322, abnormal warning.
[0169] In this step, the abnormal warning includes defect warning and model update warning. When the warning is triggered, the abnormal warning module sends warning information to the user. Among them, the defect warning includes too many defects or fatal defects, which need to remind the user to pay attention. For example, if the number of a certain defect is higher than the threshold for a period of time, a warning will be issued. Once the number of a certain defect appears, a warning will be issued. If the model infers that the number of Uncertain defects is higher than the threshold for a period of time, a warning will be issued; the model update warning mechanism includes prompting that the online data distribution may not match the model training data, and the training set needs to be updated and the model needs to be retrained. Warnings are required, such as the model infers that there are too many Uncertain defects, the accuracy is too low, the missed detection rate is too high, and the image feature distribution is greatly offset. The feature distribution of the image in a period of time is statistically compared with the feature distribution of the training set image, and a relatively large offset occurs, including: the image size changes, such as the original 600*600, and suddenly many images become 200*200; the detection box changes, and the size and position of the detection box on the image are found to have large changes; image feature changes, such as changes in the histogram statistical distribution of color and brightness, etc.
[0170] It should be noted that the model, the first target model, the second target model, the third target model, and the fourth target model in the embodiments of the present application can be a machine learning model, an artificial intelligence model, etc., such as a neural network model, a decision tree model, a support vector machine model, a random forest model, a Bayesian network model, a linear regression model, a logistic regression model, etc., which are not specifically limited here.
[0171] The model optimization method provided in this embodiment covers the entire process of machine learning model generation and tuning, enabling developers to efficiently generate high-precision models for specific tasks, and after the model is put into online use, easily obtain difficult data, add it to the original training data set, tune the model, and put it online again; the model is reused, the model in the model warehouse can be used for intelligent labeling, and can also be used as the basic model for the next training to improve the training speed; rich optimization strategies, and can use a batch of online data to see the effect of modifying the optimization strategy in real time and visually, so as to obtain the optimal parameters more conveniently; data reflux, add online erroneous data and uncertain data to the training data set to optimize the model; data supports intelligent deduplication and intelligent labeling; visual and operational confusion matrix, convenient for adjusting or updating data and models; early warning mechanism, when the model is not applicable to the current data and needs to be updated, it automatically notifies the user to improve the optimization efficiency of the model.
[0172] In some of the embodiments, data and models are version controlled. Version control includes data version and model version. For data version, a new data version will be created for new data. If you need to modify the data annotation, you can copy a version and then adjust or update the annotation. If you need to add data, you can copy a version and add new data. If you need to clean the data, you can copy a version and delete the data or modify the label. For model version, a training in the training camp generates a model, and the model can be added to the model warehouse. There is model version management in the model warehouse; a model can be added to the model warehouse repeatedly to form different versions, and different versions can have different optimization strategy configurations. For example, product A hopes that the missed detection rate is lower, and product B hopes that the accuracy rate of defect x is higher, and their model categories are the same, then they can share different versions of a model and configure different optimization strategies at the same time; different versions of models can be put online in the same service in a replacement manner. The historical model information will be recorded in the service, and a model in the historical record can be quickly selected to replace the current model. Version control is performed on data and models so that different versions can be used to train different models. Model performance can be improved by modifying data (data volume, data category, data ratio, data annotation method, etc.). If an initial data set A is annotated multiple times to generate different versions of training data sets such as training data set B, training data set C, and training data set D, and after model training and optimization, training data set D is obtained with better results, then data annotation can be performed based on training data set D to continue to generate different versions of training data sets such as training data set E, training data set F, training data set G, and so on.
[0173] The optimization method of the model in the embodiment of the present application supports the image group mode. The image group is because in the context of semiconductor ADC (automatic defect classification), the pictures generated by the manual re-judgment machine are usually taken under the same physical coordinates (such as the same defectid). The separate training and merge reasoning of these pictures ensure the improvement of the accuracy of model classification. Separate training, in a data set or training data set, the pictures of a group may have different labels, which can be separately marked, and some pictures may be fuzzy / unimportant. Not every picture can reflect the defect characteristics. Pictures that do not reflect the defect characteristics are not used as training samples. These pictures can be deleted. When making a training set, only the current picture is considered, and the information of other pictures in the group where the current picture is located is not considered. Merge reasoning, different pictures of the same coordinate are defects of the same category, and different pictures of the same coordinate can be set in a group. During reasoning, the results of several pictures are considered as a whole, and a unique category is given. In the online service, when the model is online, the pictures enter the model reasoning in the form of group packaging. Although a group has multiple pictures, only one classification result will be obtained. The specific classification result is determined by the model and the optimization strategy.
[0174] This embodiment also provides a model optimization system, Figure 4 is a schematic diagram of the structure of an optimization system of a model in an embodiment of the present application, such as Figure 4 As shown, the system includes:
[0175] A model training module 410 is used to train at least one first target model according to a training data set;
[0176] An evaluation and testing module 420 is used to perform an evaluation and testing on the at least one first target model, and add the at least one first target model that meets expectations into a model warehouse to generate at least one second target model;
[0177] A model deployment module 430 is used to select a second target model from the model warehouse and bind it to the target data, and deploy the second target model to the service;
[0178] A service monitoring module 440 is used to monitor the operation result of the service and obtain the first detection result of the target data after the target data is detected by the second target model;
[0179] The online data module 450 is used to update the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement. The model optimization system provided in this embodiment obtains at least one first target model through training according to a training data set; performs evaluation and testing on at least one first target model, adds at least one first target model that meets expectations to a model warehouse to generate at least one second target model; selects a second target model from the model warehouse and binds it to the target data, and deploys the second target model to the service; monitors the running results of the service, obtains a first detection result after the target data is detected by the second target model; updates the training data set according to the first detection result, thereby optimizing and updating the first target model, and generates a new second target model for the service to replace the model, covering the entire process of model generation and optimization, enabling developers to efficiently generate high-precision models for specific tasks, and after the model is deployed and used online, obtains difficult example data in real time, adds the original training data set, and then optimizes the model and goes online again, that is, the real-time data of the online environment can be added to the training data set at any time to perform model training and tuning, the online environment and the training environment are not isolated, and useful online data can be collected in real time to expand the model training set to optimize the model, thereby improving the optimization efficiency of the model.
[0180] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here. The above modules can be functional modules or program modules, which can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0181] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0182] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0183] Optionally, in the embodiment of the present application, the processor may be configured to perform the following steps through a computer program:
[0184] S1, training and obtaining at least one first target model according to a training data set;
[0185] S2, performing an evaluation test on the at least one first target model, and adding the at least one first target model that meets expectations into a model warehouse to generate at least one second target model;
[0186] S3, selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service;
[0187] S4, monitoring the operation result of the service, and obtaining a first detection result of the target data after the target data is detected by the second target model;
[0188] S5, updating the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement.
[0189] It should be noted that the specific examples in the embodiments of the present application can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in the embodiments of the present application.
[0190] In addition, in combination with a model optimization method provided in the above embodiment, a storage medium can also be provided in the embodiment of the present application to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, the method for optimizing any model in the above embodiment is implemented.
[0191] It should be understood that the specific embodiments described here are only used to explain this application, rather than to limit it. According to the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0192] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0193] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0194] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A model optimization method, characterized in that: The method comprises: According to the training data set, at least one first target model is obtained by training; Performing an evaluation test on the at least one first target model, and adding the at least one first target model that meets expectations into a model warehouse to generate at least one second target model; Selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service; Monitor the operation result of the service, and obtain a first detection result of the target data after the target data is detected by the second target model; The training data set is updated according to the first detection result, thereby optimizing and updating the first target model, and a new second target model is generated for the service to perform model replacement.
2. The optimization method of the model according to claim 1, characterized in that: The performing an evaluation test on the at least one first target model comprises: Get the validation dataset; The at least one first target model is trained and evaluated based on the validation data set.
3. The optimization method of the model according to claim 2, characterized in that: The performing training evaluation on the at least one first target model according to the verification data set comprises: According to the validation data set, obtaining model performance data of the at least one first target model under different model hyperparameters; Determining target model hyperparameters based on the model performance data; Determine the at least one second target model based on the target model hyperparameters and the at least one first target model.
4. The optimization method of the model according to claim 2 or 3, characterized in that: The method further comprises: performing an evaluation test on the at least one first target model; Obtain the historical data of completed detection in the test data set or target data; The first target model is trained and tested according to the historical data detected in the test data set or the target data to test the performance of the at least one first target model.
5. The optimization method of the model according to claim 1, characterized in that: The method further comprises: An optimization strategy is configured for the second target model in the model warehouse, wherein the optimization strategy is used to limit the output result of the second target model, and different optimization strategy parameters are configured for different second target models; The second target model outputs a first detection result based on an optimization strategy.
6. The optimization method of the model according to claim 5, characterized in that: The model warehouse is provided with different categories of second target models, and different second target models support the configuration of different optimization strategies.
7. The optimization method of the model according to claim 5, characterized in that: Selecting a second target model from the model warehouse and binding it to the target data, and deploying the second target model to the service, including: Selecting the target data and the second target model to create a monitoring service; triggering a pre-release test of the second target model; After the pre-release test is completed, the second target model is released to complete the deployment of the second target model.
8. The optimization method of the model according to claim 7, characterized in that: The method further comprises: updating the optimization strategy according to the pre-release test results; According to the updated optimization strategy, configuring the optimization strategy for the second target model; Deploy the second target model configured with the updated optimization strategy to the service.
9. The method for optimizing the model according to claim 8, characterized in that: The method further comprises: A pre-release page is set up to evaluate the model before it goes online. By comparing and displaying the test results of different optimization strategies, the optimization strategy that meets expectations is determined and updated.
10. The method for optimizing a model according to claim 1, characterized in that: Monitor the operation results of the service, including: According to the binding relationship between the service and the target data, the first detection result is obtained and a statistical page is formed; The statistics page includes at least one statistical chart for generating an operation status of the second target model and the first detection result.
11. The method for optimizing a model according to claim 10, characterized in that: The method further comprises: Jump to target data through the statistics page, and visualize the first detection result under at least one data dimension in the statistics page.
12. The method for optimizing a model according to claim 1, characterized in that: The method further comprises: Obtain data of the service to generate a service list; For target data for which the first detection result has been generated or for test data for which the first detection result needs to be generated, a required service is selected through the service list to perform service binding to generate the required detection result.
13. The method for optimizing a model according to claim 1, characterized in that: The updating of the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement, includes: Obtaining a first detection result of the target data for confirmation and update; Adding the first detection result or the detection result with an abnormality to the training data set to generate an updated training data set; Training the first target model according to the updated training data set to obtain an optimized first target model; Performing an evaluation test on the optimized first target model, and adding the optimized first target model to a model warehouse to generate an optimized second target model; A related second target model list is obtained from the service, and an optimized second target model is selected for replacement.
14. The method for optimizing a model according to claim 1, characterized in that: The method further comprises: Acquire a second target model in the model bin; The training data set is trained according to the second target model to obtain the at least one first target model.
15. The method for optimizing a model according to claim 1, characterized in that: The step of adding the at least one first target model that meets expectations into a model warehouse to generate at least one second target model comprises: Generating corresponding version information for the at least one second target model newly added to the model warehouse; The service obtains corresponding second target model information based on the version information to perform model replacement.
16. A model optimization system, characterized in that: The system comprises: A model training module, used for training at least one first target model according to a training data set; An evaluation and testing module, used to perform an evaluation and test on the at least one first target model, and add the at least one first target model that meets expectations into a model warehouse to generate at least one second target model; A model deployment module, used to select a second target model from the model warehouse and bind it to the target data, and deploy the second target model to the service; A service monitoring module, used to monitor the operation result of the service and obtain the first detection result of the target data after the target data is detected by the second target model; The online data module is used to update the training data set according to the first detection result, thereby optimizing and updating the first target model, and generating a new second target model for the service to perform model replacement.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the optimization method of the model according to any one of claims 1 to 15 are implemented.
Citation Information
Patent Citations
Device, system and method for operating artificial intelligence model
CN115330200A
Cited By
Model reasoning consistency verification method
CN119127722A
