Method for acquiring models and computing device

By pre-training the base model, generating a performance matrix, and outputting a recommendation matrix, it solves the problem of high computing resources and labor costs in the process of obtaining machine learning models, improves efficiency, and simplifies the operation process.

WO2024217135A1PCT designated stage expired Publication Date: 2024-10-24HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Patent Information

Application Number
PCT/CN2024/077396
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-25
Filing Date
2024-02-18
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

In the acquisition process of existing machine learning models, feature engineering and hyperparameter adjustment require a large amount of computing resources and manpower, and the threshold is high, resulting in low model training costs and efficiency.

Method used

By pre-training the base model and generating a performance matrix, the recommendation matrix is ​​output based on the target data and evaluation indicators to directly determine the adapted model, reducing computing resource usage and labor costs, and improving model acquisition efficiency.

Benefits of technology

It achieves rapid acquisition of matching models, reduces computing resources and labor costs, improves model acquisition efficiency, and simplifies user operation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077396_24102024_PF_FP_ABST
    Figure CN2024077396_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a method for acquiring models and a computing device. Since performance matrices can determine the performance of each model under each test data set, in respect of target data provided by different users, recommendation matrices corresponding to the target data can be output according to the target data and the target performance matrices, namely, the performance of each model under the target evaluation indexes of interest to the users is obtained. The solution of the present application can rapidly output recommendation matrices for users, so as to determine target models matched with target data, thus reducing the occupation of computing resources and improving model acquisition efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Method and computing device for obtaining a model

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on April 19, 2023, with application number 202310423614.X, and priority to the Chinese patent application entitled “A method and computing device for obtaining a model”, all contents of which are incorporated by reference into this application.

[0002] This application claims priority to the Chinese patent application with application number 202310601191.6 filed with the State Intellectual Property Office of China on May 25, 2023, and priority to the Chinese patent application with the invention name “A method and computing device for obtaining a model”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of machine learning, and more specifically, to a method and computing device for obtaining a model. Background Art

[0004] Feature engineering refers to the process of extracting features from raw data using domain knowledge. The goal is to leverage these additional features to improve the quality of machine learning results, rather than simply feeding the machine learning process with raw data. However, feature engineering requires extensive data processing and computation, especially when processing large amounts of data. This consumes significant computing resources and time, potentially increasing the cost and difficulty of model training. Parameter tuning refers to hyperparameter optimization, which involves selecting an appropriate set of hyperparameters from the hyperparameter space to achieve a trade-off between model bias and variance, thereby improving model effectiveness and performance. Parameter tuning is a crucial step in machine learning, impacting model performance and generalization. Improper parameter tuning can lead to poor model performance or even failure to converge. However, parameter tuning is only performed by professionals who understand the algorithm principles and parameters, and is a labor-intensive and resource-intensive process for deep learning models.

[0005] Currently, the barrier to entry for machine learning is relatively high, requiring only technical professionals with advanced programming and data processing skills to perform relevant operations. Machine learning typically involves collecting large training datasets and then training models on these datasets. This model training process involves the aforementioned "feature engineering" and manual "parameter adjustment" to obtain a model that best matches the training dataset. In other words, each time a user provides new data, multiple model training and parameter adjustments are required to obtain a model that best matches the new data. This consumes significant computing resources and is labor-intensive.

[0006] Therefore, a method for obtaining a model is needed that can save computing resources and manpower costs and improve the efficiency of obtaining the model.

[0007] Summary of the Invention

[0008] This application provides a method for obtaining a model, which can save computing resources and manpower costs and improve the efficiency of obtaining the model.

[0009] On the first aspect, a method for obtaining a model is provided. The method can be executed by a computing device, or by a component of the computing device (such as a chip or circuit), or by each server or virtual machine in a cloud service system, without limitation.

[0010] The method includes: obtaining target data and a target evaluation index corresponding to the target data; determining a target performance matrix corresponding to the target evaluation index based on the target evaluation index, wherein the target performance matrix is ​​used to indicate the test performance of each of the Q pre-trained base models when P groups of test data test the Q pre-trained base models under the target evaluation index, wherein P and Q are both integers greater than or equal to 1; and outputting a recommendation matrix corresponding to the target data based on the target data and the target performance matrix, wherein the recommendation matrix is ​​used to indicate the scores of each of the Q pre-trained base models predicted by the target data under the target evaluation index.

[0011] In this application, each performance matrix is ​​a matrix of P rows and Q columns, where the P rows correspond to P groups of test data, and the Q columns correspond to Q pre-trained base models. The K-th element Kij in each performance matrix represents the performance of the j-th pre-trained base model under the first evaluation indicator when the i-th test data in the P groups of test data tests the j-th pre-trained base model among the Q pre-trained base models. The K-th element Kij is any element in the first performance matrix, and the first evaluation indicator is any evaluation indicator among multiple evaluation indicators.

[0012] In this application, "data" can be understood as structured data, such as table data or chart data, etc. Alternatively, it can be understood that as long as the data is processed into tables, charts, etc., the solution provided in this application can be used.

[0013] In this application, the target model can be understood as the model with the best performance when using the target data under the target evaluation, and this model is selected as the model corresponding to the target data.

[0014] In this application, evaluation metrics include at least one of the following: mean absolute error, symmetric mean absolute percentage error, root mean square error, accuracy, precision, recall, bias, and F1 score. These metrics are used to measure the performance of a model in a specific aspect. The target evaluation metric can be understood as one or more of the above-mentioned evaluation metrics.

[0015] It should be understood that the evaluation indicators in this application also include other indicators for evaluating model performance that may appear in the future and are not limited.

[0016] In this application, simple and easy-to-understand evaluation indicators are provided, allowing users to intuitively understand the performance of each model in various aspects.

[0017] Based on the above scheme, in this application, the performance matrix under different evaluation indicators is generated by using the pre-trained base models and test data, and the performance of each model can be determined by the performance matrix. Therefore, for the target data provided by the user, a recommendation matrix can be output based on the target data and the target performance matrix, that is, the performance of each model under the target evaluation indicator of the user is obtained. The solution of the present application can quickly output a recommendation matrix for the user to determine the model that is adapted to the target data, which can reduce the occupation of computing resources and improve the efficiency of obtaining the model.

[0018] In combination with the first aspect, in a possible implementation, the method further includes: determining, according to the recommendation matrix, a target model corresponding to the target data under the target evaluation index among the Q pre-trained base models, wherein, when the target data uses the target model, the score of the target model under the target evaluation index is greater than or equal to a first threshold.

[0019] In this application, the first threshold can be flexibly designed by the technology in this field based on actual conditions and is not limited.

[0020] In the present application, further, based on the scores of each pre-trained base model in the recommendation matrix under the target evaluation index, it is possible to determine, according to the recommendation matrix, a model that better matches the target data under the target evaluation index among the Q pre-trained base models.

[0021] For example, in one possible implementation, the user can retrain the target model through the target data and adjust the internal parameters of the target. It should be understood that the hyperparameters of the target model have been determined in the pre-training stage, and the user does not need to "adjust the parameters" again. The general "adjustment" process requires professional and technical personnel to find the hyperparameters suitable for the model through continuous attempts. In this application, the hyperparameters of each model have been determined after the initial pre-training. After the recommendation matrix is ​​output to the user, the user can directly train the determined target model, which greatly facilitates the user and improves the user experience.

[0022] In combination with the first aspect, in a possible implementation, the method further includes: pre-training Q base models according to M groups of training data to obtain Q pre-trained base models, where M is an integer greater than or equal to P.

