Method, apparatus and system for optimizing artificial intelligence model

By generating the first sample prompt information based on business data in the business device and adjusting the parameters of the artificial intelligence model, the problems of low parameter adjustment efficiency and insufficient model performance in the prior art are solved, and the usability and performance of the model are improved.

WO2025066249A1PCT designated stage expired Publication Date: 2025-04-03HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096804
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-25
Filing Date
2024-05-31
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

When the prior art adjusts the parameter of the artificial intelligence model, it is affected by sample data, which is low efficiency and is difficult to effectively cover all scenarios in the business data, resulting in insufficient model performance.

Method used

By deploying an artificial intelligence model in the business device, the first sample prompt information based on business data is generated, the model parameters are further adjusted, and the model performance is improved.

Benefits of technology

Improves the efficiency of adjusting the parameter of AI model and enhances the usability and performance of the model, especially when covering difficult-to-acquise scenarios and abnormal situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096804_03042025_PF_FP_ABST
    Figure CN2024096804_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of artificial intelligence models. Disclosed are a method, apparatus and system for optimizing an artificial intelligence model. The method comprises: providing a trained artificial intelligence model to a service apparatus, wherein the service apparatus is used for deploying the artificial intelligence model; receiving first sample prompt information provided by the service apparatus, wherein the first sample prompt information indicates a condition that the content of first sample data needs to meet; on the basis of the first sample prompt information, generating the first sample data; and on the basis of the first sample data, continuing to adjust a parameter of the artificial intelligence model, and providing the adjusted artificial intelligence model to the service apparatus. By means of the present application, the efficiency of adjusting the parameter of the artificial intelligence model is improved, thereby facilitating an improvement in the availability of the artificial intelligence model.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and system for optimizing artificial intelligence model

[0001] This application claims priority to Chinese patent application No. 202311264377.3 filed on September 27, 2023, with invention name “Machine Learning Model Testing Method and System”, and priority to Chinese patent application No. 202311819576.6 filed on December 25, 2023, with invention name “Method, Device and System for Optimizing Artificial Intelligence Model”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence model technology, and in particular to a method, device, and system for optimizing artificial intelligence models. Background Art

[0003] With the rapid development of artificial intelligence (AI) technology, the use of AI models for tasks such as image recognition, video analysis, and natural language processing has become a trend. AI models are increasingly being integrated into a wide range of intelligent systems and applied across various industries.

[0004] Before deploying an AI model to a business device, sample data must be obtained. This data is then used to train and test the AI ​​model. Only after the AI ​​model has completed the training and testing process can it be deployed to the business device. Training and testing an AI model involves adjusting its parameters to fine-tune its performance. Currently, after obtaining sample data, it is divided into two parts: one for training and the other for testing.

[0005] However, due to the influence of sample data, the efficiency of adjusting the parameters of artificial intelligence models is currently low.

[0006] Summary of the Invention

[0007] This application provides a method, device, and system for optimizing an artificial intelligence model. This application improves the efficiency of adjusting the parameters of the artificial intelligence model and helps improve the usability of the artificial intelligence model. The technical solutions provided by this application are as follows:

[0008] In a first aspect, the present application provides a method for optimizing an artificial intelligence model, the method comprising: providing a trained artificial intelligence model to a business device, the business device being used to deploy the artificial intelligence model; receiving first sample prompt information provided by the business device, the first sample prompt information indicating conditions that the content of the first sample data needs to meet; generating first sample data based on the first sample prompt information; and continuing to adjust the parameters of the artificial intelligence model based on the first sample data, and providing the adjusted artificial intelligence model to the business device.

[0009] In the method for optimizing the artificial intelligence model, since the first sample prompt information is provided by the business device in which the artificial intelligence model is deployed, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0010] In one implementation, generating first sample data based on first sample prompt information includes: generating first sample data represented by a second representation based on the first sample prompt information, wherein the first sample prompt information is represented by the first representation.

[0011] In another implementation, the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation. Based on the first sample prompt information, generating the first sample data includes: modifying the second prompt information based on the first prompt information to obtain the first sample data.

[0012] Optionally, the first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

[0013] Optionally, the first sample prompt information indicates one or more of the following: representation method, storage format, size, data distribution method, expression style, or expression semantics of the first sample data.

[0014] In a possible implementation, before generating the first sample data based on the first sample prompt information, the method further includes: providing a sample configuration interface to the user, the sample configuration interface prompting the user to input the first sample prompt information; and obtaining the first sample prompt information from the sample configuration interface.

[0015] The model optimization device obtains the first sample prompt information provided by the user, so that the model optimization device can construct the first sample data according to the user's wishes, improve the richness of the first sample data, and make the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0016] In another possible implementation, the model optimization device generates the first sample prompt information. For example, the model optimization device is configured with a prompt information template, and the model optimization device can optionally generate the first sample prompt information based on the prompt information template.

[0017] The model optimization device generates first sample prompt information based on the prompt information template, and can automatically generate first sample prompt information indicating different contents, thereby improving the richness of the first sample data and making the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0018] Optionally, the method also includes: obtaining second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test; providing the second sample prompt information to the model training device; optimizing the third sample prompt information based on the second sample prompt information, and generating third sample data based on the third sample prompt information; receiving the trained artificial intelligence model provided by the model training device, and testing the trained artificial intelligence model based on the third sample data.

[0019] In a second aspect, the present application provides a device for optimizing an artificial intelligence model. The device includes: an interaction module for providing a trained artificial intelligence model to a business device, which is used to deploy the artificial intelligence model; the interaction module is also used to receive first sample prompt information provided by the business device, the first sample prompt information indicating conditions that the content of the first sample data must meet; a generation module for generating first sample data based on the first sample prompt information; and an optimization module for continuously adjusting parameters of the artificial intelligence model based on the first sample data and providing the adjusted artificial intelligence model to the business device.

[0020] Optionally, the generating module is specifically configured to generate first sample data represented by the second representation based on the first sample prompt information, wherein the first sample prompt information is represented by the first representation.

[0021] Optionally, the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation, and the generation module is specifically used to modify the second prompt information based on the first prompt information to obtain the first sample data.

[0022] Optionally, the first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

[0023] Optionally, the first sample prompt information indicates one or more of the following: representation method, storage format, size, data distribution method, expression style, or expression semantics of the first sample data.

[0024] Optionally, the interactive module is further configured to provide a sample configuration interface to the user, where the sample configuration interface prompts the user to input the first sample prompt information. The interactive module is further configured to obtain the first sample prompt information from the sample configuration interface.

[0025] Optionally, the generating module is further configured to generate first sample prompt information based on the prompt information template.

[0026] Optionally, the device also includes: an acquisition module, used to obtain second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test; an interaction module, also used to provide the second sample prompt information to the model training device; a generation module, also used to optimize the third sample prompt information based on the second sample prompt information, and generate third sample data based on the third sample prompt information; the interaction module is also used to receive the trained artificial intelligence model provided by the model training device, and test the trained artificial intelligence model based on the third sample data.

[0027] In a third aspect, the present application provides a method for optimizing an artificial intelligence model. The method includes: a model optimization device provides a trained artificial intelligence model to a business device; the business device deploys the artificial intelligence model and uses the artificial intelligence model to process business data; the business device obtains difficult business data based on the processing results of the artificial intelligence model on the business data, obtains first sample prompt information of the difficult business data based on the difficult business data, and provides the first sample prompt information to the model optimization device, the first sample prompt information indicating the conditions satisfied by the content of the difficult business data; the model optimization device generates first sample data based on the first sample prompt information, continues to adjust the parameters of the artificial intelligence model based on the first sample data, and provides the adjusted artificial intelligence model to the business device.

[0028] In the method for optimizing the artificial intelligence model, since the first sample prompt information is provided by the business device in which the artificial intelligence model is deployed, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0029] Moreover, the business device provides the first sample prompt information to the model optimization device, which can avoid privacy leakage caused by directly providing difficult business data to the model optimization device, and ensure the security of information in the business device, compared with directly providing difficult business data to the model optimization device.

[0030] In one implementation, when an AI model needs to output a confidence score based on business data, the AI ​​model's performance can be represented by the magnitude of the confidence score. A higher confidence score indicates better AI model performance. For example, when the confidence score output by the AI ​​model is less than a confidence threshold, the AI ​​model's performance is poor. In this case, difficult business data can be selected as business data that causes the AI ​​model to output a confidence score less than the confidence threshold.

[0031] Optionally, the business device obtains first sample prompt information of the difficult business data based on the difficult business data, including: the business device performs data desensitization processing on the difficult business data to obtain the first sample prompt information.

[0032] Desensitizing difficult-to-use business data involves processing sensitive information in the difficult-to-use business data according to desensitization rules to reliably protect sensitive privacy data. For example, a business device may filter the difficult-to-use business data according to pre-set filtering rules to obtain desensitized difficult-to-use business data. Alternatively, the business device may first identify sensitive information in the difficult-to-use business data and then transform the sensitive information to remove the sensitive information from the difficult-to-use business data.

[0033] Furthermore, before the service device performs data desensitization processing on the difficult service data, the method further includes: the service device uses a preset representation method to represent the difficult service data. The service device then performs data desensitization processing on the difficult service data, which actually involves performing data desensitization processing on the difficult service data represented using the preset representation method. For example, the preset representation method is text.

[0034] By using a preset representation method to represent difficult-case business data, not only can the difficult-case business data represented by the preset representation method contain key information of the difficult-case business data, but it can also make the privacy information in the difficult-case business data easier to identify, reduce the difficulty of performing data desensitization processing on the difficult-case business data, improve the efficiency of performing data desensitization processing on the difficult-case business data, and further ensure the security of information in the business device.

[0035] In one implementation, a transformation model or a multimodal graphic-text description model may be optionally used to transform the difficult-case business data into a representation using a preset representation method, for example, text.

[0036] Optionally, the first sample prompt information indicates one or more of the following: data representation method, storage format, size, data distribution method, expression style or expression semantics.

