Model building method, device, system, electronic device and program product
The structure and parameters of the machine learning model are quickly determined through a model recommendation algorithm based on model construction historical data, which solves the problem of low model construction efficiency in the existing technology and achieves more efficient model construction and better performance.
Patent Information
- Application Number
- CN202410743509.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-11
AI Technical Summary
Existing automatic machine learning technology is inefficient in the model building process, requiring hardware devices to spend a lot of time exhausting all possible models and model parameters, resulting in a waste of resources and time-consuming processing.
A model building method is proposed to quickly and efficiently build a machine learning model by obtaining model building task data and using a model recommendation algorithm based on model building historical data to determine the structure and parameters of the target model.
It significantly speeds up the processor or server's selection of model structure and model parameters, improves model construction efficiency, and builds a more adaptable and high-performance target model.
Smart Images

Figure CN118313486B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model building method, device, system, electronic equipment and program product. Background Art
[0002] The development and tuning of machine learning models requires a lot of expertise and experience, which limits the widespread application of the models.
[0003] Automatic machine learning is a solution proposed to solve the above problems. It uses hardware devices such as processors or servers to execute various links of the automated machine learning process, enabling non-professionals to build machine learning models, lowering the threshold for model application and accelerating the development and deployment process of machine learning models.
[0004] The implementation of automatic machine learning requires selecting models and model parameters that meet user needs and training them to ultimately obtain the optimal machine learning model. The current implementation of automatic machine learning is an exhaustive attempt, that is, hardware devices such as processors or servers exhaustively enumerate all possible models and model parameters, train and test them, and ultimately select the optimal model from a large number of built models. This implementation method is inefficient and requires the hardware device to spend a lot of time to complete model construction. Summary of the invention
[0005] Based on the above technical problems, the present application proposes a model building method, device, system, electronic device and program product, which can improve the model building efficiency of hardware devices such as processors or servers.
[0006] The first aspect of the present application proposes a model building method, including: acquiring model building task data, the model building task data including task information required to be performed for a target model to be built and training data information used to train the target model; based on the model building task data, determining the model structure and model parameters for building the target model by executing corresponding processing of a model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model building task based on model building historical data, the model building historical data including historical model building task data, and model building results corresponding to the historical model building task data; based on the model structure and the model parameters, constructing the target model.
[0007] The second aspect of the present application proposes a model building system, including: a data receiving unit, a model recommendation subsystem and a model building subsystem; the data receiving unit is used to obtain model building task data, and send the obtained model building task data to the model recommendation subsystem and the model building subsystem; wherein the model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model; the model recommendation subsystem is used to determine the model structure and model parameters for building the target model based on the model building task data by executing the corresponding processing of the model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model building task based on the model building historical data, and the model building historical data includes historical model building task data and model building results corresponding to the historical model building task data; the model building subsystem is used to construct the target model based on the model structure and the model parameters.
[0008] The third aspect of the present application proposes a model building device, including: a data acquisition unit, used to acquire model building task data, the model building task data including task information required to be performed by a target model to be built and training data information used to train the target model; a model preparation unit, used to determine the model structure and model parameters for building the target model based on the model building task data by executing corresponding processing of a model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model building task based on model building historical data, the model building historical data including historical model building task data, and model building results corresponding to the historical model building task data; a model building unit, used to build the target model based on the model structure and the model parameters.
[0009] The fourth aspect of the present application proposes an electronic device, comprising a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the above-mentioned model building method by running the program in the memory.
[0010] A fifth aspect of the present application proposes a computer program product, comprising computer program instructions, which, when executed by a processor, enable the processor to execute the above-mentioned model building method.
[0011] The model building method proposed in the present application determines a model recommendation algorithm for determining a model structure and model parameters corresponding to a model building task based on model building historical data. When a hardware device such as a processor or server obtains model building task data, the model building task data is processed accordingly by the model recommendation algorithm to obtain the model structure and model parameters required for building a target model. This achieves the use of model building historical data to assist the current model building task, so that the model structure and model parameters used for model building can be determined more quickly and efficiently. Compared with the prior art's exhaustive attempt to determine the model structure and model parameters, the present application can significantly speed up the processor or server's selection of model structure and model parameters, thereby improving model building efficiency.
[0012] On the other hand, since the model recommendation algorithm used in the model building method proposed in this application is determined based on the historical data of model building, the algorithm contains empirical information extracted from a large amount of historical data of model building. The model structure and model parameters corresponding to the current model building task are determined by this algorithm, that is, the model structure and model parameters are selected by drawing on historical empirical data. This can improve the quality of the model structure and model parameters selected by hardware devices such as processors or servers, so that the selected model structure and model parameters are more suitable for the model building task. Constructing the target model based on the model structure and model parameters can improve the efficiency of hardware devices such as processors or servers in constructing the target model, and can construct a more performant target model. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0014] Figure 1 A schematic diagram of the implementation process of automatic machine learning provided in an embodiment of the present application.
[0015] Figure 2 A schematic diagram of the structure of a model building system provided in an embodiment of the present application.
[0016] Figure 3 A schematic diagram of another implementation process of automatic machine learning provided in an embodiment of the present application.
[0017] Figure 4 A flowchart of a model building method provided in an embodiment of the present application.
[0018] Figure 5 A schematic diagram of part of the processing process of the model building method provided in an embodiment of the present application.
[0019] Figure 6 A schematic diagram of another part of the processing process of the model building method provided in an embodiment of the present application.
[0020] Figure 7 A schematic diagram of the structure of another model building system provided in an embodiment of the present application.
[0021] Figure 8 A schematic diagram of the structure of a model building device provided in an embodiment of the present application.
[0022] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solution of the embodiment of the present application is applicable to the application scenario of artificial intelligence model construction, and is particularly applicable to the application scenario of automatic machine learning model construction. The technical solution of the embodiment of the present application can enable hardware devices such as processors and servers to build machine learning models more efficiently and quickly.
[0024] Automatic machine learning (AutoML) is a technology designed to simplify the process of developing and deploying machine learning models. It is committed to automating various aspects of building machine learning models, including data preprocessing, feature engineering, model selection, hyperparameter adjustment, and model deployment.
[0025] Figure 1 The existing implementation process of automatic machine learning is shown.
[0026] Existing automatic machine learning is mainly implemented through automatic machine learning systems running on hardware devices such as processors and servers. Figure 1 As shown in the figure, the automatic machine learning system generally goes through the following steps:
[0027] 1. Model space definition
[0028] The AutoML system predefines a model space, that is, it prepares a model collection in advance, which includes a series of machine learning models that may be used to solve a given task. These models can cover various types of models, including linear models (such as logistic regression, linear regression), tree models (such as decision trees, random forests, gradient boosting trees), neural networks (such as multi-layer perceptrons, convolutional neural networks, recurrent neural networks), etc.
[0029] When users use the automatic machine learning system to build a machine learning model, they will input the task information and model training data required for the target model to be built. Based on the task to be executed input by the user, the automatic machine learning system selects a model for executing the task from the model space as the baseline model. Subsequent processing will optimize and train the model parameters based on the baseline model, in order to ultimately obtain a machine learning model that meets the user's needs.
[0030] 2. Hyperparameter Optimization
[0031] After the automatic machine learning system selects a model from the model space, it further optimizes the parameters of the model.
[0032] For each model, the AutoML system needs to determine its best hyperparameter combination. Hyperparameters are parameters that control the behavior of the model, such as learning rate, regularization term coefficient, tree depth, etc. AutoML systems usually use automated search algorithms to search for the best hyperparameter combination. These search algorithms include grid search, random search, and Bayesian optimization. This process is usually carried out in a predefined hyperparameter space to find the best hyperparameter combination to maximize the performance of the model.
[0033] 3. Model training
[0034] Once the best hyperparameter combination for each model is determined, the AutoML system will train each model using the training data entered by the user. During the training process, the model will try to learn patterns and regularities in the data to minimize the training error. This process usually uses standard machine learning training algorithms such as gradient descent, stochastic gradient descent, etc. The training process may be performed on one or more training data sets, and cross-validation may be used to evaluate the performance of the model.
[0035] 4. Model Evaluation
[0036] After the model training is completed, the AutoML system will evaluate the performance of each model on the validation set or cross-validation set. This includes various performance indicators such as accuracy, precision, recall, F1 value, etc. Through these indicators, the system can compare the performance of different models and select the best performing model for subsequent steps.
[0037] 5. Model comparison
[0038] When selecting a model from the model space, the automatic machine learning system may select multiple models and optimize parameters, train and evaluate each model through the above-mentioned processing.
[0039] Finally, the AutoML system will select the best performing model based on the performance evaluation results. This selection is usually based on pre-defined selection criteria, such as the highest accuracy or the highest F1 value. After selecting the best model, the system will use it for final testing and deployment.
[0040] The above-mentioned automatic machine learning is implemented by exhaustive trial, that is, the automatic machine learning system exhaustively searches all models and model parameters that can perform the user-set task in the model space, trains and tests them, and finally selects the best model from a large number of constructed models. This implementation method is inefficient and requires hardware devices such as processors and servers to spend a lot of time running to complete model construction.
[0041] In response to the above technical problems, in order to further improve the efficiency of model building, this application proposes a new model building solution, which can enable processors, servers and other hardware devices to more quickly determine the models and model parameters that meet user needs, thereby completing the model and model parameter optimization more quickly, and avoiding the waste of resources and time-consuming processing caused by exhaustively enumerating all models and model parameters for model building.
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] Figure 2 An application scenario of the technical solution proposed in the embodiment of the present application is shown, and the application scenario is a model building system.
[0044] See also Figure 2 As shown, the model building system includes a model building terminal and a server.
[0045] Among them, the model building terminal can be a hardware device such as a computer, an intelligent terminal, a handheld terminal, etc. The model building terminal includes input and output devices, so as to enable human-computer interaction functions, so that the user can input model building task data through the model building terminal.
[0046] The server can be a processor, workstation, cloud server and other hardware devices with automatic machine learning functions. The model building method proposed in the embodiment of the present application can be executed by the server. For example, it can be executed by an automatic machine learning system running on the server. By executing the technical solution of the embodiment of the present application, the work efficiency and performance of the above-mentioned processors, workstations, cloud servers and other hardware devices with automatic machine learning functions can be improved, the efficiency of model building can be improved, and the performance of the constructed model can be improved. In addition, based on the improvement of the model building efficiency and performance of the above-mentioned hardware devices, the user experience of users building models through the above-mentioned hardware devices can also be improved.
[0047] The server and the model building terminal are connected through any communication method. The model building terminal sends the model building task data input by the user to the server. The server executes the model building method proposed in this application and uses the model building task data input by the user to build a machine learning model that meets the user's needs.
[0048] An embodiment of the present application proposes a model building method, which is applied to hardware devices such as processors and servers, so that the above-mentioned hardware devices use model building historical data to assist in the execution of current model building tasks, thereby optimizing the construction process and model building efficiency of the current model building tasks.
[0049] Specifically, the embodiment of the present application determines a model recommendation algorithm for determining a model structure and model parameters corresponding to a model construction task based on historical model construction data.
[0050] The above-mentioned historical model building data includes various data contained in the historically executed model building tasks, such as model building task data, and model building results corresponding to the model building task data. Among them, the model building task data includes task type, training data, expected indicator information, etc., and the model building results corresponding to the model building task data include the model structure and model hyperparameters of the machine learning model built based on the model building task data.
[0051] The embodiment of the present application determines a model recommendation algorithm for determining a model structure and model parameters corresponding to a model construction task based on model construction history data. Specifically, the model construction history data is summarized and summarized, and useful empirical information for selecting a model structure and model parameters that are adapted to the model construction task based on the model construction task data is extracted, and a model recommendation algorithm is generated based on the empirical information. By executing processing corresponding to the model recommendation algorithm, the model structure and model parameters corresponding to any model construction task can be determined, that is, the model structure and model parameters suitable for the model construction task can be determined.
[0052] In some implementations, it is disclosed that a model recommendation algorithm for determining a model structure and model parameters corresponding to a model building task based on model building historical data can be determined by establishing a correspondence between the model building task data in the model building historical data and the model structure and model parameters of a machine learning model finally constructed by the corresponding model building task data, and then determining the model recommendation algorithm based on the correspondence.
[0053] For example, assuming that for model building task A, the model structure of the machine learning model finally constructed is model x1, and the hyperparameter of the model is y1, then the correspondence between model building task A and model x1 and hyperparameter y1 is established; assuming that for model building task B, the model structure of the machine learning model finally constructed is model x2, and the hyperparameter of the model is y2, then the correspondence between model building task B and model x2 and hyperparameter y2 is established; assuming that for model building task C, the model structure of the machine learning model finally constructed is model x3, and the hyperparameter of the model is y3, then the correspondence between model building task C and model x3 and hyperparameter y3 is established, and so on, the model structures and model parameters corresponding to each model building task in the model building history process can be summarized.
[0054] Based on the above correspondence, a model recommendation algorithm based on the correspondence can be determined. Specifically, when a new model building task is acquired, a model building task that is identical or similar to the newly acquired model building task is retrieved from the above correspondence, and when the identical or similar model building task is retrieved, the model structure and model parameters corresponding to the identical or similar model building task are determined as the model structure and model parameters corresponding to the newly acquired model building task.
[0055] It can be understood that as the historical data of model construction becomes more and more abundant, the scope of application of the above-mentioned model recommendation algorithm becomes wider and wider, and it can realize the recommendation of model structure and model parameters for more and more model construction tasks.
[0056] In other embodiments, a model recommendation algorithm for determining a model structure and model parameters corresponding to a model construction task is determined based on historical model construction data, and the model recommendation algorithm may also be implemented by training the model.
[0057] Exemplarily, the embodiment of the present application pre-builds a recommendation model for executing the above-mentioned model recommendation algorithm, thereby realizing the function of recommending appropriate model structure and model parameters based on the model construction task.
[0058] The above-mentioned suggestion model is a model obtained by training suitable model structures and model parameters based on historical data of automatic machine learning for model building tasks. The model structure of the suggestion model can adopt any model structure, and the optimal model structure can be selected in combination with the model training effect. For example, under normal circumstances, a decision tree model is used to construct the above-mentioned suggestion model, which can obtain better training effects and model performance. When the embodiments of the present application are actually applied, the model structure of the above-mentioned suggestion model can also be dynamically selected and adjusted according to the type of data to be processed.
[0059] Specifically, the embodiment of the present application performs model structure and model parameter recommendation training on the above-mentioned suggestion model based on the historical data of model construction, so that the suggestion model learns the above-mentioned model recommendation algorithm, so that the suggestion model can execute the corresponding processing of the above-mentioned model recommendation algorithm when it is running, and output the recommended model structure and model parameters for any model construction task.
[0060] In this embodiment, it is also disclosed that the training of the above-mentioned suggestion model can be realized by executing the following steps A1-A3:
[0061] A1. Extracting historical model building task data from the model building historical data as training samples, and extracting model building results corresponding to the historical model building task data from the model building historical data as sample labels corresponding to the training samples.
[0062] Specifically, the above-mentioned model building historical data includes model building task data and model building results corresponding to the model building task data. The model building task data includes task type, training data, expected indicator information, etc., and the model building results corresponding to the model building task data include the model structure and model hyperparameters of the machine learning model built based on the model building task data.
[0063] For the above-mentioned model building historical data, the embodiment of the present application extracts model building task data from it as training samples, that is, as input for training the proposed model. At the same time, the model structure and model parameters (hyperparameters) corresponding to the model building task data are extracted from the model building historical data as sample labels corresponding to the training samples.
[0064] Through the above processing, multiple sets of labeled training data can be extracted from the historical data of model construction. These training data can be used to perform supervised model structure and model parameter recommendation training for the proposed model.
[0065] A2. Input the training sample into the suggestion model to obtain a model recommendation result output by the suggestion model, wherein the model recommendation result includes a model structure and model parameters.
[0066] Specifically, the above training samples are characterized through feature engineering, and then input into the above recommendation model, so that the recommendation model predicts the model structure and model parameters suitable for the training samples based on the input training samples, and obtains the model recommendation results.
[0067] A3. Optimize the parameters of the recommendation model with the goal of making the model recommendation result consistent with the sample label.
[0068] Specifically, by comparing the model recommendation result obtained in step A2 with the sample label corresponding to the training sample, it is determined whether the model structure and model parameters corresponding to the model recommendation result and the training sample are consistent, thereby determining the model prediction loss. For example, the model prediction loss can be calculated by cross entropy loss.
[0069] Then, the parameters of the proposed model are optimized with the goal of reducing the model prediction loss, that is, the model recommendation results output by the proposed model are consistent with the sample labels.
[0070] Repeat the training process of A1-A3 above until the model recommendation result output by the suggestion model is consistent with the sample label, or the accuracy of the model recommendation result output by the suggestion model meets the set requirements, and the training of the suggestion model is completed. At this point, the suggestion model can be used to predict the model structure and model parameters for any model building task.
[0071] Through the processing described in the above embodiments, the present application extracts empirical data from the historical data of model construction, thereby establishing a model recommendation algorithm to assist subsequent model construction tasks. Specifically, it assists processors, servers and other hardware devices in selecting appropriate model structures and model parameters faster and more efficiently when performing subsequent model construction tasks, thereby avoiding exhaustively enumerating all model structures and model parameters for model construction and wasting a lot of time.
[0072] Exemplarily, after the above-mentioned model recommendation algorithm or the above-mentioned suggestion model is constructed, it is pre-configured in hardware devices such as processors and servers, or configured in the automatic machine learning system carried by these hardware devices, so that during the model construction process, the above-mentioned hardware devices or automatic machine learning systems can call the above-mentioned model recommendation algorithm or suggestion model at any time.
[0073] Based on the above-mentioned improvement ideas, an embodiment of the present application proposes a model building method that combines model structure and model parameter recommendation. This method can be applied to an automatic machine learning system, or to any device or apparatus for automatically building a machine learning model, such as a processor, a server, etc., thereby improving the model building efficiency of these devices or apparatuses.
[0074] Next, combine Figure 3 The model building process shown in the figure takes the application of the model building method proposed in this application to the automatic machine learning system installed on the hardware device such as the processor or server as an example to introduce the specific processing process of the model building method. It can be understood that the processing process of the automatic machine learning system described in the following embodiments is actually the processing implemented by the automatic machine learning system by calling the corresponding functional module of the hardware device where it is located, that is, the processing performed by the hardware device.
[0075] See also Figure 4 As shown, the model building method proposed in the embodiment of the present application includes:
[0076] S101, obtaining model building task data.
[0077] The model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model.
[0078] like Figure 3 As shown in , when the automatic machine learning system performs a model building task, the user will first input information about the tasks that the target model to be built needs to perform to the system, so that the system knows which machine learning model needs to be built to perform which tasks. At the same time, the user will also input training data for training the target model to be built, and the training data may specifically include training samples and sample labels, so that the automatic machine learning system trains the target model according to the training data input by the user, thereby building a machine learning model that meets the user's needs.
[0079] The above-mentioned task information can be any task performed by a machine learning model, such as image recognition, image classification, text recognition, text retrieval, audio processing, etc. Correspondingly, the above-mentioned training data refers to data used to train the machine learning model to perform the above-mentioned task, and the data corresponds to the same type of data as the data processed by the task.
[0080] For example, when the task information is an image recognition task, the corresponding training data is image data; when the task information is an audio processing task, the corresponding training data is audio data.
[0081] For example, if a user wants to build a machine learning model for classifying lesions in brain medical images, then when the user builds the machine learning model with the help of an automatic machine learning system, the user first inputs the model building task data. The model building task data includes the tasks that the target model to be built needs to perform, namely, "classifying lesions in brain medical images"; at the same time, in the model building task data, the user can add some brain medical images labeled with lesions and lesion categories, which will be used as training data for training the target model to be built.
[0082] In the embodiments of the present application, it is not limited to model building for a certain specific task and training data. Those skilled in the art should be aware that the above-mentioned task information and training data are tasks and data under a certain specific task scenario, and can be flexibly selected according to the actual scenario and task. When the tasks and data change, it does not affect the execution of the processing process of the model building method proposed in the embodiments of the present application. Those skilled in the art can, based on the introduction of the embodiments of the present application, for various different tasks and training data, by executing the technical solution of the embodiments of the present application, realize the construction of the corresponding machine learning model.
[0083] S102: Based on the model construction task data, determine the model structure and model parameters for constructing the target model by executing corresponding processing of the model recommendation algorithm.
[0084] Among them, the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model construction task based on the model construction historical data, and the model construction historical data includes historical model construction task data and the model construction results corresponding to the historical model construction task data.
[0085] Specifically, referring to the introduction of the above embodiments, the model building method proposed in the present application processes the historical model building data in advance, and extracts a model recommendation algorithm therefrom. The model recommendation algorithm can determine the model structure and model parameters corresponding to the model building task for any model building task, that is, according to the model building task, determine the model structure and model parameters suitable for the model building task.
[0086] Based on the above-mentioned model recommendation algorithm, when the model construction task data is obtained, the model construction task data is taken as the processing object. By executing the corresponding processing of the above-mentioned model recommendation algorithm, the model structure and model parameters for constructing the target model that meets the model construction task can be determined.
[0087] Among them, the above-mentioned model structure can be a model in a pre-set model set or model space. In the model set or model space, various types of machine learning models are included, such as linear models (such as logistic regression, linear regression), tree models (such as decision trees, random forests, gradient boosting trees), neural networks (such as multi-layer perceptrons, convolutional neural networks, recurrent neural networks), etc., so as to support the construction of machine learning models for performing different types of tasks. Based on the model set, when the corresponding processing of the above-mentioned model recommendation algorithm is executed to determine the model structure for constructing the target model that meets the model construction task, a model can be selected from the model set.
[0088] Exemplarily, when the above-mentioned model recommendation algorithm is the model recommendation algorithm based on the correspondence between model construction tasks and model structures and model parameters introduced in the above-mentioned embodiments, when model construction task data is obtained, based on the task information in the model construction task data, the model construction tasks that are the same or similar to the task information are retrieved from the above-mentioned correspondence, and then the model structure and model parameters corresponding to the model construction task are determined as the model structure and model parameters used to construct the above-mentioned target model.
[0089] In other implementations, when the above-mentioned model recommendation algorithm is the operation method performed by the suggestion model introduced in the above-mentioned embodiment, see Figure 3 As shown, the acquired model building task data is input into the recommendation model obtained by training in the above embodiment, and the recommendation model is based on the model building task data, and the recommended model structure and model parameters are output by executing the corresponding processing of the model recommendation algorithm determined by pre-training.
[0090] In some embodiments, the model structure and model parameters determined by executing the corresponding processing of the model recommendation algorithm can be a combination of a set of model structures and corresponding model parameters, or a combination of multiple sets of model structures and model parameters, each of which is a feasible model structure and model parameters for constructing the target model.
[0091] S103: constructing the target model based on the model structure and the model parameters.
[0092] Specifically, through the processing of step S102, a model structure and model parameters suitable for building a target model can be obtained. Based on the model structure and model parameters, a baseline model can be constructed, and then the baseline model is trained with the training data in the model construction task data for the tasks required to be performed by the target model, so that the target model can be constructed.
[0093] like Figure 3As shown in , after obtaining the model structure and model parameters, by optimizing the model parameters, as well as performing model training, model evaluation, and model comparison, we can eventually obtain a model that meets user needs or has the best performance, that is, the target model.
[0094] In some embodiments, when the model structure and model parameters determined by the processing of step S102 are a combination of multiple sets of model structures and model parameters, when executing step S103, for each set of model structure and model parameter combinations, a corresponding baseline model can be constructed, and then the baseline model is trained with the training data in the model construction task data for the tasks required to be performed by the target model, so as to construct a candidate model. Finally, the candidate models constructed by each set of model structure and model parameter combinations are compared, and the optimal model is selected as the target model finally constructed.
[0095] From the above introduction, it can be seen that the model building method proposed in the embodiment of the present application determines the model recommendation algorithm for determining the model structure and model parameters corresponding to the model building task based on the model building historical data. When a hardware device such as a processor or server obtains the model building task data, the model building task data is processed accordingly by the model recommendation algorithm to obtain the model structure and model parameters required for building the target model. In this way, the current model building task is assisted by the model building historical data, so that the model structure and model parameters used for model building can be determined more quickly and efficiently. Compared with the prior art's exhaustive attempt to determine the model structure and model parameters, the present application can significantly speed up the processor or server's selection speed of the model structure and model parameters, thereby improving the efficiency of model building.
[0096] On the other hand, since the model recommendation algorithm used in the model building method proposed in this application is determined based on the historical data of model building, the algorithm contains empirical information extracted from a large amount of historical data of model building. The model structure and model parameters corresponding to the current model building task are determined by this algorithm, that is, the model structure and model parameters are selected by drawing on historical empirical data. This can improve the quality of the model structure and model parameters selected by hardware devices such as processors or servers, so that the selected model structure and model parameters are more suitable for the model building task. Constructing the target model based on the model structure and model parameters can improve the efficiency of hardware devices such as processors or servers in constructing the target model, and can construct a more performant target model.
[0097] In other embodiments, a specific process of constructing a target model based on the determined model structure and model parameters is also disclosed.
[0098] Specifically, when building a target model based on the determined model structure and model parameters, the model structure is first parameterized using the model parameters to obtain a model to be trained, and then the model to be trained is trained using the training data in the model construction task data to obtain the target model.
[0099] The above model parameters are the hyperparameters of the above model structure. By using the hyperparameters to set the parameters of the model structure, a complete machine learning model can be obtained. Then, the machine learning model is trained with the training data provided by the user to perform the tasks required by the target model to be constructed, so that the machine learning model has the function of performing the above tasks, thereby obtaining the target model.
[0100] In some embodiments, it is disclosed that Figure 5 As shown, the above-mentioned use of model parameters to set parameters of the model structure to obtain a model to be trained, and the use of training data in the model construction task data to train the model to be trained to obtain a target model can be achieved by executing the following steps B1-B5:
[0101] B1. Perform parameter search based on the model parameters.
[0102] Specifically, parameter search is performed based on the above model parameters, that is, parameter adjustment is started based on the above model parameters, that is, the model hyperparameters are fine-tuned to obtain other model hyperparameter combinations.
[0103] For each model structure, there is a corresponding model hyperparameter space. For the adjustment of the above-mentioned model parameters, the model parameters can be used as a starting point, and the model parameters can be adjusted within the hyperparameter space where the model parameters are located to achieve parameter search.
[0104] Exemplarily, the above parameter search operation can be implemented by parameter search algorithms, such as grid search, random search, and Bayesian optimization.
[0105] It should be noted that when step B1 is executed for the first time, the above-mentioned model parameters can be directly used as the parameters obtained by parameter search, and when step B1 is executed subsequently, the above-mentioned model parameters can be used as the basis for parameter search and update.
[0106] After each parameter search is completed, step B2 is executed to set the parameters of the model structure using the model parameters determined by the search to obtain the model to be trained.
[0107] Specifically, the parameter search is performed by executing the above step B1. After each parameter search is completed to obtain a set of model hyperparameter combinations, the model hyperparameters determined by the search are used to update the parameters of the above model structure to obtain the model to be trained.
[0108] B3. Use the training data in the model building task data to train the model to be trained to obtain a candidate model.
[0109] Specifically, training data is extracted from the model building task data input by the user, and then the training data is used to train the above-obtained model to be trained on the task that the target model to be built needs to perform, so that the model to be trained learns the ability to perform the task. The model after training is used as a candidate model.
[0110] B4. Determine whether the preset stop condition is met.
[0111] In an embodiment of the present application, the above-mentioned stop condition may be that a set parameter search time is reached; and / or the obtained candidate model meets the set requirements, such as the candidate model can meet the model performance indicators set by the user.
[0112] In some embodiments, the above stop condition is set to reach the set parameter search time, or the obtained candidate model meets the set requirements. When executing step B4, on the one hand, it is determined whether the parameter search time reaches the set parameter search time, and on the other hand, it is determined whether the candidate model obtained by training meets the set requirements. As long as the judgment result of any aspect is yes, it is determined that the preset stop condition is met.
[0113] If not satisfied, return to step B1.
[0114] If so, step B5 is executed to determine the target model from the obtained candidate models.
[0115] Specifically, if the stopping condition is not met, the process returns to step B1 to search for parameters again, construct the model to be trained using the searched parameters, train the model to be trained to obtain a candidate model, and determine again whether the stopping condition is met.
[0116] Based on the above processing, as long as the stopping condition is not met, the parameter search and training will be looped to obtain the candidate model until the parameter search can no longer obtain a new hyperparameter combination, then the above loop is stopped and step B5 is executed.
[0117] When executing step B5, if there is only one candidate model obtained, the candidate model is used as the target model finally constructed; if there are multiple candidate models, the performance of the multiple candidate models is compared, and one or more models with the best performance are selected as the target model finally constructed.
[0118] The above model building process adopts a method of building a model and training and verifying while searching for parameters. When the stopping condition is met, the building process is stopped. This can reduce the workload of model building and help improve the efficiency of model building.
[0119] In another embodiment, the model structure and model parameters for constructing the target model determined by executing the above-mentioned model recommendation algorithm include multiple recommended model combinations, that is, multiple groups of model structure and model parameter combinations, and each recommended model combination includes a model structure and corresponding model parameters for constructing the target model.
[0120] At this time, if Figure 6 As shown, when the model structure is parameterized using the model parameters to obtain the model to be trained, and the model to be trained is trained using the training data in the model construction task data to obtain the target model, the following steps C1-C7 can be performed:
[0121] C1. Obtain a recommended model combination from the multiple recommended model combinations.
[0122] Specifically, each recommended model combination may be read in sequence, and each time a recommended model combination is read, subsequent processing may be performed on the read recommended model combination.
[0123] In some embodiments, multiple recommended model combinations can be sorted according to their respective priorities to obtain a recommended model combination sequence, and then starting from the starting position of the recommended model combination sequence, the recommended model combinations in the recommended model combination sequence are obtained one by one, and subsequent processing is performed on the obtained recommended model combinations.
[0124] The priorities of the multiple recommendation model combinations may be determined according to the order in which the recommendation model combinations are determined, or according to a specific priority setting rule, which is not limited in this embodiment.
[0125] Exemplarily, the above-mentioned model recommendation algorithm can also be configured to have a function of evaluating the matching degree of the model structure and model parameters with the model building task. Based on this function, when the model structure and model parameters used to build the target model are determined by executing the corresponding processing of the model recommendation algorithm, the matching degree of the model structure and model parameters with the model building task can be determined at the same time as the model structure and model parameters are determined. When there are multiple groups of determined model structures and model parameters, the combinations of each group of model structures and model parameters can be output in order of matching degree with the model building task from high to low. Figure 3 As shown, the model building task data is input into the proposed model, and the proposed model can output the topN model structures and recommended model combinations of model parameters.
[0126] On this basis, when prioritizing multiple recommendation model combinations, they can be prioritized in order from high to low according to the matching degree between each recommendation model combination and the model building task.
[0127] Then, starting from the start position of the sorted recommended model combination sequence, the recommended model combinations in the sequence are read in sequence, and each time a recommended model combination is obtained, subsequent processing is performed on the read recommended model combination.
[0128] Each time a recommended model combination is obtained, step C2 is executed to perform parameter search on the obtained recommended model combination based on the model parameters in the recommended model combination.
[0129] Specifically, parameter search is performed based on the model parameters in the recommended model combination, that is, parameter adjustment is started with the above model parameters, that is, the model hyperparameters are fine-tuned to obtain other model hyperparameter combinations.
[0130] For each model structure, there is a corresponding model hyperparameter space. For the adjustment of the above-mentioned model parameters, the model parameters can be used as a starting point, and the model parameters can be adjusted within the hyperparameter space where the model parameters are located to achieve parameter search.
[0131] Exemplarily, the above parameter search operation can be implemented by parameter search algorithms, such as grid search, random search, and Bayesian optimization.
[0132] It should be noted that when step C2 is first executed for a recommended model combination, the model parameters in the recommended model combination can be directly used as the parameters obtained by parameter search. When step C2 is subsequently executed, the parameter search and update are performed based on the above model parameters.
[0133] After each parameter search is completed, step C3 is executed to set the parameters of the model structure in the recommended model combination using the model parameters determined by the search to obtain the model to be trained.
[0134] Specifically, the parameter search is performed by executing the above step C2. After each parameter search is completed to obtain a set of model hyperparameter combinations, the model hyperparameters determined by the search are used to update the parameters of the above model structure to obtain the model to be trained.
[0135] C4. Train the model to be trained using the training data in the model building task data to obtain a candidate model.
[0136] Specifically, training data is extracted from the model building task data input by the user, and then the training data is used to train the above-obtained model to be trained on the task that the target model to be built needs to perform, so that the model to be trained learns the ability to perform the task. The model after training is used as a candidate model.
[0137] C5. Determine whether the preset stop condition is met.
[0138] In an embodiment of the present application, the above-mentioned stop condition may be that a set parameter search time is reached; and / or the obtained candidate model meets the set requirements, such as the candidate model can meet the model performance indicators set by the user.
[0139] In some embodiments, the above stop condition is set to reach the set parameter search time, or the obtained candidate model meets the set requirements. When executing step C5, on the one hand, it is determined whether the parameter search time reaches the set parameter search time, and on the other hand, it is determined whether the candidate model obtained by training meets the set requirements. As long as the judgment result of any aspect is yes, it is determined that the preset stop condition is met.
[0140] If the preset stop condition is not met, step C6 is executed to determine whether the parameter search for the current recommended model combination is completed. If not, the process returns to step C2 for execution. If completed, the process returns to step C1 for execution.
[0141] If the preset stop condition is met, step C7 is executed to determine the target model from the obtained candidate models.
[0142] Specifically, if the stopping condition is not met and the parameter search for the current recommended model combination is not completed, that is, other model parameters can still be searched for to build the model to be trained, then return to step C2 and perform parameter search, model construction and model training again; if the parameter search for the current recommended model combination is completed, that is, all hyperparameters of the model structure that can be used in the current recommended model combination have been searched, then return to step C1 and obtain the next civil engineering model combination to perform the above-mentioned parameter search, model construction and model training.
[0143] In the above processing, whenever it is determined that the preset stop condition is met, the above processing is stopped, and then step C7 is executed to determine the target model from the obtained candidate models.
[0144] When executing step C7, if there is only one candidate model obtained, the candidate model is used as the target model finally constructed; if there are multiple candidate models, the performance of the multiple candidate models is compared, and one or more models with the best performance are selected as the target model finally constructed.
[0145] The above model building process adopts a method of building a model and training and verifying while searching for parameters. When the stopping condition is met, the building process is stopped. This can reduce the workload of model building and help improve the efficiency of model building.
[0146] In other embodiments, in addition to constructing the target model using the model structure and model parameters determined by executing the above-mentioned model recommendation algorithm, based on the model construction task data, a model structure and model parameters that match the model construction task data are selected from a preset candidate model set, and the selected model structure and model parameters are used to construct the target model.
[0147] like Figure 3 As shown in, after obtaining the model building task data input by the user, in addition to inputting the model building task data into the suggestion model to predict the model structure and model parameters, the model building task data is also directly input into the automatic machine learning model, and the automatic machine learning model directly selects the model structure and model parameters that match the model building task data from a preset candidate model set, that is, from the model space based on the model building task data.
[0148] When constructing a target model based on the model structure and model parameters, the target model is first constructed based on the model structure and model parameters determined by executing the model recommendation algorithm, and then the target model is constructed based on the model structure and model parameters selected from the candidate model set.
[0149] For example, Figure 5 In the processing shown, when all hyperparameters have been searched and the stopping condition has not been reached, parameter search, model construction and model training can continue for the model structure and model parameters selected from the candidate set, and the obtained candidate model participates in the final target model selection.
[0150] Similarly, in Figure 6 In the processing shown, when the hyperparameter search is completed for all recommended model combinations and the stopping condition is not reached, parameter search, model construction and model training can continue for the model structure and model parameters selected from the candidate set, and the obtained candidate models participate in the final target model selection.
[0151] In this embodiment, in addition to constructing the target model based on the model structure and model parameters determined by executing the model recommendation algorithm, the model structure and model parameters are directly selected based on the model construction task data for constructing the target model, so that the construction of the target model is not limited to the model structure and model parameters determined by executing the model recommendation algorithm. This can avoid the negative impact on the construction of the target model due to unreasonable or inappropriate model structure and model parameters recommended by the model recommendation algorithm, thereby ensuring the global optimality of the target model construction.
[0152] In other embodiments, after the target model corresponding to the model building task data is constructed, the model building task data and the corresponding target model are also used to optimize and adjust the above-mentioned model recommendation algorithm. In other words, the model building task data used in this model building process and the corresponding constructed target model are added to the model building historical data, and the above-mentioned model recommendation algorithm is further updated and optimized, so that the model recommendation algorithm also learns the relevant information of this model building process, and further improves the model structure and model parameter recommendation performance.
[0153] Exemplarily, the model building task data used in this model building is used as a training sample, and the target model obtained in this model building is used as a sample label, and the model structure and model parameter recommendation training is performed on the above-mentioned proposed model, so as to further enhance the performance of the proposed model.
[0154] Based on the solution of this embodiment, the model recommendation algorithm can be continuously optimized during the model construction process, so that the model structure and model parameters determined based on the model recommendation algorithm are increasingly matched with the model construction task, thereby continuously improving the model construction efficiency.
[0155] Another embodiment of the present application also provides a model building system, see Figure 7 As shown, the system includes:
[0156] Data receiving unit 001, model recommendation subsystem 002 and model construction subsystem 003.
[0157] The data receiving unit 001 is connected to the model recommendation subsystem 002 and the model building subsystem 003 respectively, and the model recommendation subsystem 002 is connected to the model building subsystem 003 .
[0158] The data receiving unit 001 is used to obtain model building task data and send the obtained model building task data to the model recommendation subsystem and the model building subsystem; wherein the model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model;
[0159] The model recommendation subsystem 002 is used to determine the model structure and model parameters for constructing the target model based on the model construction task data by executing the corresponding processing of the model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model construction task based on the model construction historical data, and the model construction historical data includes historical model construction task data and model construction results corresponding to the historical model construction task data;
[0160] The model building subsystem 003 is used to build the target model based on the model structure and the model parameters.
[0161] In some implementations, the model recommendation subsystem 002 determines the model structure and model parameters for constructing the target model based on the model construction task data by executing corresponding processing of the model recommendation algorithm, including:
[0162] Inputting the model building task data into a pre-trained suggestion model so that the suggestion model determines the model structure and model parameters for building the target model based on the model building task data by executing corresponding processing of the model recommendation algorithm;
[0163] The proposed model is obtained by training the model structure and model parameters based on the historical data of model construction.
[0164] In some implementations, the model building subsystem 003 builds the target model based on the model structure and the model parameters, including:
[0165] Using the model parameters to set parameters of the model structure to obtain a model to be trained;
[0166] The model to be trained is trained using the training data in the model building task data to obtain the target model.
[0167] In some implementations, the model building subsystem 003 uses the model parameters to set parameters of the model structure to obtain a model to be trained, and uses the training data in the model building task data to train the model to be trained to obtain the target model, including:
[0168] Performing parameter search based on the model parameters, and after each parameter search is completed, setting parameters of the model structure using the model parameters determined by the search to obtain a model to be trained;
[0169] Using the training data in the model building task data to train the model to be trained, to obtain a candidate model;
[0170] The above process is repeatedly performed until a preset stop condition is met, and the target model is determined from the obtained candidate models; wherein the stop condition includes reaching a set parameter search time, and / or the obtained candidate model meets the set requirements.
[0171] In some implementations, the model structure and model parameters used to construct the target model include a plurality of recommended model combinations, each of which includes a model structure and corresponding model parameters used to construct the target model;
[0172] The model building subsystem 003 performs parameter search based on the model parameters, and after each parameter search is completed, sets the parameters of the model structure using the model parameters determined by the search to obtain a model to be trained, and trains the model to be trained using the training data in the model building task data to obtain a candidate model, including:
[0173] Sequentially obtain each of the multiple recommended model combinations;
[0174] Each time a recommended model combination is obtained, a parameter search is performed based on the model parameters in the recommended model combination, and after each parameter search is completed, the model structure in the recommended model combination is parameterized using the model parameters determined by the search to obtain a model to be trained; the model to be trained is trained using the training data in the model construction task data to obtain a candidate model.
[0175] In some implementations, the model building subsystem 003 sequentially obtains each of the multiple recommended model combinations, including:
[0176] Sorting the plurality of recommended model combinations according to their respective priorities to obtain a recommended model combination sequence;
[0177] Starting from the starting position of the recommended model combination sequence, each recommended model combination in the recommended model combination sequence is acquired in sequence.
[0178] In some implementations, the model recommendation subsystem 002 is further configured to:
[0179] Based on the model building task data, a model structure and model parameters matching the model building task data are selected from a preset candidate model set.
[0180] In some implementations, the training process of the suggestion model includes:
[0181] Extracting historical model building task data from the model building historical data as training samples, and extracting model building results corresponding to the historical model building task data from the model building historical data as sample labels corresponding to the training samples;
[0182] Inputting the training sample into the suggestion model to obtain a model recommendation result output by the suggestion model, wherein the model recommendation result includes a model structure and model parameters;
[0183] The parameters of the recommendation model are optimized with the goal of making the model recommendation result consistent with the sample label.
[0184] In some implementations, the model recommendation subsystem 002 is further configured to:
[0185] The model recommendation algorithm is optimized and adjusted using the model construction task data and the target model.
[0186] The model building system provided in this embodiment belongs to the same application concept as the model building method provided in the above embodiments of this application, and can execute the model building method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the specific processing content of the model building method provided in the above embodiments of this application, and will not be repeated here.
[0187] It is also disclosed in some embodiments that the above-mentioned model recommendation subsystem 002 includes a suggestion model, which is used to build task data based on the model, and determines the model structure and model parameters used to build the target model by executing corresponding processing of the model recommendation algorithm; wherein the suggestion model is obtained by training the model structure and model parameters based on the model construction historical data.
[0188] The above-mentioned model building subsystem 003 includes the automatic machine learning system introduced in the above-mentioned method embodiment, and the automatic machine learning system can execute the model building task, thereby realizing automatic model building.
[0189] The functions and training process of the above-mentioned recommendation model, as well as the specific working content of the above-mentioned automatic machine learning system, can all be found in the corresponding introduction in the above-mentioned embodiment of the model building method.
[0190] Corresponding to the above-mentioned model building method, the present application embodiment also provides a model building device, see Figure 8 As shown, the device comprises:
[0191] The data acquisition unit 100 is used to acquire model building task data, wherein the model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model;
[0192] A model preparation unit 110, configured to determine the model structure and model parameters for constructing the target model based on the model construction task data by executing corresponding processing of a model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model construction task based on model construction historical data, and the model construction historical data includes historical model construction task data and model construction results corresponding to the historical model construction task data;
[0193] The model building unit 120 is used to build the target model based on the model structure and the model parameters.
[0194] In some implementations, the model preparation unit 110 determines the model structure and model parameters for constructing the target model based on the model construction task data by executing corresponding processing of the model recommendation algorithm, including:
[0195] Inputting the model building task data into a pre-trained suggestion model so that the suggestion model determines the model structure and model parameters for building the target model based on the model building task data by executing corresponding processing of the model recommendation algorithm;
[0196] The proposed model is obtained by training the model structure and model parameters based on the historical data of model construction.
[0197] In some implementations, the model building unit 120 builds the target model based on the model structure and the model parameters, including:
[0198] Using the model parameters to set parameters of the model structure to obtain a model to be trained;
[0199] The model to be trained is trained using the training data in the model building task data to obtain the target model.
[0200] In some implementations, the model construction unit 120 uses the model parameters to set parameters of the model structure to obtain a model to be trained, and uses the training data in the model construction task data to train the model to be trained to obtain the target model, including:
[0201] Performing parameter search based on the model parameters, and after each parameter search is completed, setting parameters of the model structure using the model parameters determined by the search to obtain a model to be trained;
[0202] Using the training data in the model building task data to train the model to be trained, to obtain a candidate model;
[0203] The above process is repeatedly performed until a preset stop condition is met, and the target model is determined from the obtained candidate models; wherein the stop condition includes reaching a set parameter search time, and / or the obtained candidate model meets the set requirements.
[0204] In some implementations, the model structure and model parameters used to construct the target model include a plurality of recommended model combinations, each of which includes a model structure and corresponding model parameters used to construct the target model;
[0205] The model construction unit 120 performs parameter search based on the model parameters, and after each parameter search is completed, sets the parameters of the model structure using the model parameters determined by the search to obtain a model to be trained, and trains the model to be trained using the training data in the model construction task data to obtain a candidate model, including:
[0206] Sequentially obtain each of the multiple recommended model combinations;
[0207] Each time a recommended model combination is obtained, a parameter search is performed based on the model parameters in the recommended model combination, and after each parameter search is completed, the model structure in the recommended model combination is parameterized using the model parameters determined by the search to obtain a model to be trained; the model to be trained is trained using the training data in the model construction task data to obtain a candidate model.
[0208] In some implementations, the model building unit 120 sequentially obtains each of the plurality of recommended model combinations, including:
[0209] Sorting the plurality of recommended model combinations according to their respective priorities to obtain a recommended model combination sequence;
[0210] Starting from the starting position of the recommended model combination sequence, each recommended model combination in the recommended model combination sequence is acquired in sequence.
[0211] In some implementations, the model preparation unit 110 is further configured to:
[0212] Based on the model building task data, a model structure and model parameters matching the model building task data are selected from a preset candidate model set.
[0213] In some implementations, the training process of the suggestion model includes:
[0214] Extracting historical model building task data from the model building historical data as training samples, and extracting model building results corresponding to the historical model building task data from the model building historical data as sample labels corresponding to the training samples;
[0215] Inputting the training sample into the suggestion model to obtain a model recommendation result output by the suggestion model, wherein the model recommendation result includes a model structure and model parameters;
[0216] The parameters of the recommendation model are optimized with the goal of making the model recommendation result consistent with the sample label.
[0217] In some implementations, the model preparation unit 110 is further configured to:
[0218] The model recommendation algorithm is optimized and adjusted using the model construction task data and the target model.
[0219] The model building device provided in this embodiment belongs to the same application concept as the model building method provided in the above embodiments of this application, and can execute the model building method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the specific processing content of the model building method provided in the above embodiments of this application, and will not be repeated here.
[0220] The functions implemented by the above-mentioned units may be implemented by the same or different processors respectively, which is not limited in the embodiments of the present application.
[0221] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by the configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of hardware circuits, or in part by a processor calling software, and the remaining part is implemented in the form of hardware circuits.
[0222] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
[0223] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0224] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0225] Another embodiment of the present application also provides an electronic device, see Fig. 9 As shown, the device includes:
[0226] Memory 200 and processor 210;
[0227] The memory 200 is connected to the processor 210 and is used to store programs;
[0228] The processor 210 is used to implement the model building method disclosed in any of the above embodiments by running the program stored in the memory 200.
[0229] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
[0230] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.
[0231] A bus may include a pathway that transfers information between components of a computer system.
[0232] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0233] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0234] The memory 200 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0235] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0236] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0237] The communication interface 220 may include any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0238] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of any model building method provided in the above embodiments of the present application.
[0239] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the model building method described in any of the above embodiments of this specification.
[0240] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0241] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the model building method described in any of the above embodiments of this specification.
[0242] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0243] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0244] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0245] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0246] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0247] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0248] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0249] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0250] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0251] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0252] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A model building method, characterized in that: include: Acquire model building task data, wherein the model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model; the task information includes information on at least one task among image recognition, image classification, text recognition, text retrieval, and audio processing; Based on the model building task data, by executing the corresponding processing of the model recommendation algorithm, the model structure and model parameters for building the target model are determined; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model building task based on the model building historical data, the model building historical data includes historical model building task data, and the model building results corresponding to the historical model building task data; the model structure includes a machine learning model; Using the model parameters to set parameters of the model structure to obtain a model to be trained; The model to be trained is trained using the training data in the model building task data to obtain the target model.
2. The method according to claim 1, characterized in that: Based on the model building task data, by executing corresponding processing of the model recommendation algorithm, a model structure and model parameters for building the target model are determined, including: Inputting the model building task data into a pre-trained suggestion model so that the suggestion model determines the model structure and model parameters for building the target model based on the model building task data by executing corresponding processing of the model recommendation algorithm; The proposed model is obtained by training the model structure and model parameters based on the historical data of model construction.
3. The method according to claim 1, characterized in that The model structure is parameterized using the model parameters to obtain a model to be trained, and the model to be trained is trained using the training data in the model construction task data to obtain the target model, including: Performing parameter search based on the model parameters, and after each parameter search is completed, setting parameters of the model structure using the model parameters determined by the search to obtain a model to be trained; Using the training data in the model building task data to train the model to be trained, to obtain a candidate model; The above process is repeatedly performed until a preset stop condition is met, and the target model is determined from the obtained candidate models; wherein the stop condition includes reaching a set parameter search time, and / or the obtained candidate model meets the set requirements.
4. The method according to claim 3, characterized in that The model structure and model parameters used to construct the target model include a plurality of recommended model combinations, each of which includes a model structure and corresponding model parameters used to construct the target model; Performing parameter search based on the model parameters, and after each parameter search is completed, setting parameters of the model structure using the model parameters determined by the search to obtain a model to be trained, and training the model to be trained using the training data in the model construction task data to obtain a candidate model, including: Sequentially obtain each of the multiple recommended model combinations; Each time a recommended model combination is obtained, a parameter search is performed based on the model parameters in the recommended model combination, and after each parameter search is completed, the model structure in the recommended model combination is parameterized using the model parameters determined by the search to obtain a model to be trained; the model to be trained is trained using the training data in the model construction task data to obtain a candidate model.
5. The method according to claim 4, characterized in that Sequentially obtaining each of the plurality of recommended model combinations includes: Sorting the plurality of recommended model combinations according to their respective priorities to obtain a recommended model combination sequence; Starting from the starting position of the recommended model combination sequence, each recommended model combination in the recommended model combination sequence is acquired in sequence.
6. The method according to any one of claims 3 to 5, characterized in that The method further comprises: Based on the model building task data, a model structure and model parameters matching the model building task data are selected from a preset candidate model set.
7. The method according to claim 2, characterized in that The training process of the proposed model includes: Extracting historical model building task data from the model building historical data as training samples, and extracting model building results corresponding to the historical model building task data from the model building historical data as sample labels corresponding to the training samples; Inputting the training sample into the suggestion model to obtain a model recommendation result output by the suggestion model, wherein the model recommendation result includes a model structure and model parameters; The parameters of the recommendation model are optimized with the goal of making the model recommendation result consistent with the sample label.
8. The method according to claim 1 or 2, characterized in that: The method further comprises: The model recommendation algorithm is optimized and adjusted using the model construction task data and the target model.
9. A model building system, characterized in that: include: Data receiving unit, model recommendation subsystem and model building subsystem; The data receiving unit is used to obtain model building task data and send the obtained model building task data to the model recommendation subsystem and the model building subsystem; wherein the model building task data includes task information required to be performed by the target model to be built and training data information for training the target model; the task information includes information on at least one task of image recognition, image classification, text recognition, text retrieval, and audio processing; The model recommendation subsystem is used to determine the model structure and model parameters for constructing the target model based on the model construction task data by executing the corresponding processing of the model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model construction task based on the model construction historical data, and the model construction historical data includes historical model construction task data and model construction results corresponding to the historical model construction task data; the model structure includes a machine learning model; The model building subsystem is used to use the model parameters to set the parameters of the model structure to obtain the model to be trained; and use the training data in the model building task data to train the model to be trained to obtain the target model.
10. The model building system according to claim 9, characterized in that: The model recommendation subsystem includes a suggestion model, which is used to construct task data based on the model, and determines the model structure and model parameters used to construct the target model by executing corresponding processing of the model recommendation algorithm; wherein the suggestion model is obtained by training the model structure and model parameters based on the model construction historical data.
11. A model building device, characterized in that: include: A data acquisition unit, used to acquire model building task data, wherein the model building task data includes task information required to be performed by the target model to be built and training data information used to train the target model; the task information includes information on at least one task among image recognition, image classification, text recognition, text retrieval, and audio processing; A model preparation unit, configured to determine the model structure and model parameters for constructing the target model based on the model construction task data by executing corresponding processing of a model recommendation algorithm; wherein the model recommendation algorithm is an algorithm for determining the model structure and model parameters corresponding to the model construction task based on model construction history data, the model construction history data including historical model construction task data and model construction results corresponding to the historical model construction task data; the model structure includes a machine learning model; The model construction unit is used to use the model parameters to set the parameters of the model structure to obtain the model to be trained; and use the training data in the model construction task data to train the model to be trained to obtain the target model.
12. An electronic device, characterized in that: including memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the model building method according to any one of claims 1 to 8 by running the program in the memory.
13. A computer program product, characterized in that The method comprises computer program instructions, which, when executed by a processor, cause the processor to perform the model building method according to any one of claims 1 to 8.