[0023] It should be noted that, in this application, the hyperparameters of each base model can be determined after pre-training. It can also be understood that, in this application, the hyperparameters of each model can be determined by pre-training. In addition, the different base models in this application can be understood as completely different base models, or models with the same base model but different hyperparameters.

[0024] In combination with the first aspect, in a possible implementation, the method also includes: generating multiple performance matrices based on P groups of test data and Q pre-trained base models, the multiple performance matrices corresponding one-to-one to multiple evaluation indicators, the multiple performance matrices including a target performance matrix, and the multiple evaluation indicators including a target evaluation indicator.

[0025] In combination with the first aspect, in one possible implementation, the input of each pre-trained base model is P groups of test data, and the output of each pre-trained base model is P groups of inference data, wherein the P groups of test data correspond one-to-one to the P groups of inference data, and multiple performance matrices are generated based on the P groups of test data and the Q pre-trained base models, including: generating multiple performance matrices based on the P groups of test data, the P groups of inference data, the Q pre-trained base models, and multiple evaluation indicators.

[0026] For example, the original data set can also be divided into a training data set and a test data set, and both the test data set and the training data set can be understood as the original data set. Among them, the test data set can be used for pre-training of the base model, and the test data can be used to test the performance of each base model after pre-training. Generally, the amount of test data can be greater than the amount of test data. Of course, the training data set can also be used to test the performance of the model, and the test data set can also be used to train the model, which is not limited in this application.

[0027] For example, if the evaluation metric is accuracy, the accuracy performance of each model can be determined by determining how many of the inference data are completely consistent with the test data. Assuming there are three models, for test data #1, for example, in model #1, 6 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.6, and the score is 0.6; in model #2, 8 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.8, and the score is 0.8; in model #3, 4 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.4, and the score is 0.4. Therefore, it can be seen that for test data #1, model #2 has the best accuracy performance.

[0028] For example, suppose a client needs to predict sales figures for a number of vehicle brands in 2023. Historical data has already been collected during pre-training. For example, data on sales of various brands in the market for each quarter from 2012 to 2022 is collected. 70% of this data is used as training data, and 30% as test data. For example, the training data consists of multiple tables that reflect information such as year, quarter, brand, and sales volume. The test data also consists of multiple tables, but only reflects information such as year, quarter, and brand. This test data is fed into each pre-trained base model, and each pre-trained base model performs inference to obtain inference data, representing the corresponding sales volume. At this point, simply comparing the true values ​​of vehicle sales for each year, quarter, and brand in the test data with the corresponding inferred values ​​can determine the test performance of each model under various evaluation metrics. For example, if accuracy is of interest, one can measure how many of each model's inferred values ​​are completely consistent with the true values ​​of the test data.

[0029] Based on the above technical solution, the difference between the inference data predicted by the pre-trained base model and the input test data can be specifically obtained. For example, the calculation formula corresponding to each evaluation indicator can be used to calculate each element in the performance matrix, thereby obtaining the entire performance matrix.

[0030] In combination with the first aspect, in a possible implementation, outputting a recommendation matrix corresponding to the target data based on the target data and the target performance matrix includes: performing meta-feature extraction on P groups of test data respectively to generate a meta-feature matrix of the P groups of test data; determining a target mapping relationship between the meta-feature matrix of the P groups of test data and the target performance matrix based on the meta-feature matrix of the P groups of test data; performing meta-feature extraction on the target data to generate a meta-feature matrix of the target data; generating a first data matrix based on the meta-feature matrix of the target data and the target mapping relationship; and outputting a recommendation matrix corresponding to the target data based on the first data matrix and the target performance matrix.

[0031] Optionally, the method also includes: decomposing the target performance matrix to obtain a data matrix and a model matrix, wherein the number of rows of the data matrix is ​​P, the number of columns of the data matrix is ​​equal to the number of rows of the model matrix, and the number of columns of the model matrix is ​​Q; wherein the target mapping relationship is the mapping relationship between the meta-feature matrix of P groups of test data and the data matrix obtained by decomposing the target performance matrix.

[0032] For example, the number of rows of the meta-feature matrix of the P group test data is equal to the number of rows of the data matrix, and the number of columns of the meta-feature matrix of the P group test data is equal to the number of columns of the data matrix.

[0033] Based on the above technical solution, this application takes into account that the features of the extracted data sets under different tasks will be different, and even the data sets of the same task may not be exactly the same. Therefore, in order to make the target model finally obtained more valuable, it is proposed to obtain the target data based on the original feature extraction method. This method can ensure the consistency of the target data and the pre-trained test data features, thereby accurately predicting which model should be used for the target data, thereby improving the accuracy of model recommendation.

[0034] In combination with the first aspect, in a possible implementation, generating a recommendation matrix based on the first data matrix and the target performance matrix includes: outputting a recommendation matrix corresponding to the target data based on a model matrix obtained by decomposing the first data matrix and the target performance matrix.

[0035] For example, a recommendation matrix can be obtained by multiplying the first data matrix and the model matrix. The recommendation matrix is ​​similar to the performance matrix, and the recommendation matrix can be used to intuitively see which model best matches the target data under the target evaluation.

[0036] For given target data, existing methods need to continuously adjust hyperparameters and then train the model each time. Adjusting the hyperparameters and based on the adjusted hyperparameters all require a large amount of computing resources to find a model that matches the target data well, which takes up a lot of computing resources and is labor-intensive. In contrast, the method provided in the present application can output a recommendation matrix for the user based on the performance matrix obtained through early pre-training for the target data provided by the user, so as to determine a model that matches the target data well through the recommendation matrix, thereby reducing the occupancy of computing resources and saving labor costs. Exemplarily, subsequent users can perform model training on the target model determined in the recommendation matrix, but at this time, the process of model training does not require adjusting the hyperparameters, and only needs to optimize the model parameters inside the model, which can reduce resource waste.

[0037] On the second aspect, a method for obtaining a model is provided. The method can be executed by a computing device, or by a component of the computing device (such as a chip or circuit), or by each server or virtual machine in a cloud service system, without limitation.

[0038] The method includes: determining target data and a target performance matrix corresponding to the target data, the target performance matrix being used to indicate the test performance of each of the Q pre-trained base models when P groups of training data test the Q pre-trained base models under a target evaluation index, where P and Q are both integers greater than or equal to 1; determining first test data corresponding to the target data, where the similarity between the target data and the first test data is greater than or equal to a second threshold, wherein the first test data is data in the P groups of test data, and determining a target model corresponding to the first test data in the target performance matrix according to the target performance matrix, wherein when the target model uses the first test data, the score of the target model in terms of the target evaluation index is greater than or equal to the first threshold, and the Q pre-trained base models include the target model.

[0039] In the above scheme, this application generates a performance matrix under different evaluation indicators by using each pre-trained base model and test data. The performance of the test data under each model can be seen through each element in the performance matrix. When the test data set used for pre-training is small, by finding test data with a high similarity to the target data, the model that best matches the test data is determined according to the target performance matrix, and the model is directly recommended to the target data.

[0040] With this method, there is no need to perform multiple model trainings to find hyperparameters and optimize the model's internal parameters each time the target data is encountered. Instead, the target model can be directly recommended for the target data based on the performance matrix obtained through pre-training, which can reduce the use of computing resources and improve the efficiency of model acquisition.

[0041] In this application, the similarity between the "test data" and the "target data" can be measured, for example, by using existing "data similarity measurement" methods, such as nominal attributes, binary attributes, numerical attributes, or ordinal attributes, etc. of the data.

[0042] In a third aspect, the present application provides a computing device for executing the method of the first or second aspect. Specifically, the device may include units and / or modules, such as a transceiver unit and / or a processing unit, for executing the method for obtaining a model proposed in the present application.

