Method, device and equipment for running machine learning pipeline and storage medium
By acquiring attribute information from business data and a tree-structured basic model library, the training model is automatically determined and customized, solving the problem of unstable accuracy of machine learning models in different fields and achieving efficient and flexible model adaptability.
Patent Information
- Application Number
- CN202211288677.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-10-20
AI Technical Summary
Machine learning models have inconsistent accuracy in predicting results across different fields, requiring human intervention to improve accuracy and lacking flexibility.
By acquiring attribute information from business data, a basic model for applicable domains is determined using a tree-structured basic model library, and customized training is performed to obtain a suitable customized model.
It enables a model customization process that requires no human intervention, improves the automation of the machine learning pipeline and the efficiency of model customization, and enhances the model's adaptability to business data from different domains.
Smart Images

Figure CN117010524B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning technology, and in particular to a method, apparatus, device and storage medium for operating a machine learning pipeline. Background Technology
[0002] Machine learning models are widely used in an increasing number of fields. However, due to the limitations of their applicability, the accuracy of predictions obtained by the same machine learning model when processing business data from different fields is unstable.
[0003] To improve the adaptability of machine learning models to different fields, related technologies involve selecting the most accurate machine learning model from multiple models and using that model to process business data to obtain more accurate model prediction results.
[0004] However, this approach cannot adapt to the flexible and ever-changing business data in real-world operations. In some cases, manual intervention is required to improve the accuracy of machine learning model predictions in a particular domain. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for running a machine learning pipeline. The technical solution is as follows:
[0006] According to one aspect of the embodiments of this application, a method for running a machine learning pipeline is provided, the method comprising:
[0007] Obtain the attribute information of the business data of the first business, which is used to indicate the characteristics of the domain to which the business data of the first business belongs.
[0008] Obtain a base model library containing at least one pre-trained base model; wherein the base models included in the base model library are in a tree structure, and the applicable domain of the base model corresponding to the parent node of the tree structure includes the applicable domain of the base model corresponding to the child node of the parent node.
[0009] Based on the attribute information of the business data of the first service, a basic model corresponding to the first node that meets the specified conditions is determined from the tree structure and used as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes or is equivalent to the field to which the business data of the first service belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first service belongs, or the first node does not have a child node with a corresponding basic model.
[0010] Using the business data from the first service, the first basic model is trained in a customized manner to obtain a first customized model suitable for the first service.
[0011] According to one aspect of the embodiments of this application, a machine learning pipeline operation apparatus is provided, the apparatus comprising:
[0012] The information acquisition module is used to acquire the attribute information of the business data of the first business, and the attribute information of the business data of the first business is used to indicate the characteristics of the domain to which the business data of the first business belongs.
[0013] The model acquisition module is used to acquire a basic model library that stores at least one pre-trained basic model; wherein, the basic models included in the basic model library are in a tree structure, and the applicable field of the basic model corresponding to the parent node of the tree structure includes the applicable field of the basic model corresponding to the child node of the parent node.
[0014] The model determination module is used to determine the basic model corresponding to the first node that meets the specified conditions from the tree structure based on the attribute information of the business data of the first business, and use it as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes or is equivalent to the field to which the business data of the first business belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first business belongs, or the first node does not have a child node with a corresponding basic model;
[0015] The model customization module is used to perform customized training on the first basic model using the business data of the first business, so as to obtain a first customized model suitable for the first business.
[0016] According to one aspect of the embodiments of this application, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described machine learning pipeline operation method.
[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, the computer program being loaded and executed by a processor to implement the above-described machine learning pipeline operation method.
[0018] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer instructions to implement the above-described machine learning pipeline operation method.
[0019] The beneficial effects of the technical solutions provided in this application include at least the following:
[0020] On the one hand, computer equipment can determine the basic model for model customization based on the attribute information of business data, making the model customization process unnecessary for human intervention. This helps to improve the automation of the machine learning pipeline and increase the efficiency of model customization. During the model customization process, the basic model is fine-tuned using business data from the first business, resulting in a customized model. This allows the basic model to be flexibly adapted to different business data, helping to improve the adaptability of the basic model to business data from different domains.
[0021] On the other hand, the base models are stored in a tree structure in the base model library, which helps to quickly determine the base model for model customization from the base model library. Since the applicable domain of the base model used for model customization includes the domain to which the business data of the first business belongs, fine-tuning the first base model to obtain a customized model helps to improve the processing capability of the obtained customized model for business data. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in an exemplary embodiment of this application;
[0023] Figure 2 This is a flowchart of a machine learning pipeline operation method provided in an exemplary embodiment of this application;
[0024] Figure 3 This is a schematic diagram of a tree structure provided in an exemplary embodiment of this application;
[0025] Figure 4 This is a schematic diagram of an automated model testing process provided in an exemplary embodiment of this application;
[0026] Figure 5 This is a schematic diagram of a model update method provided in an exemplary embodiment of this application;
[0027] Figure 6 This is a schematic diagram of the machine learning pipeline operation process provided in an exemplary embodiment of this application;
[0028] Figure 7This is a schematic diagram of the service data for uploading the first service provided in an exemplary embodiment of this application;
[0029] Figure 8 This is a schematic diagram of a data upload page provided in an exemplary embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the service data for uploading a second service provided in an exemplary embodiment of this application;
[0031] Figure 10 This is a schematic diagram illustrating the display effect of model prediction results provided in an exemplary embodiment of this application;
[0032] Figure 11 This is a schematic diagram of the machine learning pipeline operation process provided in another exemplary embodiment of this application;
[0033] Figure 12 This is a block diagram of a machine learning pipeline operation apparatus provided in an exemplary embodiment of this application;
[0034] Figure 13 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0036] First, the terms used in this application will be introduced and explained.
[0037] 1. Artificial Intelligence (AI) is the theory, methods, technology, and application systems that utilize digital computers or machines powered by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0038] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0039] 2. Computer Vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and further processes the images to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, virtual reality (VR), augmented reality (AR), simultaneous localization and mapping (SLAM), and common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0040] 3. Key technologies in speech technology include Automatic Speech Recognition (ASR), Text-to-Speech (TTS), and voiceprint recognition. Enabling computers to hear, see, speak, and feel is the future direction of human-computer interaction, with speech being one of the most promising methods.
[0041] 4. Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, knowledge graphs, and speech pronunciation scoring.
[0042] 5. Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0043] 6. Machine Learning Operations (MLOps) are used to connect model building teams with business and operations teams, establishing a standardized process for model development, deployment, and operation, enabling organizations to better leverage machine learning capabilities to drive business growth.
[0044] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of machine learning pipeline technology, the degree of automation of AI technology will continue to improve, enabling AI technology to gain a wider range of applications.
[0045] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application. The implementation environment may include: terminal device 10 and server 20.
[0046] Terminal device 10 can be an electronic device such as a PC (Personal Computer), tablet computer, mobile phone, wearable device, smart home appliance, or in-vehicle terminal. A client application running on terminal device 10 is the target application. The target application is a business processing program that processes user input data. For example, the target application is an application for processing audio services, where audio services include, but are not limited to, at least one of the following: speech recognition, speech standardization scoring, or audio separation. Another example is an application for processing image services; where audio services include, but are not limited to, image classification and recognition, key point prediction, or image synthesis.
[0047] Furthermore, the target application can also be a news application, shopping application, social application, interactive entertainment application, browser application, content sharing application, virtual reality application, augmented reality application, etc., and this application embodiment does not limit this. In addition, different applications may process different types of business data, and the corresponding functions will also be different. These can all be pre-configured according to actual needs, and this application embodiment does not limit this.
[0048] Terminal device 10 has at least data receiving and storage functions. The data receiving function of terminal device 10 acquires user input business data to facilitate subsequent model customization based on business requirements.
[0049] Server 20 is used to provide backend services for the client of the target application in terminal device 10. For example, server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but it is not limited to these.
[0050] Server 20 has at least data receiving, storage, and computing functions. Server 20 stores a basic model library for implementing model customization methods (the basic model library includes at least one machine learning model capable of performing business functions), as well as datasets for training and testing machine learning models.
[0051] Terminal device 10 and server 20 jointly maintain the operation of the machine learning pipeline.
[0052] In one example, the machine learning pipeline is primarily implemented through terminal device 10. Server 20 sends a basic model library to terminal device 10. Terminal device 10 obtains the business data input by the user and completes the model customization process based on the business data and the basic model library. In this scenario, terminal device 10 can disconnect from server 20. That is, terminal device 10 executes the machine learning pipeline offline.
[0053] In another example, the machine learning pipeline is implemented jointly by server 20 and terminal device 10. Terminal device 10 acquires business data and sends it to server 20. After receiving the business data, server 20 completes the machine learning pipeline operation process based on the business data and the basic model library.
[0054] Figure 2 This is a flowchart illustrating a method for running a machine learning pipeline according to an exemplary embodiment of this application. Exemplarily, the entity executing this method may be... Figure 1 The terminal device 10 in the implementation environment shown can also be a server 20. For ease of description, the following uses a computer device as the execution entity to introduce the operation method of the machine learning pipeline. Figure 2 As shown, the method may include at least one of the following steps (210-240):
[0055] Step 210: Obtain the attribute information of the business data of the first business. The attribute information of the business data of the first business is used to indicate the characteristics of the domain to which the business data of the first business belongs.
[0056] The target application is capable of handling more than one service. In some embodiments, the first service refers to any service that the target application can handle. For example, the first service data is image recognition, speech recognition, or speech scoring, etc.
[0057] Of course, the first service can be more specific. For example, if the target program is used to process speech scoring, the first service could be scoring spoken audio from region A. Or, if the target program is used for image recognition, the first service could be recognizing animal images and determining the species of animal in the image. It should be noted that the first service is defined according to actual needs, and this application does not impose any limitations on it.
[0058] In some embodiments, the business data of the first service refers to business data belonging to the domain corresponding to the first service. In some embodiments, the business data of the first service is used to complete the model customization process for the first service.
[0059] In some embodiments, the type of service data for the first service is related to the type of service that the target application can process. For example, if the target application is used for audio processing, the service data for the first service can be audio data. As another example, if the target application is used for image processing, the service data for the first service can be image data. It should be noted that the type of service data for the first service is set according to actual needs, and this application does not impose any limitations on it.
[0060] In some embodiments, the domain to which business data belongs can be determined from the division direction. That is, business data of the same first business can have multiple sub-domains, and the multiple sub-domains together constitute the domain to which the business data of the first business belongs.
[0061] When the business data of a first business has multiple sub-domains, each sub-domain is determined according to a specific division direction. For example, if the business data of a certain first business is audio data, it can be divided as follows: by region, the business data belongs to region A; by interaction type, the business data belongs to dialogue type; and by scenario, the business data belongs to indoor.
[0062] The division direction of business data for the first business can be predefined, or it can be adaptively set according to changes in business during the operation of the target application. This application does not impose any restrictions here.
[0063] In some embodiments, the features of a domain refer to the representation of the domain. The features of a domain uniquely indicate the domain, and the features corresponding to different domains are not exactly the same.
[0064] Optionally, the characteristics of a domain include, but are not limited to, the domain name or domain number.
[0065] In some embodiments, the characteristics of a domain can be preset. For example, the characteristics of a domain can be represented by a number. In partition direction 1, the domain number of domain a is 1, the domain number of domain b is 2, and so on. The computer device determines the domain to which the service data belongs in partition direction 1 by using the domain number in the attribute information of the service data of the first service. By including the domain number in the attribute information, it helps to reduce the resources required for the transmission and storage of the attribute information of the service data of the first service.
[0066] In some embodiments, the attribute information of the business data of the first service includes characteristics of at least one domain to which the business data of the first service belongs. Based on the attribute information of the business data of the first service, the computer device can determine the domain to which the business data of the first service belongs.
[0067] For example, if business data has two partitioning directions, and the domain feature of business data A in partitioning direction 1 is 'a', and the domain feature in partitioning direction 2 is 'b', then the attribute information of the business data in the first business includes features a and features b. Optionally, the attribute information of the business data in the first business consists of features from all domains to which the business data in the first business belongs.
[0068] In some embodiments, during the process of customizing the model of the first service, it is necessary to use business data of multiple first services, and there are at least two first services whose attribute information is not completely the same.
[0069] In some embodiments, the computer device synchronously acquires the service data and attribute information of the first service. For example, if the computer device is a server, the terminal device sends the service data and attribute information of the first service to the server. As another example, if the computer device is a terminal device, the user uploads the service data and attribute information of the first service to a target application running on the terminal device.
[0070] In other embodiments, the computer device acquires the service data and attribute information of the first service step by step. In this case, the computer device may first receive attribute information K, and then receive n pieces of service data of the first service, where n is a positive integer. The attribute information of the aforementioned n pieces of service data of the first service is all attribute information K. This method helps to save the transmission resources used by the receiving computer device in the process of acquiring the attribute information of the service data of the first service.
[0071] Optionally, the attribute information of the business data of the first business can be determined based on the source of the business data of the first business. For example, if the target application is used to score spoken audio, and the source of the business data of a certain first business is region 1, school 1, and question type 1, then the attribute information of the business data of the first business includes region 1, school 1, and question type 1.
[0072] During the process of uploading business data for the first business, users can annotate the attribute information of the business data for the first business so that the target application can obtain the attribute information of the business data for the first business.
[0073] In some embodiments, the attribute information of the business data of the first service is manually entered by the user.
[0074] To ensure that the attribute information format of the business data of the first service is uniform, to avoid the occurrence of unrecognizable attribute information, and to improve the convenience of user operation, in some embodiments, the target application provides features of at least one candidate domain corresponding to each division direction. The target application generates the attribute information of the business data of the first service based on the features of at least one candidate domain selected by the user.
[0075] Optionally, the computer device may also use the attribute information of the business data of the first service as an index to store the business data of at least one first service.
[0076] Step 220: Obtain a basic model library containing at least one pre-trained basic model; wherein the basic models included in the basic model library are in a tree structure, and the applicable fields of the basic model corresponding to the parent node of the tree structure include the applicable fields of the basic models corresponding to the child nodes of the parent node.
[0077] The base model refers to the machine learning model. The base model can be a machine learning model designed based on any network structure such as convolutional neural networks or long short-term memory neural networks. This application does not limit the structure of the base model.
[0078] In some embodiments, the base model library includes multiple pre-trained base models; wherein at least two base models have different generalization capabilities.
[0079] In some embodiments, the generalization ability of a base model is used to characterize the applicable domain of the base model. In some embodiments, the stronger the generalization ability of a base model, the wider the scope of its applicable domain; the weaker the generalization ability of a base model, the narrower the scope of its applicable domain.
[0080] In some embodiments, the base model is pre-trained on different datasets, so that the generalization ability of different base models is not exactly the same. Pre-training methods for the base model include, but are not limited to: supervised pre-training (training based on labeled data), semi-supervised pre-training (training based on partially labeled and unlabeled data), unsupervised pre-training (training based on unlabeled data), or some zero-shot or few-shot pre-training frameworks, such as meta-learning frameworks.
[0081] During pre-training, the model parameters in the base model can be adjusted using backpropagation. The pre-training method for the base model can be determined according to actual needs, and this application is not limited thereto. The pre-training process of the base model can be completed using computer equipment or other equipment, and this application is not limited thereto either.
[0082] By utilizing these pre-trained base models for model customization, we can obtain prior knowledge from a wide range of fields, providing a solid foundation for the model customization process.
[0083] In some embodiments, the applicable domain of the base model refers to the domain to which the business data that the base model can process belongs. The base model can achieve better processing results when processing business data within its applicable domain.
[0084] In some embodiments, the applicable domain of the first basic model and the domain to which the business data of the first business pertains overlap or are equivalent.
[0085] Suppose that the domain of the business data of the first business overlaps with the domain of at least one candidate basic model in the basic model library, then the computer device can use the candidate basic model with the greatest overlap between the domain of application and the business data of the first business as the first basic model.
[0086] In some embodiments, the computer device selects a first basic model from a basic model library based on the attribute information of the business data of the first service. For details of this process, please refer to the embodiments below. The computer device then customizes the first basic model.
[0087] In some embodiments, the applicable domain of the base model includes at least one subdomain, with different subdomains originating from different division directions.
[0088] In some embodiments, multiple base models are stored hierarchically in a base model library. Optionally, the storage level of a base model is related to the applicable domain of the base model. In one possible implementation, the storage level of a base model with a larger applicable domain is higher than the storage level of a base model with a smaller applicable domain.
[0089] In some embodiments, different storage levels correspond to different partitioning directions. For example, storage level 1 is related to partitioning direction 1, and storage level 2 is related to partitioning direction 2. If there are multiple basic models in storage level 1, then at least two basic models will have different subdomains corresponding to partitioning direction 1.
[0090] For example, storage level 1 stores 3 basic models, where basic model E corresponds to subdomain 1 in partitioning direction 4 (partitioning direction 4 is divided according to regions), basic model F corresponds to subdomain 1 in partitioning direction 4, and basic model G corresponds to subdomain 2 in partitioning direction 4; where subdomain 1 and subdomain 2 belong to different regions.
[0091] In some embodiments, the basic models included in the basic model library are arranged in a tree structure, which includes at least one node. Nodes at two adjacent levels are respectively a parent node and a child node. A parent node may correspond to one or more child nodes, and a child node has only one parent node.
[0092] In some embodiments, the parent node is located above the child nodes. The topmost node in a tree structure is called the root node, which has no parent node; the bottommost node in a tree structure is called a leaf node, which has no child nodes.
[0093] In some embodiments, the applicable domain of the base model corresponding to the parent node is greater than or equal to the applicable domain of the base model corresponding to the child node. For example, there are three division directions: region, school, and question type. For base model C, the applicable domain of base model C includes region a, school b, and question type c.
[0094] When the base model C has a parent node in the tree structure, the applicable scope of the base model D corresponding to the parent node is greater than that of the base model C.
[0095] Optionally, the scope of at least one sub-domain of the applicable domain of the basic model corresponding to the parent node is greater than the scope of the corresponding sub-domain of the applicable domain of the basic model D. For example, if the applicable domain of the basic model D includes region a1, school b1, and question type c1, then the scope of a1 is greater than the scope of a, the scope of b1 is greater than the scope of b, or the scope of c1 is greater than the scope of c. At least one of the above three equal relationships exists.
[0096] It is easy to understand from the above that in a tree structure, the basic model corresponding to the root node has the widest applicability, that is, the model stored in the root node has the strongest generalization ability, while the basic model corresponding to the leaf node has the narrowest applicability.
[0097] For example, in a tree structure of a certain basic model library, the applicable scope of the basic model corresponding to the root node is xx province, and the applicable scope of the basic model corresponding to node A is yy city of xx province, and the applicable scope of the basic model corresponding to node B is zz district of yy city of xx province.
[0098] Optionally, the base model corresponding to the leaf nodes of the tree structure has a strong ability to process business data in a certain domain, but a weaker ability to process business data in other domains. In some embodiments, the tree structure has multiple leaf nodes, wherein the applicable domains of the base models corresponding to the multiple leaf nodes are not completely the same.
[0099] It should be noted that the applicable fields of the basic models corresponding to the nodes of different storage levels in the tree structure are set according to actual needs, and this application does not limit them here.
[0100] In some embodiments, in addition to storing the base model, the nodes of the tree structure also store the attribute information of the base model. The attribute information of the base model is used to characterize the characteristics of the applicable domain of the base model. In some embodiments, the attribute information of the base model is similar to the attribute information of the business data of the first service; please refer to the introduction on the attribute information of business data for details, which will not be repeated here.
[0101] Step 230: Based on the attribute information of the business data of the first business, determine the basic model corresponding to the first node that meets the specified conditions from the tree structure, and use it as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes or is equivalent to the field to which the business data of the first business belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first business belongs, or the first node does not have a child node with a corresponding basic model.
[0102] In some embodiments, the computer device starts from the bottom of the tree structure and searches layer by layer until the first basic model is determined.
[0103] In some embodiments, the computer device selects a first basic model from the model database based on the attribute information of the business data of the first service, including determining a first leaf node from the leaf nodes of the tree structure; wherein, if the applicable domain of the basic model corresponding to the first leaf node overlaps with the domain of the business data of the first service, the computer device determines a first parent node corresponding to the first leaf node; if the applicable domain of the basic model corresponding to the first parent node overlaps with the domain of the business data of the first service, the computer device continues to determine the parent node corresponding to the first parent node until the computer device finds the first node; the computer device uses the basic model corresponding to the first node as the first basic model.
[0104] In some embodiments, the overlap between the basic model corresponding to a node and the domain to which the business data of the first service belongs means that, in the division direction corresponding to the node, the domain to which the business data of the first service belongs is less than or equal to the applicable domain of the basic model corresponding to the node.
[0105] In other embodiments, the various basic models included in the basic model library are in a nested structure, where a nested structure means that an upper-level node includes at least one lower-level node.
[0106] Using a tree structure to store multiple basic models in the basic model library helps to speed up the selection of the first basic model with the attribute information of the first business data from the basic model library, and helps to improve the efficiency of model customization.
[0107] Step 240: Using the business data of the first business, perform customized training on the first basic model to obtain a first customized model suitable for the first business.
[0108] The computer equipment uses the business data from the first business to perform customized training on the first basic model.
[0109] The customized training method for the first base model can be the same as or different from the pre-training method for the first base model. The customized training method for the first base model is set according to actual needs, and this application does not impose any restrictions on it.
[0110] In some embodiments, in addition to acquiring the service data and attribute information of the first service, the computer device can also acquire the tags of the service data of the first service. These tags can be used as labels for customized training of the first base model. That is, the tags of the service data of the first service participate in the calculation of the training loss of the first base model.
[0111] In some embodiments, during customized training, the computer device inputs the business data of the first service into the first base model, and obtains the output information (equivalent to the model prediction result) obtained by the first base model processing the business data of the first service. Optionally, customized training is also called model customization. Using this output information and the labels of the business data of the first service, the training loss of the first base model is determined so that the model parameters in the first base model can be adjusted. The customized training process can be understood as fine-tuning the first base model according to the business data of the first service.
[0112] In other embodiments, during the customized training process, the computer device uses the business data of the first service to perform unsupervised or metadata training on the first base model to obtain the first customized model.
[0113] The first customized model is obtained by fine-tuning the first basic model, which helps to speed up the model customization process.
[0114] In some embodiments, the computer device acquires business data of x first services, and selects y first services' business data from the business data of multiple first services to perform customized training on the first basic model, where x and y are positive integers.
[0115] In one example, x and y are equal, meaning that the computer device uses business data from the first business with the same attribute information to train the first basic model.
[0116] In another example, y is less than or equal to x, meaning that the computer device selects at least one piece of business data from the business data of the first business with the same attribute information for updating the first basic model.
[0117] Optionally, the computer device can use business data from the first business that was not involved in the training as test data to test the first customized model obtained after customized training. If the test data is unlabeled, the computer device can send the test data to a worker and obtain the label for the test data provided by the worker. This method helps to avoid overfitting of the first customized model after customized training.
[0118] The first customized model refers to a model whose scope of application includes the scope of the business data of the first business. Optionally, the scope of application of the first customized model is equivalent to the scope of the business data of the first business. After obtaining the first customized model, if it is necessary to process other data of the first business, the computer equipment can select the first customized model to process the aforementioned other data.
[0119] In summary, computer equipment can determine the base model used in the model customization process based on the attribute information of business data. This eliminates the need for manual intervention in the model customization process, enhancing the automation of the machine learning pipeline and improving the efficiency of model customization. During model customization, the base model is fine-tuned using business data from the first business segment to obtain a customized model. This allows the base model to flexibly adapt to different business data, improving its adaptability to business data across various domains.
[0120] On the other hand, the basic models are stored in a tree structure in the basic model library, which helps to speed up the search for basic models suitable for the business data of the first business. Since the applicable domains of the basic models determined from the basic model library include the domains to which the business data of the first business belongs, fine-tuning the first basic model to obtain customized models helps to improve the processing capabilities of the customized models for the business data of the first business.
[0121] In some embodiments, after the computer device uses the business data of the first business to perform customized training on the first basic model and obtains a first customized model suitable for the first business, the method further includes: the computer device adding the first customized model as a child node of the first node to the tree structure.
[0122] In some embodiments, after obtaining the first customized model, the computer device stores the first customized model in a tree structure. Optionally, the computer device creates a node in the tree structure for storing the first customized model (the node is a leaf node in the attribute structure) and sets the node as a child node of the first node.
[0123] Figure 3 This is a schematic diagram of a tree structure provided in an exemplary embodiment of this application. Figure 3 As shown, the basic models with a wider range of applications are stored in the upper layer of the tree structure.
[0124] In some embodiments, the base model in the base model and the customized models corresponding to at least one base model are stored in a tree structure in the full database. The tree structure corresponding to the full model library is based on the tree structure corresponding to the base model library, with the addition of leaf nodes for storing customized models.
[0125] By storing the first customized model in the child nodes of the first node, it is easier to quickly find the first customized model corresponding to the first basic model.
[0126] In some embodiments, the base model has a training dataset, a test dataset, and a business dataset, wherein the training dataset is used to train the base model; the test dataset is used to test the trained base model; and the business dataset is used to store business data. Optionally, the business data includes business data from a first business and business data from other businesses.
[0127] Training data can have labels, which can be manually assigned. For example, if the training data consists of spoken audio, the label could be the degree of accuracy of the spoken audio as assessed by the human. In this case, the label can be represented numerically. The higher the numerical value of the label, the more accurate the pronunciation of the spoken audio. Alternatively, if the training data consists of image data, the label could be the name of the target object in the image data.
[0128] It should be noted that the format of the labels in the training data can be set according to actual needs, and this application does not impose any restrictions on it.
[0129] In some embodiments, the training data in the training dataset, the test data in the test dataset, and the business data in the business dataset are stored in the same database (i.e., the base model database corresponding to the base model), and the indices corresponding to data belonging to different datasets are different. The computer device can then retrieve data belonging to different datasets from the model database based on the indices.
[0130] Optionally, at least one model stored in the basic model library corresponds to a model database.
[0131] In other embodiments, the training data in the training dataset, the test data in the test dataset, and the business data in the business dataset can be stored in different databases. It should be noted that the storage method for the training data in the training dataset, the test data in the test dataset, and the business data in the business dataset is determined according to actual needs, and this application does not impose any limitations on this method.
[0132] In some embodiments, after determining the first basic model that needs to be pre-trained based on the attribute information of the business data of the first service, the computer device stores the business data of the first service in the test dataset corresponding to the first basic model.
[0133] In some embodiments, the data included in the training dataset, test dataset, and business dataset can change dynamically. As the target application continuously processes the business data, the data in the business dataset increases, and the distribution of business data belonging to different businesses in the model database may change. In this case, the computer device can transform the data in the training dataset, test dataset, and business dataset to maintain a uniform data distribution in the model database.
[0134] In some embodiments, when the business dataset meets the transformation conditions, the computer device filters the business data in the business dataset and transforms the filtered business data into the test dataset in the model database.
[0135] Transformation criteria are used to measure when business data needs to be transformed. In some embodiments, transformation criteria relate to the gap between the distribution of data in the training dataset and the distribution of data in the business dataset.
[0136] Taking a business dataset as an example, the distribution of business data in the business dataset refers to the proportion of business data with different attribute information. When the distribution of business data in the business dataset differs significantly from the distribution of test data in the test dataset, the computer equipment needs to adjust the data distribution in the test dataset to reduce the difference between the two datasets.
[0137] In some embodiments, the computer device uses statistical methods or mathematical modeling to select at least one piece of business data from the business dataset, deletes the selected business data from the business dataset, and converts the selected business data into training data, which is then stored in the storage space corresponding to the training dataset.
[0138] In one example, if the difference between the data distribution in the business dataset and the data distribution in the training dataset is greater than or equal to the balance limit, the computer device will select at least one business data point from the business dataset and convert the selected business data into training data. For example, if the proportion of business data for business 1 stored in the business dataset is 70% and the proportion of business data for business 2 stored in the test dataset is 30%, and the balance limit is 5%, then the data distribution difference between the two datasets is 40%, exceeding the balance limit. Therefore, the computer device needs to convert at least one business data point for business 1 from the business dataset to the test dataset for storage.
[0139] In other embodiments, the conversion condition is related to the amount of business data in the business dataset. When the amount of business data in the business dataset is greater than or equal to a quantity threshold, the computer device filters out at least one piece of business data from the business dataset.
[0140] In this situation, the computer device can use statistical methods or mathematical modeling to select at least one piece of business data from the business dataset, or it can randomly select at least one piece of business data from the business dataset.
[0141] In some embodiments, the training data in the training dataset needs to have labels. When the computer device selects labeled business data from the business dataset, the computer device directly converts that business data into training data.
[0142] If the business data selected by the computer device from the business data does not have a tag, the computer device needs to determine the tag for the business data. In one example, the computer device sends the business data to a worker, who then manually determines the tag corresponding to the business data.
[0143] In another example, a computer device determines the label of the business data using a machine learning model; this machine learning model can be a base model in a basic database, a customized model, or a machine learning model specifically designed to predict the labels of business data. The method for determining the labels of business data can be set according to actual needs, and this application does not impose any limitations on it.
[0144] On the one hand, by transforming business data in the business dataset into data in the test dataset, the training data in the training dataset can be dynamically changed according to actual business needs, thus improving the flexibility of the model customization method.
[0145] On the other hand, as the amount of business data in the business dataset continues to grow, the amount of business data in the business dataset is kept stable by transforming the business data. This enables computer equipment to automatically maintain the training dataset, test dataset, and business dataset of the model without human intervention in the model customization process, thus improving the independence of the model customization method.
[0146] In some embodiments, the model customization method further includes: when the condition for periodic model updates is met, the computer device determines at least one second basic model from the basic model library; the computer device updates the at least one second basic model to obtain at least one updated second basic model.
[0147] In some embodiments, in order to improve the adaptability of at least one basic model contained in the basic model library to different types of business data at different times, the computer device needs to update at least one basic update in the basic model library.
[0148] In some embodiments, the periodic model update condition is used to determine when to update the second base model. The second base model can be any base model in the base model library that satisfies the periodic model update condition.
[0149] In some embodiments, the periodic update condition for the model is related to a time interval. In one embodiment, the periodic update condition is related to the time interval between the current moment and the moment when the second base model was last updated. For example, if the periodic update condition is 20 days, the computer device updates the base model when the time interval between the last update of the second base model and the current moment is greater than or equal to 20 days.
[0150] In other embodiments, the periodic update conditions of the model are related to the training dataset of the second base model. Optionally, the periodic update conditions of the model are not entirely the same if the first base model belongs to a different level in the tree structure.
[0151] In one example, the periodic update condition is related to the amount of training data in the training dataset of the second base model. When the amount of training data in the training dataset exceeds the threshold corresponding to that level, the computer device updates the second base model.
[0152] In another example, the condition for periodic model updates is related to the data distribution in the training dataset of the second base model. When the data distribution in the training dataset differs significantly from the data distribution in the business dataset of the second base model, the computer device updates the second base model.
[0153] In some embodiments, the computer device updates at least one second base model to obtain at least one updated second base model, including: for a target base model among the at least one second base model, the computer device acquires a target training dataset for automatically updating the target base model; wherein, when a node corresponding to the target base model has child nodes, the target training dataset includes a training dataset of the base model corresponding to at least one child node; the computer device uses the training data in the target training dataset to automatically update the target base model at regular intervals to obtain an updated target base model; and when the target base model has a corresponding target customized model, the computer device obtains an updated target customized model based on the updated target base model; wherein the target customized model is obtained by customizing and updating the target base model.
[0154] For details regarding tree structures, please refer to the embodiments described above; this application will not elaborate further.
[0155] The target base model is any one of at least one second base model. When an update to the target base model is required, the computer device needs to determine a target training dataset for periodically updating the target base model. In some embodiments, if a node corresponding to the target base model in a tree structure (i.e., the node is the parent node) has at least one child node, the computer device determines that the node has at least one target child node and determines the target training dataset based on the training dataset of the base model corresponding to the at least one target child node.
[0156] For example, the target base model corresponds to node a in the tree structure. Node a has two child nodes, namely target byte node b and target child node c. Target byte node b corresponds to base model B, and target child node c corresponds to base model C. Base model B has training dataset 1, and base model C has training dataset 2. Then the target training dataset of the target base model can include any one of the training datasets 1 and 2.
[0157] Optionally, the computer device filters the training datasets of the base models corresponding to at least one target sub-node to obtain the target training data in the target training dataset.
[0158] The computer equipment periodically updates and trains the target base model based on the target training dataset to obtain an updated target base model. The training method for periodic updates can be any existing training method; this application does not specify one.
[0159] For example, if the target training data in the target training dataset has labels, the computer device can use supervised learning methods to periodically update the target base model. If the target training data in the target training dataset has partial labels, the computer device can perform semi-supervised or unsupervised training on the target base model.
[0160] In some embodiments, the computer device obtains the labels of the training data in the target training dataset from staff or users. In some embodiments, after determining the target base model, the computer device determines whether the target base model has a target customized model.
[0161] Optionally, the computer device determines whether the target basic model has at least one target customized model through the tree structure of the basic model library. In the tree structure, if the node corresponding to the target basic model is the parent node, and at least one child node of the parent node corresponds to a customized model, then it is said that the target basic model has a target customized model.
[0162] If the node corresponding to the target base model is a child node, then the target base model does not have a target customized model. If the node corresponding to the target base model is a parent node, then the models corresponding to the child nodes of that parent node are all base models. Therefore, the target base model does not have a target customized model.
[0163] When the target base model has a target customization model, the computer equipment periodically updates the target customization model to obtain the updated target customization model. After obtaining the updated target base model, the computer equipment uses business data from the business dataset of the target customization model to fine-tune the updated target base model to obtain the updated target customization model.
[0164] In some embodiments, the fine-tuning process is similar to the process of pre-training the first base model to obtain the first customized model in the above embodiments. Please refer to the above embodiments for details, which will not be repeated here.
[0165] In one embodiment, the computer device needs to determine when to update the first base model. The periodic update conditions are related to the time interval and the training dataset of the first base model. For example, the training dataset of the second base model is updated at fixed time intervals to obtain an updated training dataset. After obtaining the updated training dataset, the computer device determines whether to update the second base model based on the dataset corresponding to the second base model. The dataset corresponding to the first base model includes at least one of the following: the training dataset of the first base model, the test dataset of the first base model, and the business dataset of the first base model.
[0166] In some embodiments, the computer device determines whether to update the first basic model based on the dataset corresponding to the first basic model, including: the computer device determining the subdomain to be updated, and if the applicable domain of the first basic model includes the subdomain to be updated, the computer device updates the first basic model.
[0167] In this scenario, the computer device first updates the training database of the basic models in the basic model library. Then, the computer device determines the timed update conditions corresponding to different levels of the tree structure. When the total amount of training data in a subdomain corresponding to a certain level is greater than or equal to the update threshold, the computer device takes that subdomain as the subdomain to be updated and updates any basic model corresponding to the subdomain to be updated.
[0168] In some embodiments, the computer device updates the first base model to obtain an updated first base model; based on the updated first base model, an updated first customized model is obtained, including: fine-tuning the updated first base model to obtain an updated first customized model.
[0169] In some embodiments, during the fine-tuning process, the computer device inputs the business data of the first service corresponding to the first customized model into the updated first base model to obtain the model prediction result of the business data of the first service, and adjusts the model parameters of the updated first base model according to the model prediction result and the label of the business data of the first service.
[0170] After the basic model is updated, updating the corresponding customized model synchronously helps the customized model adapt to changes in business data.
[0171] The following example illustrates the update process of the second base model. In this embodiment, the data is updated periodically as follows: the model database of the base model corresponding to the base model is updated every 20 days. The transformation condition is that the distribution of business data of a certain business in the training dataset and business dataset of a certain business in a certain model database is unbalanced. The model is updated periodically when the amount of data in the training dataset of the updated model database is greater than a data threshold.
[0172] After 20 days or more since the last model database update, the computer equipment updates the model databases corresponding to at least one basic model in the basic model library. For any basic model, if there is a significant difference in the distribution of business data for a certain business in the training dataset and the business data in the model database of that basic model, then the model database of that basic model is updated.
[0173] The computer device filters out at least one piece of business data from the business dataset, transforms the at least one piece of business data into the training dataset (or test dataset), and deletes the at least one piece of business data from the business dataset in order to complete the update of the model database.
[0174] After the computer device receives the updated model database, it determines whether to update the base model based on the changes in the amount of data in the updated training dataset.
[0175] In some embodiments, the method for running a machine learning pipeline further includes: a computer device acquiring a first test dataset and a second test dataset; wherein the first test dataset is obtained based on the training dataset of at least one base model, and the second test dataset is obtained based on business data of at least one first business; the computer device uses the first test dataset to perform automated testing on the updated target base model to obtain the test results of the updated target base model; and the computer device uses the target test dataset to perform automated testing on the updated first customized model to obtain the test results of the updated target customized model.
[0176] In some embodiments, the training dataset of the base model refers to the dataset used in the process of training the target base model. The training dataset of the target base model includes at least one training data set, and the training dataset of the target base model is stored in the model database of the target base model. Optionally, the computer device determines the first test dataset based on the second training dataset corresponding to at least one third base model. Optionally, the applicability of the third base model is less than or equal to the applicability of the target base model.
[0177] In some embodiments, in the tree structure of the base model library, the first node corresponds to the target base model, the second node corresponds to the third base model, and the first node is the parent node of the second node. Optionally, the first node has multiple child nodes, that is, the tree structure has multiple different second nodes. The computer device determines the training dataset and the first test dataset of the target base model based on the second training dataset of the third base model corresponding to each second node.
[0178] In some embodiments, the computer device acquires a third training dataset corresponding to at least one third base model, and determines i target training datasets from the plurality of third training datasets, where i is a positive integer; the computer device determines a first test dataset based on the i target training datasets; the computer device determines the training dataset of the target base model based on the training datasets that were not selected from the plurality of third datasets.
[0179] The first test dataset can include all training data from the i target training datasets. Alternatively, the first test dataset can include a portion of the training data from the i target training datasets.
[0180] In some embodiments, the computer device partitions multiple second training datasets to obtain a first test dataset and a first training dataset; wherein the first training dataset is used to train a first base model. For example, the computer device determines a target training dataset based on the first k second training datasets from the multiple second training datasets, and uses the remaining second training datasets as the first training dataset, where k is the number of positive frames. Another example is that the computer device selects r training data points from multiple second training models, and the first test data includes the aforementioned r training data points.
[0181] In some embodiments, the training data in the first training dataset can be dynamically changed, as detailed in the embodiments described above.
[0182] In other embodiments, when the first node is a leaf node, the second base model and the first base model are the same base model, and the computer device directly uses the test dataset of the first base model as the first test dataset.
[0183] After determining the first test data set, the computer device uses the first test dataset to test the model prediction accuracy of the updated first base model. Specifically, the computer device inputs the first test data in the first test dataset into the updated first base model, obtains the first prediction result of the first base model for the first test data, and determines the test result of the updated first base model based on the label of the first training data and the first prediction result.
[0184] If the test results of the updated first base model are within the acceptable error range, the computer device determines that the updated first base model has passed the automated test. If the test results of the updated first base model exceed the acceptable error range, the computer device determines that the updated first base model has failed the automated test. Optionally, the computer device may continue training the first base model until the updated first base model passes the automated test.
[0185] The method for automated testing of the updated first customized model is the same as the method for automated testing of the updated first base model; please refer to the embodiments above for details, which will not be repeated here. It should be noted that the allowable error range in the above embodiments is set according to actual needs, and this application does not limit it.
[0186] During the automated testing of the first customized model, the test dataset for the first customized model is related to the business dataset of the first customized model. If there is unlabeled business data in the business dataset, the computer equipment can obtain the labels for the business data through staff or users.
[0187] The process of automatically testing the updated first customized model is the same as the method of automatically testing the updated second base model; please refer to the embodiments above for details, which will not be repeated here. In some embodiments, when the computer device obtains the updated second customized model, the computer device performs automated testing on the updated second customized model. This process is also similar to the method of automatically testing the updated second base model; please refer to the embodiments above for details.
[0188] Figure 4 This is a schematic diagram of an automated testing process for a model provided in an exemplary embodiment of this application.
[0189] For automated testing of the base model, the computer device determines the first training dataset and the first test dataset of the first base model based on a genus tree structure. For the first base model a, the first training dataset and the first test dataset of the first base model a are determined by using the training datasets of the base model b corresponding to the parent node of the first base model a, which has at least one child node respectively.
[0190] like Figure 4 As shown, the training dataset corresponding to the Domain 1_x model is divided into a first training dataset and a first test dataset for the general model (equivalent to the first basic model mentioned above). Similarly, the training dataset corresponding to the Domain 2_x model is divided into a training dataset and a test dataset corresponding to the Domain 1_x model. It should be noted that the allowable error range in the above embodiments is set according to actual needs, and this application does not impose any limitations on it.
[0191] After the computer equipment updates the first base model, the updated first base model and the updated first customized model are tested to ensure that the updated first base model and the updated first customized model maintain an appropriate model prediction accuracy.
[0192] In some embodiments, the computer device updates the training dataset of the second base model before updating the first base model.
[0193] In some embodiments, the base model has a model database, which includes a training dataset for training the base model, a test dataset for testing the base model, and a business dataset adapted to the applicable domain of the base model. The method further includes: for any model database, under the condition of timely data update, selecting at least one target business data from the business dataset, transferring the at least one target business data to the training dataset or the test dataset to obtain an updated model database; and determining the applicable domain to be updated based on at least one updated model database; wherein the applicable domain to be updated overlaps with the applicable domain of the second base model.
[0194] In some embodiments, the data timing update condition is used to determine when the base model library corresponding to at least one base model is updated. The data timing update condition includes updating the training dataset in the base model library that meets the transformation condition at the update time.
[0195] Optionally, the scheduled update time is preset, or the computer device determines a scheduled update time at regular intervals. For details regarding the conversion conditions, please refer to the embodiments described above; they will not be repeated here.
[0196] Updating the test dataset in the base model database helps maintain a uniform data distribution within the base model database.
[0197] In some embodiments, before custom training a first base model using business data from a first business to obtain a first customized model suitable for the first business, the method further includes: determining a model customization strategy for the first business, wherein the model customization strategy is a first strategy or a second strategy, the first strategy being a strategy for fine-tuning based on a pre-trained base model, and the second strategy being a strategy for training a newly constructed model that has not been pre-trained; if the model customization strategy for the first business is the first strategy, the method begins by determining the base model corresponding to the first node that meets specified conditions from the tree structure based on the attribute information of the business data of the first business, and using it as the first base model; if the model customization strategy for the first business is the second strategy, the computer device uses the business data of the first business to train the newly constructed model that has not been pre-trained, and obtains a first customized model suitable for the first business.
[0198] In some embodiments, the model customization strategy includes a first strategy and a second strategy. The first strategy refers to determining a first basic model from a basic model library and fine-tuning the first basic model based on the business data of the first business.
[0199] The second strategy refers to training (and testing) a newly constructed model based on the business data of the first business to obtain a first customized model whose applicable domain matches the domain of the business data of the first business. In some embodiments, the newly constructed model refers to a model that has not been pre-trained, that is, the newly constructed model is not a base model in the base model library.
[0200] In some embodiments, the model structure of the newly constructed model can be based on any type of network such as a convolutional neural network, a feedforward neural network, or a long short-term memory neural network. This application does not limit the model structure of the newly constructed model.
[0201] Optionally, the computer device can select a reference base model from the base model library and reset the model parameters in the reference base model to obtain a newly constructed model. For example, based on the attribute information of the business data of the first business, the computer device selects a reference base model from the base model library that matches the attribute information of the business data of the first business, and resets the model parameters of the reference base model to obtain a newly constructed model.
[0202] In some embodiments, the computer device determines a model customization strategy for the first service based on the acquired service data of the first service. For example, the computer device determines the model customization strategy for the first service based on the attribute information of the service data of the first service. Optionally, the computer device determines the model customization strategy for the first service based on statistical knowledge or modeling.
[0203] For example, a computer device determines a model customization strategy for a first business based on the attribute information of the business data. If a basic model exists in the basic model library with the same applicable domain as the business data of the first business, the computer device will use the first strategy as the model customization strategy for the first business. Since the applicable domain of the basic model is the same as that of the business data of the first business, high accuracy can be achieved by only fine-tuning the model parameters of the basic model. This method helps to reduce the time spent on the model customization process.
[0204] For example, a computer device determines a model customization strategy for a first business based on the amount of business data acquired. If the amount of business data for the first business is less than or equal to a fine-tuning threshold, the computer device uses the first strategy as the model customization strategy for the first business; if the amount of business data for the first business is greater than or equal to the fine-tuning threshold, the computer device uses the second strategy as the model customization strategy for the first business. Since the second strategy requires a larger amount of business data from the first business to train the newly constructed model from scratch, choosing the second strategy as the model customization strategy for the first business when the amount of business data for the first business is greater than or equal to the fine-tuning threshold helps improve the training effect of the newly constructed model and improves the accuracy of the resulting customized model in processing business data in the applicable domain.
[0205] For example, the computer equipment determines the model customization strategy for the first service based on the amount of data in the tags of the first service's business data. When the amount of data in the tags of the first service's business data is small, the computer equipment uses the first strategy as the model customization strategy for the first service; when the amount of data in the tags of the first service's business data is large, the computer equipment uses the second strategy as the model customization strategy for the first service.
[0206] Given the large amount of data in the labels of the business data in the first business, the process of generating model prediction results during model training, and calculating the loss function and adjusting model parameters based on the model prediction results and the labels of the business data, requires a lot of computation. In this case, pre-training the basic model can speed up the model customization process.
[0207] For example, a computer device determines a model customization strategy for a first service based on the distribution of attribute information of the service data. Suppose the computer device obtains attribute information for m pieces of service data from the first service, and these m attributes include n similar attributes, where m and n are positive integers, and n is close to m. In this case, the distribution of attribute information for the m pieces of service data from the first service is relatively concentrated. The computer device can then use a second strategy as the model customization strategy for the first service.
[0208] By setting different model customization strategies, the model customization strategy can be selected according to the actual situation of the primary business of the computer equipment, which helps to improve the adaptability of the machine learning pipeline to different situations.
[0209] Figure 5 This is a schematic diagram of a model update method provided in an exemplary embodiment of this application.
[0210] like Figure 5 The aforementioned methods for updating the basic model include two approaches: model customization and scheduled updates.
[0211] During model customization, the computer equipment updates the first basic model based on the business data of the first business. Optionally, during model customization, the computer equipment can also first determine the customization strategy for the first business based on factors such as the attribute information or the amount of data labeled in the business data of the first business. The computer equipment can fine-tune the first basic model in the basic model library to obtain the first customized model. Alternatively, the computer equipment can determine a newly constructed model and train it using the business data of the first business to obtain a target model whose applicable scope includes the domain to which the business data of the first business belongs.
[0212] During the periodic model update process, the computer device can determine the domain to be updated based on the quantity and distribution of data belonging to different domains. It then updates at least one base model applicable to the domain to be updated, resulting in an updated base model. If a customized model exists corresponding to the updated base model, the computer device fine-tunes the updated base model to obtain an updated customized model.
[0213] For a detailed description of the above process, please refer to the above embodiment; it will not be repeated here.
[0214] In some embodiments, the computer device acquires business data of a second service to be predicted by the model, as well as attribute information of the business data of the second service. The attribute information of the business data of the second service is used to indicate the characteristics of the domain to which the business data of the second service belongs. The computer device selects a target model from a full model library that matches the attribute information of the business data of the second service. The full model library includes various basic models and customized models generated based on the basic models. The computer device uses the target model to process the business data of the second service and obtains the model prediction result.
[0215] In some embodiments, the second service refers to the service to which the target application belongs in processing the business data during model prediction. The definition of the second service is the same as that of the first service; please refer to the above embodiments for details, which will not be repeated here.
[0216] Optionally, the second service and the first service can be the same service. In scenarios where model prediction results need to be provided to the user, the type of the second service is determined based on the attribute information of the service data obtained by the computer device. If the attribute information of the service data of the second service obtained by the computer device is the same as the attribute information of the service data of the second service mentioned above, then the first service and the second service belong to the same service. For example, both the first service and the second service are scoring spoken audio recordings from a certain school. The first service and the second service can also be different services.
[0217] The attribute information of the business data of the second service is defined in the same way as the attribute information of the data of the first service. Please refer to the above embodiment for relevant content, which will not be repeated here.
[0218] In some embodiments, the full model library includes basic models from the base model library and customized models generated based on the basic models. In some embodiments, the basic models and customized models included in the full model library are in a tree structure. The computer device determines, layer by layer, the target model that matches the attribute information of the business data of the second service, based on the attribute information of the business data of the second service. The applicable domain of the target model is the same as the domain to which the business data of the second service belongs, or the applicable domain of the target model includes the domain to which the business data of the second service belongs.
[0219] The target model can be a base model from the base model library, or a customized model obtained through model customization methods. If the target model is a base model, there is no corresponding customized model for that base model.
[0220] In some embodiments, the machine learning pipeline operation method provided in this application is mainly divided into online scenarios and offline private deployment scenarios. The difference between the two is that the base model in the private deployment scenario is not updated periodically, and a fixed base model library is used. In the private deployment scenario, the computer device can be a terminal device. The terminal device selects a first base model from the base model library based on the attribute information of the business data of the first service. For example, the terminal device determines the target model by searching from top to bottom in the tree structure of the base model library based on the attribute information, uses the target model to predict the business data of the second service to generate model prediction results, and returns the model prediction results to the user.
[0221] Determining the target model by using the attribute information of the second business data helps to improve the level of automation in the second business process.
[0222] The following section uses the application scenario of oral assessment as an example to introduce and explain the operation process of the machine learning pipeline.
[0223] Figure 6 This is a schematic diagram illustrating the operation of a machine learning pipeline for an application process provided in an exemplary embodiment of this application.
[0224] In one example, the machine learning pipeline operates within the business execution process, primarily including the following steps:
[0225] Step 1. The computer device obtains the attribute information of the first business data uploaded by the user. The first business refers to the model customization business. In the application scenario of spoken language scoring, the business data of the first business belongs to spoken language audio. The tag of the business data of the first business refers to the human score of the spoken language audio. In one example, the user uploads the business data of the first business, the attribute information of the business data of the first business, and the tag of the business data of the first business simultaneously.
[0226] Figure 7 This is a schematic diagram of the service data for uploading the first service provided in an exemplary embodiment of this application.
[0227] The interface for uploading business data for the first service is as follows: Figure 7 As shown. Optionally, users can upload multiple spoken audio recordings in batches, along with the attribute information and human scores for each audio recording.
[0228] Step 2. The computer equipment performs a model customization process based on the attribute information of the business data of the first service. The computer equipment determines the first basic model based on the attribute information of the business data of the first service. Then, using the obtained business data of the first service, it customizes the first basic model to obtain the first customized model.
[0229] Figure 8 This is a schematic diagram of a data upload page provided in an exemplary embodiment of this application.
[0230] The interface diagram during the model customization process is shown in Figure 800. Optionally, users can query the model customization status of multiple base models based on attribute information. Model status includes various options, such as customization in progress, customization complete, model update after new data updates, and waiting for customization.
[0231] Step 3. Perform automated testing on the first customized model, or manually review the first customized model to ensure its rationality.
[0232] Step 4. The computer device obtains the business data of the second service uploaded by the user and the attribute information of the business data of the second service.
[0233] Figure 9 This is a schematic diagram of the service data for uploading a second service provided in an exemplary embodiment of this application. The schematic diagram of the service data for uploading a second service is shown at 900.
[0234] Step 5. The computer equipment determines the target model from the full database based on the attribute information of the business data of the second business, and determines the model prediction result (speech audio score) of the business data of the second business through the target model.
[0235] Step 6. The computer device returns the model prediction results of the business data of the second service to the user. Figure 10 This is a schematic diagram illustrating the display effect of model prediction results provided in an exemplary embodiment of this application. A schematic diagram of the uploaded second service's business data is shown in Figure 1000.
[0236] Figure 11 This is a schematic diagram of a machine learning pipeline operation method provided in another exemplary embodiment of this application.
[0237] related Figure 11 Please refer to the above embodiment for details, which will not be repeated here. It should be noted that the order of steps 1-6 is not fixed. For example, steps 4-6 may occur before steps 1-3. This embodiment only describes the operation process of a machine learning pipeline and does not imply a limitation on the order of steps 1-6. In fact, since the machine learning pipeline operation method provided in this application can be automatically maintained by computer equipment over a relatively long period without manual intervention, several model customization processes and several model prediction result generation processes can occur during this period. From different points in time, the order of steps 1-6 is not entirely the same.
[0238] The above methods enable continuous model training, continuous testing, and automated deployment. Computer equipment can automate model customization, testing, and deployment to meet diverse business needs, effectively reducing manual intervention and significantly improving efficiency in responding to different business requirements.
[0239] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0240] Figure 12 A block diagram of an apparatus for running a machine learning model provided in an exemplary embodiment of this application is shown. This apparatus can be implemented as all or part of a computer device through software, hardware, or a combination of both. The apparatus 1200 may include: an information acquisition module 1210, a model acquisition module 1220, a model determination module 1230, and a model customization module 1240.
[0241] The information acquisition module 1210 is used to acquire the attribute information of the business data of the first business, and the attribute information of the business data of the first business is used to indicate the characteristics of the domain to which the business data of the first business belongs.
[0242] The model acquisition module 1220 is used to acquire a basic model library that stores at least one pre-trained basic model; wherein, the basic models included in the basic model library are in a tree structure, and the applicable field of the basic model corresponding to the parent node of the tree structure includes the applicable field of the basic model corresponding to the child node of the parent node.
[0243] The model determination module 1230 is used to determine, based on the attribute information of the business data of the first service, the basic model corresponding to the first node that meets specified conditions from the tree structure, as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes or is equivalent to the field to which the business data of the first service belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first service belongs, or the first node does not have a child node with a corresponding basic model.
[0244] The model customization module 1240 uses the business data of the first business to perform customized training on the first basic model to obtain a first customized model suitable for the first business.
[0245] In some embodiments, the apparatus 1200 further includes a model adding module, configured to add the first customized model as a child node of the first node to the tree structure.
[0246] In some embodiments, the apparatus 1200 further includes: an update determination module, configured to determine at least one second basic model from the basic model library when the model is periodically updated; and a model update module, configured to update at least one second basic model to obtain at least one updated second basic model.
[0247] In some embodiments, the model update module is configured to: obtain a target training dataset for automatically updating the target base model in the at least one second base model; wherein, when the node corresponding to the target base model has child nodes, the target training dataset includes training datasets of at least one base model corresponding to the child node; use the training data in the target training dataset to automatically update the target base model at regular intervals to obtain an updated target base model; and, when the target base model has a corresponding target customized model, obtain an updated target customized model based on the updated target base model; wherein, the target customized model is obtained by customizing and updating the target base model.
[0248] In some embodiments, the apparatus 1200 further includes: a dataset acquisition module, configured to acquire a first test dataset and a second test dataset; wherein the first test dataset is obtained based on the training dataset of at least one of the base models, and the second test dataset is obtained based on the business data of at least one of the first services; the updated target base model is automatically tested using the first test dataset to obtain the test results of the updated target base model; and the updated target customized model is automatically tested using the second test dataset to obtain the test results of the updated target customized model.
[0249] In some embodiments, the base model has a model database, which includes a training dataset for training the base model, a test dataset for testing the base model, and a business dataset adapted to the applicable domain of the base model. The device 1200 further includes: a data update module, configured to, for any model database, under the condition of timely data update, filter at least one target business data from the business dataset, transfer at least one target business data to the training dataset or the test dataset to obtain an updated model database; and determine the applicable domain to be updated based on at least one updated model database; wherein the applicable domain to be updated overlaps with the applicable domain of the second base model.
[0250] In some embodiments, the apparatus 1200 further includes: a strategy determination module, configured to determine a model customization strategy for the first service, wherein the model customization strategy is a first strategy or a second strategy, wherein the first strategy refers to a strategy of fine-tuning based on the pre-trained base model, and the second strategy refers to a strategy of training a newly constructed model that has not been pre-trained; if the model customization strategy for the first service is the first strategy, then the execution begins from the step of determining the base model corresponding to the first node that meets the specified conditions from the tree structure based on the attribute information of the service data of the first service, and using it as the first base model; if the model customization strategy for the first service is the second strategy, then the service data of the first service is used to train the newly constructed model that has not been pre-trained, thereby obtaining a first customized model suitable for the first service.
[0251] In some embodiments, the apparatus 1200 further includes: a result prediction module, configured to acquire business data of a second service to be predicted by the model, and attribute information of the business data of the second service, wherein the attribute information of the business data of the second service is used to indicate the characteristics of the domain to which the business data of the second service belongs; select a target model from a full model library that matches the attribute information of the business data of the second service, wherein the full model library includes each of the basic models and customized models generated based on the basic models; and process the business data of the second service using the target model to obtain a model prediction result.
[0252] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method-side embodiments, which will not be repeated here. The beneficial effects of the apparatus provided in the above embodiments can be found in the description of the method-side embodiments, which will not be repeated here either.
[0253] Figure 13 A structural block diagram of a computer device provided in an exemplary embodiment of this application is shown.
[0254] Typically, computer device 1300 includes a processor 1301 and a memory 1302.
[0255] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1301 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0256] Memory 1302 may include one or more computer-readable storage media, which may be tangible and non-transitory. Memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 1302 stores a computer program that is loaded and executed by processor 1301 to implement the machine learning pipeline operation methods provided in the above-described method embodiments.
[0257] This application also provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the machine learning pipeline operation method provided in the above-described method embodiments.
[0258] The computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM (Random Access Memory), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the above-mentioned types.
[0259] This application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the machine learning pipeline operation method provided in the above-described method embodiments.
[0260] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0261] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the business data involved in this application were all obtained (stored and used) under fully authorized conditions.
[0262] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for running a machine learning pipeline, characterized in that, The method includes: Obtain attribute information of the business data of the first service, wherein the business data of the first service is audio data or image data, and the attribute information of the business data of the first service is used to indicate the characteristics of the domain to which the business data of the first service belongs, wherein the characteristics of the domain include the name or domain number of the domain. Obtain a base model library containing at least one pre-trained base model; wherein the base models included in the base model library are in a tree structure, and the applicable domain of the base model corresponding to the parent node of the tree structure includes the applicable domain of the base model corresponding to the child node of the parent node. Based on the attribute information of the business data of the first service, a basic model corresponding to the first node that meets the specified conditions is determined from the tree structure and used as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes the field to which the business data of the first service belongs, or is the same as the field to which the business data of the first service belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first service belongs, or the first node does not have a child node with a corresponding basic model. Using the business data from the first service, the first basic model is trained in a customized manner to obtain a first customized model suitable for the first service.
2. The method according to claim 1, characterized in that, After using the business data of the first service to perform customized training on the first basic model to obtain a first customized model suitable for the first service, the process further includes: The first customized model is added as a child node of the first node to the tree structure corresponding to the full model library, which includes each of the basic models and customized models generated based on the basic models.
3. The method according to claim 1, characterized in that, The method further includes: Under the condition that the model is updated periodically, at least one second basic model is determined from the basic model library; At least one of the second basic models is updated to obtain at least one updated second basic model.
4. The method according to claim 3, characterized in that, The step of updating at least one of the second basic models to obtain at least one updated second basic model includes: For the target base model in the at least one second base model, a target training dataset for automatically updating the target base model is obtained; wherein, when the node corresponding to the target base model has child nodes, the target training dataset includes the training dataset of the base model corresponding to at least one child node. Using the training data in the target training dataset, the target base model is automatically updated at regular intervals to obtain the updated target base model. When the target base model has a corresponding target customization model, an updated target customization model is obtained based on the updated target base model; wherein, the target customization model is obtained by customizing and updating the target base model.
5. The method according to claim 4, characterized in that, The method further includes: Obtain a first test dataset and a second test dataset; wherein the first test dataset is obtained based on the training dataset of at least one of the base models, and the second test dataset is obtained based on at least one business data. The updated target base model is automatically tested using the first test dataset to obtain the test results of the updated target base model. The updated target customization model is automatically tested using the second test dataset to obtain the test results of the updated target customization model.
6. The method according to claim 3, characterized in that, The base model has a model database, which includes a training dataset for training the base model, a test dataset for testing the base model, and a business dataset adapted to the applicable domain of the base model. The method further includes: For any model database, under the condition of timely data update, at least one target business data is selected from the business dataset, and at least one target business data is transferred to the training dataset or the test dataset to obtain the updated model database. Based on at least one updated model database, determine the applicable domain to be updated; wherein the applicable domain to be updated overlaps with the applicable domain of the second base model.
7. The method according to claim 1, characterized in that, Before using the business data of the first service to perform customized training on the first basic model to obtain a first customized model suitable for the first service, the method further includes: Determine the model customization strategy for the first service. The model customization strategy is either a first strategy or a second strategy. The first strategy refers to a strategy of fine-tuning based on the pre-trained base model, and the second strategy refers to a strategy of training a newly constructed model that has not been pre-trained. If the model customization strategy for the first service is the first strategy, then the execution begins with the step of determining the basic model corresponding to the first node that meets the specified conditions from the tree structure based on the attribute information of the service data of the first service, and using it as the first basic model. If the model customization strategy for the first service is the second strategy, then the business data of the first service is used to train the newly constructed model that has not been pre-trained, so as to obtain a first customized model suitable for the first service.
8. The method according to claim 1, characterized in that, The method further includes: Obtain the business data of the second business to be predicted by the model, as well as the attribute information of the business data of the second business. The attribute information of the business data of the second business is used to indicate the characteristics of the domain to which the business data of the second business belongs. From the full model library, select a target model that matches the attribute information of the business data of the second business. The full model library includes each of the basic models and customized models generated based on the basic models. The target model is used to process the business data of the second business to obtain the model prediction results.
9. A machine learning pipeline operation device, characterized in that, The device includes: The information acquisition module is used to acquire attribute information of the business data of the first service, where the business data of the first service is audio data or image data. The attribute information of the business data of the first service is used to indicate the characteristics of the domain to which the business data of the first service belongs. The characteristics of the domain include the name or domain number of the domain. The model acquisition module is used to acquire a basic model library that stores at least one pre-trained basic model; wherein, the basic models included in the basic model library are in a tree structure, and the applicable field of the basic model corresponding to the parent node of the tree structure includes the applicable field of the basic model corresponding to the child node of the parent node. The model determination module is used to determine the basic model corresponding to the first node that meets the specified conditions from the tree structure based on the attribute information of the business data of the first business, and use it as the first basic model; wherein, the specified conditions include: the applicable field of the basic model corresponding to the first node includes the field to which the business data of the first business belongs, or is the same as the field to which the business data of the first business belongs, and the applicable field of the basic model corresponding to the child node of the first node does not include the field to which the business data of the first business belongs, or the first node does not have a child node with a corresponding basic model; The model customization module is used to perform customized training on the first basic model using the business data of the first business, so as to obtain a first customized model suitable for the first business.
10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the machine learning pipeline operation method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is loaded and executed by a processor to implement the machine learning pipeline operation method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor reads from and executes the computer instructions to implement the machine learning pipeline operation method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Video classification method, device and equipment based on multi-modal representation, and storage medium
CN113762322A
Anomaly detection of model performance in an mlops platform
US20210184958A1