[0037] In one implementation, the model optimization device generates first sample data based on the first sample prompt information, including: the model optimization device generates the first sample data represented by the second representation based on the first sample prompt information, and the first sample prompt information is represented by the first representation.

[0038] In another implementation, the first sample prompt information includes first prompt information expressed in a first representation and second prompt information expressed in a second representation. The model optimization device generates first sample data based on the first sample prompt information, including: the model optimization device modifies the second prompt information based on the first prompt information to obtain the first sample data.

[0039] Optionally, the first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

[0040] Optionally, before the model optimization device generates the first sample data based on the first sample prompt information, the method also includes: the model optimization device provides a sample configuration interface to the user, the sample configuration interface prompts the user to input the first sample prompt information; the model optimization device obtains the first sample prompt information from the sample configuration interface.

[0041] The model optimization device obtains the first sample prompt information provided by the user, so that the model optimization device can construct the first sample data according to the user's wishes, improve the richness of the first sample data, and make the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0042] In another possible implementation, the model optimization device generates the first sample prompt information. For example, the model optimization device is configured with a prompt information template, and the model optimization device can optionally generate the first sample prompt information based on the prompt information template.

[0043] The model optimization device generates first sample prompt information based on the prompt information template, and can automatically generate first sample prompt information indicating different contents, thereby improving the richness of the first sample data and making the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0044] Optionally, the method also includes: the model optimization device obtains second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test, provides the second sample prompt information to the model training device, and optimizes the second sample prompt information to obtain third sample prompt information based on the second sample prompt information, and generates third sample data based on the third sample prompt information; the model optimization device receives the trained artificial intelligence model provided by the model training device, and tests the trained artificial intelligence model based on the third sample data.

[0045] In a fourth aspect, the present application provides a system for optimizing an artificial intelligence model. The system includes: a model optimization device and a business device. The model optimization device is used to provide a trained artificial intelligence model to the business device; the business device is used to deploy the artificial intelligence model and use the artificial intelligence model to process business data; the business device is also used to obtain difficult business data based on the processing results of the artificial intelligence model on the business data, obtain first sample prompt information of the difficult business data based on the difficult business data, and provide the first sample prompt information to the model optimization device, the first sample prompt information indicating the conditions satisfied by the content of the difficult business data; the model optimization device is also used to generate first sample data based on the first sample prompt information, continue to adjust the parameters of the artificial intelligence model based on the first sample data, and provide the adjusted artificial intelligence model to the business device.

[0046] Optionally, the confidence level output by the artificial intelligence intelligent model for difficult business data is less than a confidence threshold.

[0047] Optionally, the business device is specifically used to perform data desensitization processing on difficult business data to obtain first sample prompt information.

[0048] Optionally, before the business device performs data desensitization processing on the difficult-case business data, the business device is further configured to represent the difficult-case business data using a preset representation method.

[0049] Optionally, the default representation is text.

[0050] Optionally, the first sample prompt information indicates one or more of the following: data representation method, storage format, size, data distribution method, expression style or expression semantics.

[0051] Optionally, the model optimization device is specifically used to generate first sample data represented by the second representation based on the first sample prompt information, and the first sample prompt information is represented by the first representation.

[0052] Optionally, the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation, and the model optimization device is specifically used to modify the second prompt information based on the first prompt information to obtain the first sample data.

[0053] Optionally, the first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

[0054] Optionally, before generating the first sample data based on the first sample prompt information, the model optimization device is further configured to provide a sample configuration interface to the user, where the sample configuration interface prompts the user to input the first sample prompt information. The model optimization device is further configured to obtain the first sample prompt information from the sample configuration interface.

[0055] Optionally, before the model optimization device generates the first sample data based on the first sample prompt information, the model optimization device is further used to generate the first sample prompt information based on a prompt information template.

[0056] Optionally, the system further includes: a model training device. The model optimization device is further configured to obtain second sample prompt information of the test sample data that caused the artificial intelligence model to fail the test, provide the second sample prompt information to the model training device, optimize the second sample prompt information to obtain third sample prompt information based on the second sample prompt information, and generate third sample data based on the third sample prompt information; the model optimization device is further configured to receive the trained artificial intelligence model provided by the model training device and test the trained artificial intelligence model based on the third sample data.

[0057] In a fifth aspect, the present application provides a computing device comprising a memory and a processor, wherein the memory stores program instructions, and the processor runs the program instructions to execute the method provided in the first or third aspect of the present application and any possible implementation thereof.

[0058] In a sixth aspect, the present application provides a computing device cluster, comprising multiple computing devices, the multiple computing devices including multiple processors and multiple memories, the multiple memories storing program instructions, and the multiple processors running the program instructions, so that the computing device cluster executes the method provided in the first or third aspect of the present application and any possible implementation thereof.

[0059] In the seventh aspect, the present application provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium, and the computer-readable storage medium includes program instructions. When the program instructions are executed on a computing device, the computing device executes the method provided in the first or third aspect of the present application and any possible implementation thereof.

[0060] In an eighth aspect, the present application provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the method provided in the first or third aspect of the present application and any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] FIG1 is a schematic diagram of a process of using an artificial intelligence model to perform a preset task according to an embodiment of the present application;

[0062] FIG2 is a schematic diagram of an implementation scenario involved in a method for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0063] FIG3 is a schematic diagram of an implementation scenario involved in another method for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0064] FIG4 is a schematic diagram of a process of using an artificial intelligence model to perform a preset task according to an embodiment of the present application;

[0065] FIG5 is a flow chart of a method for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0066] FIG6 is a schematic diagram of a difficult example of business data in a business data collection business data provided by an embodiment of the present application;

[0067] FIG7 is a schematic diagram of a second prompt information represented by an image provided in an embodiment of the present application;

[0068] FIG8 is a schematic diagram of first sample information generated based on first prompt information and second prompt information provided by an embodiment of the present application;

[0069] FIG9 is a schematic diagram of another embodiment of the present application, which shows first sample information generated based on first prompt information and second prompt information;

[0070] FIG10 is a schematic diagram of another embodiment of the present application, wherein the first sample information is generated based on the first prompt information and the second prompt information;

[0071] FIG11 is a flow chart of a method for optimizing an artificial intelligence model when a model optimization device provided in an embodiment of the present application is essentially a model testing device;

[0072] FIG12 is a flowchart of another method for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0073] FIG13 is a schematic diagram of an apparatus for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0074] FIG14 is a schematic diagram of another device for optimizing an artificial intelligence model provided in an embodiment of the present application;

[0075] FIG15 is a schematic diagram of a system for optimizing an artificial intelligence model provided by an embodiment of the present application;

[0076] FIG16 is a schematic diagram of another system for optimizing an artificial intelligence model provided by an embodiment of the present application;

[0077] FIG17 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0078] FIG18 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0080] With the rapid development of artificial intelligence (AI) technology, the use of AI models to implement tasks such as image recognition, video analysis, and natural language processing has become a trend. AI models are increasingly being integrated into intelligent systems and applied across various industries. When an AI model needs to perform a pre-defined task, as shown in Figure 1, sample data related to the pre-defined task must first be collected. An AI model is then designed based on this sample data, and then the AI ​​model is trained using the collected sample data. After the AI ​​model is trained, it is typically subjected to integration testing to verify whether its functionality meets the requirements. If the integration test results indicate that the AI ​​model's functionality does not meet the requirements, the AI ​​model is redesigned and trained and integration tested until its functionality meets the requirements. After the integration test results indicate that the AI ​​model's functionality meets the requirements, the AI ​​model is also subjected to stability testing to ensure its accuracy and robustness. After the AI ​​model passes the stability test, it can be deployed to business devices to perform the pre-defined task. If the AI ​​model fails the stability test, the AI ​​model development process needs to be reviewed, such as by redesigning or retraining the AI ​​model, until it passes the stability test. Alternatively, after the integration test results indicate that the AI ​​model's functionality meets the requirements, the AI ​​model can be directly deployed to the business device. It can be seen from this that using an AI model to perform preset tasks requires a training phase, a testing phase, and an application phase. The training and testing phases are the process of adjusting the performance of the AI ​​model by adjusting the parameters of the AI ​​model. The application phase refers to the AI ​​model deployed in the business device performing preset tasks based on the input data (i.e., business data) of the business device.

[0081] Due to the inherent unexplainability of AI models, training and testing them presents significant challenges. For example, large amounts of labeled data are required to serve as sample data for training and testing AI models. In many cases, collecting sample data presents the following challenges: high data collection costs, limited data sources, and a failure to cover all scenarios within a business device. For example, facial data collection is expensive, making it difficult to collect large amounts of facial data in real-world scenarios. Furthermore, because facial data involves personal privacy, rigorous authorization processes are required before collection, making it challenging. For another example, in anomaly detection scenarios, naturally occurring anomaly samples are typically rare, making real-world conditions unsuitable for collection. Therefore, constructing anomaly samples requires simulated methods, such as destroying normal samples. Furthermore, business devices may also contain unusual scenarios, such as long-tail scenarios, but sample data for these scenarios is difficult to collect, making it difficult to cover these scenarios. Consequently, sample data is often scarce and has a monotonous distribution, posing significant challenges to effective training and testing. The long-tail effect is a statistical phenomenon that refers to the fact that, in some data distributions, values ​​at the tail of the distribution have a greater proportion or influence than values ​​at the head of the distribution. In computer vision, the long-tail effect also exists in some tasks, such as object detection and image segmentation. These tasks require identifying and localizing objects of different categories in an image, including some with a large number of samples and some with a small number of samples. However, the total number of categories in these categories with a small number of samples is very large, which leads to imbalanced sample data and bias towards categories.

