Method for providing AI model service and AI model service platform

By selecting the appropriate AI model based on the classification information of user needs and tasks and performing dynamic billing, the problems of high operating costs and poor user experience of AI large models are solved, and more efficient AI model services are achieved.

CN119276927APending Publication Date: 2025-01-07HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311146179.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-07
Filing Date
2023-09-06
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The more parameters the existing AI model is, the more accurate the prediction results are, but the higher the calling and running costs, resulting in poor user experience. The requirements and task processing results in different technical fields have their own advantages and disadvantages, making it difficult to save costs and improve users. Experience.

Method used

By obtaining user demand task classification information, determining the corresponding AI model, ensuring the accuracy of processing results while reducing operating costs, providing dynamic billing based on historical demand data, and improving user experience.

Benefits of technology

While ensuring the accuracy of AI model processing results, the cost of calling the AI ​​model is reduced, the billing information that is more in line with user usage records is provided, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276927A_ABST
    Figure CN119276927A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an AI model service method and an AI model service platform. The method comprises the following steps: receiving a first demand task of a user; obtaining first classification information of the first demand task, wherein the first classification information comprises an application field re-classification result and / or a complexity classification result of the first demand task; determining a first AI model for solving the first demand task from the one or more AI models according to the first classification information; processing the first demand task by using the first AI model; and determining charging information of the user according to the first AI model. According to the technical scheme, under the condition that the accuracy of the AI model processing result is guaranteed, the operation cost of the AI model is saved, and the experience of using the AI model by a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of artificial intelligence (AI), and more specifically, to a method for providing AI model services and an AI model service platform. Background Art

[0002] At present, AI models have gone through three stages: pre-trained models, large-scale pre-trained models, and ultra-large-scale pre-trained models. The parameter scale of AI models continues to increase, and the number of parameters has achieved a breakthrough from hundreds of millions to trillions. Currently, large AI models with parameter scales exceeding hundreds of billions are gradually becoming mainstream.

[0003] Generally speaking, the more parameters a large AI model has, the more accurate the model's prediction results will be. However, the cost of calling and running the large AI model will be higher, and the price charged to users will be higher, resulting in a poor user experience. In addition, there are many types of tasks that large AI models can handle, and the processing results of large AI models have their own advantages and disadvantages for tasks in different technical fields. Therefore, how to save the cost of providing AI model services while improving the user experience has become a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method and device for providing AI model services, which obtains classification information of required tasks provided by users and determines the corresponding AI model. While ensuring the accuracy of AI model processing results, it saves the cost of AI model operation and improves the user experience of using the AI ​​model.

[0005] In a first aspect, an embodiment of the present application provides a method for providing artificial intelligence (AI) model services, which is applied to an AI model service platform that provides one or more AI models, and the method includes: receiving a first demand task of a user; obtaining first classification information of the first demand task, the first classification information including a classification result of an application field of the first demand task and / or a classification result of a complexity level; determining, based on the first classification information, a first AI model that solves the first demand task from the one or more AI models; using the first AI model to process the first demand task; and determining the billing information of the user based on the first AI model.

[0006] Exemplarily, if the AI ​​model is a language model, the first required task may be a task related to language understanding, generation, interaction or reasoning, such as a text to be translated, a question to be answered, or a detailed description of an article to be generated; if the AI ​​model is an image processing model, the first required task may be an image to be recognized or an image to be generated; if the AI ​​model is used in the field of autonomous driving, the first required task may be a task for perception and rule decision-making.

[0007] In an embodiment of the present application, by determining the corresponding AI model based on the classification information of the required tasks provided by the user, the cost of running the AI ​​model is saved and the user experience of using the AI ​​model is improved while ensuring the accuracy of the AI ​​model processing results.

[0008] In combination with the first aspect, in certain implementations of the first aspect, determining the billing information of the user according to the first AI model includes: obtaining historical demand data of the user, the historical demand data including one or more historical AI models for solving one or more historical demand tasks, the one or more AI models including the one or more historical AI models, the historical demand tasks including the first demand task, or the historical demand tasks are demand tasks that have been solved before the first demand task; in a case where the historical demand task is a demand task that has been solved before the first demand task, determining the billing information of the user according to the one or more historical AI models and the first AI model; or, in a case where the historical demand tasks include the first demand task, determining the billing information of the user according to the one or more historical AI models.

[0009] In combination with the first aspect, in certain implementations of the first aspect, when the historical demand task is a demand task that has been solved before the first demand task, the billing information of the user is determined based on the one or more historical AI models and the first AI model, including: obtaining the usage ratio of each AI model in the one or more historical AI models; obtaining the single call billing information of each AI model in the one or more historical AI models; and determining the single call billing information when the user uses the first AI model based on the usage ratio of each AI model and the single call billing information of each AI model.

[0010] In combination with the first aspect, in certain implementations of the first aspect, when the historical demand task includes the first demand task, the one or more historical AI models include the first AI model, and the billing information of the user is determined based on the one or more historical AI models, including: obtaining the billing information of each AI model in the one or more historical AI models each time it is called; determining the total billing information of the user based on the sum of the billing information when the one or more historical AI models are called once or multiple times.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the historical AI model includes AI models for all tasks that solve demand within a specified period or a specified number of tasks.