[0043] In a fourth aspect, a computing device is provided, comprising: at least one processor configured to execute a computer program or instructions stored in a memory to perform the method of the first or second aspect. Optionally, the device further comprises a memory configured to store the computer program or instructions. Optionally, the device further comprises a communication interface, through which the processor reads the computer program or instructions stored in the memory.

[0044] In one implementation, the device is a functional computing device for implementing the method for acquiring a model in a chip.

[0045] In another implementation, the device is a chip, a chip system, or a circuit for implementing a model acquisition function in a chip.

[0046] In a fifth aspect, the present application provides a processor comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of the first or second aspect above.

[0047] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a transceiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.

[0048] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or if they do not conflict with their actual functions or internal logic in the relevant descriptions, they can be understood as processor output, reception, input and other operations, and can also be understood as sending and receiving operations performed by the radio frequency circuit and antenna. This application does not limit this.

[0049] In a sixth aspect, a processing device is provided, comprising a processor and a memory. The processor is configured to read instructions stored in the memory and receive signals via a transceiver and transmit signals via a transmitter to execute the method of the first or second aspect.

[0050] Optionally, there are one or more processors and one or more memories.

[0051] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0052] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0053] It should be understood that related data interaction processes, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of receiving input capability information from the processor. Specifically, data output by the processor can be output to the transmitter, and input data received by the processor can be received from the transceiver. The transmitter and transceiver can be collectively referred to as a transceiver.

[0054] The processing device in the sixth aspect described above may be one or more chips. The processor in the processing device may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

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

[0056] Optionally, the processor may be a general-purpose processor, which may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

[0057] In an eighth aspect, a computer-readable storage medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing the first aspect or the second aspect.

[0058] In a ninth aspect, a computer program product comprising instructions is provided, which, when run on a computer, enables the computer to execute the method in the first or second aspect above.

[0059] In a tenth aspect, a chip system is provided, comprising a processor for calling and running a computer program from a memory, so that a device equipped with the chip system executes the method of the first or second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] FIG1 is a schematic diagram of the basic process of machine learning shown in this application.

[0061] FIG2 is a schematic diagram of a scenario to which this application is applicable.

[0062] FIG3 is a schematic flowchart of a method 300 for acquiring a model provided in this application.

[0063] FIG4 is a schematic diagram of the performance matrix provided in this application.

[0064] FIG5 is another schematic diagram of the performance matrix provided in this application.

[0065] FIG6 is another schematic diagram of the method for obtaining a model provided in this application.

[0066] FIG7 is another schematic diagram of the method for obtaining a model provided in the present application.

[0067] FIG8 is a schematic block diagram of a computing device 100 provided in this application.

[0068] FIG9 is a schematic block diagram of a computing device 200 provided in this application.

[0069] FIG10 is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application.

[0070] FIG11 is a schematic diagram of a network connection between computing devices 1000A and 1000B provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] The technical solution in this application will be described below with reference to the accompanying drawings.

[0072] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0073] In order to facilitate understanding of the technical solutions provided by this application, the following is a brief introduction to the professional mathematical terms involved in this application.

[0074] 1. Meta-learning (ML)

[0075] Meta-learning is an exciting research trend in machine learning that addresses the problem of learning to learn. The traditional approach to machine learning research involves acquiring a large dataset for a specific task and using it to train a model from scratch. Clearly, this deviates from how humans leverage past experience to quickly learn new tasks. This is because humans learn to learn.

[0076] 2. Meta-features (MF)

[0077] Meta-features refer to information extracted from raw data for feature representation and classification. In the fields of machine learning and deep learning, meta-features are often used to train classification models, regression models, and clustering models.

[0078] 3. Performance Matrix (PM)

[0079] A performance matrix is ​​a matrix used to evaluate model performance. A performance matrix is ​​usually a two-dimensional matrix, in which "rows" represent different data and "columns" represent models and their parameters under a certain evaluation index. In the performance matrix, each element represents the performance of the data in a certain model, usually expressed as a numerical value or symbol. The performance matrix can be decomposed to obtain a data matrix (dataset matrix, DM) and a model matrix (model matrix, MM), that is, P = DM * MM. In this application, each evaluation index can correspond to a performance matrix, and each element in each performance matrix can represent the performance of a model under a certain evaluation index.

[0080] 4. Multi-output regressor model (MORM)

[0081] A multiple output regression model is a regression model used to predict multiple output variables. In a multiple output regression model, the model needs to predict multiple output variables, such as sales volume, sales volume, profit, etc. Generally, multiple output regression models can be divided into two types: linear and nonlinear.

[0082] 5. Pre-training

[0083] "Pre-training" in this application can be understood as manually setting "hyperparameters" when training a model. Given a training data set, each base model is trained and the "model parameters" are updated. In other words, the pre-training process in this application can optimize each base model. For example, the pre-training process can use a "supervised learning model" or an "unsupervised learning model", etc., without limitation. Those skilled in the art can flexibly set it according to actual circumstances.

[0084] 6. Base Model

[0085] The “base model” of this application can be a traditional machine learning algorithm, a deep learning algorithm, or expert experience and formulas. Among them, traditional machine learning algorithms include decision trees, support vector machines, neural networks, etc. They are usually based on the principles of statistics and probability theory, and use labeled data to train models for tasks such as classification and regression. Deep learning algorithms are based on neural networks and achieve classification and prediction of high-dimensional data through the design, optimization and training of neural network models. Expert experience and formulas refer to the use of expert knowledge and experience to make predictions and decisions by establishing mathematical models or formulas.

[0086] 7. Feature Engineering

[0087] Feature engineering refers to the transformation and extraction of raw data to create new features so that machine learning algorithms can better understand and predict data. It is a very important part of machine learning and directly affects the accuracy and generalization ability of the model. Through operations such as data cleaning, data preprocessing, feature selection, feature scaling, feature dimensionality reduction and feature generation, new features can be created to improve the performance of the model. Feature engineering is a very important part of machine learning, but it also has some disadvantages, including: (1) It requires a lot of preprocessing work: Feature engineering requires cleaning, preprocessing and transforming data, which takes a lot of time and effort, especially when processing large-scale data, which requires a lot of computing resources and time. (2) It may introduce noise and bias: In feature engineering, data needs to be cleaned, preprocessed and transformed, but these operations may introduce noise and bias, which will affect the accuracy and generalization ability of the model. (3) It requires in-depth analysis of the data: Feature engineering requires in-depth analysis of the data to extract the most relevant features, but if the data quality is not high or the feature selection is inappropriate, it may lead to poor model performance. (4) Requires a lot of computing resources: Feature engineering requires a lot of data processing and calculation, especially when processing large-scale data, which requires a lot of computing resources and time, which may increase costs and difficulty. (5) May affect the generalization ability of the model: The operation of feature engineering may affect the generalization ability of the model. If it is not done properly, it may cause the model to perform poorly on new data.

[0088] 8. Adjust parameters

[0089] "Parameter tuning" refers to "hyperparameter" optimization, which involves selecting an appropriate set of hyperparameters from the hyperparameter space to strike a balance between the model's bias and variance, thereby improving model effectiveness and performance. "Hyperparameters" refer to parameters that cannot be learned from the training data during training or that cannot be changed by the training data. They are a concept relative to the "internal parameters of the model." Hyperparameters of deep learning models are typically set manually based on experience or experimentation. Hyperparameters include: learning rate, batch size, network structure hyperparameters (such as the number of network layers (also known as depth), how layers interact with each other, the number and size of convolution kernels, and activation functions). The "internal parameters of the model" are generally optimized through the calculation of a loss function and repeated iterations. Generally, the internal parameters of the model are related to a specific dataset.