[0082] To improve model robustness, when it's impossible to collect more sample data from real-world environments, various approaches are often used to enhance the performance of AI models. These include data augmentation, adversarial attacks, and theoretical analysis. Data augmentation is widely adopted due to its simplicity. Data augmentation involves randomly perturbing input data during training and testing, such as rotation, cropping, scaling, and noise, to improve and test the AI ​​model's ability to generalize to these variations. Data augmentation for image data can be performed using pixel-based methods and methods based on geometric space transformations. Examples of pixel-based methods include changing color contrast, adjusting lighting, and fogging pixels. Examples of geometric space transformation methods include occlusion transformation, rotation transformation, symmetry transformation, shearing transformation, scaling transformation, and spatial transformation.

[0083] Currently, after acquiring sample data, it is divided into two parts: one for training and the other for testing. However, due to the data collection method, the current sample data collected results in low effectiveness for training and testing AI models. For example, the sample data currently collected fails to reflect the complexity of real-world data, making it impossible to fully train and test AI models. This results in quality issues in the AI ​​models not being discovered in the test environment, impacting the usability of AI models in business devices. Another example is that the current method of acquiring sample data leads to the homogenization of training and testing samples, making it impossible to decouple the training and testing processes of AI models, resulting in ineffective testing of AI models. Homogeneity refers to the process by which individual entities with different characteristics gradually converge in their inherent characteristics over the course of their development. Furthermore, due to the long-tail effect in the data distribution of some scenarios, data collection cannot cover all scenarios, and some types of data are difficult to obtain through construction. For example, in the security monitoring field, data on scenarios such as mudslides and landslides often show a significant gap between simulated and real-world results.

[0084] Based on this, an embodiment of the present application provides a method for optimizing an artificial intelligence model. In this method, a model optimization device first provides a trained artificial intelligence model to a business device, then receives first sample prompt information provided by the business device, and then generates first sample data based on the first sample prompt information. Based on the first sample data, the parameters of the artificial intelligence model are further adjusted, and then the adjusted artificial intelligence model is provided to the business device. The business device is used to deploy the artificial intelligence model. The first sample prompt information indicates the conditions that the content of the first sample data must meet.

[0085] Since the first sample prompt information is provided by a business device deployed with an artificial intelligence model, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0086] The following is a detailed introduction to the technical solution of the present application from multiple perspectives, including implementation scenarios, method flow, hardware devices, software devices, etc. The following first illustrates the application scenarios of the embodiments of the present application.

[0087] Figure 2 is a schematic diagram of an implementation scenario involved in a method for optimizing an artificial intelligence model provided in an embodiment of the present application. As shown in Figure 2, the implementation scenario includes: a model optimization device 10 and a business device 20. A communication connection is established between the model optimization device 10 and the business device 20. For example, a communication connection can be established between the model optimization device 10 and the business device 20 through a network. Optionally, the network can be a local area network, the Internet, or other networks, which is not limited in the embodiment of the present application. It should be noted that in order to ensure the security of data in the business device, network isolation measures are configured between the model optimization device 10 and the business device 20.

[0088] The model optimization device 10 is used to implement the functions of the model optimization device 10 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application. And the model optimization device 10 can be optionally used to train and / or test the artificial intelligence model. The business device 20 is used to implement the functions of the business device 20 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application. For example, when the model optimization device 10 is essentially a model testing device for testing the artificial intelligence model, the model optimization device 10 obtains the trained artificial intelligence model from the model training device, tests the artificial intelligence model, and after obtaining the trained and tested artificial intelligence model, provides the trained and tested artificial intelligence model to the business device 20. When the model optimization device 10 is essentially a model training device for training an artificial intelligence model, the model optimization device 10 trains the artificial intelligence model after obtaining the artificial intelligence model, and after obtaining the trained artificial intelligence model, provides the trained artificial intelligence model to the business device 20. When the model optimization device 10 is capable of training and testing an artificial intelligence model, after obtaining the artificial intelligence model, the model optimization device 10 trains the artificial intelligence model and tests the trained artificial intelligence model. After obtaining the trained and tested artificial intelligence model, the service device 20 provides the trained and tested artificial intelligence model. After obtaining the artificial intelligence model, the service device 20 deploys the artificial intelligence model therein, obtains first sample prompt information based on the input data of the artificial intelligence model, and provides the first sample prompt information to the model optimization device 10. When the model optimization device 10 is a model testing device for testing an artificial intelligence model, after obtaining the first sample prompt information, the model optimization device 10 generates first sample data based on the first sample prompt information and continues to test the artificial intelligence model based on the first sample data to adjust the parameters of the artificial intelligence model. When the model optimization device 10 is a model training device for training an artificial intelligence model, after obtaining the first sample prompt information, the model optimization device 10 generates first sample data based on the first sample prompt information and continues to train the artificial intelligence model based on the first sample data to adjust the parameters of the artificial intelligence model. When the model optimization device 10 is actually capable of training and testing the artificial intelligence model, after obtaining the first sample prompt information, the model optimization device 10 generates first sample data based on the first sample prompt information, and continues to train and test the artificial intelligence model based on the first sample data to adjust the parameters of the artificial intelligence model.

[0089] Among them, the function of the model optimization device 10 in this application can be regarded as optimizing the artificial intelligence model. When the model optimization device 10 is essentially a model training and / or testing device, the model optimization device 10 includes various components required in the model training and / or testing process, including data management, algorithm management, algorithm training and integration testing components. In addition, compared with ordinary model training and / or testing devices, the model optimization device 10 adds the function of generating first sample data based on the first sample prompt information, and continuing to adjust the parameters of the artificial intelligence model based on the first sample data.

[0090] In one implementation, the functions of each device in the method for optimizing an artificial intelligence model provided in an embodiment of the present application can be optionally implemented by running an executable program on a computing device. For example, the executable program for implementing the functions of the model optimization device 10 in the method can be optionally presented in the form of an application installation package. After the application installation package is installed in the computing device, the functions of the model optimization device 10 can be implemented by running the executable program. Similarly, the executable program for implementing the functions of the business device 20 in the method can be optionally presented in the form of an application installation package. After the application installation package is installed in the computing device, the functions of the business device 20 can be implemented by running the executable program.

[0091] Optionally, the model optimization device 10 and the business device 20 can each be a single server, a server cluster consisting of several servers, or a cloud computing service cluster. The deployment method of the model optimization device 10 and the business device 20 can be configured according to application requirements. For example, when the model optimization device 10 is essentially a model training device, some or all of the model optimization device 10, the model testing device, and the business device 20 can be optionally deployed in a cloud computing service cluster. When the model optimization device 10 is essentially a model testing device, some or all of the model optimization device 10, the model training device, and the business device 20 can be optionally deployed in a cloud computing service cluster. When the model optimization device 10 is essentially capable of training and testing artificial intelligence models, some or all of the model optimization device 10 and the business device 20 can be optionally deployed in a cloud computing service cluster. For example, the model optimization device 10 and the business device 20 are all deployed in a cloud computing service cluster, or the model optimization device 10 is deployed in a cloud computing service cluster and the business device 20 is deployed in the user's computer room. In particular, the cloud computing service cluster is deployed with a large number of basic resources owned by the cloud service provider. For example, computing resources, storage resources, and network resources are deployed in a cloud computing service cluster. The cloud computing service cluster can utilize these numerous basic resources to implement the method for optimizing the artificial intelligence model provided in the embodiments of this application. The cloud computing service cluster can be a cloud computing service cluster of a central cloud, a cloud computing service cluster of an edge cloud, or a cloud computing service cluster that includes both a central cloud and an edge cloud, and is not specifically limited in the embodiments of this application.

[0092] In another implementation scenario, as shown in FIG3 , the implementation scenario may include a client 30. In the implementation scenario of FIG3 , a user can interact with the model optimization device 10 and / or the business device 20 through the client 30. The client 30 may provide the user with an interactive interface, which includes at least one of an upload entry, a test entry, and a training entry. For example, the client 30 provides the user with an interactive interface, which includes an upload entry, and the user can provide the model file of the artificial intelligence model to the model optimization device 10 through the upload entry. Alternatively, the user can also interact with the terminal through a command line.

[0093] In one implementation, the client 30 can be a computer, a personal computer, a laptop computer, a mobile phone, a smart phone, a tablet computer, a cloud host, a portable mobile terminal, a multimedia player, an e-book reader, a wearable device, a smart home appliance, an artificial intelligence device, a smart wearable device, a smart vehicle-mounted device or an Internet of Things device, etc.

[0094] When the model optimization device 10 is a server or a server cluster, the function of the model optimization device 10 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application can be applied to an automated development platform or an intelligent analysis system. In this case, the function of the model optimization device 10 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application can be provided by means of an artificial intelligence automated development platform or a deep learning automated development platform. For example, when the model optimization device 10 is a model testing device, the function of the model optimization device 10 in the present application can be provided by means of a robustness testing development platform, so that the user can select a suitable model based on the test results. The development platform can provide a public interface, and the client 30 can provide the model file of the artificial intelligence model to be tested to the development platform through the public interface. After receiving the model file, the development platform can test the robustness of the artificial intelligence model and provide the test results to the user. Alternatively, the function of the model optimization device 10 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application can also be applied to the artificial intelligence model development process or the computer vision model development process. In this case, the function of the model optimization device 10 in the method for optimizing the artificial intelligence model provided in the embodiment of the present application can be provided by means of an artificial intelligence application or a deep learning application.

[0095] When the model optimization device 10 is implemented through a cloud computing service center, the user can access the cloud platform through the client 30 and instruct the model optimization device 10 through the cloud platform to optimize the artificial intelligence model owned by the user. At this time, the model optimization device 10 provides the user with the function of optimizing the artificial intelligence model, which can be abstracted into an optimization cloud service by the cloud service provider on the cloud platform. After the user purchases the optimization cloud service on the cloud platform, the cloud platform can use the resources of the cloud computing service center and use the method for optimizing the artificial intelligence model provided in the embodiment of the present application to optimize the user's artificial intelligence model. In addition, the optimization cloud service can be provided as an independent cloud service or as an additional service to other cloud services. Optionally, the cloud platform can be a cloud platform of a central cloud, a cloud platform of an edge cloud, or a cloud platform including a central cloud and an edge cloud, and the embodiment of the present application does not specifically limit it.