[0012] In an embodiment of the present application, the user's billing information is determined based on the user's historical demand data, the user obtains a more accurate AI model prediction result, and the charging information is more in line with the user's usage record rather than a fixed billing, thereby improving the user's usage experience.

[0013] In combination with the first aspect, in certain implementations of the first aspect, when the first classification information includes the classification result of the complexity of the first required task, the scale of the first AI model is positively correlated with the classification result of the complexity of the first required task.

[0014] In combination with the first aspect, in certain implementations of the first aspect, determining the first AI model that solves the first requirement task from the one or more AI models based on the first classification information includes: obtaining a first correspondence between the classification result of the complexity and the scale of the AI ​​model; determining the scale of the AI ​​model that solves the first requirement task based on the first correspondence and the classification result of the complexity of the first requirement task; determining the first AI model from the one or more AI models based on the scale of the AI ​​model that solves the first requirement task.

[0015] In an embodiment of the present application, required tasks of different complexity correspond to AI models of different scales. Ultimately, while ensuring the processing accuracy of the required tasks, the situation of calling a large-scale AI model with high cost each time is avoided, thereby reducing the calling cost of the AI ​​model.

[0016] In combination with the first aspect, in some implementations of the first aspect, receiving the first demand task of the user includes: providing a demand input application programming interface API, so that the user inputs the first demand task through the demand input API.

[0017] In the embodiment of the present application, by providing a dedicated demand input API, it helps to improve the efficiency of solving demand tasks.

[0018] In combination with the first aspect, in certain implementations of the first aspect, obtaining the first classification information of the first requirement task includes: obtaining the first classification information of the first requirement task by inputting the first requirement task into a trained second AI model.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the second AI model is one of the one or more AI models.

[0020] In an embodiment of the present application, the classification requirement task is constructed through an AI model or an existing AI model of an AI model service platform, saving the cost of providing AI model services.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the one or more AI models are language models.

[0022] In a second aspect, an embodiment of the present application provides an AI model service platform, which provides one or more AI models, and the AI ​​model service platform includes: a receiving module, used to: receive a user's first demand task; an acquisition module, used to: obtain first classification information of the first demand task, the first classification information including the classification result of the application field of the first demand task and / or the classification result of the complexity; a processing module, used to: determine, according to the first classification information, a first AI model that solves the first demand task from the one or more AI models; use the first AI model to process the first demand task; and determine the user's billing information according to the first AI model.

[0023] In combination with the second aspect, in certain implementations of the second aspect, the acquisition module is specifically used to: obtain the user's historical demand data, the historical demand data including one or more historical AI models for solving one or more historical demand tasks, the one or more AI models including the one or more historical AI models, the historical demand tasks including the first demand tasks, or the historical demand tasks are demand tasks that have been solved before the first demand tasks; the processing module is specifically used to: when the historical demand tasks are demand tasks that have been solved before the first demand tasks, determine the user's billing information based on the one or more historical AI models and the first AI model; or, when the historical demand tasks include the first demand tasks, determine the user's billing information based on the one or more historical AI models.

[0024] In combination with the second aspect, in certain implementations of the second aspect, when the historical demand task is a demand task that has been solved before the first demand task, the acquisition module is specifically used to: obtain the usage ratio of each AI model in the one or more historical AI models; obtain the single call billing information of each AI model in the one or more historical AI models; the processing module is specifically used to: determine the single call billing information when the user uses the first AI model based on the usage ratio of each AI model and the single call billing information of each AI model.

[0025] In combination with the second aspect, in certain implementations of the second aspect, the historical AI model includes all AI models for solving demand tasks within a specified period or a specified number of tasks.

[0026] In combination with the second aspect, in certain implementations of the second aspect, when the first classification information includes the classification result of the complexity of the first required task, the scale of the first AI model is positively correlated with the classification result of the complexity of the first required task.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the acquisition module is specifically used to: obtain a first correspondence between the classification result of the complexity and the scale of the AI ​​model; the processing module is specifically used to: determine the scale of the AI ​​model that solves the first requirement task based on the first correspondence and the classification result of the complexity of the first requirement task; determine the first AI model from the one or more AI models based on the scale of the AI ​​model that solves the first requirement task.

[0028] In combination with the second aspect, in some implementations of the second aspect, the receiving module is specifically used to: provide a demand input application programming interface API, so that the user inputs the first demand task through the demand input API.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the acquisition module is specifically used to obtain first classification information of the first requirement task by inputting the first requirement task into a trained second AI model.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the second AI model is one of the one or more AI models.

[0031] In combination with the second aspect, in certain implementations of the second aspect, the one or more AI models are language models.

[0032] In a third aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the link tracking method of the first aspect or any possible implementation of the first aspect.

[0033] In a fourth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the link tracking method of the first aspect or any possible implementation of the first aspect.

[0034] In a fifth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the link tracking method of the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic block diagram of a cloud scenario provided in an embodiment of the present application.

[0036] Figure 2 This is a schematic diagram of the processing results of AI models of different scales in different fields provided in an embodiment of the present application.

[0037] Figure 3 It is a schematic block diagram of an AI model service method provided in an embodiment of the present application.