[0090] "Parameter adjustment" is a very important part of machine learning, which affects the performance and generalization ability of the model. If the "parameter adjustment" is not done properly, the model may perform poorly or even fail to converge. However, only professional technicians who understand the principles of the algorithm and hyperparameters can adjust the parameters, and "parameter adjustment" is also a very labor-intensive and material-intensive process for deep models. When the data is normal, although parameter adjustment can improve the performance of the model, it also has some disadvantages, including: (1) Requires a lot of computing resources and time: Parameter adjustment requires adjusting the external parameters of the model to optimize the performance of the model. This requires a lot of computing resources and time, especially when processing large-scale data. (2) Requires professional knowledge and skills: Parameter adjustment requires professional knowledge and skills, such as machine learning, data analysis, numerical optimization, etc. This requires experts to have rich experience and skills to ensure the effect and accuracy of parameter adjustment. (3) There may be uncertainty and randomness: The parameter adjustment process may be uncertain and random because the adjustment of parameters depends on the optimization and search capabilities of the algorithm. This may cause the results of parameter adjustment to have a certain degree of randomness and uncertainty. (4) Parameter tuning may not be able to find the optimal solution: Parameter tuning may not be able to find the optimal solution because the parameter space may be infinite and the performance of the model may be affected by many factors. Therefore, even parameter tuning cannot guarantee that the optimal solution will be found. (5) Possible impact on privacy and security: Parameter tuning may require accessing and processing a large amount of personal data, which may have an impact on privacy and security. Therefore, when processing sensitive data, appropriate security measures need to be taken to protect the security of the data.

[0091] 9. Structured Data

[0092] Structured data refers to data stored and represented in computers using data structures, such as tables, charts, and tables in relational databases. With the rapid development of the Internet and information technology, a large amount of data exists in the form of structured data, and the use cases of structured data are becoming increasingly widespread.

[0093] Specifically, the applications of structured data include the following aspects: (1) E-commerce: With the rapid development of e-commerce, more and more companies have begun to use structured data to manage orders, inventory, and customer information to improve efficiency and accuracy. (2) Financial risk control: Structured data is widely used in the financial field, such as risk control, investment analysis, fraud detection, etc. (3) Healthcare: Structured data is also increasingly used in the healthcare field, such as medical record management, medical image analysis, drug development, etc. (4) Internet of Things: With the continuous development of Internet of Things technology, a large number of sensors and devices can collect and process structured data, such as temperature, humidity, light intensity, sensor data, etc. (5) Artificial Intelligence: Structured data is an important input for artificial intelligence algorithms, such as data sets and labeled data used to train machine learning models.

[0094] Figure 1 shows a schematic diagram of the basic process in machine learning. As shown in Figure 1, step 101 involves collecting data. For example, data can be collected from big data websites or internal company software. Step 102 involves data cleaning. For example, the acquired data can be checked for obvious errors or empty data. Step 103 involves feature engineering, which involves transforming the data so that it can be recognized by the program. This typically involves vectorizing the data and extracting its features. Step 104 involves preprocessing the data. For example, this involves normalizing and standardizing the data to make it easier for the program to recognize it. Step 105 involves selecting an algorithm model. An appropriate algorithm model must be selected. Step 106 involves training the model. Model training is an iterative process that optimizes model performance through continuous training, optimization of model parameters, and manual adjustment of hyperparameters. Step 107 involves deploying the model. The trained model is deployed on a server.

[0095] As can be seen from the above introduction, the threshold for machine learning is relatively high, and only professional technicians with certain programming and data processing skills can perform related operations. In machine learning, large training data sets are usually collected and model training is performed on these data sets. The model training process includes the above-mentioned "feature engineering" and manual "parameter adjustment" process, thereby obtaining a model that better corresponds to the training data set. In other words, each time new data is provided by the user, in order to obtain a model that better matches the new data, model training is required. For a large amount of different new data, performing model training each time will require a large amount of computing resources and consume manpower. Therefore, a method for obtaining a model is needed that can save computing resources and labor costs and improve the efficiency of model acquisition.

[0096] In view of this, the present application provides a method for obtaining a model, in which each base model is pre-trained through training data, and then the performance matrix under different evaluation indicators is generated using the pre-trained base models and test data. The performance matrix can be used to show the performance of each model under a certain evaluation indicator. Therefore, a recommendation matrix can be output based on the target data and the performance matrix for the target data provided by the user, that is, the performance of each model under the evaluation indicator of interest to the user is obtained. The solution of the present application can quickly output a recommendation matrix for the user in order to determine the model that is adapted to the target data, thereby obtaining the model that best matches the target data. This method can reduce the occupancy of computing resources and manpower costs.

[0097] The technical solution provided in this application can be applied in cloud scenarios. Figure 2 is a schematic diagram of a scenario to which this application is applicable. As shown in Figure 2, the public cloud artificial intelligence (AI) basic development platform is a platform as a service (PaaS) cloud service in the cloud platform. It is a software platform that assists enterprises (also known as tenants, AI developers, etc.) in building, training, optimizing, deploying AI models and developing and deploying AI applications based on the large amount of basic resources and software capabilities owned by public cloud service providers. When an enterprise develops and trains its own AI model on the AI ​​basic development platform, it is based on the basic resources in the cloud service provider's data center (mainly computing resources, such as central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), etc.). In this application, for example, model pre-training, performance matrix generation and recommendation matrix generation can be performed on the cloud platform.

[0098] FIG3 is a schematic flow chart of a method 300 for obtaining a model provided by the present application. The method is mainly divided into a process of generating a performance matrix through pre-training and a process of generating a recommendation matrix based on the performance matrix. It should be noted that the pre-training process in the present application can generally be performed only once, and each performance matrix obtained through pre-training can be directly used. Therefore, steps 301 and 302 are optional. As shown in FIG3, the method includes:

[0099] Optionally, in step 301, multiple base models are pre-trained according to the training data to obtain multiple pre-trained base models.

[0100] The understanding of "base model" and "pre-training" in step 301 can refer to the above description and will not be repeated here.

[0101] Optionally, before step 301 , the method further includes: obtaining original data.

[0102] Specifically, in this application, the original data set can be divided into a training data set and a test data set, wherein the training data set can be used for model pre-training, and the test data can be used to subsequently generate a performance matrix based on each base model after pre-training. Normally, the amount of test data can exceed the amount of test data. Of course, the training data set can also be used to test the performance of the model, and the test data set can also be used to train the model, which is not limited in this application. For example, the test data includes M groups of training data and P groups of test data, where M is a positive integer greater than or equal to P. Exemplarily, 70% of the test data is used as training data and 30% of the test data is used as test data.

[0103] In this application, "training data" may also be referred to as a "training dataset." This application collects and organizes a large number of training datasets, which cover a variety of tasks such as classification, regression, time series, and anomaly detection. It should be noted that the data type of the training data in this application can be structured data.

[0104] In one possible implementation, Q base models are pre-trained based on M sets of training data to obtain Q pre-trained base models. In this application, M, P, and Q are all integers greater than or equal to 1.

[0105] For example, during pre-training, hyperparameters and the number of training times can be manually set. Through multiple trainings, the model parameters of each base model can be updated so that each pre-trained base model is more closely aligned with the training data base. Specifically, multiple base models can be trained together or separately, which is not limited in this application.