[0096] Similarly, when the business device 20 is implemented through a cloud computing service center, the user can access the cloud platform through the client 30, and instruct the business device 20 to deploy the artificial intelligence model through the cloud platform, and provide the first sample prompt information to the model optimization device 10 based on the input data of the artificial intelligence model. At this time, the function of the business device 20 to provide the first sample prompt information to the model optimization device 10 can be abstracted by the cloud service provider into an information feedback cloud service on the cloud platform. After the user purchases the information feedback cloud service on the cloud platform, the cloud platform can use the resources of the cloud computing service center and use the method for optimizing the artificial intelligence model provided in the embodiment of the present application to provide the first sample prompt information to the model optimization device 10 based on the business data of the artificial intelligence model. In addition, the information feedback cloud service can be provided as an independent cloud service or as an additional service to other cloud services.

[0097] It should be noted that in the implementation scenario shown in FIG3 , the model optimization device 10 and the business device 20 can also be implemented through resource platforms other than the cloud platform, and this embodiment of the present application does not specifically limit this. In addition, this implementation scenario may also optionally include a storage device for storing various data, such as sample data and model files, and this embodiment of the present application does not specifically limit this.

[0098] FIG4 is a process diagram of the method for optimizing an artificial intelligence model provided by an embodiment of the present application. As shown in FIG4 , compared to FIG1 , FIG4 adds the following process: the business device 20 obtains first sample prompt information based on the business data received by the artificial intelligence model and provides the first sample prompt information to the model optimization device 10; the model optimization device 10 generates first sample data based on the first sample prompt information and continues to adjust the parameters of the artificial intelligence model based on the first sample data. FIG4 is a schematic diagram of the target operation being to perform a stability test on the artificial intelligence model.

[0099] It should be understood that the above content is an illustrative description of the implementation scenario of the method for optimizing the artificial intelligence model provided in the embodiment of the present application, and does not constitute a limitation on the implementation scenario of the method for optimizing the artificial intelligence model. A person of ordinary skill in the art will know that as business needs change, its implementation scenario can be adjusted according to application requirements, and the embodiments of the present application do not list them one by one.

[0100] The following describes the method for optimizing the artificial intelligence model provided in the embodiment of the present application. As shown in Figure 5, the method includes the following steps:

[0101] Step 501: The model optimization device provides a trained artificial intelligence model to the business device.

[0102] The model optimization device can provide a trained artificial intelligence model to the business device so that the business device can deploy the artificial intelligence model and use the artificial intelligence model to process business data, thereby realizing user services. When the model optimization device provides the artificial intelligence model to the business device, it actually provides the model file of the artificial intelligence model to the business device. Among them, the model optimization device can optionally be a model testing device for testing the artificial intelligence model. In this case, the artificial intelligence model provided by the model optimization device to the business device has been trained and tested. Alternatively, the model optimization device is a model training device for training the artificial intelligence model. In this case, the artificial intelligence model provided by the model optimization device to the business device has been trained and may not have been tested. Alternatively, the model optimization device is a device that can both train and test the artificial intelligence model. In this case, the artificial intelligence model provided by the model optimization device to the business device has been trained and tested, or has been trained but not tested.

[0103] Step 502: The business device deploys the artificial intelligence model in the business device and uses the artificial intelligence model to process business data.

[0104] After the business device obtains the model file of the artificial intelligence model, it can deploy the artificial intelligence model in the business device based on the model file, and use the artificial intelligence model to process the business data to realize user business.

[0105] Step 503: The business device obtains difficult-case business data based on the processing result of the business data by the artificial intelligence model.

[0106] After a service device processes service data using an artificial intelligence model, it can retrieve difficult service data from the service data based on the processing results of the artificial intelligence model. Difficult service data can be service data that causes the artificial intelligence model to perform poorly. In one implementation, when the artificial intelligence model needs to output a confidence score based on the service data, the performance of the artificial intelligence model can be represented by the magnitude of the confidence score. A higher confidence score indicates better performance of the artificial intelligence model. For example, when the confidence score output by the artificial intelligence model is less than a confidence threshold, it indicates poor performance. In this case, difficult service data can be service data that causes the confidence score output by the artificial intelligence model to be less than the confidence threshold. When the confidence score output based on the service data is less than the confidence threshold, the service device can determine that the service data is difficult service data. The value of the confidence threshold can be determined based on application requirements. For example, in scenarios with high performance requirements for the artificial intelligence model, the confidence threshold can be set to a larger value, such as 0.8. For another example, in scenarios where the performance requirements for the AI ​​model are lower, the confidence threshold can be set to a smaller value, such as 0.6. As shown in Figure 6, after the business data is input into the AI ​​model, the business device can collect difficult business data from the business data based on the output of the AI ​​model on the business data. Optionally, the AI ​​model can be a computer vision (CV) model, in which case the difficult business data is an image.

[0107] Step 504: The service device obtains first sample prompt information of the difficult-case service data based on the difficult-case service data.

[0108] After obtaining the difficult-case business data, the business device may optionally first obtain first sample prompt information for the difficult-case business data, and then provide the first sample prompt information to the model optimization device. Providing the first sample prompt information to the model optimization device can avoid privacy leaks caused by directly providing the difficult-case business data to the model optimization device, thereby ensuring the security of information in the business device, compared to directly providing the difficult-case business data to the model optimization device.

[0109] The first sample prompt information indicates the conditions that the content of the difficult business data satisfies. That is, the first sample prompt information is not the difficult business data itself, but the first sample prompt information can reflect the content of the difficult business data. For example, the first sample information can reflect information such as the application scenario and key features of the difficult business data. For example, the first sample prompt information indicates one or more of the following: the representation method, storage format, size, data distribution method, expression style, or semantics of the difficult business data.

[0110] For example, the representation mode includes one or more of the following: text, image, video, or audio. When the representation mode is text, the storage format includes one or more of the following: text (TXT), document (DOC), workbook (Excel, XLS), or presentation (PowerPoint, PPT). When the representation mode is an image, the storage format includes one or more of the following: bitmap format (BMP), graphics interchange format (GIF), joint photographic experts group (JPEG), tagged image file format (TIFF), or portable network graphics (PNG). When the representation mode is video, the storage format includes one or more of the following: flash video (FLV) format, audio video interleaved (AVI) format, media player (MP4), media variable bitrate (MVB) format, or real media variable bitrate (RMVB) format. When the representation is audio, the storage format includes one or more of the following: CD, WAVE, Audio Interchange File Format (AIFF), Moving Pictures Experts Group (MPE), MPEG-4, Media Player (MP3), Musical Instrument Digital Interface (MIDI), Windows Media Audio (WMA), or Adaptive Multi-Rate (AMR). Data distribution includes one or more of the following: power law, Poisson, exponential, long-tail, Gaussian, or normal. Expression style includes one or more of the following: narrative, descriptive, lyrical, argumentative, explanatory, abstract, minimalist, anime, aesthetic, and classical. When the representation is image or video, semantics indicates one or more of the following: the position of the foreground within the image, the image style, or the color, size, texture, volume, brightness, contrast, or category of elements within the image, and whether the element is foreground or background.When the representation is audio, the semantics indicate one or more of the following: audio style, audio frequency, pitch, timbre, or loudness. For example, when the difficult service data is an image, the first sample prompt information may indicate "a scalene acute triangle with coordinates [[x1, y1, x2, y2], ...]", or "a scalene acute triangle with coordinates [[x1, y1, x2, y2], ...], with a background of vertical stripes", or "a hexagon and a scalene acute triangle with coordinates [[x1, y1, x2, y2], ...], with a background of vertical stripes".

[0111] In one implementation, a business device obtains first sample prompt information for difficult-to-use business data, including: the business device performs data desensitization processing on the difficult-to-use business data to obtain the first sample prompt information. Desensitization processing on the difficult-to-use business data refers to processing sensitive information in the difficult-to-use business data according to desensitization rules to achieve reliable protection of sensitive privacy data. For example, the business device may optionally filter the difficult-to-use business data according to preset filtering rules to obtain data-desensitized difficult-to-use business data. Alternatively, the business device may optionally first identify sensitive information in the difficult-to-use business data and then transform the sensitive information to remove the sensitive information from the difficult-to-use business data. For example, the business device may optionally first identify private information such as portraits, license plates, ID cards, ID numbers, mobile phone numbers, card numbers, and customer numbers in the difficult-to-use business data and then randomly transform this information to obtain the first sample prompt information for the difficult-to-use business data. After obtaining the desensitized difficult-to-use business data, the business device may optionally use the desensitized difficult-to-use business data as the first sample prompt information.

[0112] Optionally, before performing data desensitization processing on difficult-case business data, the business device may optionally first use a preset representation method to represent the difficult-case business data. The business device then performs data desensitization processing on the difficult-case business data, which actually performs data desensitization processing on the difficult-case business data represented by the preset representation method. For example, the preset representation method is text. By using a preset representation method to represent the difficult-case business data, not only can the difficult-case business data represented by the preset representation method contain key information of the difficult-case business data, but it also makes the privacy information in the difficult-case business data easier to identify, which can reduce the difficulty of performing data desensitization processing on the difficult-case business data, improve the efficiency of performing data desensitization processing on the difficult-case business data, and further ensure the security of information in the business device. In one implementation method, a transformation model or a multimodal graphic description model can be optionally used to transform the difficult-case business data into a representation using a preset representation method. For example, assuming that the difficult-case business data is an image, as shown in Figure 6, the business device may optionally use a picture-to-text model to process the difficult-case business data represented by the image to obtain a first sample prompt information represented by text.

[0113] Step 505: The business device provides first sample prompt information to the model optimization device.