[0038] Figure 4 It is a schematic diagram of an AI model service provided in an embodiment of the present application.

[0039] Figure 5 It is a schematic diagram of billing information provided in an embodiment of the present application.

[0040] Figure 6 It is a schematic structural block diagram of an AI model service platform provided in an embodiment of the present application.

[0041] Figure 7 It is a schematic structural block diagram of a computing device provided in an embodiment of the present application.

[0042] Figure 8 It is a schematic structural block diagram of a computing device cluster provided in an embodiment of the present application.

[0043] Fig. 9 It is a schematic structural block diagram of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0045] An AI model is a mathematical or computational model built using AI technology, used to implement reasoning and computation in the field of AI. Typical AI models include neural network models. In the field of machine learning and cognitive science, neural network models are mathematical or computational models that mimic the structure and function of biological neural networks (the central nervous system of animals, especially the brain) and are used to estimate or approximate functions. Neural network models can include Transformer neural networks, convolutional neural network (CNN) models, deep neural network (DNN) models, multilayer perceptron (MLP), etc.

[0046] At present, AI models have gradually evolved from small-scale pre-trained models with fewer parameters to pre-trained models with a large number of parameters, such as large-scale or ultra-large-scale AI models. AI models are large and complex neural networks that need to store large-scale parameters to increase the depth and width of the model, thereby improving the performance of the model. The parameter scale of AI models starts from tens of billions, and they train large amounts of data and produce high-quality prediction results. For example, Davinci is a large-scale language model consisting of 17.5 billion parameters that can perform a variety of natural language tasks such as question-answering, generation, and summarization.

[0047] The development and application of traditional AI models require a large amount of computing resources and storage resources. At the same time, the model training, installation and configuration processes are complicated, which invisibly raises the threshold for use. Therefore, in order to promote the development of AI models and accelerate the implementation of AI models in more scenarios, multiple developed AI models can be integrated into a service platform. Users or developers can directly experience the application effects of various models by using or calling multiple AI models launched on the service platform, clicking to upload the input parameters or required tasks of the model. For example, the AI ​​model service platform includes a model for AI painting. If the user of the AI ​​model service platform calls the model and enters a description text, the model can generate pictures of the corresponding style introduced in the description text. For another example, if the AI ​​model service platform includes an AI model for natural language processing, the user calls the model and enters a question, and the AI ​​model can answer the question raised by the user.

[0048] The above-mentioned AI model service platform can be implemented through a software platform provided in the form of a service, or can be implemented through a software development kit (SDK) supporting cloud services. For example, the AI ​​model service platform is set in a cloud scene, and the cloud server in the cloud scene is used to run multiple AI models set in the AI ​​model service platform.

[0049] To understand the cloud environment, Figure 1 A schematic diagram of a system based on a cloud server system is shown. Figure 1 As shown, the cloud management platform 110 is used to manage the infrastructure that provides multiple cloud services, and the infrastructure includes multiple cloud data centers, each of which includes multiple servers, each of which includes cloud service resources, to provide corresponding cloud services to tenants. Among them, the tenants who use cloud services are the users who use the AI ​​model mentioned above.

[0050] The cloud management platform 110 provides an access interface (such as an interface or an application program interface (API)). The tenant can operate the client remote access access interface to register a cloud account and password on the code development platform and log in to the code development platform. After the code development platform successfully authenticates the cloud account and password, the tenant can further pay to select and purchase a virtual machine of a specific specification (processor, memory, disk) on the code development platform. After the paid purchase is successful, the code development platform provides the remote login account and password of the purchased virtual machine, and the client can remotely log in to the virtual machine, install and run the tenant's application in the virtual machine. The tenant of the cloud service can be an individual, an enterprise, a school, a hospital, an administrative agency, etc. The functions of the cloud management platform 110 include but are not limited to a user console, a computing management service, a network management service, a storage management service, an authentication service, and an image management service. The user console provides an interface or API to interact with the tenant, the computing management service is used to manage servers and bare metal servers running virtual machines and containers, the network management service is used to manage network services (such as gateways, firewalls, etc.), the storage management service is used to manage storage services (such as data bucket services), the authentication service is used to manage the tenant's account password, and the image management service is used to manage virtual machine images. The tenant can use the client 130 to log in to the cloud management platform 110 through the Internet 120 to manage the rented cloud services.

[0051] For example, in an embodiment of the present application, the tenant accesses the AI ​​model service platform set in the cloud management platform 110 through the client 130 to obtain multiple AI models connected to the AI ​​model service platform. Then, the tenant calls the AI ​​model connected to the AI ​​model service platform and inputs the required task, and finally obtains the prediction data or processing results corresponding to the required task.

[0052] In some embodiments of the present application, the AI ​​model service platform may include multiple AI models for processing the same demand tasks, but the scale, operating costs, and charging prices of these AI models are not the same. Generally speaking, the more parameters and the larger the scale of the AI ​​model, the more accurate the prediction results of the AI ​​model, but the operating costs and charging prices are higher. For example, the prediction results of a large-scale AI model are more accurate than those of a small-scale AI model, but the operating costs and charging prices are also several times or even dozens of times that of a small-scale AI model.