[0106] In this application, "various models" can be understood as having different model parameters or using different algorithms. For example, in some cases, models with the same algorithm but different internal model parameters can be understood as different models. In another example, in some cases, the algorithms are different, which can also be understood as different models. Therefore, in this application, each model can also be understood as having different model parameters.

[0107] Optionally, in step 302 , multiple performance matrices are generated based on the test data and multiple pre-trained base models.

[0108] For example, multiple performance matrices are generated based on P sets of test data and Q pre-trained base models.

[0109] In the present application, multiple performance matrices correspond to multiple evaluation indicators one by one. It can also be understood that each evaluation indicator corresponds to a performance matrix. Among them, multiple performance matrices include a target performance matrix, and multiple evaluation indicators include a target evaluation indicator. Or it can also be understood that each performance matrix is ​​a matrix of P rows and Q columns, the P rows correspond to P groups of test data, the Q columns correspond to Q pre-trained base models, and the K-th element Kij in each performance matrix represents the performance of the j-th pre-trained base model under the first evaluation indicator when the i-th test data in the P group of test data tests the j-th pre-trained base model in the Q pre-trained base models. The K-th element Kij is any element in the first performance matrix, and the first evaluation indicator is any evaluation indicator among multiple evaluation indicators.

[0110] Suppose there are four tasks, namely regression tasks, classification tasks, time series tasks and anomaly detection tasks. This application proposes that the evaluation indicators are different for different types of tasks. Even for the same task, the evaluation indicators may be different due to different test data. This application provides different evaluation indicators for different types of tasks. For example, in regression tasks, mean absolute error (MAE) can be used as an evaluation indicator. In classification tasks, indicators such as accuracy, precision, recall and F1 score can be used for evaluation. In time series tasks, indicators such as mean absolute error, root mean square error (RMSE) and symmetric mean absolute percentage error (SMASP) can be used for evaluation. For anomaly detection tasks, deviance can be used as an evaluation indicator.

[0111] It should be noted that the evaluation indicators in this application are not limited to the evaluation indicators listed above, but also include other evaluation indicators that may appear in the future.

[0112] For example, a test dataset and pre-trained base models can be used to generate a performance matrix, where the performance matrix includes multiple elements, each of which represents the performance of each pre-trained base model using the test data under a certain evaluation metric.

[0113] For example, suppose that in a classification task, the accuracy, recall and mean absolute error of the data need to be measured. There are 6 base models, 3 sets of training data sets and 3 sets of test data sets. At this time, the 3 sets of training data sets can be used to pre-train the 5 base models to obtain the pre-trained base models. Then, the 3 sets of test data sets are used to test the accuracy and recall of each base model respectively. For example, the accuracy corresponds to the performance matrix #1, the recall corresponds to the performance matrix #2, and the mean absolute error corresponds to the performance matrix #3. The performance matrix #1 has 3 rows and 6 columns, each row represents one of the 3 test data sets, and each column represents one of the 6 pre-trained base models. Figure 4 shows the performance matrix #1, and each element in Figure 4 represents the performance of each model under each test data set. For example, each element in the performance matrix #1 in Figure 4 can be a specific numerical value, that is, a score is given for the accuracy under each model. For another example, each element in the performance matrix #1 can be a specific character, that is, the accuracy under each model is evaluated. For example, 9 levels of A++, A+, A, B++, B+, B, C++, C+, C can be used to evaluate the accuracy under each model.

[0114] Specifically, the following method can be used to determine the score or character of each element in the performance matrix #1. For example, for the pre-trained base model #1, its input can be test data #1 and the output is inference data #1. Since the current evaluation indicator is accuracy, the existing formula can be used to perform a series of mathematical operations on the inference data #1 and the test data #1 to determine the accuracy performance of the test data #1 in the pre-trained base model #1. For example, it can be reflected in the form of scoring. The higher the score, the better the accuracy performance of the test data #1 under the model. Similarly, the performance matrix #2 and so on can be understood in a similar way and will not be described in detail.

[0115] For example, if the evaluation metric is accuracy, the accuracy performance of each model can be determined by determining how many of the inference data are completely consistent with the test data. Assuming there are three models, for test data #1, for example, in model #1, 6 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.6, and the score is 0.6; in model #2, 8 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.8, and the score is 0.8; in model #3, 4 out of 10 inference data are completely consistent with test data #1, so model #1's accuracy is 0.4, and the score is 0.4. Therefore, it can be seen that for test data #1, model #2 has the best accuracy performance.

[0116] For example, suppose a client needs to predict sales figures for a number of vehicle brands in 2023. Historical data has already been collected during pre-training. For example, data on sales of various brands in the market for each quarter from 2012 to 2022 is collected. 70% of this data is used as training data, and 30% as test data. For example, the training data consists of multiple tables that reflect information such as year, quarter, brand, and sales volume. The test data also consists of multiple tables, but only reflects information such as year, quarter, and brand. This test data is fed into each pre-trained base model, and each pre-trained base model performs inference to obtain inference data, representing the corresponding sales volume. At this point, simply comparing the true values ​​of vehicle sales for each year, quarter, and brand in the test data with the corresponding inferred values ​​can determine the test performance of each model under various evaluation metrics. For example, if accuracy is of interest, the number of inferred values ​​from each model that are completely consistent with the test values ​​can be measured.

[0117] In this application, simple and easy-to-understand evaluation indicators are provided so that users can intuitively understand the performance of each model.

[0118] Step 303: Obtain target data and target evaluation indicators corresponding to the target data.

[0119] In this application, the data type of the target data may be structured data.

[0120] Exemplarily, the target evaluation metric may include at least one of the following: mean absolute error, symmetric mean absolute percentage error, root mean square error, accuracy, precision, recall, bias, and F1 score.

[0121] For example, the target evaluation index may be pre-specified by the user. For example, the user specifies which evaluation index or which evaluation indexes to focus on based on the provided target data.

[0122] Step 304: Determine a target performance matrix corresponding to the target evaluation indicator according to the target evaluation indicator.

[0123] In this application, the target performance matrix can be determined based on the target evaluation metric. The target performance matrix is ​​included in the multiple performance matrices generated in step 302. For example, if the evaluation metric of interest to the user is mean absolute error, then the performance matrix #3 corresponding to the mean absolute error generated in step 302 can be found. For another example, if the evaluation metric of interest to the user is recall rate, then the performance matrix #2 corresponding to the recall rate generated in step 302 can be found.

[0124] In this application, the target performance matrix is ​​used to indicate the test performance of each of the Q pre-trained base models when P groups of test data test the Q pre-trained base models under the target evaluation index.

[0125] It should be noted that for a given target data, there may be one or more evaluation indicators that the user is concerned about.

[0126] Considering that the features of the extracted datasets for different tasks will be different, and even the datasets for the same task may not be exactly the same, in order to make the target model finally obtained more useful, this application proposes to extract original features from the test data and meta-features from the target data, and perform a series of processing to ensure that there is a connection between the target data and the test data. For example, data from the financial industry and data from the sales industry usually seem to have nothing to do with each other, but after meta-feature extraction, it may be found that the data features of the two may be similar. At this time, the model that was previously pre-trained and matched well with the data from the financial industry can be recommended to the data from the sales industry.

[0127] For example, after generating the performance matrices corresponding to the various average indicators in step 302, each performance matrix can be decomposed to generate a data matrix and a model matrix. Taking performance matrix #1 as an example, the number of columns of model matrix #1 of performance matrix #1 is 6, and the number of rows of model matrix #1 can be manually set, for example, 2. The content of model matrix #1 can be randomly generated by the system. Therefore, model matrix #1 can be a 2×6 matrix. In this case, data matrix #1 can be obtained based on performance matrix #1 and model matrix #1. For example, data matrix #1 has 3 rows and 2 columns, that is, the data matrix is ​​a 3×2 matrix. As shown in Figure 5, the performance matrix #1 can be obtained by multiplying data matrix #1 and model matrix #1.