[0114] As shown in Figure 6, after the business device obtains the first sample prompt information, it can provide the first sample prompt information to the model optimization device, so that the model optimization device can optimize the artificial intelligence model based on the first sample prompt information. In particular, since the first sample prompt information comes from the difficult business data in the business device, before providing the first sample prompt information to the model optimization device, the business device may also optionally obtain the user's authorization, and after obtaining the user's authorization, provide the first sample prompt information to the model optimization device. In one implementation, the business device may optionally display an authorization page to the user, and the authorization page is used to prompt the user to enter an authorization opinion. After the user enters the authorization opinion in the authorization page, the business device can obtain the authorization opinion from the authorization page. Since the first sample prompt information reduces the sensitivity to the data transmission process and reduces the privacy data in the difficult business data, it can reduce the difficulty of obtaining user authorization, which helps to improve the efficiency of locating artificial intelligence model problems and continuously optimize the model quality.

[0115] When the difficult-example business data is an image, and the first sample prompt information derived from the difficult-example business data is text, the size of content represented by text is smaller than that represented by an image. This reduces the amount of data transmitted when the business device provides the first sample prompt information to the model optimization device. Furthermore, using text to represent the first sample prompt information also reduces the difficulty of user review during authorization, facilitating user review and making it easier to obtain user authorization.

[0116] Step 506: The model optimization device obtains first sample prompt information.

[0117] After the business device provides the first sample prompt information to the model optimization device, the model optimization device can obtain the first sample prompt information. Optionally, in addition to obtaining the first sample prompt information from the business device, the model optimization device can also obtain the first sample prompt information through other means.

[0118] In one implementation, the first sample prompt information may also come from the user. That is, the model optimization device may also obtain the first sample prompt information sent by the user. Its implementation process includes: the model optimization device provides a sample configuration interface to the user, and the sample configuration interface prompts the user to input the first sample prompt information. After the user inputs the first sample prompt information in the sample configuration interface, the model optimization device obtains the first sample prompt information from the sample configuration interface. At this time, the first sample prompt information indicates the conditions that the content of the first sample data needs to meet. By obtaining the first sample prompt information provided by the user, the model optimization device can construct the first sample data according to the user's wishes, improve the richness of the first sample data, and make the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0119] In another implementation, the model optimization device generates the first sample prompt information. For example, a prompt information template is configured in the model optimization device, and the model optimization device can optionally generate the first sample prompt information based on the prompt information template. The prompt information template is a document written according to certain specifications for prompting the content that the sample data needs to include. When the model optimization device needs to generate the first sample prompt information, it can fill in the content in the prompt information template to obtain the first sample prompt information for indicating the first sample data. Alternatively, the prompt information template can fully indicate the sample data, and the prompt information template includes multiple changeable modules. The model optimization device can obtain the first sample prompt information by changing the content in the changeable modules. For example, the model optimization device changes the original content of the changeable modules in the prompt information template, including: automatically adding different weather effects to the original content, changing the target posture in the image, erasing foreground targets, etc. The model optimization device generates first sample prompt information based on the prompt information template, and can automatically generate first sample prompt information indicating different contents, thereby improving the richness of the first sample data and making the first sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0120] Step 507: The model optimization device generates first sample data based on the first sample prompt information.

[0121] After the model optimization device obtains the first sample prompt information, it can generate the first sample data based on the first sample prompt information. In one implementation, a generative model can be optionally used to generate the first sample data based on the first sample prompt information. There are many implementation methods, and the embodiments of the present application illustrate them with the following two implementation methods. In the first implementation, when the first sample prompt information is represented by a first representation, the model optimization device generates the first sample data based on the first sample prompt information, including: the model optimization device generates the first sample data represented by a second representation based on the first sample prompt information. For example, if the first sample prompt information is represented by text, the model optimization device generates the first sample data including: generating the first sample data represented by an image. In the second implementation, when the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation, the model optimization device generates the first sample data based on the first sample prompt information, including: the model optimization device modifies the second prompt information based on the first prompt information to obtain the first sample data. For example, if the first sample prompt information includes first prompt information represented by text and second prompt information represented by an image, then the model optimization device generating the first sample data includes: the model optimization device modifying the image based on the text to obtain the first sample data represented by the image. The representation method includes one or more of the following: text, image, video, or audio. The implementation of this representation method is described in step 504 and is not further elaborated here.

[0122] Optionally, as shown in FIG6 , the model optimization device can generate first sample data using a generative model based on the first sample prompt information. The generative model can be a stable diffusion (SD) model. The model can generate first sample data represented by an image based on the first sample prompt information represented by text. Alternatively, the model can modify second prompt information represented by an image based on the first prompt information represented by text to obtain first sample data represented by an image. Alternatively, the generative model can be a generative adversarial network (GAN). A GAN consists of a generative network and a discriminative network. The generative network randomly samples from the latent space as input, and its output must closely mimic real samples in the training set. The discriminative network receives real samples or the output of the generative network as input, with the goal of distinguishing the output of the generative network from real samples as much as possible. The generative network, in turn, must deceive the discriminative network as much as possible. The two networks compete with each other and continuously adjust parameters, with the ultimate goal of making it impossible for the discriminative network to determine whether the output of the generative network is authentic. The generative model can optionally be a trained model. For example, the generative model can be optionally pre-trained with large-scale data, so that the generative model maintains strong generalization ability and has strong generation ability.

[0123] When the model optimization device is a model testing device, as shown in FIG4 , after the model testing device generates the first sample data, it can also provide the first sample data to the model training device, so that the model training device can optimize and train the artificial intelligence model based on the first sample data. Similarly, when the model optimization device is a model training device, after the model training device generates the first sample data, it can also provide the first sample data to the model testing device, so that the model testing device can test the artificial intelligence model based on the first sample data. In addition, the model optimization device can also be a device other than the model optimization device and the model training device, for example, the model optimization device is a computing device dedicated to generating the first sample data. Then, after the model optimization device generates the first sample data, it can also optionally provide the first sample data to at least one of the model training device and the model testing device.

[0124] For example, the first sample prompt information includes first prompt information and second prompt information. Figure 7 is a schematic diagram of the second prompt information represented by an image provided in an embodiment of the present application. When the first prompt information indicates "an unequal-sided acute triangle with coordinates [[x1, y1, x2, y2],......]", Figure 8 is a schematic diagram of the first sample information generated based on the first prompt information and the second prompt information shown in Figure 7. As shown in Figure 8, the right triangle in Figure 7 becomes the unequal-sided acute triangle in Figure 8, and the coordinates of the acute triangle are [[x1, y1, x2, y2],......]. When the first prompt information indicates "an unequal-sided acute triangle with coordinates [[x1, y1, x2, y2],......], and the background is vertical stripes", Figure 9 is a schematic diagram of the first sample information generated based on the first prompt information and the second prompt information shown in Figure 7. As shown in Figure 9, the right triangle in Figure 7 has been transformed into the scalene acute triangle in Figure 9, whose coordinates are [[x1, y1, x2, y2], ...], and the background of Figure 9 has been transformed into vertical stripes. When the first prompt information indicates "a hexagon and a scalene acute triangle, whose coordinates are [[x1, y1, x2, y2], ...], and a vertical striped background," Figure 10 is a schematic diagram of the first sample information generated based on this first prompt information and the second prompt information shown in Figure 7. As shown in Figure 10, the right triangle in Figure 7 has been transformed into the scalene acute triangle in Figure 10, whose coordinates are [[x1, y1, x2, y2], ...], the background of Figure 10 has been transformed into vertical stripes, and Figure 10 has an additional hexagon compared to Figure 7.

[0125] When the first sample prompt information is obtained based on the difficult business data in the business device, the model optimization device generates the first sample data based on the first sample prompt information, so that the first sample data can retain the style and key characteristics of the difficult business data while removing the sensitive information in the difficult business data, thereby ensuring the security of the data in the business device. In addition, the first sample data can cover more scenarios, especially scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model. At the same time, when the first sample prompt information is obtained based on the difficult business data, the first sample data generated based on the first sample prompt information can be called an adversarial sample. Training or testing the artificial intelligence model based on the adversarial sample helps users (such as model developers) discover model defects of the artificial intelligence model, evaluate the robustness and generalization of the artificial intelligence model, and thus improve the performance of the artificial intelligence model. Among them, adversarial samples are more likely to cause the artificial intelligence model to produce incorrect outputs, and users using the artificial intelligence model can more easily identify the correct results. The existence of adversarial samples exposes the vulnerability and limitations of the artificial intelligence model, and also threatens the security and reliability of the artificial intelligence model.

[0126] Step 508: The model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, and provides the adjusted artificial intelligence model to the business device.

[0127] After the model optimization device generates the first sample data, it can continue to adjust the parameters of the artificial intelligence model based on the first sample data to optimize the artificial intelligence model. For example, when the model optimization device is a model training device, the model optimization device can train the artificial intelligence model based on the first sample data. Since the first sample data is obtained based on the difficult business data in the business device, it can reflect the characteristics of the difficult business data. By training the artificial intelligence model based on the first sample data, the parameters of the artificial intelligence model can be optimized for the difficult business data, so as to improve the usability of the artificial intelligence model. When the model optimization device is a model testing device, the model optimization device can test the artificial intelligence model based on the first sample data. Since the first sample data is obtained based on the difficult business data in the business device, it can reflect the characteristics of the difficult business data. By testing the artificial intelligence model based on the first sample data, the problems existing in the artificial intelligence model can be located for the difficult business data, so as to optimize the artificial intelligence model based on the problem and improve the effectiveness and robustness of the artificial intelligence model. Furthermore, one of model training and model testing uses the first sample data to operate the AI ​​model, while the other uses sample data obtained through other collection methods to operate the AI ​​model. For example, the AI ​​model is trained using the collected samples, while the AI ​​model is tested using the first sample data obtained based on difficult business data. In this way, because training and testing use sample data from different sources, the development and testing processes of the AI ​​model can be decoupled, improving the efficiency of discovering problems with the AI ​​model, ensuring the effectiveness of testing the AI ​​model, and enhancing the usability of the AI ​​model.

[0128] Optionally, as shown in FIG11 , when the model optimization device is essentially a model testing device, after the model optimization device tests the artificial intelligence model based on the first sample data, the method further includes:

