Method and apparatus for processing data, and storage medium
By deploying the first AI model on the first cloud service platform to process the target data and offset the probability of biased features of the second AI model, the problem of low robustness of AI models is solved, the accuracy and robustness of data processing are improved, and the impact of biased attributes on the task is reduced.
Patent Information
- Application Number
- PCT/CN2025/086243
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-22
- Filing Date
- 2025-03-31
- Publication Date
- 2025-12-26
AI Technical Summary
Existing AI models have biases, which makes them less robust when processing data, especially when recognizing images. If an image contains features that are not causally related to the task, such as a road image, it may be misidentified as a vehicle image, reducing the accuracy of the recognition model.
By deploying the first AI model on the first cloud service platform and using this model to process target data, the probability of the bias features of the second AI model being identified as a specific category is obtained and offset or reduced. Combined with the probability of task features, the accuracy and robustness of data processing are improved.
By offsetting or reducing the probability of biased features, the accuracy and flexibility of data processing are improved, ensuring the accuracy and robustness of the processing results and reducing the impact of biased attributes on the task.
Smart Images

Figure CN2025086243_26122025_PF_FP_ABST
Abstract
Description
Method, device and storage medium for processing data
[0001] The present application claims priority to Chinese Patent Application No. 202410813613.0, filed on June 21, 2024, and titled “Method, Device and Storage Medium for Processing Data”, the contents of which are incorporated herein by reference in its entirety. In addition, the present application also claims priority to Chinese Patent Application No. 202411161670.1, filed on August 22, 2024, and titled “Method, Device and Storage Medium for Processing Data”, the contents of which are incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of communication, and in particular to a method, device and storage medium for processing data. BACKGROUND
[0003] With the rapid development of graphics processors and mobile internet industries, the parallel computing capability of computers has shown explosive growth, which has promoted the rapid development of artificial intelligence (AI). Currently, AI models can be deployed on the cloud, and the cloud provides application program interfaces of AI models to users. The users can send data to be processed to the cloud through the application program interfaces, and the cloud processes the data using AI models.
[0004] In related technologies, AI models have bias attributes. Bias attributes are characteristics of training data of AI models that have statistical correlations with tasks themselves without causal relationships. For example, for a vehicle recognition model that identifies whether there is a vehicle, the vehicle and the road surface have no causal relationship, but most of the training data used to train the vehicle recognition model includes vehicle images and road surface images, so that the proportion of the training data including vehicle images and road surface images is very high. That is, there is a statistical correlation between the vehicle and the road surface, and using such training data to train the vehicle recognition model makes the vehicle recognition model have a bias attribute of the road surface.
[0005] Therefore, when using the vehicle recognition model to identify a picture, if it is identified that the picture includes a road surface image, it is identified that there is a vehicle. Therefore, in related technologies, the robustness of AI models in processing data is low. SUMMARY
[0006] The present application provides a method, device and storage medium for processing data to improve the robustness of processing data. The technical solution is as follows:
[0007] In a first aspect, a method for processing data is provided. The method is applied to a first cloud service platform, and the first cloud service platform comprises a first artificial intelligence (AI) model. In the method, target data to be processed is received, and the target data comprises a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model. m first probabilities are obtained, where the m first probabilities are probabilities of the target data being recognized by the second AI model as m categories of interest of the task, and m is an integer greater than 1. The target data is processed based on the first AI model to obtain m second probabilities of the first bias feature being recognized as the m categories. Based on the m first probabilities and the m second probabilities, m third probabilities of the first task feature being recognized as the m categories are obtained.
[0008] Since the second AI model has a bias attribute, the m first probabilities obtained by the second AI model processing the target data include m probabilities of the first bias feature being recognized as the m categories and m probabilities of the first task feature being recognized as the m categories. However, the m second probabilities of the first bias feature being recognized as the m categories are obtained based on the first AI model processing the target data. In this way, the m second probabilities can offset or reduce the probabilities of the first bias feature being recognized as the m categories in the m first probabilities. That is, based on the m first probabilities and the m second probabilities, the m third probabilities of the first task feature being recognized as the m categories are obtained, which can improve the accuracy of processing the target data and improve the robustness of processing the target data.
[0009] In a possible implementation, a processing result is sent, and the processing result comprises the m third probabilities, or the processing result comprises a target detected in the target data based on the m third probabilities. In this way, when a classification task is processed, the processing result comprises the m third probabilities, and when a target detection task is processed, the processing result comprises the detected target, which ensures the accuracy and flexibility of the processing result.
[0010] In another possible implementation, the second AI model is located on a second cloud service platform. A processing request is sent to the second cloud service platform, and the processing request comprises the target data. The processing request is used to instruct the second cloud service platform to process the target data based on the second AI model to obtain the m first probabilities. The m first probabilities sent by the second cloud service platform are received.
[0011] In the first cloud service platform, the first AI model is deployed, and the second AI model is located on a second cloud service platform. The second cloud service platform belongs to a third party. The first cloud service platform requests the second cloud service platform to process the target data using the second AI model, so that the accuracy and robustness of processing the target data can be improved without modifying the third party.
[0012] In another possible implementation, m sample sets are received, the m sample sets correspond to m categories, each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of the category corresponding to the sample set. The first AI model is trained based on the m sample sets.
[0013] Since the m sample sets correspond to the m categories, each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of the category corresponding to the sample set, the first AI model is trained based on the m sample sets, so that the first AI model can identify the probability that the bias feature corresponding to the bias attribute is the m categories. Thus, the first AI model can be used to reduce the influence of the bias attribute on the task implemented by the second AI model.
[0014] In another possible implementation, m fourth probabilities corresponding to each training sample in the m sample sets are obtained, the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature included in the training sample is identified as the m categories. The first AI model is trained based on each training sample and the m fourth probabilities corresponding to each training sample.
[0015] Since the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature included in the training sample is identified as the m categories, the first AI model is trained based on each training sample and the m fourth probabilities corresponding to each training sample, so that the first AI model can identify the probability that the bias feature corresponding to the bias attribute is the m categories.
[0016] In another possible implementation, m fifth probabilities corresponding to each training sample in the m training samples are obtained, the m training samples are samples belonging to the m sample sets, and the m fifth probabilities corresponding to the training sample are probabilities that the training sample is identified as the m categories by the second AI model. The m fourth probabilities corresponding to each training sample are obtained based on the m fifth probabilities corresponding to each training sample.
[0017] The m training samples are processed using the second AI model to obtain m fifth probabilities that each training sample is identified as m categories. Since the m training samples belong to the m sample sets, the m sample sets correspond to the m categories, and thus the m training samples belong to the m categories. Thus, based on the m fifth probabilities corresponding to each training sample, the probability corresponding to the second task feature in each fifth probability can be offset. The m fourth probabilities corresponding to each training sample are probabilities corresponding to the second bias feature. Thus, based on each training sample and the m fourth probabilities corresponding to each training sample, the precision of the trained first AI model is higher, and the influence of the bias attribute of the second AI model on the implemented task can be well reduced by the first AI model.
[0018] In another possible implementation, the target structure is determined based on the data types of the training samples included in the m sample sets. The AI model of the target structure is trained based on the m sample sets to obtain the first AI model. In this way, the precision of the first AI model can be improved.
[0019] In another possible implementation, an application program interface (API) of the first AI model is sent. Target data sent through the API is received. In this way, the user can send target data to be processed to the first AI model, and the robustness of processing the target data can be improved by using the first AI model.
[0020] In another possible implementation, the target data includes one or more of the following: image data, audio data, or text data.
[0021] In a second aspect, the present application provides a system for processing data, the system comprising a terminal device and a first cloud service platform, the first cloud service platform comprising a first artificial intelligence (AI) model.
[0022] The terminal device is configured to send target data to be processed to the first cloud service platform, the target data comprising a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model.
[0023] The first cloud service platform is configured to obtain m first probabilities that the target data is identified as m categories of interest by the second AI model, m being an integer greater than 1; process the target data based on the first AI model to obtain m second probabilities that the first bias feature is identified as the m categories; and obtain m third probabilities that the first task feature is identified as the m categories based on the m first probabilities and the m second probabilities.
[0024] Since the second AI model has the bias attribute, the second AI model processes the target data to obtain m first probabilities, so that the m first probabilities include m probabilities that the first bias feature is recognized as the m categories and m probabilities that the first task feature is recognized as the m categories. However, based on the first AI model processing the target data, m second probabilities that the first bias feature is recognized as the m categories are obtained. In this way, through the m second probabilities, the probabilities that the first bias feature is recognized as the m categories in the m first probabilities can be offset or reduced. That is, based on the m first probabilities and the m second probabilities, m third probabilities that the first task feature is recognized as the m categories are obtained, which can improve the accuracy of processing the target data and improve the robustness of processing the target data.
[0025] In a possible implementation, the system further includes a second cloud service platform, and the second cloud service platform includes the second AI model.
[0026] The first cloud service platform is configured to send a processing request to the second cloud service platform, and the processing request includes the target data.
[0027] The second cloud service platform is configured to process the target data based on the second AI model to obtain m first probabilities, and send the m first probabilities to the first cloud service platform.
[0028] The first AI model is deployed on the first cloud service platform, and the second AI model is located on the second cloud service platform, and the second cloud service platform belongs to a third party. The first cloud service platform requests the second cloud service platform to process the target data using the second AI model, so that the accuracy and robustness of processing the target data can be improved without modifying the third party.
[0029] In another possible implementation, the terminal device is further configured to send, to the first cloud service platform, m sample sets corresponding to the m categories, and each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of a category corresponding to the sample set.
[0030] The first cloud service platform is further configured to train the first AI model based on the m sample sets.
[0031] Since the m sample sets correspond to the m categories, and each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of a category corresponding to the sample set, the first AI model can be trained based on the m sample sets, so that the first AI model can recognize the probability that the bias feature corresponding to the bias attribute is the m categories. Thus, the first AI model can be used to reduce the influence of the bias attribute of the second AI model on the task implemented.
[0032] In another possible implementation, the first cloud service platform is configured to obtain m fourth probabilities corresponding to each training sample in the m sample set, the m fourth probabilities corresponding to each training sample being probabilities that the second biased feature included in the training sample is identified as the m categories; and train the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample.
[0033] Since the m fourth probabilities corresponding to each training sample are probabilities that the second biased feature included in the training sample is identified as the m categories, the first cloud service platform trains the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample, so that the first AI model can identify probabilities that the biased feature corresponding to the biased attribute is in the m categories.
[0034] In another possible implementation, the first cloud service platform is configured to obtain m fifth probabilities corresponding to each training sample in the m training samples, the m training samples being samples belonging to the m sample set, and the m fifth probabilities corresponding to each training sample being probabilities that the training sample is identified as the m categories by the second AI model; and obtain m fourth probabilities corresponding to each training sample based on the m fifth probabilities corresponding to each training sample.
[0035] Processing the m training samples using the second AI model can obtain m fifth probabilities that each training sample is identified as the m categories. Since the m training samples belong to the m sample set, and the m sample set corresponds to the m categories, the m training samples belong to the m categories, so that the first cloud service platform can offset the probability corresponding to the second task feature in each fifth probability based on the m fifth probabilities corresponding to each training sample. The m fourth probabilities corresponding to each training sample are probabilities corresponding to the second biased feature. In this way, the first cloud service platform trains the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample, and the accuracy of the first AI model is higher, and the influence of the biased attribute of the second AI model on the implemented task can be well reduced through the first AI model.
[0036] In another possible implementation, the first cloud service platform is configured to determine a target structure based on a data type of the training sample included in the m sample set, and train an AI model of the target structure based on the m sample set to obtain the first AI model. In this way, the accuracy of the first AI model can be improved.
[0037] In another possible implementation, the first cloud service platform is further configured to send an application program interface (API) of the first AI model to a terminal device. The terminal device is configured to send target data to the first cloud service platform through the API. In this way, a user can send target data to be processed to the first cloud service platform, and the first cloud service platform uses the first AI model to improve the robustness of processing the target data.
[0038] In another possible implementation, the target data comprises one or more of: image data, audio data, or text data.
[0039] In a third aspect, the present application provides an apparatus for processing data, configured to perform the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus comprises units for performing the method in the first aspect or any possible implementation of the first aspect.
[0040] In a fourth aspect, the present application provides a computing device cluster comprising at least one computing device, each computing device comprising a processor and a memory;
[0041] The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method in the first aspect or any possible implementation of the first aspect.
[0042] In a fifth aspect, the present application provides a computer program product comprising instructions which, when executed by a computing device cluster, cause the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect.
[0043] In a sixth aspect, the present application provides a computer-readable storage medium comprising computer program instructions which, when executed by a computing device cluster, cause the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect.
[0044] In a seventh aspect, the present application provides a chip comprising a memory and a processor, the memory being configured to store computer instructions, and the processor being configured to call and run the computer instructions from the memory to perform the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0045] FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present application;
[0046] FIG. 2 is a schematic diagram of another network architecture according to an embodiment of the present application;
[0047] FIG. 3 is a flowchart of a method for training a first AI model according to an embodiment of the present application;
[0048] FIG. 4 is a schematic diagram of a first interface according to an embodiment of the present application;
[0049] FIG. 5 is a schematic diagram of a second interface according to an embodiment of the present application;
[0050] FIG. 6 is a flowchart of a method for processing data according to an embodiment of the present application;
[0051] FIG. 7 is a schematic diagram of an apparatus for processing data according to an embodiment of the present application;
[0052] FIG. 8 is a schematic diagram of a system for processing data according to an embodiment of the present application;
[0053] FIG. 9 is a schematic diagram of a computing device according to an embodiment of the present application;
[0054] FIG. 10 is a schematic diagram of a cluster for processing data according to an embodiment of the present application;
[0055] FIG. 11 is a schematic diagram of another cluster for processing data according to an embodiment of the present application. DETAILED DESCRIPTION
[0056] Referring to FIG. 1, a network architecture 100 according to an embodiment of the present application includes a cloud service platform 101 and a terminal device 102. The cloud service platform 101 can communicate with the terminal device 102.
[0057] The cloud service platform 101 can include an AI model 1011. The AI model 1011 can implement a certain task. The AI model 1011 is configured to identify m first probabilities of data belonging to m categories of interest for the task, where m is an integer greater than 1.
[0058] The cloud service platform 101 can send an application programming interface (API) of the AI model 1011 to the terminal device 102. The terminal device 102 receives the API of the AI model 1011, displays the API of the AI model 1011 to a user, and receives target data to be processed from the user. The terminal device 102 sends the target data to the cloud service platform 101 via the API of the AI model 1011. The cloud service platform 101 receives the target data, processes the target data based on the AI model 1011, obtains m first probabilities of the target data being identified as the m categories, and sends the m first probabilities to the terminal device 101. The terminal device 102 receives the m first probabilities and displays the m first probabilities.
[0059] For example, assume that the AI model 1011 is a vehicle recognition model, and the vehicle recognition model implements a vehicle recognition task. The vehicle recognition task is concerned with two categories, one of which is a vehicle and the other of which is no vehicle.
[0060] The cloud service platform 101 can send an API of the vehicle recognition model to the terminal device 102, and the terminal device 102 can display the API of the vehicle recognition model. The user can input target data to be processed to the terminal device 102, and the target data is a picture including a vehicle image, or the target data is a picture not including a vehicle image.
[0061] The terminal device 102 receives the target data, and sends the target data to the cloud service platform 101 based on the API of the vehicle recognition model. The cloud service platform 101 receives the target data, processes the target data based on the vehicle recognition model, obtains a first probability that the target data is recognized as having a vehicle and a first probability that the target data is recognized as not having a vehicle, and sends the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle to the terminal device 102.
[0062] The terminal device 102 receives the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle, and then displays the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle to the user.
[0063] In some embodiments, the API of the AI model 1011 can be a uniform resource locator (URL) of the AI model 1011, etc.
[0064] The AI model 1011 can be trained by a third-party service provider, and the AI model 1011 trained by the third-party service provider is deployed on the cloud service platform 101. The AI model trained has a bias attribute, and for a large number of training samples used to train the AI model 1011, the bias attribute refers to that there is a certain feature in the large number of training samples that has no causal relationship with the task itself but has a statistical correlation.
[0065] For example, for the vehicle recognition model described above, the vehicle has no causal relationship with the road surface, but most of the training samples used to train the vehicle recognition model include vehicle images and road surface images, so that the ratio between the number of training samples including vehicle images and road surface images and the total number of training samples is high, thereby making the vehicle and the road surface have a statistical correlation. The third-party service provider trains the vehicle recognition model using such training samples, so that the vehicle recognition model has a bias attribute of the road surface. That is, when processing a picture using the vehicle recognition model, if the picture includes a road surface image, the vehicle recognition model can recognize that there is a vehicle, so as to increase the first probability of recognizing that the picture has a vehicle and reduce the first probability of recognizing that the picture has no vehicle, thereby reducing the robustness of the vehicle recognition model.
[0066] Referring to FIG. 1, for ease of illustration, the AI model 1011 is referred to as a second AI model 1011, and the cloud service platform 101 is referred to as a second cloud service platform 101. That is, the second AI model 1011 on the second cloud service platform 101 has a bias attribute, which reduces the robustness of the second AI model 1011 in processing data, thereby affecting the task implemented by the second AI model 1011.
[0067] To improve the robustness of processing data, referring to FIG. 2, the network architecture 100 further includes a first cloud service platform 103, which includes a first AI model 1031 for reducing the impact of the bias attribute of the second AI model 1011 on the task implemented by the second AI model 1011.
[0068] The first cloud service platform 103 communicates with the second cloud service platform 101 and the terminal device 102, respectively. The second cloud service platform 101 no longer sends the API of the second AI model 1011 to the terminal device 102, but sends the API of the first AI model 1031 to the terminal device 102.
[0069] The terminal device 102 receives the API of the first AI model 1031, displays the API of the first AI model 1031 to the user, and inputs the target data to be processed to the terminal device 102. The terminal device 102 sends the target data to the first cloud service platform 103 through the API of the first AI model 1031. The target data includes the first bias feature corresponding to the bias attribute and the first task feature corresponding to the task.
[0070] The first cloud service platform 103 receives the target data and sends the target data to the second cloud service platform 101. The second cloud service platform 101 receives the target data, processes the target data based on the second AI model 1011, and obtains m first probabilities that the target data is identified as the m categories. For each category, the first probability that the target data is identified as the category includes the probability that the first bias feature in the target data is identified as the category and the probability that the first task feature in the target data is identified as the category. The second cloud service platform 101 sends the m first probabilities to the first cloud service platform 103.
[0071] The first cloud service platform 103 receives the m first probabilities, processes the target data based on the first AI model 1031, and obtains m second probabilities that the first bias feature in the target data is identified as the m categories. Based on the m first probabilities and the m second probabilities, m third probabilities that the first task feature in the target data is identified as the m categories are obtained. The m third probabilities are sent to the terminal device 102.
[0072] The terminal device 102 receives the m third probabilities, and displays the m third probabilities.
[0073] For example, still taking the second AI model 1011 as a vehicle recognition model, the first AI model 1031 on the first cloud service platform 103 is used to reduce the influence of the bias attribute (road surface) in the vehicle recognition model on the vehicle recognition task.
[0074] The first cloud service platform 103 sends the API of the first AI model 1031 to the terminal device 102, and the terminal device 102 can display the API of the first AI model 1031. The user inputs the target data to be processed to the terminal device 102, and the target data is a picture including a vehicle image and a road surface image, the vehicle image being the first task feature corresponding to the vehicle recognition task, and the road surface image being the first bias feature corresponding to the bias attribute (road surface); or, the target data is a picture not including a vehicle image but including a road surface image, the first task feature corresponding to the vehicle recognition task not including a vehicle image, and the road surface image being the first bias feature corresponding to the bias attribute (road surface).
[0075] The terminal device 102 receives the target data, and sends the target data to the first cloud service platform 103 through the API of the first AI model 1031. The first cloud service platform 103 receives the target data, and sends the target data to the second cloud service platform 101. The second cloud service platform 101 receives the target data, processes the target data based on the second AI model 1011, obtains the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle, and sends the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle to the first cloud service platform 103.
[0076] The first cloud service platform 103 receives the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle, processes the target data based on the first AI model 1031, obtains the second probability that the first bias feature in the target data is recognized as having a vehicle and the second probability that the first bias feature in the target data is recognized as not having a vehicle. Based on the first probability that the target data is recognized as having a vehicle and the first probability that the target data is recognized as not having a vehicle, and the second probability that the first bias feature is recognized as having a vehicle and the second probability that the first bias feature is recognized as not having a vehicle, the third probability that the first task feature in the target data is recognized as having a vehicle and the third probability that the first task feature in the target data is recognized as not having a vehicle are obtained. The third probability that the first task feature is recognized as having a vehicle and the third probability that the first task feature is recognized as not having a vehicle are sent to the terminal device 102.
[0077] The terminal device 102 receives the third probability that the first task feature is recognized as having a vehicle and the third probability that the first task feature is recognized as not having a vehicle, and displays the third probability that the first task feature is recognized as having a vehicle and the third probability that the first task feature is recognized as not having a vehicle.
[0078] In some embodiments, the first cloud service platform 103 and the second cloud service platform 101 are two different cloud service platforms, or the first cloud service platform 103 and the second cloud service platform 101 are the same cloud service platform.
[0079] Referring to FIG. 3, the embodiment of the present application provides a method 300 for training a first AI model, the first AI model being used to reduce the influence of a bias attribute of a second AI model on a task implemented by the second AI model, the method 300 can be applied to the network architecture 100 shown in FIG. 1 or FIG. 2, and the method 300 includes the following processes.
[0080] Step 301: The terminal device obtains m sample sets, the m sample sets corresponding to m categories, each training sample in the sample set including a second bias feature corresponding to a bias attribute and a second task feature corresponding to a task, the second task feature being a feature of the category corresponding to the sample set, and m being an integer greater than 1.
[0081] Referring to FIG. 4, the terminal device can display a first interface, the first interface including an API of the second AI model and an upload interface. A user can upload a compressed package including the m sample sets to the first interface through the upload interface. The terminal device obtains the API of the second AI model and the compressed package including the m sample sets from the first interface.
[0082] For example, the second AI model is a vehicle recognition model, the bias attribute of the vehicle recognition model is a road surface, and the task implemented by the vehicle recognition model is a vehicle recognition task. The m categories concerned by the vehicle recognition task include two categories, namely, with a vehicle and without a vehicle. Therefore, the terminal device can obtain two sample sets, namely, a first sample set and a second sample set.
[0083] The category corresponding to the first sample set is with a vehicle, and the first sample set includes a plurality of first training samples, each first training sample including a road surface image and a vehicle image, wherein the second bias feature corresponding to the bias attribute (road surface) includes the road surface image in the first training sample, and the second task feature corresponding to the vehicle recognition task includes the vehicle image in the first training sample.
[0084] The category corresponding to the second sample set is without a vehicle, and the second sample set includes a plurality of second training samples, each second training sample including a road surface image but not including a vehicle image, wherein the second bias feature corresponding to the bias attribute (road surface) includes the road surface image in the second training sample, and the second task feature corresponding to the vehicle recognition task does not include a vehicle image.
[0085] Step 302: The terminal device sends the m sample sets to the first cloud service platform.
[0086] In step 302, the terminal device sends the m sample sets to the first cloud service platform based on an API of the second AI model.
[0087] In some embodiments, the API of the second AI model is a URL of the second AI model, and the terminal device sends the m sample sets to the first cloud service platform based on the URL of the second AI model.
[0088] Optionally, the operation of sending the m sample sets to the first cloud service platform is to send a compressed package including the m sample sets to the first cloud service platform.
[0089] Next, the first cloud service platform trains the first AI model based on the m sample sets in the following process.
[0090] In step 303, the first cloud service platform receives the m sample sets, obtains m fourth probabilities corresponding to each training sample in the m sample sets, and the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature included in the training sample is recognized as the m categories.
[0091] In some embodiments, the first cloud service platform receives the compressed package and decompresses the compressed package to obtain the m sample sets.
[0092] In step 303, the first cloud service platform can obtain the m fourth probabilities corresponding to each training sample based on the following operations 3031-3033.
[0093] 3031: The first cloud service platform selects one training sample from each sample set in the m sample sets respectively to obtain m training samples.
[0094] Therefore, the m training samples are samples belonging to the m sample sets, and each training sample belongs to a different sample set.
[0095] For example, assuming that the first cloud service platform receives the first sample set and the second sample set, selects one first training sample from the first sample set and one second training sample from the second sample set, and obtains two training samples in total.
[0096] 3032: The first cloud service platform obtains m fifth probabilities corresponding to each training sample in the m training samples, and the m fifth probabilities corresponding to the training sample are probabilities that the training sample is recognized as the m categories by the second AI model.
[0097] In some embodiments, the second AI model is located on a second cloud service platform, and the first cloud service platform and the second cloud service platform are different cloud service platforms. The first cloud service platform sends a first processing request to the second cloud service platform, and the first processing request comprises the m training samples. The second cloud service platform receives the first processing request, processes each of the m training samples based on the second AI model to obtain m fifth probabilities that each of the training samples is identified as the m categories, and sends the m fifth probabilities that each of the training samples is identified as the m categories to the first cloud service platform. The first cloud service platform receives the m fifth probabilities that each of the training samples is identified as the m categories.
[0098] For example, the first cloud service platform sends a first processing request to the second cloud service platform, and the first processing request comprises the first training sample and the second training sample. The second cloud service platform receives the first processing request, processes the first training sample based on the second AI model to obtain a fifth probability P11 that the first training sample is identified as having a vehicle and a fifth probability P12 that the first training sample is identified as not having a vehicle, and processes the second training sample based on the second AI model to obtain a fifth probability P21 that the second training sample is identified as having a vehicle and a fifth probability P22 that the second training sample is identified as not having a vehicle. The second cloud service platform sends the fifth probability P11 and the fifth probability P12 to the first cloud service platform, and sends the fifth probability P21 and the fifth probability P22 to the first cloud service platform. The first cloud service platform receives the fifth probability P11 and the fifth probability P12, and receives the fifth probability P21 and the fifth probability P22.
[0099] In some embodiments, the second AI model is located on a second cloud service platform, and the first cloud service platform and the second cloud service platform are different cloud service platforms. The first cloud service platform sends a first processing request to the second cloud service platform, and the first processing request comprises the m training samples. The second cloud service platform receives the first processing request, processes each of the m training samples based on the second AI model to obtain m fifth probabilities that each of the training samples is identified as the m categories, and sends the m fifth probabilities that each of the training samples is identified as the m categories to the first cloud service platform. The first cloud service platform receives the m fifth probabilities that each of the training samples is identified as the m categories.
[0100] 3033: The first cloud service platform obtains m fourth probabilities corresponding to each of the training samples based on the m fifth probabilities corresponding to each of the training samples.
[0101] For each training sample, the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature corresponding to the bias attribute in the training sample is identified as the m categories.
[0102] For each training sample, the m fifth probabilities corresponding to the training sample are probabilities that the training sample is identified as the m categories. For the i-th category, the fourth probability that each of the training samples is identified as the i-th category is obtained based on the fifth probability that each of the training samples is identified as the i-th category according to a first formula as follows: i = 1, 2, …, m.
[0103] The first formula is:
[0104] In the first formula, p i is the fourth probability that each training sample is identified as the i-th class, P i1 is the fifth probability that the first training sample is identified as the i-th class, P i2 is the fifth probability that the second training sample is identified as the i-th class, P im is the fifth probability that the m-th training sample is identified as the i-th class.
[0105] For example, the first cloud service platform receives the fifth probability P11 and the fifth probability P12, and the fifth probability P21 and the fifth probability P22, and the fourth probability that the first training sample is identified as having a vehicle is equal to the fourth probability that the second training sample is identified as having a vehicle, and the fourth probability of having a vehicle is equal to (P11+P21) / 2. The fourth probability that the first training sample is identified as not having a vehicle is equal to the fourth probability that the second training sample is identified as not having a vehicle, and the fourth probability of not having a vehicle is equal to (P12+P22) / 2.
[0106] Wherein the second bias feature corresponding to the bias attribute (road surface) in the first training sample includes the road surface image in the first training sample, the second task feature corresponding to the vehicle recognition task includes the vehicle image in the first training sample, and the second bias feature corresponding to the bias attribute (road surface) in the second training sample includes the road surface image in the second training sample, and the second task feature corresponding to the vehicle recognition task is not including the vehicle image. In this way, in the calculation of (P11+P21) / 2 and (P12+P22) / 2, the second task feature in the first training sample (the vehicle image in the first training sample) and the second task feature in the second training sample (not including the vehicle image) offset each other, only the second bias feature in the first training sample and the second bias feature in the second training sample are reserved, so that (P11+P21) / 2 and (P12+P22) / 2 are the probability that the second bias feature is identified as having a vehicle and the probability that the second bias feature is identified as not having a vehicle, respectively.
[0107] Repeat the operations of 3011-3033 above until the m fourth probabilities corresponding to each training sample in the m sample set are obtained.
[0108] Step 304: The first cloud service platform trains the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample.
[0109] In some embodiments, the first AI model is used to process the target data to be processed to obtain m probabilities that the bias attribute corresponding to the bias feature in the target data is identified as m classes.
[0110] In some embodiments, the first cloud service platform determines the target structure based on a data type of the training samples included in the m sample set. The first AI model is trained based on each training sample and the m fourth probabilities corresponding to each training sample.
[0111] For example, in a case where the data type of the training sample is an image type, the target structure is a residual network (resnet). In a case where the data type of the training sample is a non-image type, the target structure is a multilayer perceptron (MLP).
[0112] In step 304, the first cloud service platform can train the first AI model based on operations 3041-3043 as follows.
[0113] 3041: Based on the AI model to be trained and each training sample, obtain m sixth probabilities corresponding to each training sample. The sixth probability corresponding to each training sample is the probability that the training sample is recognized as the m categories by the AI model to be trained.
[0114] For each training sample, the AI model to be trained is used to infer the training sample, and m sixth probabilities that the training sample is recognized as the m categories are obtained.
[0115] Optionally, the AI model to be trained includes a random forest algorithm, a logistic regression algorithm, or a support vector machine (SVM), etc.
[0116] 3042: Based on the m fourth probabilities corresponding to each training sample and the m sixth probabilities corresponding to each training sample, calculate a loss value by a loss function, and adjust the AI model to be trained based on the loss value.
[0117] In 3042, the hyperparameters and / or model structure, etc. of the AI model to be trained are adjusted based on the loss value.
[0118] 3043: When it is determined to continue training the AI model to be trained, return to perform step 3041. When it is determined not to continue training the AI model to be trained, the AI model to be trained is taken as the first AI model.
[0119] In some embodiments, when the number of times of training the AI model to be trained reaches a specified number of times, it is determined not to continue training the AI model to be trained.
[0120] In some embodiments, the accuracy rate of the AI model to be trained is obtained using a plurality of training samples. When the accuracy rate exceeds a specified accuracy threshold, it is determined not to continue training the AI model to be trained. In implementation,
[0121] For each training sample in the plurality of training samples, based on the AI model to be trained and each training sample, m sixth probabilities corresponding to each training sample are obtained, and based on the m fourth probabilities corresponding to each training sample and the m sixth probabilities corresponding to each training sample, a correct rate of inference of the AI model to be trained is obtained. If the correct rate does not exceed a specified correct rate threshold, it is determined to continue training the AI model to be trained, and if the correct rate exceeds the specified correct rate threshold, it is determined not to continue training the AI model to be trained.
[0122] Step 305: The first cloud service platform sends the API of the first AI model to the terminal device.
[0123] The terminal device receives the API of the first AI model, and can display a second interface as shown in FIG. 5, the second interface including the API of the first AI model.
[0124] In the embodiments of the present application, the first cloud service platform receives m sample sets, the m sample sets corresponding to m categories of interest of a task implemented by the second AI model, and each training sample in the sample set including a second bias feature corresponding to a bias attribute and a second task feature corresponding to a task. In this way, the first AI model is trained based on the m sample sets, so that the first AI model is used to reduce the influence of the bias attribute of the second AI model on the task implemented by the second AI model. In this way, when the second AI model processes data, the influence of the bias attribute of the second AI model is reduced or eliminated by the first AI model, improving the accuracy and robustness of processing data.
[0125] Referring to FIG. 6, the embodiments of the present application provide a method 600 for processing data, which can be applied to the network architecture 100 shown in FIG. 1 or FIG. 2, and the method 600 includes the following flow.
[0126] Step 601: The terminal device obtains target data to be processed, the target data including a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model.
[0127] Referring to FIG. 5, the terminal device can display a second interface, the second interface including the API of the first AI model and an upload interface. The user can upload the target data to be processed to the second interface through the upload interface. The terminal device obtains the API of the first AI model and the target data from the first interface.
[0128] For example, the second AI model is a vehicle recognition model, the bias attribute of the vehicle recognition model is a road surface, and the task implemented by the vehicle recognition model is a vehicle recognition task. The target data is a picture including a road surface image and a vehicle image, wherein the first bias feature corresponding to the bias attribute (road surface) includes the road surface image, and the first task feature corresponding to the vehicle recognition task includes the vehicle image. Alternatively, the target data is a picture including a road surface image but not including a vehicle image, wherein the first bias feature corresponding to the bias attribute (road surface) includes the road surface image, and the first task feature corresponding to the vehicle recognition task is not including a vehicle image.
[0129] In some embodiments, the target data includes one or more of: image data, audio data, or text data.
[0130] Step 602: The terminal device sends target data to the first cloud service platform.
[0131] In step 602, the terminal device sends the target data to the first cloud service platform based on the API of the first AI model.
[0132] Step 603: The first cloud service platform receives the target data and obtains m first probabilities that the target data is recognized by the second AI model as m categories of interest of the task, m being an integer greater than 1.
[0133] In some embodiments, the second AI model is located on a second cloud service platform, and the first cloud service platform and the second cloud service platform are different cloud service platforms. The first cloud service platform sends a second processing request to the second cloud service platform, and the second processing request includes the target data. The second cloud service platform receives the second processing request, processes the target data based on the second AI model to obtain m first probabilities that the target data is recognized as the m categories, and sends the m first probabilities to the first cloud service platform. The first cloud service platform receives the m first probabilities.
[0134] For example, the second AI model is a vehicle recognition model, the first cloud service platform sends a second processing request to the second cloud service platform, the second processing request includes the target data, and the target data is a picture including a road surface image and a vehicle image, or the target data is a picture including a road surface image but not including a vehicle image. The second cloud service platform receives the second processing request, processes the target data based on the vehicle recognition model to obtain a first probability P1 that the target data is recognized as having a vehicle and a first probability P2 that the target data is recognized as not having a vehicle. The second cloud service platform sends the first probability P1 and the first probability P2 to the first cloud service platform.
[0135] In some embodiments, the second AI model is located on a second cloud service platform, the first cloud service platform and the second cloud service platform are the same cloud service platform, and the first cloud service platform also includes the second AI model. The first cloud service platform processes the target data based on the second AI model to obtain m first probabilities that the target data is identified as the m categories.
[0136] Step 604: The first cloud service platform processes the target data based on the first AI model to obtain m second probabilities that the first bias feature in the target data is identified as the m categories.
[0137] The process of processing the target data based on the first AI model and the process of processing the data based on the second AI model are not in any particular order. The two processes can be performed simultaneously, or the process of processing the target data based on the first AI model can be performed first, or the process of processing the target data based on the second AI model can be performed first.
[0138] For example, the first AI model is used to reduce the influence of the bias attribute of the vehicle recognition model on the vehicle recognition task implemented by the vehicle recognition model. The first cloud service platform processes the target data based on the first AI model to obtain a second probability P11 that the first bias feature (road surface image) in the target data is identified as having a vehicle and a second probability P12 that the first bias feature in the target data is identified as not having a vehicle.
[0139] Step 605: The first cloud service platform obtains, based on the m first probabilities and the m second probabilities, m third probabilities that the first task feature in the target data is identified as the m categories.
[0140] In step 605, for the jth category, based on the first probability that the target data is identified as the jth category and the second probability that the first bias feature in the target data is identified as the jth category, the third probability that the first task feature in the target data is identified as the jth category is obtained according to the following second formula, j = 1, 2, …, m.
[0141] The second formula is: P j = P j1 - P j2 ;
[0142] In the second formula, P j is the third probability that the first task feature in the target data is identified as the jth category, P j1 is the first probability that the target data is identified as the jth category, and P j2 is the second probability that the first bias feature in the target data is identified as the jth category.
[0143] For example, in the example of the vehicle recognition model described above, the third probability that the first task feature in the target data is recognized as having a vehicle is equal to P1-P11, and the third probability that the first task feature in the target data is recognized as not having a vehicle is equal to P2-P12.
[0144] Step 606: The first cloud service platform sends a processing result to the terminal device, the processing result including m third probabilities that the first task feature in the target data is recognized as the m categories, or the processing result including a target detected in the target data based on the m third probabilities.
[0145] The terminal device can receive the processing result including the m third probabilities, and display the m third probabilities to the user. Alternatively, the terminal device can receive the processing result including the target detected in the target data based on the m third probabilities, display the target data to the user, and mark the target in the target data.
[0146] In the embodiment of the present application, the first cloud service platform receives target data to be processed, the target data including a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model. The target data is processed using the second AI model to obtain m first probabilities, the m first probabilities being probabilities that the target data is recognized as m categories of interest by the second AI model. The first cloud service platform processes the target data based on the first AI model to obtain m second probabilities that the first bias feature is recognized as the m categories. For each category corresponding first probability, the first probability includes a probability that the first bias feature is recognized as the category and a probability that the first task feature is recognized as the category. Therefore, based on the m first probabilities and the m second probabilities, the first cloud service platform can obtain m third probabilities that the first task feature is recognized as the m categories, thereby improving the accuracy of processing the target data and improving the robustness of processing the target data.
[0147] Referring to FIG. 7, the embodiment of the present application provides a device 700 for processing data, which can be deployed in the first cloud service platform in the network architecture 100 of FIG. 1 or FIG. 2. The device 700 includes a first artificial intelligence AI model, and the device 700 includes:
[0148] The communication unit 701 is configured to receive target data to be processed, the target data including a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model.
[0149] The processing unit 702 is configured to obtain m first probabilities, the m first probabilities being probabilities that the target data is recognized as m categories of interest by the second AI model, m being an integer greater than 1.
[0150] The processing unit 702 is further configured to process the target data based on the first AI model to obtain m second probabilities that the first bias feature is identified as m categories.
[0151] The processing unit 702 is further configured to obtain m third probabilities that the first task feature is identified as m categories based on the m first probabilities and the m second probabilities.
[0152] Optionally, the communication unit 701 receives the target data to be processed. For details, refer to related contents in step 603 of method 600 shown in FIG. 6. Details are not described herein again.
[0153] Optionally, the processing unit 702 obtains the m first probabilities. For details, refer to related contents in step 603 of method 600 shown in FIG. 6. Details are not described herein again.
[0154] Optionally, the processing unit 702 processes the target data based on the first AI model to obtain m second probabilities that the first bias feature is identified as m categories. For details, refer to related contents in step 604 of method 600 shown in FIG. 6. Details are not described herein again.
[0155] Optionally, the processing unit 702 obtains m third probabilities that the first task feature is identified as m categories based on the m first probabilities and the m second probabilities. For details, refer to related contents in step 604 of method 600 shown in FIG. 6. Details are not described herein again.
[0156] Optionally, the communication unit 701 is further configured to send the processing result. The processing result includes the m third probabilities, or the processing result includes a target detected in the target data based on the m third probabilities.
[0157] Optionally, the communication unit 701 sends the processing result. For details, refer to related contents in step 606 of method 600 shown in FIG. 6. Details are not described herein again.
[0158] Optionally, the second AI model is located on a second cloud service platform. The communication unit 701 is further configured to:
[0159] send a processing request to the second cloud service platform. The processing request includes the target data. The processing request is used to instruct the second cloud service platform to process the target data based on the second AI model to obtain the m first probabilities.
[0160] receive the m first probabilities sent by the second cloud service platform.
[0161] Optionally, the communication unit 701 sends the processing request to the second cloud service platform. For details, refer to related contents in step 603 of method 600 shown in FIG. 6. Details are not described herein again.
[0162] Optionally, the communication unit 701 receives the m first probabilities from the second cloud service platform. For details, refer to the related content of step 603 of method 600 shown in FIG. 6, which will not be described in detail here.
[0163] Optionally, the communication unit 701 is further configured to receive m sample sets, the m sample sets correspond to the m categories, each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of a category corresponding to the sample set.
[0164] The processing unit 702 is further configured to train the first AI model based on the m sample sets.
[0165] Optionally, the communication unit 701 receives the m sample sets. For details, refer to the related content of step 303 of method 300 shown in FIG. 3, which will not be described in detail here.
[0166] Optionally, the processing unit 702 trains the first AI model based on the m sample sets. For details, refer to the related content of steps 303-304 of method 300 shown in FIG. 3, which will not be described in detail here.
[0167] Optionally, the processing unit 702 is configured to:
[0168] Obtain m fourth probabilities corresponding to each training sample in the m sample sets, and the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature included in the training sample is identified as the m categories.
[0169] Train the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample.
[0170] Optionally, the processing unit 702 obtains the m fourth probabilities corresponding to each training sample in the m sample sets. For details, refer to the related content of step 303 of method 300 shown in FIG. 3, which will not be described in detail here.
[0171] Optionally, the processing unit 702 trains the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample. For details, refer to the related content of step 304 of method 300 shown in FIG. 3, which will not be described in detail here.
[0172] Optionally, the processing unit 702 is configured to:
[0173] Obtain m fifth probabilities corresponding to each training sample in the m training samples, the m training samples are samples belonging to the m sample sets, and the m fifth probabilities corresponding to the training sample are probabilities that the training sample is identified as the m categories by the second AI model.
[0174] The m fourth probabilities corresponding to each training sample are obtained based on the m fifth probabilities corresponding to each training sample.
[0175] Optionally, the processing unit 702 obtains the m fifth probabilities corresponding to each training sample in the m training samples, and details of the implementation process refer to the related content of step 3032 of method 300 shown in FIG. 3, which will not be described in detail here.
[0176] Optionally, the processing unit 702 obtains the m fourth probabilities corresponding to each training sample based on the m fifth probabilities corresponding to each training sample, and details of the implementation process refer to the related content of step 3033 of method 300 shown in FIG. 3, which will not be described in detail here.
[0177] Optionally, the processing unit 702 is configured to:
[0178] Determine the target structure based on the data type of the training sample included in the m sample set;
[0179] Train the AI model of the target structure based on the m sample set to obtain the first AI model.
[0180] Optionally, the processing unit 702 determines the target structure based on the data type of the training sample included in the m sample set, and details of the implementation process refer to the related content of step 304 of method 300 shown in FIG. 3, which will not be described in detail here.
[0181] Optionally, the processing unit 702 trains the AI model of the target structure based on the m sample set to obtain the first AI model, and details of the implementation process refer to the related content of step 304 of method 300 shown in FIG. 3, which will not be described in detail here.
[0182] Optionally, the communication unit 701 is configured to:
[0183] Send an application program interface (API) of the first AI model;
[0184] Receive target data sent through the API.
[0185] Optionally, the communication unit 701 sends the API of the first AI model, and details of the implementation process refer to the related content of step 305 of method 300 shown in FIG. 3, which will not be described in detail here.
[0186] Optionally, the communication unit 701 receives the target data sent through the API, and details of the implementation process refer to the related content of step 603 of method 600 shown in FIG. 6, which will not be described in detail here.
[0187] Optionally, the target data includes one or more of the following: image data, audio data, or text data.
[0188] In the embodiment of the present application, the communication unit receives target data to be processed, the target data including first bias features corresponding to bias attributes of a second AI model and first task features corresponding to a task implemented by the second AI model. The processing unit processes the target data using the second AI model to obtain m first probabilities, the m first probabilities being probabilities that the target data is recognized by the second AI model as m categories of interest of the task. The processing unit processes the target data based on the first AI model to obtain m second probabilities that the first bias features are recognized as the m categories. For each category, the first probability includes a probability that the first bias features are recognized as the category and a probability that the first task features are recognized as the category. Therefore, based on the m first probabilities and the m second probabilities, the processing unit can obtain m third probabilities that the first task features are recognized as the m categories, thereby improving the accuracy of processing the target data and improving the robustness of processing the target data.
[0189] Referring to FIG. 8, a system 800 for processing data according to an embodiment of the present application can be applied to the network architecture 100 shown in FIG. 1 or FIG. 2, and the system 800 includes a terminal device 801 and a first cloud service platform 802, and the first cloud service platform 802 includes a first artificial intelligence (AI) model.
[0190] The terminal device 801 is configured to send target data to be processed to the first cloud service platform 802, the target data including first bias features corresponding to bias attributes of a second AI model and first task features corresponding to a task implemented by the second AI model.
[0191] The first cloud service platform 802 is configured to obtain m first probabilities that the target data is recognized by the second AI model as m categories of interest of the task, m being an integer greater than 1; process the target data based on the first AI model to obtain m second probabilities that the first bias features are recognized as the m categories; and based on the m first probabilities and the m second probabilities, obtain m third probabilities that the first task features are recognized as the m categories.
[0192] Optionally, the system 800 further includes a second cloud service platform 803, and the second cloud service platform 803 includes a second AI model.
[0193] The first cloud service platform 802 is configured to send a processing request to the second cloud service platform 803, the processing request including the target data.
[0194] The second cloud service platform 803 is configured to process the target data based on the second AI model to obtain the m first probabilities, and send the m first probabilities to the first cloud service platform 802.
[0195] Optionally, the terminal device 801 is further configured to send the m sample sets to the first cloud service platform 802, the m sample sets correspond to the m categories, each training sample in the sample set includes a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, and the second task feature is a feature of a category corresponding to the sample set.
[0196] The first cloud service platform 802 is further configured to train the first AI model based on the m sample sets.
[0197] Optionally, the first cloud service platform 802 is configured to obtain m fourth probabilities corresponding to each training sample in the m sample sets, the m fourth probabilities corresponding to the training sample are probabilities that the second bias feature included in the training sample is identified as the m categories; and the first AI model is trained based on each training sample and the m fourth probabilities corresponding to each training sample.
[0198] Optionally, the first cloud service platform 802 is configured to obtain m fifth probabilities corresponding to each training sample in the m training samples, the m training samples are samples belonging to the m sample sets, and the m fifth probabilities corresponding to the training sample are probabilities that the training sample is identified as the m categories by the second AI model; and the m fourth probabilities corresponding to each training sample are obtained based on the m fifth probabilities corresponding to each training sample.
[0199] Optionally, the first cloud service platform 802 is configured to determine a target structure based on a data type of the training sample included in the m sample sets, and train an AI model of the target structure based on the m sample sets to obtain the first AI model. In this way, the accuracy of the first AI model can be improved.
[0200] Optionally, the first cloud service platform 802 is further configured to send an application program interface (API) of the first AI model to the terminal device 801.
[0201] The terminal device 801 is configured to send target data to the first cloud service platform through the API.
[0202] Optionally, the target data includes one or more of the following: image data, audio data, or text data.
[0203] In the embodiment of the present application, the terminal device sends target data to the first cloud service platform, the target data comprising a first bias feature corresponding to a bias attribute of the second AI model and a first task feature corresponding to a task implemented by the second AI model. The second cloud service platform processes the target data using the second AI model to obtain m first probabilities that the target data is identified as m categories. The first cloud service platform processes the target data based on the first AI model to obtain m second probabilities that the first bias feature is identified as the m categories. Based on the m first probabilities and the m second probabilities, m third probabilities that the first task feature is identified as the m categories can be obtained, thereby improving the accuracy of processing the target data and improving the robustness of processing the target data.
[0204] Referring to FIG. 9, an embodiment of the present application provides a computing device 900. For example, the computing device 900 can be a device included in the network architecture 100 shown in FIG. 1 or FIG. 2, or the computing device 900 can be a device in the network architecture 100 of the method 300 shown in FIG. 3 or the method 600 shown in FIG. 6, etc.
[0205] As shown in FIG. 9, the computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other through the bus 902. The computing device 900 can be a server or a terminal device. It should be understood that the number of processors and memories in the computing device 900 is not limited by the present application.
[0206] The bus 902 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is shown in FIG. 9, but it does not mean that there is only one bus or only one type of bus. The bus 902 can include a path for transmitting information between various components (e.g., the processor 904, the memory 906, the communication interface 908) of the computing device 900.
[0207] The processor 904 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.
[0208] The memory 906 can include volatile memory, such as random access memory (RAM), and non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid-state drive (SSD).
[0209] Referring to FIG. 9, the memory 906 stores executable program code that the processor 904 executes to implement the functions of the communication unit 701 and the processing unit 702 in the apparatus 700 shown in FIG. 7, respectively, to implement the method provided by any of the above embodiments. That is, the memory 906 stores instructions for performing the method provided by any of the above embodiments. Alternatively,
[0210] The communication interface 908 uses a transceiving module such as, but not limited to, a network interface card or a transceiver to enable communication between the computing device 900 and other devices or communication networks.
[0211] The embodiments of the present application also provide a cluster for processing data. The cluster for processing data 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 notebook computer, or a smart phone.
[0212] As shown in FIG. 10, the cluster for processing data includes at least one computing device 900. The memory 906 in one or more computing devices 900 in the cluster for processing data can store the same instructions for performing the method provided by any of the above embodiments.
[0213] In some possible implementations, the memory 906 of one or more computing devices 900 in the cluster for processing data can also respectively store partial instructions for performing the method for processing data. In other words, the combination of one or more computing devices 900 can collectively execute the instructions for performing the method provided by any of the above embodiments.
[0214] In some possible implementations, one or more computing devices in the cluster for processing data can be connected through a network. The network can be a wide area network or a local area network, etc. FIG. 11 shows one possible implementation. As shown in FIG. 11, two computing devices 900A and 900B are connected through a network. Specifically, the communication interface in each computing device is connected to the network.
[0215] In one possible implementation, the memory 906 in the computing device 900A stores instructions for performing the functions of the processing unit 702 in the embodiment shown in FIG. 7. Meanwhile, the memory 906 in the computing device 900B stores instructions for performing the functions of the communication unit 701 in the embodiment shown in FIG. 7.
[0216] It should be understood that the functions of the computing device 900A shown in FIG. 11 can also be completed by multiple computing devices 900. Similarly, the functions of the computing device 900B can also be completed by multiple computing devices 900.
[0217] The embodiments of the present application also provide another cluster for processing data. The connection relationship between the computing devices in the cluster for processing data can be similar to the connection manner of the cluster for processing data described with reference to FIG. 11. The difference is that the memory 906 in one or more computing devices 900 in the cluster for processing data can store the same instructions for performing the method provided in any of the embodiments described above.
[0218] In some possible implementations, the memory 906 in one or more computing devices 900 in the cluster for processing data can also respectively store partial instructions for performing the method provided in any of the embodiments described above. In other words, the combination of one or more computing devices 900 can collectively execute the instructions for performing the method provided in any of the embodiments described above.
[0219] The embodiments of the present application also provide a computer program product containing instructions. The computer program product can be a software or program product containing instructions, which can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, the at least one computing device is caused to perform the method provided in any of the embodiments described above.
[0220] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium can be any available medium that a computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions, which instruct the computing device to perform the method provided in any of the embodiments described above.
[0221] The information (including but not limited to API of the AI model), data (including but not limited to target data, training sample, etc.) and signals involved in the present application are authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0222] A person of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0223] The above is only an optional embodiment of the present application and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of processing data, characterized by, The method is applied to a first cloud service platform, the first cloud service platform comprising a first artificial intelligence (AI) model, and the method comprises: receiving target data to be processed, the target data comprising a first bias feature corresponding to a bias attribute of a second AI model and a first task feature corresponding to a task implemented by the second AI model; obtaining m first probabilities that the target data is identified as m categories of interest by the second AI model, m being an integer greater than 1; processing the target data based on the first AI model to obtain m second probabilities that the first bias feature is identified as the m categories; based on the m first probabilities and the m second probabilities, obtaining m third probabilities that the first task feature is identified as the m categories.
2. The method of claim 1, wherein, The method further comprises: sending a processing result, the processing result comprising the m third probabilities, or the processing result comprising a target detected in the target data based on the m third probabilities.
3. The method of claim 1 or 2, wherein, The second AI model is located on a second cloud service platform; The method further comprises: sending a processing request to the second cloud service platform, the processing request comprising the target data, the processing request being used to instruct the second cloud service platform to process the target data based on the second AI model to obtain the m first probabilities; and receiving the m first probabilities sent by the second cloud service platform.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: receiving m sample sets corresponding to the m categories, each training sample in the sample set comprising a second bias feature corresponding to the bias attribute and a second task feature corresponding to the task, the second task feature being a feature of a category corresponding to the sample set; training the first AI model based on the m sample sets.
5. The method of claim 4, wherein, The method further comprises: obtaining m fourth probabilities corresponding to each training sample in the m sample sets, the m fourth probabilities corresponding to the training sample being probabilities that the second bias feature included in the training sample is identified as the m categories; training the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample.
6. The method of claim 5, wherein, The method further comprises: obtaining m fifth probabilities corresponding to each training sample in m training samples, the m training samples being samples belonging to the m sample sets, the m fifth probabilities corresponding to the training sample being probabilities that the training sample is identified as the m categories by the second AI model; obtaining the m fourth probabilities corresponding to each training sample based on the m fifth probabilities corresponding to each training sample.
7. The method according to any one of claims 4 to 6, wherein, The method further comprises: determining a target structure based on a data type of the training samples included in the m sample sets. The method further comprises: Train the AI model of the target structure based on the m sample sets to obtain the first AI model.
8. The method according to any one of claims 1 to 7, wherein, The method further includes: sending an application program interface (API) of the first AI model; The method further includes: receiving the target data sent through the API.
9. The method according to any one of claims 1 to 8, wherein, The target data includes one or more of image data, audio data, or text data.
10. An apparatus for processing data, the apparatus comprising: The device includes a first artificial intelligence (AI) model, and the device includes: a communication unit configured to receive target data to be processed, the target data including first bias features corresponding to bias attributes of a second AI model and first task features corresponding to a task implemented by the second AI model; a processing unit configured to obtain m first probabilities, the m first probabilities being probabilities that the target data is recognized by the second AI model as m categories of interest for the task, m being an integer greater than 1; The processing unit is further configured to process the target data based on the first AI model to obtain m second probabilities that the first bias features are recognized as the m categories; The processing unit is further configured to obtain, based on the m first probabilities and the m second probabilities, m third probabilities that the first task features are recognized as the m categories.
11. The apparatus of claim 10, wherein, The communication unit is further configured to: send a processing result, the processing result including the m third probabilities or the processing result including a target detected in the target data based on the m third probabilities.
12. The apparatus of claim 10 or 11, wherein, The second AI model is located on a second cloud service platform; and the communication unit is further configured to: send a processing request to the second cloud service platform, the processing request including the target data, the processing request being used to instruct the second cloud service platform to process the target data based on the second AI model to obtain the m first probabilities; and receive the m first probabilities sent by the second cloud service platform.
13. The device of any one of claims 10-12, wherein: The communication unit is further configured to receive m sample sets, the m sample sets corresponding to the m categories, each training sample in the sample set including second bias features corresponding to the bias attributes and second task features corresponding to the task, the second task features being features of a category corresponding to the sample set; The processing unit is further configured to train the first AI model based on the m sample sets.
14. The apparatus of claim 13, wherein, The processing unit is configured to: obtain m fourth probabilities corresponding to each training sample in the m sample sets, the m fourth probabilities corresponding to the training sample being probabilities that second bias features included in the training sample are recognized as the m categories; and train the first AI model based on each training sample and the m fourth probabilities corresponding to each training sample.
15. The apparatus of claim 14, wherein, The processing unit is configured to: obtain m fifth probabilities corresponding to each of the m training samples, the m training samples being samples belonging to the m sample set, and the m fifth probabilities corresponding to each of the training samples being probabilities that the training sample is identified as the m categories by the second AI model; obtain m fourth probabilities corresponding to each of the training samples based on the m fifth probabilities corresponding to each of the training samples.
16. The apparatus of any one of claims 13-15, wherein, The processing unit is configured to: determine a target structure based on a data type of a training sample included in the m sample set; train an AI model of the target structure based on the m sample set to obtain the first AI model.
17. The apparatus of any one of claims 10-16, wherein, The communication unit is configured to: send an application program interface (API) of the first AI model; receive the target data sent through the API.
18. The apparatus of any one of claims 10-17, wherein, The target data includes one or more of image data, audio data, or text data.
19. A cluster of computing devices, characterized in that, The at least one computing device includes a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to perform the method of any one of claims 1-9.
20. A computer-readable storage medium, characterized in that, The computer program instructions, when executed by a computing device cluster, cause the computing device cluster to perform the method of any one of claims 1-9.
21. A computer program product comprising instructions, wherein: The instructions, when executed by a computing device cluster, cause the computing device cluster to perform the method of any one of claims 1-9.
Citation Information
Patent Citations
Intelligent training method and device fusing semantics and image features, equipment and medium
CN113449821A
Model training method and device, storage medium and electronic equipment
CN115618964A
Adversarial sample generation method, model training method, image recognition method and device
CN117333732A
Method for generating image classification model, roadside device and cloud control platform
US20220222921A1