[0053] However, not all the demand tasks that users input to AI models are complex. Generally speaking, the more complex the demand tasks, the more large-scale AI models are needed, and simple demand tasks do not necessarily require complex, large-scale AI models. Figure 2A schematic diagram showing the processing results of language models of different scales in different language fields, wherein the display priority of the test scores is small-scale AI model, medium-scale AI model and large-scale AI model. For example, the test score of the statistics course only shows the score of the small-scale AI model, which means that the score of the small-scale AI model is higher than the score of the medium-scale AI model and the large-scale AI model. Figure 2 It can be seen that for tasks in different fields, large-scale AI models only have significant advantages in predicting or processing results in algorithm competitions, biology, psychology, and college entrance examinations. Compared with statistics courses that are less comprehensive and less difficult, small-scale AI models are capable of doing so.

[0054] Therefore, when users choose the AI ​​model that needs to be called in the AI ​​model service platform, in one case, if the user's required task may not be complicated, but the AI ​​model selected by the user is a large-scale AI model, it will cause waste of AI model operating costs and resource usage, and the large-scale AI models are charged higher fees to users, which reduces the user's usage experience; in another case, the user's required task is very complex, but the AI ​​model selected by the user is a small-scale AI model, and the model results obtained by the user are not accurate, which also reduces the user's usage experience.

[0055] In addition, some small-scale AI models at this stage are only targeted at specific technical fields, such as Figure 2 The algorithm competition field shown, and then this part of the small-scale AI model can only show good prediction effects or processing results when processing the required tasks or problems in the algorithm competition field, and has no significant advantages in technical fields such as biology and psychology. At this stage, different small-scale AI models can be trained for different technical fields as AI models dedicated to each technical field. If a large-scale AI model for multiple technical fields is trained, the required training cost and AI model construction cost are high. When the user's required task is a specific technical field, but the user chooses an AI model dedicated to other technical fields, the processing result obtained by the user will be very inaccurate, thereby reducing the user's experience, or the user chooses a large-scale AI model for multiple fields, and then the operating cost of the AI ​​model service platform is high, and the payment information provided to the user is higher, resulting in a worse user experience. The embodiment of the present application can integrate multiple small-scale AI models trained for different technical fields into an AI model service platform, and there is no need to specially train a large-scale AI model with a higher cost.

[0056] In order to solve the above-mentioned problem of poor user experience, the present application proposes a method 300 for providing AI model services. The method 300 includes steps 310 to 350. The method 300 determines the corresponding AI model according to the classification information of the required task provided by the user, thereby saving the cost of AI model operation and improving the user experience of using the AI ​​model while ensuring the accuracy of the AI ​​model processing result.

[0057] Step 310: Receive the user's first required task.

[0058] Among them, the first required task is the input content of the AI ​​model or the task to be processed. The AI ​​model can be used in the fields of autonomous driving, speech recognition, natural language processing, etc. For example, if the AI ​​model is a language model, the first required task can be a task in language understanding, generation, interaction or reasoning, such as a text to be translated, a question to be answered, or a detailed description of an article to be generated; if the AI ​​model is an image processing model, the first required task can be an image to be recognized or an image to be generated; if the AI ​​model is used in the field of autonomous driving, the first required task can be a task for perception and rule decision-making.

[0059] Step 320: Obtain first classification information of the first required task.

[0060] The AI ​​model service platform of the present application can classify the application field and / or complexity of the first demand task, for example, into simple tasks, medium tasks and complex tasks. For another example, the first demand task is classified as a language processing task or an image processing task, or classified as a simple task in a language processing task or a complex task in an image processing task. The basis for classifying the complexity can be the predicted delay, predicted cost and processing difficulty of completing the first demand task. The basis for classifying the application field can be the processing type of the demand task or the technical field to which the demand task belongs.

[0061] For example, Figure 4 A schematic diagram of an AI model service is shown. Figure 4 As shown in (a), in an embodiment of the present application, the AI ​​model service platform may include a task classification unit, which can be specifically used to determine the classification information of the application field and / or complexity of the first requirement task received in step 310, for example, determining that the classification information of the first requirement task is a complex task of an image processing task.

[0062] Optionally, the above-mentioned task classification unit can be constructed based on an AI model. Exemplarily, if the AI ​​models provided in the AI ​​model service platform are all language models, and the first demand task input by the user is a question to be answered, the task classification unit can be constructed based on the same type of language model in the AI ​​model service platform or based on a small-scale language model in the AI ​​model service platform to determine whether the complexity of the question to be answered is a simple question or a complex question. The input of the language model used to construct the task classification unit is the first demand task, and the output is the classification information of the complexity of the first demand task, that is, the first demand task is determined to be a simple question or a complex question. For example, the demand task input by the user is "What is the relationship between A and B?" The task classification unit or the language model that constructs the task classification unit determines that the demand task is a complex question, or further, the demand task is a complex legal consulting question or a complex historical knowledge question, etc. More detailed classification information. For another example, the demand task input by the user is "What is the role of the pooling layer in the neural network", then the task classification unit can determine that the demand task is a simple task, or a simple task in the field of artificial intelligence AI. In other embodiments of the present application, the above-mentioned task classification unit can be a demand input application programming interface (API) for users to call. By inputting the demand task into the demand input API, the AI ​​model management platform can determine the classification information of the demand task based on the demand task received by the demand input API.