[0129] Step 509: When the test result indicates that the artificial intelligence model fails the test, the model testing device obtains second sample prompt information of the first sample data that causes the artificial intelligence model to fail the test.

[0130] For the implementation process of obtaining the second sample prompt information of the first sample data, please refer to the relevant description of obtaining the first sample prompt information of the difficult business data in step 504, which will not be repeated here.

[0131] Step 510: The model testing device provides second sample prompt information to the model training device.

[0132] After the model testing device obtains the second sample prompt information, it can provide the second sample prompt information to the model training device so that the model training device can generate sample data for training the artificial intelligence model based on the second sample prompt information.

[0133] Step 511: The model training device generates second sample data based on the second sample prompt information, continues to train the artificial intelligence model based on the second sample data, and provides the trained artificial intelligence model to the model testing device.

[0134] After obtaining the second sample prompt information, the model training device may generate second sample data for training the artificial intelligence model based on the second sample prompt information, then train the artificial intelligence model based on the second sample data, and provide the trained artificial intelligence model to the model testing device. For the implementation process of the model training device generating the second sample data based on the second sample prompt information, please refer to the relevant description in step 507, and will not be repeated here.

[0135] Step 512: The model testing device optimizes the second sample prompt information to obtain third sample prompt information, and generates third sample data based on the third sample prompt information.

[0136] After the model testing device obtains the second sample prompt information, in order to facilitate further training of the artificial intelligence model, the model testing device may also optimize the second sample prompt information to obtain more complex third sample prompt information, and generate third sample data based on the third sample prompt information. In one implementation, the model testing device may modify some information in the second sample prompt information, or add some information to the second sample prompt information to obtain the third sample prompt information. For the implementation process of the model testing device generating the third sample data based on the third sample prompt information, please refer to the implementation process of generating the first sample data based on the first sample prompt information, which will not be repeated here.

[0137] Step 513: The model testing device tests the trained artificial intelligence model based on the third sample data and provides the tested artificial intelligence model to the business device.

[0138] After obtaining the trained artificial intelligence model, the model testing device can test the trained artificial intelligence model based on the third sample data. After the artificial intelligence model passes the test, the model testing device provides the artificial intelligence model to the business device. If the artificial intelligence model fails the test, the model testing device can continue to provide the model training device with the third sample prompt information, so that the model training device can train the artificial intelligence model based on the third sample prompt information, and so on, until the artificial intelligence model passes the test.

[0139] Furthermore, before deploying the AI ​​model in the business device, it is optional to first perform target operations on the AI ​​model, the target operations include training and / or testing, and the samples used in the target operations are obtained based on the sample prompt information. As shown in Figure 12, before step 501, the implementation process of the method also includes:

[0140] Step 514: The model optimization device obtains an artificial intelligence model of the target operation to be executed.

[0141] The model optimization device may be a model training device. Alternatively, the model optimization device may be a model testing device. Alternatively, the model optimization device may be a device capable of performing both training and testing.

[0142] Step 515: The model optimization device obtains fourth sample prompt information.

[0143] In one implementation, the fourth sample prompt information may come from the user. That is, the model optimization device can obtain the fourth sample prompt information sent by the user. The implementation process includes: the model optimization device provides a sample configuration interface to the user, and the sample configuration interface prompts the user to enter the fourth sample prompt information. After the user enters the fourth sample prompt information in the sample configuration interface, the model optimization device obtains the fourth sample prompt information from the sample configuration interface. At this time, the fourth sample prompt information indicates the conditions that the content of the training sample data needs to meet. By obtaining the fourth sample prompt information provided by the user, the model optimization device can construct the training sample data according to the user's wishes, improve the richness of the training sample data, and make the training sample data cover more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0144] In another implementation, the fourth sample prompt information is generated by the model optimization device. For example, the model optimization device is configured with a prompt information template, and the model optimization device can optionally generate the fourth sample prompt information based on the prompt information template. The prompt information template is a document written according to certain specifications for prompting the content that the sample data needs to include. The prompt information template includes multiple editable modules, and the model optimization device can obtain the fourth sample prompt information by changing the content in the editable modules. For example, the model optimization device changes the original content of the editable modules in the prompt information template, including: automatically adding different weather effects to the original content, changing the target posture in the image, erasing the foreground target, etc. The model optimization device can automatically generate the fourth sample prompt information indicating different content by changing the original content of the editable modules in the prompt information template, which can improve the richness of the training sample data, so that the training sample data covers more scenarios, especially covering scenarios that cannot be collected, such as various abnormal and long-tail scenarios, which helps to improve the performance of the artificial intelligence model.

[0145] Step 516: The model optimization device generates third sample data based on the fourth sample prompt information.

[0146] After obtaining the fourth sample prompt information, the model optimization device can generate third sample data based on the fourth sample prompt information. In one implementation, a generative model can optionally be used to generate the third sample data based on the fourth sample prompt information. This implementation can be implemented in a variety of ways, and the present embodiment uses the following two implementations as examples to illustrate them. In the first implementation, when the fourth sample prompt information is represented using a first representation, the model optimization device generates the third sample data based on the fourth sample prompt information, including: the model optimization device generates the third sample data represented using a second representation based on the fourth sample prompt information. In the second implementation, when the fourth sample prompt information includes first prompt information represented using the first representation and second prompt information represented using the second representation, the model optimization device generates the third sample data based on the fourth sample prompt information, including: the model optimization device modifies the second prompt information based on the first prompt information to obtain the third sample data. For the implementation of this representation, please refer to the relevant description in step 504, which will not be repeated here. For the generative model, please refer to the relevant description in step 507, which will not be repeated here.

[0147] When the model optimization device is a model testing device, after the model testing device generates the third sample data, it can also provide the third sample data to the model training device, so that the model training device can optimize and train the artificial intelligence model based on the third sample data. Similarly, when the model optimization device is a model training device, after the model training device generates the third sample data, it can also provide the third sample data to the model testing device, so that the model testing device can test the artificial intelligence model based on the third sample data.

[0148] Generating third sample data based on the fourth sample prompt information can reduce reliance on collected data and improve the reliability of training and / or testing the AI ​​model. Furthermore, when generating third sample data based on the fourth sample prompt information, the third sample data can cover more scenarios, particularly scenarios that cannot be collected, such as various abnormal and long-tail scenarios, helping to improve the performance of the AI ​​model and ensure the delivery quality of the AI ​​model.

[0149] Step 517: The model optimization device performs target operations on the artificial intelligence model based on the third sample data and adjusts the parameters of the artificial intelligence model.

[0150] When the target operation is to test the AI ​​model, the model optimization device can provide the tested AI model to the business device after completing the testing of the AI ​​model. When the target operation is to train the AI ​​model, the model optimization device can optionally provide the trained AI model to the model testing device after completing the training of the AI ​​model. After the model testing device completes the testing of the AI ​​model, it can then provide the tested AI model to the business device.

[0151] In summary, in the method for optimizing the artificial intelligence model provided in the embodiment of the present application, since the first sample prompt information is provided by the business device in which the artificial intelligence model is deployed, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0152] It should be noted that the order of the steps in the method for optimizing the artificial intelligence model provided in the embodiments of the present application can be adjusted appropriately, and the steps can be increased or decreased accordingly. Any person skilled in the art who can easily conceive of a modified method within the technical scope disclosed in this application should be included in the scope of protection of this application, so it will not be described in detail.

[0153] The following describes the virtual device in the embodiment of the present application by way of example.

[0154] The above introduces the method for optimizing the artificial intelligence model of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a device for optimizing the artificial intelligence model. Figure 13 is a structural diagram of a device for optimizing the artificial intelligence model provided by an embodiment of the present application. Based on the following multiple components shown in Figure 13, the device for optimizing the artificial intelligence model shown in Figure 13 can perform all or part of the operations shown in Figures 5, 11 or 12 above. It should be understood that the device may include more additional components than the components shown or omit some of the components shown therein, and the embodiment of the present application is not limited to this. Optionally, the device for optimizing the artificial intelligence model can be configured on a cloud platform. As shown in Figure 13, the device 130 for optimizing the artificial intelligence model may include:

[0155] The interaction module 1301 is used to provide a trained artificial intelligence model to the business device, and the business device is used to deploy the artificial intelligence model.

[0156] The interaction module 1301 is further configured to receive first sample prompt information provided by the service device, where the first sample prompt information indicates conditions that the content of the first sample data needs to meet.

[0157] The generating module 1302 is configured to generate first sample data based on the first sample prompt information.

[0158] The optimization module 1303 is used to continue adjusting the parameters of the artificial intelligence model based on the first sample data and provide the adjusted artificial intelligence model to the business device.

[0159] Optionally, the generating module 1302 is specifically configured to generate first sample data represented by the second representation based on the first sample prompt information, where the first sample prompt information is represented by the first representation.

[0160] Optionally, the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation. The generating module 1302 is specifically configured to modify the second prompt information based on the first prompt information to obtain the first sample data.

[0161] Optionally, the representation includes one or more of the following: text, image, video or audio.

[0162] Optionally, the first sample prompt information indicates one or more of the following: representation method, storage format, size, data distribution method, expression style, or expression semantics of the first sample data.

[0163] Optionally, the interaction module 1301 is further configured to provide a sample configuration interface to the user, where the sample configuration interface prompts the user to input first sample prompt information. The interaction module 1301 is further configured to obtain the first sample prompt information from the sample configuration interface.

[0164] Optionally, the generating module 1302 is further configured to generate first sample prompt information based on the prompt information template.

[0165] Optionally, as shown in FIG14 , the device 130 for optimizing the artificial intelligence model further includes:

[0166] The acquisition module 1304 is used to obtain second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test.

[0167] The interaction module 1301 is further configured to provide second sample prompt information to the model training device.

[0168] The generating module 1302 is further configured to optimize the second sample prompt information to obtain third sample prompt information, and generate third sample data based on the third sample prompt information.

[0169] The interaction module 1301 is also used to receive the trained artificial intelligence model provided by the model training device and test the trained artificial intelligence model based on the third sample data.