[0128] Exemplarily, meta-feature extraction can be performed on the test data to obtain a meta-feature matrix of the test data. If the dimension of the extracted meta-feature matrix is ​​relatively high, the meta-feature matrix can be further reduced in dimensionality. For example, the number of rows of the meta-feature matrix of the test data is the same as the number of rows of the decomposed data matrix #1, and / or the number of columns of the meta-feature matrix of the test data is the same as the number of columns of the decomposed data matrix #1. Furthermore, a mapping relationship between the data matrix #1 and the meta-feature matrix of the test data can be obtained. For example, the mapping relationship can be a multivariate output regression model; for another example, the mapping relationship is Y=kX, or the mapping relationship is Y=kX+b. For another example, the mapping relationship can be a deep learning model, and so on are not limited.

[0129] Exemplarily, meta-features are extracted from the target data to obtain a meta-feature matrix for the target data. If the dimensionality of the extracted meta-feature matrix is ​​relatively high, the meta-feature matrix can be further reduced. For example, the number of columns in the meta-feature matrix of the target data is the same as the number of columns in the decomposed data matrix #1. Furthermore, it is necessary to clearly define the target evaluation indicators for the target data, determine the target performance matrix, and thus determine the target mapping relationship corresponding to the target performance matrix. In this case, the first data matrix can be determined based on the meta-feature matrix of the target data and the target mapping relationship.

[0130] This application proposes a meta-feature extraction method to obtain the meta-feature matrix of target data. This method can ensure that the features of the target data remain consistent with those of the pre-trained test data, thereby accurately predicting which model should be used for the target data and improving the accuracy of model recommendation.

[0131] Step 305: Output a recommendation matrix corresponding to the target data based on the target data and the target performance matrix.

[0132] In this application, the recommendation matrix corresponds one-to-one with the target performance matrix. It can also be understood that, for the target data, the evaluation indicators that the user cares about correspond to the recommendation matrix. In other words, each element in the recommendation matrix represents the performance of each model for that target evaluation indicator.

[0133] Among them, the recommendation matrix is ​​used to indicate the prediction performance of each of the Q pre-trained base models predicted by the target data under the target evaluation index.

[0134] Specifically, in a possible implementation, the first data matrix and the model matrix corresponding to each performance matrix may be multiplied together to output a recommendation matrix corresponding to the target data.

[0135] For example, assuming that the target data focuses on accuracy, a recommendation matrix #1 can be generated based on the first data and the model matrix #1. Each element in the recommendation matrix #1 can reflect the prediction performance of the pre-trained base model #1 to the pre-trained base model #6 under the target data. For example, it can be presented by scores or characters.

[0136] It should be understood that in one possible implementation, one or more recommended models that best fit the target data may be directly presented to the user without presenting the scores of the individual models.

[0137] Optionally, the method further includes step 306, wherein a target model corresponding to the target data under the target evaluation index is determined from the Q pre-trained base models according to the recommendation matrix.

[0138] In this application, the elements in recommendation matrix #1 can be used to directly determine which model performs best under the target evaluation index, or which model best matches the target data under the target evaluation index. For example, the target model is the model represented by the element with the highest score.

[0139] When there are multiple evaluation indicators that users are interested in for a certain target data, recommendation matrices can be obtained for each evaluation indicator. Each recommendation matrix will have the optimal model under its corresponding evaluation indicator, and the user can select a model based on the actual situation. For example, the scores of the corresponding models in different recommendation matrices can be weighted, and the model with the highest weighted score is selected as the target model. For example, for target data #1, the user is interested in the model accuracy and model regression rate. At this time, assuming that the accuracy corresponds to recommendation matrix #1, recommendation matrix #1 is . It can also be understood that there are 4 models in the recommendation matrix, where model #1 has a score of 0.5, model #2 has a score of 0.7, model #3 has a score of 0.3, and model #4 has a score of 0.9. Assuming that the regression rate corresponds to recommendation matrix #2, recommendation matrix #2 is . The various elements in recommendation matrix #2 can also be understood with reference to recommendation matrix #1. If the user is more concerned about the accuracy of the model, for example, the accuracy is 70% and the regression rate is 30%, then the scores of each model after weighted average are , so it can be determined that model #3 best meets the user's needs.

[0140] FIG6 shows a flow chart of the method for obtaining a model proposed in this application from the perspective of a matrix. As shown in FIG6 , assuming that there are 30 groups of test data and 10 base models, each performance matrix obtained after pre-training is a matrix of 30 rows × 10 columns. The performance matrix can then be decomposed into a data matrix and a model matrix, wherein the number of rows and columns of the model matrix to be decomposed can be fixed in advance, for example, the number of rows of the model matrix is ​​10 and the number of columns is 20, and the content of the model matrix is ​​randomly generated. After the model matrix is ​​fixed, the data matrix can be inferred based on the performance matrix, for example, the data matrix is ​​a matrix of 30 rows × 20 columns. In addition, meta-feature extraction can be performed on the test data to obtain a meta-feature matrix of the test data, assuming that the meta-feature matrix of the test data is a matrix of 30 rows × 100 columns. Optionally, the meta-feature matrix of the test data can also be reduced in dimension, and the meta-feature matrix of the test data after dimensionality reduction is a matrix of 30 rows × 10 columns. At this point, the mapping relationship between the data matrix obtained by decomposing each performance matrix and the meta-feature matrix of the test data after dimensionality reduction is obtained. For example, the mapping relationship can be a linear expression: y = kx, where the data matrix obtained by performance matrix decomposition can be considered as y, and the meta-feature matrix of the test data after dimensionality reduction can be considered as x. It should be understood that there is a mapping relationship between each data matrix obtained by performance matrix decomposition and the meta-feature matrix of the test data.

[0141] Assuming that the target data is a matrix of 1 row × 30 columns, after obtaining the target data, meta-feature extraction can be performed on the target data to obtain the meta-feature matrix of the target data. Assuming that the meta-feature matrix of the target data is a matrix of 1 row × 100 columns, it is then subjected to dimensionality reduction. After dimensionality reduction, the meta-feature matrix of the target data obtained is a matrix of 1 row × 10 columns. At this time, the first data matrix can be obtained based on the meta-feature matrix of the target data obtained after dimensionality reduction and the target mapping relationship. The recommendation matrix can be obtained by multiplying the first data matrix with the model matrix obtained by decomposing the target performance matrix. Figure 6 shows a recommendation matrix, which is a matrix of 1 row × 10 columns. From the recommendation matrix, it can be intuitively seen that the pre-trained base model #3 under the target evaluation index has the highest score when using the target data, that is, the best performance. Therefore, the model that best matches the target data is the pre-trained base model #3.

[0142] It should be noted that in Figure 6, after the performance matrix is ​​generated, the performance matrix can be decomposed, and the data matrix and model matrix obtained after the decomposition of each performance matrix can be saved separately. In addition, the mapping relationship corresponding to each performance matrix can be saved. In this way, if there is target data, the mapping relationship corresponding to the target performance matrix of the target evaluation indicator of the target data and the decomposed model matrix can be directly found. This can speed up the processing speed and avoid repeated splitting of the performance matrix and determination of the mapping relationship, etc., which can reduce the processing delay of the business and improve the user experience.