[0063] In other embodiments of the present application, the AI ​​model provided in the AI ​​model service platform can also be used in other fields. For example, when the AI ​​model is an image recognition model, and the first required task input by the user is an image to be recognized, the task classification unit can determine whether the image is a complex image or a simple image based on factors such as the blurriness, color depth, content, and image size of the image to be recognized. This application does not impose any restrictions on the application field of the AI ​​model.

[0064] Step 330: Determine a first AI model for solving the first requirement task based on the first classification information of the first requirement task.

[0065] In the case where the first classification information includes the classification result of complexity, it can be obtained from the above that a task with lower difficulty can be solved by a small-scale AI model, and a task with higher difficulty can be solved by a large-scale AI model. Therefore, the embodiment of the present application can determine the first AI model of corresponding scale according to the classification information of the complexity of the first task required determined in step 320, that is, the scale of the first AI model is positively correlated with the complexity of the first task required. For example, Figure 4As shown in (a), the AI ​​model service platform may include an AI model library for storing multiple connected AI models. The present application determines a first AI model from the AI ​​model library that is positively correlated with the classification result of the complexity of the first required task.

[0066] For example, Figure 4 As shown in (b), the relationship between the classification results of the complexity of the required task and the scale of the AI ​​model can be the first corresponding relationship shown in the table, such as very complex problems correspond to ultra-large-scale language models (with more than 100 billion parameters), relatively complex problems correspond to large-scale language models (with more than 10 billion parameters), moderately difficult problems correspond to medium-scale language models (with more than hundreds of millions of parameters), and simple problems correspond to small-scale language models (with more than 10 million parameters). Furthermore, the embodiment of the present application determines that the AI ​​model used to solve the required task is one of the four AI models in the table based on the classification results of the complexity of the required task in step 320. It is worth noting that Figure 4 (b) is only an illustration of a first correspondence and does not impose any restrictions on the correspondence between the complexity of the classification results and the scale of the AI ​​model.

[0067] In other embodiments of the present application, when the first classification information includes the classification results of the application field, the AI ​​model service platform in the present application can integrate the AI ​​models used in different technical fields to form a "large-scale AI model" composed of multiple small-scale or medium-scale AI models. For example, the multiple small-scale AI models can be applied to the prediction of processing tasks in industries such as government affairs, finance, manufacturing, medicine, mining, railways, and meteorology. The AI ​​model service platform can determine the AI ​​model used to process the first demand task based on the field to which the first demand task belongs, such as the meteorological field.

[0068] Exemplarily, the AI ​​model service platform can set up a multi-layer architecture to integrate AI models in multiple fields. For example, the AI ​​model service platform can set up a three-layer architecture - a basic large model, an industry large model and a scenario model. The basic large model can be a large model such as natural language, vision, multimodality, prediction, scientific computing, etc. The industry large model can be applied to government affairs, finance, manufacturing, mining, meteorology and other fields. The scenario model can be a small-scale model for a specific scenario, such as typhoon path prediction in the meteorological field or supply chain logistics distribution prediction in the manufacturing field. In this way, the AI ​​model service platform can select a suitable first AI model to solve the first demand task according to the processing type of the first demand task (such as natural language processing), the field to which the first demand task belongs, and the specific scenario.

[0069] Optionally, in other embodiments of the present application, the above-mentioned AI model service platform may also include multiple scenario models for the same specific scenario, and these scenario models can be divided into different scales. Then, based on the application field of the first requirement task, the present application can also determine the scenario model of corresponding scale according to the complexity of the first requirement task.

[0070] Step 340: Use the first AI model to process the first required task.

[0071] Step 350: Determine the user's billing information based on the first AI model.

[0072] At present, the way to determine the user's billing information is based on the operating cost of the AI ​​model. For example, after the user uses the first AI model to process the first required task, the user's billing information is the single call fee of the first AI model. For example, if the first required task is a problem with a character sequence of 2k Tokens, and the single call fee of the first AI model for natural language processing is x / k Token, then the user's billing information is 2x. In the above case, the charge provided to the user is a fixed charge, and it is difficult for the user to determine whether the charge is reasonable and whether it is worth paying to use the AI ​​model.

[0073] The embodiment of the present application proposes a method for determining the user's billing information, that is, determining the user's billing information based on the user's historical demand data. The charging information is more in line with the user's usage record rather than fixed billing, which improves the user's usage experience.

[0074] The historical demand data includes one or more historical AI models that solve the one or more historical demand tasks, and the one or more historical AI models are part or all of the AI ​​models in the AI ​​model service platform. The scale of each historical AI model can be positively correlated with the classification result of the complexity of the historical demand tasks solved by each historical AI model. In other words, the process of determining the historical AI model that solves the historical demand tasks is the same as step 330.

[0075] In an embodiment of the present application, if the user has used the AI ​​model service platform to call the AI ​​model multiple times, the historical demand tasks may be all demand tasks that have been solved before the first demand task, or may be all demand tasks within a specified period range or a specified number of tasks including the first demand task after the first demand task is solved, or the historical AI model is an AI model for all solved demand tasks within a specified period range or a specified number of tasks; if the user is a novice user who has never used the AI ​​model service platform, then the historical demand data may be the historical demand data of all users or some users of the AI ​​model service platform, such as the historical demand data of all users in the area where the novice user is located.