[0170] In the device for optimizing the artificial intelligence model, since the first sample prompt information is provided by the business device in which the artificial intelligence model is deployed, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0171] Here, please refer to the description of the previous method embodiment for the detailed working process of the interaction module 1301, generation module 1302, optimization module 1303, and acquisition module 1304. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process of each component described above can refer to the corresponding content in the previous method embodiment and will not be repeated here.

[0172] The embodiment of the present application also provides a system for optimizing artificial intelligence models. Figure 15 is a structural diagram of a system for optimizing artificial intelligence models provided by an embodiment of the present application. Based on the following multiple components shown in Figure 15, the system for optimizing artificial intelligence models shown in Figure 15 can perform all or part of the operations shown in Figure 5, Figure 11 or Figure 12 above. It should be understood that the system may include more additional components than the components shown or omit some of the components shown therein, and the embodiment of the present application does not limit this. Optionally, the system for optimizing artificial intelligence models can be configured on a cloud platform. As shown in Figure 15, the system 150 for optimizing artificial intelligence models may include: a model optimization device 1501 and a business device 1502.

[0173] The model optimization device 1501 is used to provide a trained artificial intelligence model to the business device 1502.

[0174] Business device 1502 is used to deploy artificial intelligence models and use artificial intelligence models to process business data.

[0175] The business device 1502 is also used to obtain difficult business data based on the processing results of the business data by the artificial intelligence model, obtain first sample prompt information of the difficult business data based on the difficult business data, and provide the first sample prompt information to the model optimization device 1501. The first sample prompt information indicates the conditions that the content of the difficult business data meets.

[0176] The model optimization device 1501 is also used to generate first sample data based on the first sample prompt information, continue to adjust the parameters of the artificial intelligence model based on the first sample data, and provide the adjusted artificial intelligence model to the business device 1502.

[0177] Optionally, the confidence level output by the artificial intelligence intelligent model for difficult business data is less than a confidence threshold.

[0178] Optionally, the business device 1502 is specifically used to perform data desensitization processing on difficult business data to obtain first sample prompt information.

[0179] Optionally, before the business device 1502 performs data desensitization processing on the difficult-case business data, the business device 1502 is further configured to represent the difficult-case business data using a preset representation method.

[0180] Optionally, the default representation is text.

[0181] Optionally, the first sample prompt information indicates one or more of the following: data representation method, storage format, size, data distribution method, expression style or expression semantics.

[0182] Optionally, the model optimization device 1501 is specifically configured to generate first sample data represented by the second representation based on the first sample prompt information, and the first sample prompt information is represented by the first representation.

[0183] Optionally, the first sample prompt information includes first prompt information represented by a first representation and second prompt information represented by a second representation. The model optimization device 1501 is specifically used to modify the second prompt information based on the first prompt information to obtain the first sample data.

[0184] Optionally, the representation includes one or more of the following: text, image, video or audio.

[0185] Optionally, before generating the first sample data based on the first sample prompt information, the model optimization device 1501 is further configured to provide a sample configuration interface to the user, where the sample configuration interface prompts the user to input the first sample prompt information. The model optimization device 1501 is further configured to obtain the first sample prompt information from the sample configuration interface.

[0186] Optionally, before the model optimization device 1501 generates the first sample data based on the first sample prompt information, the model optimization device 1501 is further configured to generate the first sample prompt information based on a prompt information template.

[0187] Optionally, as shown in FIG16 , the system for optimizing the artificial intelligence model further includes a model training device 1503. The model optimization device 1501 is further configured to obtain second sample prompt information of the test sample data that caused the artificial intelligence model to fail the test, provide the second sample prompt information to the model training device 1503, optimize the second sample prompt information to obtain third sample prompt information, and generate third sample data based on the third sample prompt information. The model optimization device 1501 is further configured to receive the trained artificial intelligence model provided by the model training device 1503 and test the trained artificial intelligence model based on the third sample data.

[0188] In the system for optimizing the artificial intelligence model, since the first sample prompt information is provided by the business device in which the artificial intelligence model is deployed, it can be known that the first sample prompt information is obtained based on the input data (i.e., business data) of the artificial intelligence model in the business device. The model optimization device generates the first sample data based on the first sample prompt information, which is equivalent to generating the first sample data based on the business data of the artificial intelligence model. In this way, the first sample data can reflect the characteristics of the business data of the artificial intelligence model. When the model optimization device continues to adjust the parameters of the artificial intelligence model based on the first sample data, it can adjust the parameters of the artificial intelligence model in a targeted manner according to the characteristics of the business data of the artificial intelligence model, thereby improving the efficiency of adjusting the parameters of the artificial intelligence model and helping to improve the availability of the artificial intelligence model.

[0189] Moreover, the business device provides the first sample prompt information to the model optimization device, which can avoid privacy leakage caused by directly providing difficult business data to the model optimization device, and ensure the security of information in the business device, compared with directly providing difficult business data to the model optimization device.

[0190] The detailed working processes of model optimization device 1501, service device 1502, and model training device 1503 are described in the previous method embodiments. Those skilled in the art will clearly understand that for ease and brevity of description, the specific working processes of the various components described above can be referred to in the corresponding content of the previous method embodiments and will not be repeated here.

[0191] Among them, the interaction module 1301, generation module 1302, optimization module 1303, acquisition module 1304, model optimization device 1501, business device 1502, and model training device 1503 can all be implemented through software or hardware. Exemplarily, the implementation of the interaction module 1301 will be described below using the example of the interaction module 1301. Similarly, the implementation of the generation module 1302, optimization module 1303, acquisition module 1304, model optimization device 1501, business device 1502, and model training device 1503 can refer to the implementation of the interaction module 1301.

[0192] As an example of a software functional unit, the interaction module 1301 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the interaction module 1301 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.

[0193] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0194] As an example of a hardware functional unit, the interaction module 1301 may include at least one computing device, such as a server. Alternatively, the interaction module 1301 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0195] The multiple computing devices included in the interaction module 1301 can be distributed in the same region or in different regions. The multiple computing devices included in the interaction module 1301 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the interaction module 1301 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0196] It should be noted that in other embodiments, any one of the interaction module 1301, generation module 1302, optimization module 1303, and acquisition module 1304 can be used to execute any step in the method for optimizing an artificial intelligence model. The steps that the interaction module 1301, generation module 1302, optimization module 1303, and acquisition module 1304 are responsible for implementing can be specified as needed. By having the interaction module 1301, generation module 1302, optimization module 1303, and acquisition module 1304 respectively implement different steps in the method for optimizing an artificial intelligence model, the full functionality of the device for optimizing an artificial intelligence model is achieved.

[0197] Similarly, any one of the model optimization device 1501, the service device 1502, and the model training device 1503 can be used to perform any step in the method for optimizing an artificial intelligence model. The steps that the model optimization device 1501, the service device 1502, and the model training device 1503 are responsible for implementing can be specified as needed. By having the model optimization device 1501, the service device 1502, and the model training device 1503 respectively implement different steps in the method for optimizing an artificial intelligence model, the full functionality of the device for optimizing an artificial intelligence model is achieved.

[0198] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the various components described above can refer to the corresponding contents in the aforementioned method embodiments and will not be repeated here.

[0199] The following is an example of the basic hardware structure involved in the embodiments of the present application.

[0200] An embodiment of the present application provides a computing device. The computing device is used to implement some or all of the functions of the method for optimizing an artificial intelligence model provided in an embodiment of the present application. Figure 17 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. As shown in Figure 17, the computing device 1700 includes a processor 1701, a memory 1702, a communication interface 1703, and a bus 1704. The processor 1701, the memory 1702, and the communication interface 1703 are connected to each other via the bus 1704.

[0201] Processor 1701 may include a general-purpose processor and / or a dedicated hardware chip. A general-purpose processor may include: a central processing unit (CPU), a microprocessor or a graphics processing unit (GPU). The CPU is, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A dedicated hardware chip is a hardware module for high-performance processing. The dedicated hardware chip includes at least one of a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or a network processor (NP). Processor 1701 may also be an integrated circuit chip with signal processing capabilities. During implementation, some or all of the functions of the method for optimizing the artificial intelligence model of the present application may be completed by the integrated logic circuit of the hardware in processor 1701 or instructions in the form of software.

[0202] Memory 1702 is used to store computer programs, including an operating system 1702a and executable code (i.e., program instructions) 1702b. Memory 1702 may be, for example, a read-only memory or other type of static storage device capable of storing static information and instructions, a random access memory or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory, a read-only optical disc or other optical disc storage, an optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired executable code in the form of instructions or data structures and accessible by a computer, but not limited to these. For example, memory 1702 is used to store an outbound port queue, etc. Memory 1702 may be independent and connected to processor 1701 via bus 1704. Alternatively, memory 1702 and processor 1701 may be integrated. Memory 1702 can store executable code. When the executable code stored in memory 1702 is executed by processor 1701, processor 1701 is used to perform some or all of the functions of the method for optimizing the artificial intelligence model provided in the embodiments of this application. For the implementation of the process executed by processor 1701, please refer to the relevant description in the aforementioned embodiments. Memory 1702 may also include software modules and data required for other running processes, such as an operating system.

[0203] Communication interface 1703 uses a transceiver module, such as, but not limited to, a transceiver, to communicate with other devices or communication networks. For example, communication interface 1703 can be any one or a combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, or other device with network access capabilities.

[0204] Bus 1704 is any type of communication bus used to interconnect the internal components of a computing device (e.g., memory 1702, processor 1701, communication interface 1703). For example, a system bus is provided. The embodiments of this application illustrate the interconnection of the aforementioned components within a computing device via bus 1704. Alternatively, the aforementioned components within computing device 1700 may be communicatively connected to each other using other connection methods besides bus 1704. For example, the aforementioned components within computing device 1700 may be interconnected via an internal logical interface.

[0205] It should be noted that the above-mentioned multiple devices can be respectively arranged on independent chips, or at least partially or completely arranged on the same chip. Whether each device is independently arranged on different chips or integrated on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above-mentioned devices. The descriptions of the processes corresponding to the above-mentioned figures have different focuses. For parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.