[0143] FIG7 is another schematic diagram of the model acquisition method illustrated in this application. As shown in FIG7 , each base model is pre-trained using collected test data to obtain a performance matrix under each evaluation indicator. Feature extraction can then be performed on the test data to obtain a meta-feature matrix of the test data. For new target data, meta-features of the target data can be extracted, and then model recommendations can be made based on the meta-features of the target data and the target performance matrix.

[0144] For a given target data, existing methods require multiple training models to find a model that best matches the target data, which consumes a large amount of computing resources and manpower. In contrast, the method provided in this application can recommend a model that is suitable for the target data provided by the user, reducing the use of computing resources and saving manpower costs.

[0145] In addition, the method provided in this application has higher accuracy and greater flexibility. The hyperparameters of the model can be adjusted during the pre-training stage to adapt to different data and task requirements.

[0146] The above technical solution can also be understood as follows: after pre-training, the performance matrix under each evaluation indicator is obtained. When the test data used for pre-training is small, by finding test data (for example, test data) that is extremely similar to the target data, the model that best matches the test data (for example, test data) is determined according to each element in the target performance matrix, and the model is directly recommended to the target data.

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

[0148] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.

[0149] In the embodiment of the present application, the computing device can be divided into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0150] FIG8 is a schematic block diagram of a computing device 100 according to an embodiment of the present application. As shown in the figure, the computing device 100 may include an acquisition module 110, a determination module 120, and a processing module 130. Optionally, the computing device 100 may also include a pre-training module 140.

[0151] Among them, the above modules are respectively used to execute the various steps of the above-mentioned method for obtaining the model, which will not be repeated here.

[0152] It should also be understood that the computing device 100 herein is embodied in the form of a functional unit. The term "unit" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group of processors, etc.) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functionality.

[0153] The computing device 100 in each of the above-described embodiments has the functionality to implement the corresponding steps of the above-described method 300. These functions can be implemented via hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above-described functions; for example, the determination unit and the like can be replaced by a processor to perform the transceiver operations and related processing operations in each of the method embodiments. Furthermore, the determination unit can be a processing circuit.

[0154] It should be noted that the computing device in FIG8 can be the computing device in the aforementioned method embodiment, or it can be a chip or chip system of the computing device, such as a system on chip (SoC). The processing unit is a processor, microprocessor, or integrated circuit integrated on the chip. This is not limited here.

[0155] Figure 9 is a schematic block diagram of another computing device 200 provided in accordance with an embodiment of the present application. As shown, the device 200 includes at least one processor 220. The processor 220 is coupled to a memory and configured to execute instructions stored in the memory to transmit and / or receive signals. Optionally, the device 200 also includes a memory 230 for storing instructions. Optionally, the device 200 also includes a transceiver 210, with the processor 220 controlling the transceiver 210 to transmit and / or receive signals.

[0156] It should be understood that the processor 220 and memory 230 may be combined into one processing device, and the processor 220 is used to execute the program code stored in the memory 230 to implement the above functions. In specific implementations, the memory 230 may also be integrated into the processor 220 or independent of the processor 220.

[0157] It should also be understood that the transceiver 210 may include a transceiver (or receiver) and a transmitter (or transmitter). The transceiver may further include an antenna, and the number of antennas may be one or more. The transceiver 210 may also be a communication interface or interface circuit.

[0158] Specifically, the processor 220 in the device 200 may correspond to the acquisition module 110, the matrix generation module 120, and the determination module 130 in the computing device 100. Optionally, the processor 220 may also correspond to the pre-training module 140 or the matrix decomposition module 150 in the computing device 100.

[0159] As a solution, the computing device 200 is used to implement the steps in the above method 300 embodiment.

[0160] For example, the processor 220 is configured to execute computer programs or instructions stored in the memory 230 to implement the various steps in the above method 300 .

[0161] Figure 10 is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone. As shown in Figure 10, the computing device cluster includes at least one computing device 1000. The memory 1030 in one or more computing devices 1000 in the computing device cluster can store the same instructions for executing the method of obtaining the module described in the above embodiment.

[0162] In some possible implementations, the memory 1030 of one or more computing devices 1000 in the computing device cluster may also store partial instructions for executing the method for obtaining a model described in the above embodiment. In other words, the combination of one or more computing devices 1000 can jointly execute instructions for executing the method for obtaining a model described in the above embodiment.

[0163] It should be noted that the memory 1030 in different computing devices 1000 in the computing device cluster may store different instructions, each for executing part of the functions of the computing device 1000. That is, the instructions stored in the memory 1030 in different computing devices 1000 may implement the functions of one or more modules among the acquisition module 110, the determination module 120, the processing module 130, and the pre-trained model 140.

[0164] Alternatively, the memory 1030 in different computing devices 1000 in the computing device cluster may store different instructions, each for executing part of the functions of the computing devices 100 to 200. That is, the instructions stored in the memory 1030 in different computing devices 1000 may implement the functions of one or more of the acquisition module 110, determination module 120, processing module 130, and pre-training module 140.

[0165] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG11 shows a possible implementation. FIG11 is a schematic diagram of a network connection between computing devices 1000A and 1000B provided in an embodiment of the present application. The two computing devices 1000A and 1000B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1030 in the computing device 1000A stores instructions for executing the functions of the acquisition module 110, the determination module 120, and the processing module 130. At the same time, the memory 1030 in the computing device 1000B stores instructions for executing the functions of the pre-training module 140.

[0166] The connection method between the computing device clusters shown in Figure 11 can be considered to be that the model acquisition method provided in this application requires a large amount of matrix multiplication and matrix decomposition calculations, and the pre-training stage also requires some computing resources. Therefore, it is considered to hand over the functions implemented by the pre-training module 140 to the computing device 1000B for execution.

[0167] It should be understood that the functions of the computing device 1000A shown in FIG11 may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B may also be completed by multiple computing devices 1000.

[0168] According to the method provided in the embodiment of the present application, the present application also provides a computer program product, which stores computer program code. When the computer program code is run on a computer, the computer executes the steps in the embodiment of method 300.

[0169] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable medium, which stores program code. When the program code runs on a computer, the computer executes the steps in the embodiment of the above method 300.

[0170] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, and will not be repeated here.

[0171] It should be understood that the specific process of each transceiver and processor executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.

[0172] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0173] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above processor can be a general-purpose processor, 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, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0174] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0175] In each of the above-mentioned device embodiments, the corresponding modules or units perform the corresponding steps. For example, the transceiver unit (transceiver) performs the receiving or sending steps in the method embodiments, and other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can be referred to in the corresponding method embodiments. There can be one or more processors.

[0176] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component on a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0177] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

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

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

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

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

[0182] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0183] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for obtaining a model, characterized in that: include: Acquire target data and target evaluation indicators corresponding to the target data; Determine a target performance matrix corresponding to the target evaluation indicator according to the target evaluation indicator, wherein the target performance matrix is ​​used to indicate the test performance of each of the Q pre-trained base models when P groups of test data test Q pre-trained base models under the target evaluation indicator, and both P and Q are integers greater than or equal to 1; According to the target data and the target performance matrix, a recommendation matrix corresponding to the target data is output, wherein the recommendation matrix is ​​used to indicate respective scores of the Q pre-trained base models predicted by the target data under the target evaluation index.

2. The method according to claim 1, characterized in that The method further comprises: According to the recommendation matrix, a target model corresponding to the target data under the target evaluation index is determined among the Q pre-trained base models, wherein when the target data uses the target model, the score of the target model under the target evaluation index is greater than or equal to a first threshold.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Pre-train Q base models according to M groups of training data to obtain the Q pre-trained base models, wherein M is an integer greater than or equal to P.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: A plurality of performance matrices are generated according to the P groups of test data and the Q pre-trained base models, the plurality of performance matrices corresponding one-to-one to a plurality of evaluation indicators, the plurality of performance matrices including the target performance matrix, and the plurality of evaluation indicators including the target evaluation indicators.