[0076] The following will take the language model as an example and combine Figure 5 An embodiment of determining the billing information according to the classification result of the complexity in step 360 is specifically introduced.

[0077] The billing mode of Example 1 is that the AI ​​model service platform dynamically charges according to the user's historical demand data within a specified period range or a specified task number range, that is, a post-payment mode. At this time, the historical demand data includes the first demand task in step 310. The specified period range can be one day, one month, or one year, and the specified task number can be any positive integer such as 30 times, 60 times, etc.

[0078] For example, if the postpaid model is based on a specified period range, the user enters a total of N problems to be solved within the specified period range, which means that language models of different sizes may be called N times. By obtaining the call cost or billing information of each call of the language model N times, the billing information of the user within the specified period range is determined. Figure 5 As shown in (a), the user called the language model 5 times in total within one month, of which the large-scale language model was called once, the medium-scale language model was called once, and the small-scale language model was called 3 times. If the unit price of the large-scale language model when it is called is n1 / 1KToken and the number of tokens of the character sequence of the complex problem is 1K, then the billing information of the large-scale language model is n1. Similarly, the billing information of the medium-scale language model is n2, and the total billing information of the small-scale language model when it is called 3 times is n3. Finally, the total billing information of the user within the specified period is (n1+n2+n3). In other embodiments of the present application, n1, n2 and n3 may also be the cost when the language model is called, and then the billing information of the user within the specified period can be any value greater than or equal to (n1+n2+n3).

[0079] Similarly, if the post-payment model is based on a specified number of tasks, the billing information or operating cost of each time the language model is called can be used to ultimately obtain the billing information of the user within the specified number of tasks.

[0080] The billing mode of Example 2 is a pay-as-you-go mode, that is, each time the user calls the language mode AI model service platform, the user is provided with billing information once. At this time, the historical demand data does not include the first demand task in step 310, and the final billing information is the corresponding charge when the first AI model is used to solve the first demand task. The billing information may also be based on the historical demand data of the user within a specified period range or a specified task quantity range. If the user is a novice user, the historical demand data of the novice user may be the historical demand data of all users or some users of the AI ​​model service platform, such as the historical demand data of all users in the region where the novice user is located, or the historical demand data of all users within the first time threshold or the first number threshold before the novice user calls the language model.

[0081] For example, Figure 5 As shown in (b), if the pay-as-you-go model is based on a specified period of one month, the user enters N problems to be solved in one month, of which complex problems account for 10%, medium problems account for 20%, and simple problems account for 70%, that is, the proportion of calling large-scale language models is 10%, the proportion of calling medium-scale language models is 20%, and the proportion of calling small-scale language models is 70%. If the unit price of calling a large-scale language model is m1 / 1K Token, the unit price of calling a medium-scale language model is m2 / 1K Token, and the unit price of calling a small-scale language model is m3 / 1K Token, then the total charge information for the user when calling the language model to solve the first demand task is (0.1*m1+0.2*m2+0.7*m3) / 1K Token. Similarly, if m1 / 1K Token, m2 / 1K Token, and m3 / 1K Token are the calling costs of the language model respectively, then the billing information of the user when calling the language model is any positive integer greater than (0.1*m1+0.2*m2+0.7*m3) / 1KToken.

[0082] Similarly, if the pay-as-you-go model is based on a specified number of tasks, the user's billing information for the specified number of tasks can be obtained based on the unit price of calling the language model and the ratio of the number of calls to different language models or the ratio of problems of different complexity.

[0083] In other embodiments of the present application, the billing information of the AI ​​model can also be determined based on the charging information of different application fields. For example, the charging information of AI models in popular fields such as autonomous driving is higher than that of AI models in the literary field. The historical demand data can include the AI ​​models in which technical fields the user has used, the scale of the AI ​​model, and the corresponding charging unit price. Therefore, the present application can also provide users with reasonable charging information based on the historical demand data, which will not be elaborated here.

[0084] The embodiments of the present application determine the appropriate or cost-effective AI model according to the complexity and / or application field of the required task provided by the user, and provide the corresponding billing information to the user. On the one hand, required tasks of different application fields / complexity levels can correspond to specific types of AI models of different sizes, which improves the accuracy of AI model processing results and reduces the waste of AI model operating costs; on the other hand, users obtain more accurate AI model prediction results, and the charging information is more in line with the user's usage record rather than fixed billing, which improves the user's usage experience.

[0085] Combined with the following Figure 6 The AI ​​model service platform of the embodiment of the present application is introduced. It should be noted that: Figure 6 The AI ​​model service platform shown can execute Figure 3 It should be understood that the AI ​​model service platform described below is capable of executing the method of the aforementioned embodiment of the present application. In order to avoid unnecessary repetition, the repeated description is appropriately omitted when introducing the database of the embodiment of the present application.

[0086] Figure 6 is a schematic diagram of an AI model service platform in an embodiment of the present application. Figure 6 The AI ​​model service platform 600 shown includes: a receiving module 610, an acquisition module 620, and a processing module 630.

[0087] Specifically, the receiving module 610 is used to receive the first required task of the user.