[0206] In the above embodiments, all or part of the embodiments may be implemented through software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product providing a program development platform includes one or more computer instructions that, when loaded and executed on a computing device, fully or partially implement the functions of the method for optimizing the artificial intelligence model provided in the embodiments of the present application.

[0207] Furthermore, computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium stores computer program instructions that provide a program development platform.

[0208] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0209] Optionally, the structure of at least one computing device included in the computing device cluster can refer to the computing device 1700 shown in Figure 17. The memory 1702 in one or more computing devices 1700 in the computing device cluster may store the same instructions for executing the method for optimizing the artificial intelligence model.

[0210] In some possible implementations, the memory 1702 of one or more computing devices 1700 in the computing device cluster may also store partial instructions for executing the method for optimizing the artificial intelligence model. In other words, the combination of one or more computing devices 1700 can jointly execute the instructions for executing the method for optimizing the artificial intelligence model.

[0211] It should be noted that the memory 1702 in different computing devices 1700 in the computing device cluster can store different instructions, each for executing a portion of the functions of the apparatus for optimizing the artificial intelligence model. In other words, the instructions stored in the memory 1702 in different computing devices 1700 can implement the functions of one or more of the first determination module 1301, the second determination module 1302, and the third determination module 1303.

[0212] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), etc. FIG18 illustrates a possible implementation. As shown in FIG18 , two computing devices 1800A and 1800B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, computing devices 1800A and 1800B include a bus 1802, a processor 1804, a memory 1806, and a communication interface 1808. The memory 1806 in computing device 1800A stores instructions for executing the functions of the first determination module 1301. Simultaneously, the memory 1806 in computing device 1800B stores instructions for executing the functions of the second determination module 1302 and the third determination module 1303.

[0213] It should be understood that the functions of computing device 1800A shown in FIG18 may also be performed by multiple computing devices 1800. Similarly, the functions of computing device 1800B may also be performed by multiple computing devices 1800. Furthermore, the deployment method of the modules for implementing the method for optimizing the artificial intelligence model in the computing devices may also be adjusted according to application requirements.

[0214] An embodiment of the present application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium. The computer-readable storage medium includes program instructions. When the program instructions are executed on a computing device, the computing device implements the method for optimizing the artificial intelligence model as provided in the embodiment of the present application.

[0215] An embodiment of the present application also provides a computer program product containing instructions. When the computer program product is run on a computer, it enables the computer to implement the method for optimizing the artificial intelligence model provided by the embodiment of the present application.

[0216] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0217] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the raw data and executable code involved in this application were obtained with full authorization.

[0218] In the embodiments of the present application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" refers to one or more, and the term "plurality" refers to two or more, unless otherwise expressly limited.

[0219] In this application, the term "and / or" simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0220] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for optimizing an artificial intelligence model, characterized in that: The method comprises: Providing a trained artificial intelligence model to a business device, wherein the business device is used to deploy the artificial intelligence model; receiving first sample prompt information provided by the service device, where the first sample prompt information indicates a condition that content of the first sample data needs to satisfy; Based on the first sample prompt information, generating the first sample data; Based on the first sample data, continue to adjust the parameters of the artificial intelligence model and provide the adjusted artificial intelligence model to the business device.

2. The method according to claim 1, characterized in that The generating the first sample data based on the first sample prompt information includes: Based on the first sample prompt information, the first sample data represented by a second representation method is generated, and the first sample prompt information is represented by a first representation method.

3. The method according to claim 1, characterized in that The first sample prompt information includes first prompt information represented by a first representation method and second prompt information represented by a second representation method. The generating the first sample data based on the first sample prompt information includes: The second prompt information is modified based on the first prompt information to obtain the first sample data.

4. The method according to claim 2 or 3, characterized in that The first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

5. The method according to any one of claims 1 to 4, characterized in that: The first sample prompt information indicates one or more of the following: representation method, storage format, size, data distribution method, expression style or expression semantics of the first sample data.

6. The method according to any one of claims 1 to 5, characterized in that: Before generating the first sample data based on the first sample prompt information, the method further includes: Providing a sample configuration interface to the user, wherein the sample configuration interface prompts the user to input the first sample prompt information; The first sample prompt information is obtained from the sample configuration interface.

7. The method according to any one of claims 1 to 6, characterized in that: Before generating the first sample data based on the first sample prompt information, the method further includes: The first sample prompt information is generated based on the prompt information template.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Obtaining second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test; Providing the second sample prompt information to the model training device; Optimizing the second sample prompt information to obtain third sample prompt information, and generating third sample data based on the third sample prompt information; Receive the trained artificial intelligence model provided by the model training device, and test the trained artificial intelligence model based on the third sample data.

9. A device for optimizing an artificial intelligence model, characterized in that: The device comprises: An interaction module, configured to provide a trained artificial intelligence model to a business device, wherein the business device is configured to deploy the artificial intelligence model; The interaction module is further configured to receive first sample prompt information provided by the service device, where the first sample prompt information indicates a condition that the content of the first sample data needs to satisfy; A generating module, configured to generate the first sample data based on the first sample prompt information; An optimization module is used to continue adjusting the parameters of the artificial intelligence model based on the first sample data and provide the adjusted artificial intelligence model to the business device.

10. A method for optimizing an artificial intelligence model, characterized in that: The method comprises: The model optimization device provides the trained artificial intelligence model to the business device; The business device deploys the artificial intelligence model and uses the artificial intelligence model to process business data; The business device obtains difficult business data based on the processing result of the business data by the artificial intelligence model, obtains first sample prompt information of the difficult business data based on the difficult business data, and provides the first sample prompt information to the model optimization device, wherein the first sample prompt information indicates a condition satisfied by the content of the difficult business data; The model optimization device generates first sample data based on the first sample prompt information, continues to adjust the parameters of the artificial intelligence model based on the first sample data, and provides the adjusted artificial intelligence model to the business device.

11. The method according to claim 10, characterized in that The confidence level output by the artificial intelligence intelligent model for the difficult business data is less than a confidence threshold.

12. The method according to claim 10 or 11, characterized in that The business device obtains first sample prompt information of the difficult business data based on the difficult business data, including: The business device performs data desensitization processing on the difficult business data to obtain the first sample prompt information.

13. The method according to claim 12, characterized in that Before the service device performs data desensitization processing on the difficult service data, the method further includes: The business device uses a preset representation method to represent the difficult-case business data.

14. The method according to claim 13, characterized in that The preset representation is text.

15. The method according to any one of claims 10 to 14, characterized in that: The first sample prompt information indicates one or more of the following: data representation method, storage format, size, data distribution method, expression style or expression semantics.

16. The method according to any one of claims 10 to 15, characterized in that: The model optimization device generates first sample data based on the first sample prompt information, including: The model optimization device generates the first sample data represented by a second representation method based on the first sample prompt information, and the first sample prompt information is represented by a first representation method.

17. The method according to any one of claims 10 to 15, characterized in that: The first sample prompt information includes first prompt information represented by a first representation method and second prompt information represented by a second representation method. The model optimization device generates first sample data based on the first sample prompt information, including: The model optimization device modifies the second prompt information based on the first prompt information to obtain the first sample data.

18. The method according to claim 16 or 17, characterized in that The first representation mode and the second representation mode include one or more of the following: text, image, video or audio.

19. The method according to any one of claims 10 to 18, characterized in that: Before the model optimization device generates the first sample data based on the first sample prompt information, the method further includes: The model optimization device provides a sample configuration interface to the user, and the sample configuration interface prompts the user to input the first sample prompt information; The model optimization device obtains the first sample prompt information from the sample configuration interface.

20. The method according to any one of claims 10 to 19, characterized in that: Before the model optimization device generates the first sample data based on the first sample prompt information, the method further includes: The model optimization device generates the first sample prompt information based on a prompt information template.

21. The method according to any one of claims 10 to 20, characterized in that: The method further comprises: The model optimization device obtains second sample prompt information of the test sample data that causes the artificial intelligence model to fail the test, provides the second sample prompt information to the model training device, optimizes the second sample prompt information to obtain third sample prompt information based on the second sample prompt information, and generates third sample data based on the third sample prompt information; The model optimization device receives the trained artificial intelligence model provided by the model training device, and tests the trained artificial intelligence model based on the third sample data.

22. A system for optimizing an artificial intelligence model, characterized in that: The system comprises: a model optimization device and a business device; The model optimization device is used to provide a trained artificial intelligence model to the business device; The business device is used to deploy the artificial intelligence model and use the artificial intelligence model to process business data; The business device is further used to obtain difficult business data based on the processing result of the business data by the artificial intelligence model, obtain first sample prompt information of the difficult business data based on the difficult business data, and provide the first sample prompt information to the model optimization device, wherein the first sample prompt information indicates a condition satisfied by the content of the difficult business data; The model optimization device is also used to generate first sample data based on the first sample prompt information, continue to adjust the parameters of the artificial intelligence model based on the first sample data, and provide the adjusted artificial intelligence model to the business device.

23. A computing device cluster, characterized in that: The method comprises a plurality of computing devices, wherein the plurality of computing devices comprises a plurality of processors and a plurality of memories, wherein program instructions are stored in the plurality of memories, and the plurality of processors execute the program instructions, so that the computing device cluster executes any one of the methods described in claims 1 to 8 and claims 10 to 21.

24. A computer-readable storage medium, characterized in that: The method comprises program instructions, which, when executed on a computing device, enable the computing device to execute the method according to any one of claims 1 to 8 and claims 10 to 21.

25. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 8 and claims 10 to 21.

Citation Information

Patent Citations

  • Classification model training method and device, electronic equipment and storage medium

    CN112560912A

  • System, method and device for realizing data mining and storage medium

    CN113392151A

  • Model generation method and device, electronic equipment and storage medium

    CN116151323A

  • Transfer learning across automated machine learning systems

    US20210271966A1