5. The method according to claim 4, characterized in that The input of each pre-trained base model is the P groups of test data, and the output of each pre-trained base model is the P groups of inference data, wherein the P groups of test data correspond to the P groups of inference data one by one, The generating a plurality of performance matrices according to the P groups of test data and the Q pre-trained base models comprises: The multiple performance matrices are generated according to the P groups of test data, the P groups of inference data, the Q pre-trained base models, and the multiple evaluation indicators.

6. The method according to any one of claims 1 to 5, characterized in that The step of outputting a recommendation matrix corresponding to the target data according to the target data and the target performance matrix includes: Extracting meta-features from the P groups of test data to generate a meta-feature matrix of the P groups of test data; Determining a target mapping relationship between the meta-feature matrix of the P groups of test data and the target performance matrix according to the meta-feature matrix of the P groups of test data and the target performance matrix; Extracting meta-features of the target data to generate a meta-feature matrix of the target data; Generate a first data matrix according to the meta-feature matrix of the target data and the target mapping relationship; According to the first data matrix and the target performance matrix, a recommendation matrix corresponding to the target data is output.

7. The method according to claim 6, characterized in that The method further comprises: Decomposing the target performance matrix to obtain a data matrix and a model matrix, wherein the number of rows of the data matrix is ​​P, the number of columns of the data matrix is ​​equal to the number of rows of the model matrix, and the number of columns of the model matrix is ​​Q; Determining the target mapping relationship between the meta-feature matrix of the P group of test data and the target performance matrix according to the meta-feature matrix of the P group of test data and the target performance matrix includes: According to the meta-feature matrix of the P groups of test data and the data matrix obtained by decomposing the target performance matrix, a target mapping relationship between the meta-feature matrix of the P groups of data and the data matrix is ​​determined.

8. The method according to claim 7, characterized in that The step of outputting a recommendation matrix corresponding to the target data according to the first data matrix and the target performance matrix includes: The model matrix obtained by decomposing the first data matrix and the target performance matrix is ​​used to output the recommendation matrix corresponding to the target data.

9. The method according to any one of claims 1 to 8, characterized in that The target evaluation index includes at least one of the following: mean absolute error, symmetric mean absolute percentage error, root mean square error, accuracy, precision, recall, deviation, and F1 score.

10. A computing device, characterized in that include: Acquisition module, determination module, processing module, among which, The acquisition module is used to acquire target data and target evaluation indicators corresponding to the target data; The determination module is used to determine a target performance matrix corresponding to the target evaluation indicator according to the target evaluation indicator, wherein the target performance matrix is ​​used to indicate the test performance of each of the Q pre-trained base models when P groups of test data test Q pre-trained base models under the target evaluation indicator, and both P and Q are integers greater than or equal to 1; The processing module is used to output a recommendation matrix corresponding to the target data based on the target data and the target performance matrix, wherein the recommendation matrix is ​​used to indicate the respective scores of the Q pre-trained base models predicted by the target data under the target evaluation index.

11. The computing device according to claim 10, characterized in that The determination module is used to determine, according to the recommendation matrix, a target model corresponding to the target data under the target evaluation index among the Q pre-trained base models, wherein when the target data uses the target model, the score under the target evaluation index is greater than or equal to a first threshold.

12. The computing device according to claim 10 or 11, characterized in that The computing device further includes: a pre-training module, The pre-training module is used to pre-train Q base models according to M groups of training data to obtain the Q pre-trained base models, wherein M is an integer greater than or equal to P.

13. The computing device according to any one of claims 10 to 12, characterized in that: The processing module is used to generate multiple performance matrices based on the P groups of test data and the Q pre-trained base models, the multiple performance matrices corresponding one-to-one to multiple evaluation indicators, the multiple performance matrices including the target performance matrix, and the multiple evaluation indicators including the target evaluation indicators.

14. The computing device according to claim 13, characterized in that The input of each pre-trained base model is the P groups of test data, and the output of each pre-trained base model is the P groups of inference data, wherein the P groups of test data correspond to the P groups of inference data one by one, The processing module is used to generate a plurality of performance matrices according to the P groups of test data and the Q pre-trained base models, including: The processing module is used to generate the multiple performance matrices according to the P groups of test data, the P groups of inference data, the Q pre-trained base models and the multiple evaluation indicators.

15. The computing device according to any one of claims 10 to 14, characterized in that: The processing module is used to output a recommendation matrix corresponding to the target data according to the target data and the target performance matrix, including: The processing module is used to extract meta-features from the P groups of test data to generate a meta-feature matrix of the P groups of test data; The determination module is used to determine the mapping relationship between the meta-feature matrix of the P group of test data and the target performance matrix according to the meta-feature matrix of the P group of test data and the target performance matrix; The processing module is used to extract meta-features from the target data and generate a meta-feature matrix of the target data; The processing module is used to generate a first data matrix according to the meta-feature matrix of the target data and the target mapping relationship; The processing module is used for obtaining the recommendation matrix corresponding to the target data according to the first data matrix and the target performance matrix.

16. The computing device according to claim 15, characterized in that The processing module is used to decompose the target performance matrix to obtain a data matrix and a model matrix, wherein the number of rows of the data matrix is ​​P, the number of columns of the data matrix is ​​equal to the number of rows of the model matrix, and the number of columns of the model matrix is ​​Q; The determination module is used to determine the target mapping relationship between the meta-feature matrix of the P group test and the target performance matrix according to the meta-feature matrix of the P group test data and the target performance matrix, including: The determination module is used to determine the target mapping relationship between the meta-feature matrix of the P group of test data and the data matrix obtained by decomposing the target performance matrix.

17. The computing device according to claim 16, characterized in that The processing module is used to output a recommendation matrix corresponding to the target data according to the first data matrix and the target performance matrix, including: The processing module is used to output the recommendation matrix corresponding to the target data according to the model matrix obtained by decomposing the first data matrix and the target performance matrix.

18. The computing device according to any one of claims 11 to 17, characterized in that: The target evaluation index includes at least one of the following: mean absolute error, symmetric mean absolute percentage error, root mean square error, accuracy, precision, recall, deviation, and F1 score.

19. The computing device according to any one of claims 11 to 18, characterized in that: The computing device is deployed on a cloud server for artificial intelligence (AI) applications.

20. A computing device, characterized in that The method comprises a processor and a memory, wherein the processor runs instructions in the memory, so that the processor performs the method according to any one of claims 1 to 9.

21. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.

22. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the method according to any one of claims 1 to 9.

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

Citation Information

Patent Citations

  • Method for generating information prediction model, electronic equipment and computer readable storage medium

    CN109919684A

  • Deep learning model selection method and device thereof, computer equipment and medium

    CN113988310A

  • Solver recommendation method and system, chip, equipment, medium and program product

    CN114764588A

  • Strategy model processing method and device and computer readable storage medium

    CN115269973A

  • Diversity and Explainability Parameters for Recommendation Accuracy in Machine Learning Recommendation Systems

    US20210374132A1

Cited By

  • Pipeline optimization method, device and equipment based on hybrid strategy and storage medium

    CN119202756A

  • Optical fiber performance evaluation method and system based on environmental conditions and storage medium

    CN119249116A

  • Task-based model reasoning method and device

    CN119294530A

  • A task-based model inference method and device

    CN119294530B

  • Industrial process monitoring model intelligent recommendation method and system

    CN119537927A