[0088] Specifically, the acquisition module 620 is used to: acquire the first classification information of the first required task.

[0089] Specifically, the processing module 630 is used to: determine a first AI model among one or more AI models that solves the first requirement task based on the first classification information, and use the first AI model to process the first requirement task, and determine the billing information of the user based on the first AI model.

[0090] The specific functions and beneficial effects of the receiving module 610, the obtaining module 620 and the processing module 630 are described in the above embodiments, and will not be repeated here for the sake of brevity.

[0091] Among them, the above modules can be implemented by software or by hardware. Exemplarily, the implementation of the acquisition module 620 is introduced by taking the acquisition module 620 as an example. Similarly, the implementation of the receiving module 610 and the processing module 630 can refer to the implementation of the acquisition module 620.

[0092] As an example of a software functional unit, the acquisition module 620 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the acquisition module 620 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 (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 a data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.

[0093] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0094] As an example of a hardware functional unit, the acquisition module 620 may include at least one computing device, such as a server, etc. Alternatively, the acquisition module 620 may also be a device 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.

[0095] The multiple computing devices included in the acquisition module 620 can be distributed in the same region or in different regions. The multiple computing devices included in the acquisition module 620 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the acquisition module 620 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices included in the acquisition module 620 can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0096] The present application also provides a computing device 700. Figure 7 As shown, computing device 700 includes: bus 702, processor 704, memory 706 and communication interface 708. Processor 704, memory 706 and communication interface 708 communicate through bus 702. Computing device 700 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 700.

[0097] The bus 702 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 702 may include a path for transmitting information between various components of the computing device 800 (eg, the memory 706, the processor 704, and the communication interface 708).

[0098] The processor 704 may 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).

[0099] The memory 706 may include a volatile memory, such as a random access memory (RAM). The memory 706 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0100] The memory 706 stores executable program codes, and the processor 704 executes the executable program codes to respectively implement the functions of the aforementioned receiving module 610, the acquisition module 620, and the processing module 630, thereby implementing the above method. That is, the memory 706 stores instructions for executing the above AI model service method.

[0101] The communication interface 708 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 700 and other devices or communication networks.

[0102] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least two computing devices. 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 smart phone.

[0103] like Figure 8 As shown, the computing device cluster includes at least two computing devices 700. The memory 706 in the multiple computing devices 700 in the computing device cluster may store the same instructions for executing the above-mentioned AI model service method.

[0104] In some possible implementations, the memory 706 of the multiple computing devices 700 in the computing device cluster may also store some instructions for executing the above-mentioned AI model service method. In other words, a combination of one or more computing devices 700 can jointly execute instructions for executing the above-mentioned AI model service method.

[0105] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the above database. That is, the instructions stored in the memory 706 in different computing devices 700 can implement the functions of one or more modules among the receiving module, the obtaining module and the processing module.

[0106] In some possible implementations, multiple computing devices in a computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig. 9 A possible implementation is shown. Fig. 9 As shown, two computing devices 700A and 700B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 706 in the computing device 700A stores instructions for the functions of the receiving module. At the same time, the memory 706 in the computing device 700B stores instructions for executing the functions of the acquisition module and the processing module.

[0107] It should be understood that Fig. 9 The functions of the computing device 700A shown in FIG. 7 may also be completed by multiple computing devices 700. Similarly, the functions of the computing device 700B may also be completed by multiple computing devices 700.

[0108] An embodiment of the present application also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned AI model service method.

[0109] The embodiment of the present application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above-mentioned AI model service method.

[0110] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive), etc. The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned AI model service method.

[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0112] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.

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

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0117] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0118] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for providing artificial intelligence (AI) model services, characterized in that: The method is applied to an AI model service platform that provides one or more AI models, and the method includes: Receive the user's first demand task; Acquire first classification information of the first demand task, where the first classification information includes a classification result of an application field and / or a classification result of a complexity level of the first demand task; Determine, according to the first classification information, a first AI model that solves the first required task from the one or more AI models; Processing the first required task using the first AI model; Determine the billing information of the user according to the first AI model.

2. The method according to claim 1, characterized in that The determining, according to the first AI model, the billing information of the user includes: Acquire historical demand data of the user, where the historical demand data includes one or more historical AI models that solve one or more historical demand tasks, where the one or more AI models include the one or more historical AI models, and where the historical demand tasks include the first demand task, or where the historical demand tasks are demand tasks that have been solved before the first demand task; In a case where the historical demand task is a demand task that has been solved before the first demand task, determining the billing information of the user according to the one or more historical AI models and the first AI model; or In a case where the historical demand tasks include the first demand tasks, the billing information of the user is determined according to the one or more historical AI models.

3. The method according to claim 2, characterized in that In a case where the historical demand task is a demand task that has been solved before the first demand task, determining the billing information of the user according to the one or more historical AI models and the first AI model includes: Obtaining a usage ratio of each AI model in the one or more historical AI models; Obtain single call billing information of each AI model in the one or more historical AI models; According to the usage ratio of each AI model and the single call billing information of each AI model, the single call billing information when the user uses the first AI model is determined.

4. The method according to claim 2, characterized in that: In a case where the historical demand task includes the first demand task, the one or more historical AI models include the first AI model, and determining the billing information of the user according to the one or more historical AI models includes: Obtaining billing information each time the one or more historical AI models are called; Determine the total billing information of the user according to the sum of the billing information when the one or more historical AI models are called once or multiple times.

5. The method according to any one of claims 2 to 4, characterized in that The historical AI model includes all AI models for solving demand tasks within a specified period or a specified number of tasks.

6. The method according to any one of claims 1 to 5, characterized in that When the first classification information includes the classification result of the complexity of the first required task, the scale of the first AI model is positively correlated with the classification result of the complexity of the first required task.

7. The method according to claim 6, characterized in that The determining, according to the first classification information, a first AI model that solves the first required task from the one or more AI models includes: Get the first correspondence between the complexity of the classification results and the scale of the AI ​​model; Determining the scale of the AI ​​model for solving the first requirement task according to the classification result of the first corresponding relationship and the complexity of the first requirement task; The first AI model is determined from the one or more AI models according to the scale of the AI ​​model that solves the first required task.

8. The method according to any one of claims 1 to 7, characterized in that The task of receiving the first requirement of the user comprises: A requirement input application programming interface API is provided, so that the user inputs the first requirement task through the requirement input API.

9. The method according to any one of claims 1 to 8, characterized in that The obtaining of the first classification information of the first required task includes: By inputting the first requirement task into the trained second AI model, first classification information of the first requirement task is obtained.

10. The method according to claim 9, characterized in that The second AI model is one of the one or more AI models.

11. The method according to any one of claims 1 to 10, characterized in that The one or more AI models are language models.

12. An AI model service platform, characterized in that: The AI ​​model service platform provides one or more AI models, and the AI ​​model service platform includes: A receiving module, used to: receive a first required task from a user; An acquisition module, used to: acquire first classification information of the first demand task, wherein the first classification information includes a classification result of an application field and / or a classification result of a complexity level of the first demand task; A processing module, configured to: determine, according to the first classification information, a first AI model that solves the first required task from the one or more AI models; Processing the first required task using the first AI model; Determine the billing information of the user according to the first AI model.

13. The AI ​​model service platform according to claim 12, characterized in that: The acquisition module is specifically used for: Acquire historical demand data of the user, where the historical demand data includes one or more historical AI models that solve one or more historical demand tasks, where the one or more AI models include the one or more historical AI models, and where the historical demand tasks include the first demand task, or where the historical demand tasks are demand tasks that have been solved before the first demand task; The processing module is specifically used for: In a case where the historical demand task is a demand task that has been solved before the first demand task, determining the billing information of the user according to the one or more historical AI models and the first AI model; or In a case where the historical demand tasks include the first demand tasks, the billing information of the user is determined according to the one or more historical AI models.

14. The AI ​​model service platform according to claim 13, characterized in that: In the case where the historical demand task is a demand task that has been solved before the first demand task, the acquisition module is specifically used to: Obtaining a usage ratio of each AI model in the one or more historical AI models; Obtain single call billing information of each AI model in the one or more historical AI models; The processing module is specifically used for: According to the usage ratio of each AI model and the single call billing information of each AI model, the single call billing information when the user uses the first AI model is determined.

15. The AI ​​model service platform according to claim 13, characterized in that: In a case where the historical demand tasks include the first demand tasks, the one or more historical AI models include the first AI model, and the acquisition module is specifically configured to: Obtaining billing information for each AI model in the one or more historical AI models each time it is called; The processing module is specifically used for: Determine the total billing information of the user according to the sum of the billing information when the one or more historical AI models are called once or multiple times.

16. The AI ​​model service platform according to any one of claims 13 to 15, characterized in that: The historical AI model includes all AI models for solving demand tasks within a specified period or a specified number of tasks.

17. The AI ​​model service platform according to any one of claims 12 to 16, characterized in that: When the first classification information includes the classification result of the complexity of the first required task, the scale of the first AI model is positively correlated with the classification result of the complexity of the first required task.

18. The AI ​​model service platform according to claim 17, characterized in that: The acquisition module is specifically used for: Obtaining a first correspondence between the classification results of the complexity and the scale of the AI ​​model; The processing module is specifically used for: Determining the scale of the AI ​​model for solving the first requirement task according to the classification result of the first corresponding relationship and the complexity of the first requirement task; The first AI model is determined from the one or more AI models according to the scale of the AI ​​model that solves the first required task.

19. The AI ​​model service platform according to any one of claims 12 to 18, characterized in that: The receiving module is specifically used for: A requirement input application programming interface API is provided, so that the user inputs the first requirement task through the requirement input API.

20. The AI ​​model service platform according to any one of claims 12 to 19, characterized in that: The acquisition module is specifically used for: By inputting the first requirement task into the trained second AI model, first classification information of the first requirement task is obtained.

21. The AI ​​model service platform according to claim 20, characterized in that: The second AI model is one of the one or more AI models.

22. The AI ​​model service platform according to any one of claims 12 to 21, characterized in that: The one or more AI models are language models.

23. A computing device cluster, characterized in that: include: at least one computing device, each computing device comprising 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, so that the computing device cluster executes the method according to any one of claims 1 to 11.

24. 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 11.

25. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, and when the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 11.