A model training and use method, device, equipment and storage medium

By constructing a variety of training samples and training different data processing layers of the machine learning model in stages, the problem of missing sample features caused by different data source coverage is solved, the training effect and prediction accuracy of the model are improved, and resources are saved.

CN112101570BActive Publication Date: 2024-09-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011003210.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-22
Publication Date
2024-09-17
Estimated Expiration
2040-09-22

AI Technical Summary

Technical Problem

Inconsistent coverage of different data sources leads to missing sample features, affecting the training effect and prediction accuracy of the machine learning model.

Method used

Use data sources with different coverages to construct a variety of training samples, and train different data processing layers of the machine learning model in stages to ensure the comprehensiveness and accuracy of the training samples at each stage, and select according to the data source coverage of the samples to be predicted. Appropriate data processing layer for task prediction.

Benefits of technology

It improves the model training effect and task prediction accuracy, saves resources, reduces the power consumption of model training, and provides a new idea to deal with data characteristics of different coverage data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112101570B
    Figure CN112101570B
Patent Text Reader

Abstract

The present application discloses a model training and use method, device, equipment and storage medium, which relates to the fields of artificial intelligence, machine learning and big data technology. The specific implementation scheme of the model training method is as follows: according to the coverage of at least two data sources, at least two training samples are constructed using the data features of the at least two data sources; wherein the training samples are associated with at least one data source; the at least two training samples are used to train at least two data processing layers in the machine learning model to obtain a target model; wherein different training samples train different data processing layers. To improve the model training effect and the accuracy of task prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, in particular to artificial intelligence, machine learning and big data technology, and specifically to a model training and calling method. Background Art

[0002] At present, machine learning models play a vital role in many fields. Among them, the comprehensiveness and accuracy of the model input features determine the prediction effect of the model. Therefore, in order to improve the prediction effect of the model, R&D personnel usually introduce data features from different data sources for model training and task prediction. However, the coverage of different data sources is inconsistent. For data sources with low coverage, the data features they contain are relatively weak, and there may be missing data features. Therefore, when using data features from data sources with different coverage for model training or task prediction, there are problems such as poor training effect or low task prediction accuracy, which urgently need to be improved. Summary of the invention

[0003] The present invention provides a model training and use method, device, equipment and storage medium.

[0004] According to one aspect of the present disclosure, a model training method is provided, the method comprising:

[0005] According to the coverage of at least two data sources, at least two training samples are constructed using data features of the at least two data sources; wherein the training samples are associated with at least one data source;

[0006] The at least two training samples are used to train at least two data processing layers in the machine learning model to obtain a target model; wherein different training samples train different data processing layers.

[0007] According to a second aspect of the present disclosure, a model use method is provided. The method is implemented using a target model trained by the method of any embodiment of the present application. The method includes:

[0008] Determine, according to the coverage of the data source associated with the sample to be predicted, a target training sample associated with the sample to be predicted from at least two training samples constructed in the model training phase;

[0009] Determining, according to the target training sample, a data processing layer to be called from at least two data processing layers of the target model;

[0010] According to the data processing layer to be called, task prediction is performed on the sample to be predicted.

[0011] According to a third aspect of the present disclosure, a model training device is provided, the device comprising:

[0012] A training sample construction module, used to construct at least two training samples according to the coverage of at least two data sources and using the data features of the at least two data sources; wherein the training samples are associated with at least one data source;

[0013] The model training module is used to use the at least two training samples to train at least two data processing layers in the machine learning model to obtain a target model; wherein different training samples train different data processing layers.

[0014] According to a fourth aspect of the present disclosure, a model using device is provided, the device is implemented using a target model trained by the method of any embodiment of the present application, and the device includes:

[0015] A sample analysis module, used to determine a target training sample associated with the sample to be predicted from at least two training samples constructed in the model training phase according to the coverage of the data source associated with the sample to be predicted;

[0016] A calling data layer determination module is used to determine the data processing layer to be called from at least two data processing layers of the target model according to the target training sample;

[0017] The task prediction module is used to perform task prediction on the sample to be predicted according to the data processing layer to be called.

[0018] According to a fifth aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0019] at least one processor; and

[0020] a memory communicatively connected to at least one processor; wherein,

[0021] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the model training method or model usage method of any embodiment of the present application.

[0022] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to enable a computer to execute the model training method or model use method of any embodiment of the present application.

[0023] The technology of the present application solves the problem of missing sample features due to different coverage of data sources, thereby affecting the model training effect and model prediction accuracy, and provides a new idea for model training and model prediction.

[0024] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0026] Figure 1 is a flow chart of a model training method provided according to an embodiment of the present application;

[0027] Figure 2 is a flow chart of a model training method provided according to an embodiment of the present application;

[0028] Figure 3A is a flow chart of a model training method provided according to an embodiment of the present application;

[0029] Figure 3B It is a structural diagram of the data processing layer of the machine learning model provided according to an embodiment of the present application;

[0030] Figure 4 is a flow chart of a model training method provided according to an embodiment of the present application;

[0031] Figure 5 is a flow chart of a model training method provided according to an embodiment of the present application;

[0032] Figure 6 is a flow chart of a model use method provided according to an embodiment of the present application;

[0033] Figure 7 is a structural schematic diagram of a model training device provided according to an embodiment of the present application;

[0034] Figure 8 It is a structural schematic diagram of a model using device provided according to an embodiment of the present application;

[0035] Fig. 9 It is a block diagram of an electronic device used to implement the model training or model usage method of an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0037] Figure 1 1 is a flow chart of a model training method provided according to an embodiment of the present application. This embodiment is applicable to the case where a machine learning model is trained using data features of data sources with different coverage rates. This embodiment can be executed by a model training device configured in an electronic device, and the device can be implemented using software and / or hardware. Figure 1 As shown, the method includes:

[0038] S101, constructing at least two training samples using data features of at least two data sources according to coverage of at least two data sources.

[0039] Among them, the data source refers to the source from which the data features are obtained. For example, if the data features to be used are the features of the user's search and browsing data, the data sources for obtaining such features may include but are not limited to: Tieba data source, search engine data source, and Weibo data source, etc. Different data sources have different corresponding coverage rates due to the different numbers of registered users. The data source with more registered users has a higher corresponding coverage rate. For example, the number of users using Tieba is less than the number of users using search engines, so the coverage rate of Tieba data source is lower than that of search engine data source. It should be noted that in the embodiments of the present application, the coverage rates of various data sources can be pre-calculated, or they can be calculated in real time during training according to the data source to which the data features to be used belong. The specific calculation method will be described in detail in the subsequent embodiments.

[0040] A training sample may refer to sample data used when training a machine learning model. The training of the machine learning model in the embodiment of the present application is divided into at least two stages. Accordingly, the number of training samples to be constructed is at least two. It should be noted that in the embodiment of the present application, each training sample is associated with at least one data source, that is, each training sample contains data features obtained from at least one data source. In addition, the data sources associated with different training samples overlap with each other. For example, the data source associated with the first training sample is a search engine data source, and the data source associated with the second training sample is a search engine data source and a Weibo data source; the data source associated with the third training sample is a search engine data source, a Weibo data source, and a Tieba data source. Among these three training samples, the data sources associated with any two training samples overlap with each other.

[0041] Optionally, the embodiment of the present application does not directly use the data features corresponding to data sources with different coverage rates as a training sample, but recombines these data features to obtain at least two training samples. Specifically, since the embodiment of the present application performs multi-stage training on the machine learning model according to the different coverage rates of the data sources to which the data features belong, it can be determined according to the working principle of the model and / or the type of data source to which the data features belong, etc., first determine how many stages the machine learning model needs to be trained, that is, determine how many training samples need to be constructed in this step (i.e., each training stage corresponds to a training sample), and then determine which data source data features are associated with each training sample. Optionally, when determining the data source associated with each training sample, as the number of training times associated with the training sample increases, the type of data source associated with the training sample also increases accordingly, such as the current training sample can be based on the data source associated with the previous training sample. On the basis of, at least one new data source is added, and the coverage rate of the newly added data source is lower than the coverage rate of the data source associated with the previous training sample.

[0042] S102, using at least two training samples to train at least two data processing layers in the machine learning model to obtain a target model.

[0043] Among them, there are many types of machine learning models in the embodiments of the present application, and the characteristics that this type of machine learning model needs to have are: it contains at least two data processing layers, and each data processing layer performs iterative calculations on the processing results of its previous data processing layer. For example, machine learning models that meet this feature may include but are not limited to: tree models built based on the Gradient Boosting Decision Tree (GBDT) algorithm, logistic regression (LR) models, deep learning models, etc. Optionally, when the machine learning model is a tree model, at least two data processing layers in the tree model are at least two decision trees.

[0044] Optionally, since S101 has constructed at least two training samples, and each training sample corresponds to a stage of machine learning model training, this step can be to determine the data processing layer that needs to be trained for different training stages, and then input the training sample into the machine learning model to perform parameter training on the data processing layer that needs to be trained. It should be noted that in the embodiment of the present application, different training samples train the same machine learning model, but each training sample trains the machine learning model with a different data processing layer. That is to say, in the embodiment of the present application, the data processing layer trained with one training sample is not repeatedly trained based on other types of training samples to ensure the accuracy of the prediction results during subsequent task prediction.

[0045] Optionally, in an embodiment of the present application, the data processing layer that needs to be trained in the machine learning model corresponding to each training sample can be pre-set. For example, assuming that the machine learning model has 10 layers and there are 3 types of training samples, the first training sample can be pre-set to train the 1st to 5th layers of the machine learning model, the second training sample can be pre-set to train the 6th to 8th layers of the machine learning model, and the third training sample can be pre-set to train the 9th to 10th layers of the machine learning model. It is also possible that the data processing layer that needs to be trained for each training sample is not known in advance, but after the data processing layer trained by the previous training sample, the subsequent untrained data processing layer is trained. The specific number of trainings can be determined during the training process of this stage. For example, assuming that the 1st to 5th layers of the machine learning model were trained in the previous training stage, the current stage can be to use the training sample corresponding to the current stage to start training from the 6th layer of the machine learning model. If the training sample is trained to the 8th layer when the model converges, it can be determined that the data processing layer trained by the current training sample is the 6th to 8th layer of the machine learning model.

[0046] The technical solution of the embodiment of the present application, in case of inconsistent coverage of the data source to which the data features belong and the presence of missing data, in order to ensure the accuracy of the trained machine learning model, does not simply supplement the missing features (wherein, simply supplementing the missing features cannot ensure the accuracy of the supplemented features), nor does it train multiple machine learning models for data sources with different coverage rates to perform task prediction (wherein, training multiple machine learning models is costly and occupies a lot of resources). Instead, the data features are divided into multiple training samples according to the coverage of the data source to which they belong, each training sample corresponds to a training stage, and different data processing layers of a machine learning model are trained in stages. Thereby, it is achieved that there is no need to supplement the missing features, only one machine learning model is trained, and subsequently, according to the coverage of the data source to which the data features to be predicted belong, different data processing layers are selected to be called, so that task prediction can be accurately performed, the model training effect is improved, and the accuracy of subsequent task prediction is improved, while saving resources and reducing the power consumption of model training, providing a new idea for model training using data features of data sources with different coverage rates.

[0047] Figure 2 1 is a flow chart of a model training method provided according to an embodiment of the present application. Based on the above embodiment, this embodiment provides a specific description of the situation of constructing at least two training samples using data features of at least two data sources according to the coverage of at least two data sources, such as Figure 2 As shown, the method includes:

[0048] S201: Divide at least two data sources into at least two groups according to coverage of the at least two data sources.

[0049] Optionally, in an embodiment of the present application, it may be first determined how many stages the machine learning model needs to be trained in based on the working principle of the model and / or the type of data source to which the data features belong, and this step specifically divides the at least two data sources into several types, depending on how many stages the machine learning model needs to be trained in. For example, if it has been determined that the machine learning model needs to be trained in two stages, then at this time, the at least two data sources may be divided into two groups.

[0050] Optionally, after determining the number of groups into which at least two types of data are to be divided, there are many specific methods for how to divide the at least two data sources, which are not limited in this embodiment. Method 1: The number and value of the coverage thresholds to be used may be determined according to the number of groups to be divided. Then, according to the number of determined coverage thresholds (wherein the number may be 1 less than the number of groups to be divided) and the value, the at least two data sources are divided into at least two groups. For example, assuming that this step requires the number of groups into which at least two data sources are divided to be 2, the number of coverage thresholds to be used at this time is 1, and if the coverage range is 1-100, the value of the coverage threshold can be set to 50 at this time. Then, among the at least two data sources, those with a coverage greater than or equal to 50 are divided into a group as a high coverage group, and those with a coverage less than 50 are divided into a group as a low coverage group. Method 2: At least two data sources with different coverage rates can be sorted in order of coverage, and then divided according to the number of groups to be divided. For example, assuming that this step requires dividing four data sources into two groups, the two data sources with higher coverage rates can be divided into one group, namely, the high coverage group, and the other two can be divided into one group, namely, the low coverage group.

[0051] S202, selecting a current group of data sources from at least two groups of data sources, and using data features of the current group of data sources and data features of the data source in the previous training sample as the current training sample.

[0052] Among them, the coverage of the data source of the current group is lower than the coverage of the data source in the previous training sample.

[0053] Optionally, an embodiment of the present application may be to use each group of data sources divided by S201 as the current group of data sources in order from high to low data source coverage. If the current group of data sources is the first group of data sources, the data features of the first group of data sources may be directly used as the current training sample, that is, the current training sample is the first training sample, and there is no previous training sample before it; if the current group of data sources is not the first group of data sources, the data features of the current group of data sources and the data features of all data sources contained in the previous training sample may be used as the data features of the current training sample. For example, S201 divides the data source into two groups, namely a high coverage group and a low coverage group. In this step, the data features of the data source of the high coverage group may be used as the first training sample, and the data features of the data source of the low coverage group and the data features contained in the first training sample (i.e., the data features of the data source of the high coverage group) may be used as the second training sample.

[0054] S203, using at least two training samples to train at least two data processing layers in the machine learning model to obtain a target model.

[0055] Among them, different training samples are trained at different data processing layers.

[0056] The technical solution of the embodiment of the present application first divides at least two groups of data sources into at least two groups according to the coverage of at least two data sources, and then for each group, the data features of the group of data sources and the data sources in the previous training sample are used as the current training samples to train different data processing layers in the machine learning model in stages. When the solution of this embodiment determines the training samples of each stage, the coverage rate of the training samples of the current stage is lower than that of the previous stage, and the training samples of the current stage contain the data features of the training samples of the previous stage, which ensures the comprehensiveness and accuracy of the training samples of each stage, provides a preferred solution for the construction of training samples, and further ensures the training effect of the subsequent stage-by-stage training of the machine learning model.

[0057] Figure 3A is a flow chart of a model training method provided according to an embodiment of the present application; Figure 3B 1 is a schematic diagram of the structure of the data processing layer of the machine learning model provided in the embodiment of the present application. Based on the above embodiment, this embodiment provides a specific introduction to the use of at least two training samples to train at least two data processing layers in the machine learning model, such as Figure 3A-3B As shown, the method includes:

[0058] S301, constructing at least two training samples using data features of at least two data sources according to coverage of at least two data sources.

[0059] Among them, the training samples in the embodiments of the present application are associated with at least one data source.

[0060] S302, determining the data processing layer to be trained for the current training sample from at least two data processing layers in the machine learning model according to the association relationship between the training sample and the number of layers to be trained.

[0061] The so-called association relationship between the training samples and the number of layers to be trained may be a pre-set relationship between each training sample and the number of data processing layers to be trained.

[0062] Optionally, in the embodiment of the present application, the association relationship may be pre-set for each training sample to train which layers of the machine learning model, in which case each of the at least two training samples may be used as the current training sample in turn, and then according to which layers of the machine learning model need to be trained recorded in the association relationship of the current training sample, these layers are selected from the machine learning model as the data processing layers to be trained for the current training sample. For example, the machine learning model to be trained is Figure 3B For the machine learning model shown, assuming that the association relationship between the training samples and the number of layers to be trained is that the first training sample trains the 1st to 5th layers of the machine learning model, the second training sample trains the 6th to 8th layers of the machine learning model, and the third training sample trains the 9th to 10th layers of the machine learning model, then based on the association relationship, the 1st to 5th layers of the machine learning model can be directly used as the data processing layers to be trained for the first training sample; the 6th to 8th layers of the machine learning model can be used as the data processing layers to be trained for the second training sample; and the 9th to 10th layers of the machine learning model can be used as the data processing layers to be trained for the third training sample. Optionally, the association relationship can also be a pre-set total number of data processing layers of the machine learning model that need to be trained for each training sample. At this time, each training sample of at least two training samples can be used as the current training sample in turn, and then the data processing layer to be trained for the current training sample is selected from the machine learning model based on the total number of data processing layers of the machine learning model that need to be trained recorded in the association relationship of the current training sample, combined with the data processing layer to be trained for the previous training sample. For example, the machine learning model to be trained is Figure 3B For the machine learning model shown, assuming that the correlation between the training samples and the number of layers to be trained is that the first training sample trains 5 layers of the machine learning model, the second training sample trains 3 layers of the machine learning model, and the third training sample trains 2 layers of the machine learning model, then the 1st to 5th layers of the machine learning model can be used as the data processing layers to be trained for the first training sample; the 6th to 8th layers after the data processing layers trained by the first training sample can be used as the data processing layers to be trained for the second training sample; and the 9th to 10th layers after the data processing layers trained by the second training sample can be used as the data processing layers to be trained for the third training sample.

[0063] S303, based on the trained data processing layer in the machine learning model, use the current training sample to train the data processing layer to be trained of the current training sample.

[0064] The trained data processing layer is obtained by training with the training samples used before the current training samples. For example, the machine learning model to be trained is Figure 3B The machine learning model shown in FIG301 assumes that three types of training samples (i.e., the first training sample, the second training sample, and the third training sample) are constructed, and the current training stage is the third training stage, i.e., the current training sample used is the third training sample. Then, the trained data processing layer of the embodiment of the present application is the 1st to 8th layers of the machine learning model that have been trained in the first training stage and the second training stage using the first training sample and the second training sample.

[0065] Optionally, in an embodiment of the present application, each training sample of at least two training samples is used as the current training sample in turn, and based on the data processing layers that have been trained by all training samples before the current training sample, the current training sample is used to train the data processing layer to be trained. Specifically, the current training sample can be input into the machine learning model, and the current training sample is first processed by the trained data processing layer, and then the parameters of the data processing layer to be trained of the current training sample are further trained according to the processing results of the trained data processing layer. For example, Figure 3B As shown, it is assumed that the current training sample to be trained is the 9th-10th layer of the machine learning model; the training sample before the current training sample has trained the 1st-8th layer of the machine learning model. At this time, based on the 1st-8th layers of the trained machine learning model, the current training sample can be used to train the 9th-10th layers of the machine learning model, and update the parameter values ​​of the 9th-10th layers of the machine learning model. It should be noted that in the embodiment of the present application, after the above-mentioned S303 operation is performed for each training sample, the machine learning model is trained and the target model for subsequent task prediction is obtained.

[0066] The technical solution of the embodiment of the present application is to construct at least two training samples for the data features of at least two data sources according to the different coverage rates of the data sources, and then use each training sample as the current training sample in turn, and determine the data processing layer to be trained for the current training sample according to the association relationship between the training sample and the number of layers to be trained, and then use the current training sample to train the data processing layer to be trained for the current training sample based on the trained data processing layer, and obtain the target model after all training samples have completed the training operation. In the solution of the embodiment of the present application, the R&D personnel can combine the characteristics of each data processing layer of the machine learning model, the training effect, etc., and flexibly set the association relationship between various training samples and their data processing layers to be trained in advance. It is possible to quickly and flexibly determine the data processing layer to be trained for each training sample, while improving the model training effect, ensuring the flexibility and efficiency of model training.

[0067] Figure 4 It is a flow chart of a model training method provided according to an embodiment of the present application. Based on the above embodiment, this embodiment provides another specific situation of using at least two training samples to train at least two data processing layers in a machine learning model. It should be noted that the machine learning model applicable to the scheme of this embodiment is a tree model. For example, it can be a tree model built based on the GBDT algorithm. Correspondingly, at least two data processing layers in the tree model are at least two decision trees.

[0068] Next, let's briefly introduce the GBDT algorithm: The GBDT algorithm can be an addition formula composed of k basic decision trees: where f k Represents the output value of the kth decision tree. The training goal of each decision tree is to fit the actual y value and the current When training the GBDT model, first train the first decision tree and record the output value of this decision tree as f1(x). Then the training target of the second decision tree is y-f1(x), the training target of the third tree is y-f1(x)-f2(x), and so on. Currently, many popular machine learning libraries, such as the optimized distributed gradient boosting library (xgboost) and the gradient boosting algorithm library (catboost), are an implementation of the GBDT algorithm.

[0069] like Figure 4 As shown, the method for training a tree model in this embodiment includes:

[0070] S401, constructing at least two training samples using data features of at least two data sources according to coverage of at least two data sources.

[0071] Among them, the training samples in the embodiment of the present application are associated with at least one data source.

[0072] S402: Take at least one data processing layer in the machine learning model that is located after the trained data processing layer as a candidate training layer, and use the current training sample to train the candidate training layer.

[0073] Optionally, the so-called candidate training layer may be each data processing layer located after the trained data processing layer in the machine learning model. It should be noted that, in an embodiment of the present application, the first data processing layer after the trained data processing layer may be first used as the candidate training layer, and then the current training sample is used to train the data processing layer, and it is determined whether the residual meets the convergence condition compared with the training target, such as whether the residual value is not decreasing or whether the residual value is within an acceptable error range. If so, it means that the candidate training layer is accurately selected and the training result meets the convergence condition, and the operation of S403 can be performed. If not, it means that the candidate training layer needs to be further increased, such as adding the next data processing layer after the data processing layer to the candidate training layer, and continuing to use the current training sample to train the newly added candidate training layer to obtain the training result, and it is determined whether the residual meets the convergence condition compared with the training target. If so, the operation of S403 is performed, otherwise the number of candidate training layers is continued to be increased according to the scheme introduced above until the residual of the training result of the candidate training layer and the training target meets the convergence condition.

[0074] For example, if Figure 3B The machine learning model shown is a tree model, and the first training stage has ended. The 1st to 5th decision trees of the tree model have been trained. At this time, the current training stage (i.e., the second training stage) can be to first use the 6th decision tree as the candidate training layer of the current training sample, and use the current training sample to calculate whether the residual value of the output result of the 6th layer is no longer reduced compared with the training target. If so, it means that the model meets the convergence conditions. If not, it means that the model has not converged. At this time, the 7th layer needs to be added to the candidate training layer, and the residual value between the output result of the 7th layer and the training target is continued to be calculated. Whether it is no longer decreasing, and so on, until the residual value is no longer decreasing, it is considered that the model training meets the convergence conditions before the subsequent S403 operation can be performed.

[0075] S403: If the training result of the candidate training layer meets the convergence condition, the candidate training layer is used as the data processing layer for the current training sample training, and the training of the machine learning model by the current training sample is completed.

[0076] Optionally, in an embodiment of the present application, if S403 uses the current training sample to train the candidate training layer. The training result meets the convergence condition, then the current training sample is completed at the current stage of the machine learning model. When the convergence condition is met, the corresponding candidate training layer is the data processing layer trained by the current training sample.

[0077] It should be noted that an embodiment of the present application can be to use each training sample constructed in S401 as the current training sample in turn to perform operations S402 and S403 until all training samples have completed the above operations S402 and S403. At this time, the machine learning model training is completed and the target model is obtained.

[0078] The technical solution of the embodiment of the present application is to construct at least two training samples for the data features of at least two data sources according to the different coverage of the data sources, and then take each training sample as the current training sample in turn, take at least one data processing layer after the trained data processing layer in the machine learning model as the candidate training layer, and use the current training sample to train the candidate training layer. If the training result meets the convergence condition, the training of the machine learning model by the current training sample is completed, and the candidate training layer is used as the data processing layer for the training of the current training sample. In the solution of the embodiment of the present application, the number of data processing layers required to be trained for each training sample is determined according to the convergence condition during the model training process, and is not manually pre-set, which improves the accuracy of the data processing layer trained for each training sample, thereby improving the accuracy of the model training.

[0079] Figure 5 is a flow chart of a model training method provided according to an embodiment of the present application. Based on the above embodiment, this embodiment provides an introduction to a method for determining the coverage of a data source, such as Figure 5 As shown, the method includes:

[0080] S501, obtaining a data feature set including at least two data sources.

[0081] The data feature set may be a set of data features obtained multiple times from at least two data sources.

[0082] Optionally, in an embodiment of the present application, the operation of obtaining data features from at least two data sources may be performed in batches (such as 5 times), and the data features obtained each time are placed in the data feature set as a subset. It should be noted that although feature data is obtained from at least two data sources each time, due to the different coverage of different data, feature data is not necessarily obtained from each data source each time. For example, if the two data sources are a search engine data source and a Tieba data source, the registered users of the search engine data source are significantly higher than the registered users of the Tieba data source, that is, the coverage of the search engine data source is higher than the coverage of the Tieba data source. Assume that the search and browsing features of user 1, user 2, user 3, user 4 and user 5 in these two data sources are obtained five times respectively, and only user 1 and user 3 use the search engine and Tieba at the same time, and user 2, user 4 and user 5 only use the search engine. At this time, although the operation of obtaining data features is performed 5 times on both data sources, the search flow feature 1 of the search engine and the search flow feature 2 of the Tieba are not actually obtained at the same time every time. The data feature set obtained at this time is: A row of data in the data feature set represents a feature subset obtained at one time.

[0083] S502: Determine the number of features of at least two data sources and the number of target features according to the data feature set.

[0084] Among them, in the embodiment of the present application, the target feature number refers to the number of data features obtained for one data source after performing multiple acquisition operations when acquiring a data feature set, if the data features can be obtained each time from each data source. In other words, the target feature number is the number of times the acquisition operation is performed when acquiring a data feature set.

[0085] Optionally, in an embodiment of the present application, to determine the coverage of each data source, it is necessary to first determine the number of features and the number of target features of at least two data sources in the data feature set. Specifically, when determining the number of features of at least two data sources, it can be for each data source, the number of features of the data features of the data source contained in the data feature set is counted, that is, for each data source, the number of times the data features of the data source are obtained by multiple acquisition operations; when determining the number of target features, it can be the total number of acquisition operations. For example, for the data feature set shown in S501, the total number of rows of data features containing various data sources can be counted as the number of features of various data sources. For example, if the total number of rows of search and browsing features 1 containing a search engine data source is 5 rows, the number of features of the search engine data source is 5, and the total number of rows of search and browsing features 2 containing a Tieba data source is 2 rows, then the number of features of the Tieba data source is 2. The total number of rows of the data feature set, 5, can be counted as the target number of features.

[0086] S503: Determine coverage of at least two data sources according to the number of features of the at least two data sources and the number of target features.

[0087] Optionally, the embodiment of the present application may be that for each data source, the ratio of the number of features of the data source to the number of target features is used as the coverage rate of the data source. For example, if the number of features of the search engine data source is 5, the number of features of the Tieba data source is 2, and the number of target features is 5, then the coverage rate of the search engine data source is 5 / 5=1; the coverage rate of the Tieba data source is 2 / 5=0.4. Obviously, the coverage rate of the search engine data source is higher than that of the Tieba data source.

[0088] S504: construct at least two training samples using data features of at least two data sources according to the coverage of at least two data sources.

[0089] Wherein, the training sample is associated with at least one data source;

[0090] S505, using at least two training samples to train at least two data processing layers in the machine learning model to obtain a target model.

[0091] Among them, different training samples are trained at different data processing layers.

[0092] The technical solution of the embodiment of the present application determines the number of data features and the number of target features of each data source based on the data feature set obtained containing at least two data sources, and uses the ratio of the number of features of each data source to the number of target features as the coverage of various data sources. Furthermore, for the data features of at least two data sources, at least two training samples are constructed according to the different coverage rates of their data sources, and each training sample is used in turn to train different data processing layers in the machine learning model in stages. The solution of the embodiment of the present application calculates the coverage rate of each data source based on the data feature set containing at least two data sources obtained multiple times, which has higher timeliness and accuracy, and provides a guarantee for subsequent model training based on the coverage rate.

[0093] Figure 6 1 is a flow chart of a model use method provided according to an embodiment of the present application. This embodiment is applicable to the case where task prediction is performed based on the target model trained in the above embodiments. This embodiment can be executed by a model use device configured in an electronic device, and the device can be implemented by software and / or hardware. Figure 6 As shown, the method includes:

[0094] S601, determining a target training sample associated with the sample to be predicted from at least two training samples constructed in a model training phase according to the coverage of the data source associated with the sample to be predicted.

[0095] The sample to be predicted may be the input data that needs to be input into the trained target model when performing the prediction operation. Optionally, in an embodiment of the present application, the data features contained in the sample to be predicted belong to at least one data source. The so-called model training stage in this embodiment may refer to the stage of training the machine learning model to obtain the target model in the model training method of any of the above embodiments.

[0096] Optionally, in an embodiment of the present application, it is possible to first determine at least one data source to which the data features contained in the sample to be predicted belong, and then calculate the coverage of each data source in real time, or directly refer to the coverage of each data source calculated in the model training phase. Since in the model training phase, an operation of constructing at least two training samples using data features of at least two data sources is performed before training the model, this step can be to determine whether the coverage of the data source associated with the sample to be predicted is consistent with the coverage of the data source associated with which training sample constructed in the model training phase, and then use the training sample as the target training sample associated with the sample to be predicted.

[0097] For example, suppose that two types of training samples are constructed in the model training stage, that is, the browsing search feature 1 of the search engine data source is used as the first training sample, and the browsing search feature 1 of the search engine data source and the browsing search feature 2 of the forum search data source are used as the second training sample. If the sample to be predicted in this embodiment only contains browsing search feature 1, then the coverage of the data source associated with the sample to be predicted is consistent with that of the first training sample, that is, both only contain search engine data sources with high coverage, then the target training sample associated with the sample to be predicted is the first training sample constructed in the model training stage. Similarly, if the sample to be trained contains both browsing search feature 1 and data feature 2, or only contains data feature 2 (the probability of this situation occurring is extremely low), then the target training sample associated with the sample to be predicted is the second training sample constructed in the model training stage.

[0098] S602: Determine a data processing layer to be called from at least two data processing layers of a target model according to a target training sample.

[0099] Among them, the data processing layer to be called may be a data processing layer that needs to be called from the target model to perform this prediction task. The target model may be obtained by training the machine learning model using the method of any of the above embodiments. The characteristics that the target model needs to have are: it contains at least two data processing layers, and each data processing layer performs iterative calculations on the processing results of the previous data processing layer. For example, the target model that meets this feature may include but is not limited to: a tree model constructed based on the Gradient Boosting Decision Tree (GBDT) algorithm, a logistic regression (LR) model, a deep learning model, etc. Optionally, when the target model is a tree model, at least two data processing layers in the tree model are at least two decision trees.

[0100] Optionally, in an embodiment of the present application, the target training samples associated with the sample to be predicted are different, and when executing this prediction task, the data processing layers called from the target model are also different. After the model is trained, the mapping relationship between the various training samples constructed in the model training phase and their corresponding data processing layers to be called is recorded, and the data processing layer to be called corresponding to the target training sample can be determined by the mapping relationship. It is also possible to find the data processing layer trained by the target training sample in the model training phase, and use the data processing layer and the data processing layers before the data processing layer as the data processing layer to be called corresponding to the target training sample. For example, if the target training sample is trained in the 6th to 8th layers of the machine learning model in the model training phase, then at this time, the 1st to 8th layers of the trained target model can be used as the data processing layer to be called for the target training sample.

[0101] S603: Perform task prediction on the sample to be predicted according to the data processing layer to be called.

[0102] Optionally, after determining the data processing layer to be called, the embodiment of the present application may input the sample to be predicted into the trained target model, call the data processing layer to be called determined in S602 to process the input prediction sample, and obtain the prediction result.

[0103] It should be noted that in the embodiment of the present application, during the model training phase, a data processing layer trained with one type of training sample is no longer repeatedly trained based on other types of training samples. For example, after training the 1st to 5th layers of the machine learning model with the first training sample that is only associated with a high-coverage data source, the second training sample that contains both high and low coverage data sources is used to train only the 6th to 8th layers of the machine learning model, and the 1st to 5th layers of the machine learning model are not repeatedly trained. The advantage of such a setting of the embodiment of the present application is that the accuracy of the model training results is guaranteed. Because in the model usage phase, if the target training sample associated with the training sample to be predicted is the first training sample, then it is necessary to call the 1st to 5th layers of the trained target model as the data processing layer to be called. If the 1st to 5th layers have not been repeatedly trained, they are trained by training samples that are only associated with high-coverage data sources. At this time, the 1st to 5th layers of the target model can accurately predict the samples to be predicted that are only associated with high-coverage data sources. If the 1st to 5th layers are repeatedly trained using the second training samples, because the second samples are also associated with low-coverage data sources, the 1st to 5th layers after repeated training cannot accurately predict the samples to be predicted that are only associated with high-coverage data sources, affecting the accuracy of the prediction results.

[0104] The technical solution of the embodiment of the present application, after obtaining the target model through staged training, determines the target training sample associated with the sample to be predicted from the training samples constructed in the model training stage according to the coverage of the data source associated with the sample to be predicted, and then determines the data processing layer to be called according to the target training sample, and uses the sample to be predicted to call the data processing layer to be called of the target model to perform task prediction. The solution of the embodiment of the present application, for samples to be predicted associated with data sources with different coverage rates, chooses to call different data processing layers of the same target model to perform prediction tasks, without the need to deploy multiple target models, while improving the accuracy of task prediction, saving resources, reducing the power consumption of model training, and providing a new idea for the use of models.

[0105] Further, in an embodiment of the present application, according to the target training sample, the process of determining the data processing layer to be called from at least two data processing layers of the target model may also include: determining the data processing layer trained by the target training sample in the model training stage; according to the data processing layer trained by the target training sample, determining the data processing layer to be called from at least two data processing layers of the target model. Specifically, the target training sample belongs to one of the at least two training samples constructed in the model training stage. In the model training stage, each training sample corresponds to a part of the data processing layer in the training machine learning model. Therefore, at this time, the data processing layer trained by the target training sample in the model training stage and the data processing layers before the data processing layer can be used as the data processing layer to be called for this prediction. The advantage of this setting is that the data processing layer to be called this time is determined in combination with the model training stage, which ensures the accuracy of the data processing layer called this time, and provides a guarantee for accurate task prediction.

[0106] Figure 7 700 is a schematic diagram of a model training device provided according to an embodiment of the present application. This embodiment is applicable to the case where a machine learning model is trained using data features of data sources with different coverage rates. The device can implement the model training method of any embodiment of the present application. The device 700 specifically includes the following:

[0107] The training sample construction module 701 is used to construct at least two training samples according to the coverage of at least two data sources and using the data features of the at least two data sources; wherein the training samples are associated with at least one data source;

[0108] The model training module 702 is used to use the at least two training samples to train at least two data processing layers in the machine learning model to obtain a target model; wherein different training samples train different data processing layers.

[0109] The technical solution of the embodiment of the present application, in case of inconsistent coverage of the data source to which the data features belong and the presence of missing data, in order to ensure the accuracy of the trained machine learning model, does not simply supplement the missing features (wherein, simply supplementing the missing features cannot ensure the accuracy of the supplemented features), nor does it train multiple machine learning models for data sources with different coverage rates to perform task prediction (wherein, training multiple machine learning models is costly and occupies a lot of resources). Instead, the data features are divided into multiple training samples according to the coverage of the data source to which they belong, each training sample corresponds to a training stage, and different data processing layers of a machine learning model are trained in stages. Thereby, it is achieved that there is no need to supplement the missing features, only one machine learning model is trained, and subsequently, according to the coverage of the data source to which the data features to be predicted belong, different data processing layers are selected to be called, so that task prediction can be accurately performed, the model training effect is improved, and the accuracy of subsequent task prediction is improved, while saving resources and reducing the power consumption of model training, providing a new idea for model training using data features of data sources with different coverage rates.

[0110] Furthermore, the training sample construction module 701 includes:

[0111] a data source grouping unit, configured to divide the at least two data sources into at least two groups according to the coverage of the at least two data sources;

[0112] A training sample determination unit, configured to select a current group of data sources from the at least two groups of data sources, and use data features of the current group of data sources and data features of a data source in a previous training sample as a current training sample;

[0113] The coverage rate of the current group of data sources is lower than the coverage rate of the data sources in the previous training sample.

[0114] Furthermore, the model training module 702 is specifically used for:

[0115] According to the correlation between the training sample and the number of layers to be trained, determine the data processing layer to be trained for the current training sample from at least two data processing layers in the machine learning model;

[0116] Based on the trained data processing layer in the machine learning model, using the current training sample to train the data processing layer to be trained by the current training sample;

[0117] The trained data processing layer is obtained by training with a training sample used before the current training sample.

[0118] Furthermore, the model training module 702 is also specifically used for:

[0119] At least one data processing layer located after the trained data processing layer in the machine learning model is used as a candidate training layer, and the candidate training layer is trained using the current training sample;

[0120] If the training result of the candidate training layer meets the convergence condition, the candidate training layer is used as the data processing layer for the current training sample training, and the training of the machine learning model by the current training sample is completed.

[0121] Furthermore, the device further includes a coverage determination module, and the coverage determination module specifically includes:

[0122] A feature set acquisition unit, used to acquire a data feature set including the at least two data sources;

[0123] A feature quantity determination unit, configured to determine the feature quantity and target feature quantity of the at least two data sources according to the data feature set;

[0124] The coverage determination unit is used to determine the coverage of the at least two data sources according to the number of features and the target number of features of the at least two data sources.

[0125] Furthermore, the machine learning model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

[0126] Figure 8 800 is a schematic diagram of a model using device according to an embodiment of the present application; this embodiment is applicable to the case where task prediction is performed based on the target model trained in the above embodiments. The device 800 specifically includes the following:

[0127] The sample analysis module 801 is used to determine the target training sample associated with the sample to be predicted from at least two training samples constructed in the model training phase according to the coverage of the data source associated with the sample to be predicted;

[0128] A calling data layer determination module 802 is used to determine a data processing layer to be called from at least two data processing layers of the target model according to the target training sample;

[0129] The task prediction module 803 is used to perform task prediction on the sample to be predicted according to the data processing layer to be called.

[0130] The technical solution of the embodiment of the present application, after obtaining the target model through staged training, determines the target training sample associated with the sample to be predicted from the training samples constructed in the model training stage according to the coverage of the data source associated with the sample to be predicted, and then determines the data processing layer to be called according to the target training sample, and uses the sample to be predicted to call the data processing layer to be called of the target model to perform task prediction. The solution of the embodiment of the present application, for samples to be predicted associated with data sources with different coverage rates, chooses to call different data processing layers of the same target model to perform prediction tasks, without the need to deploy multiple target models, while improving the accuracy of task prediction, saving resources, reducing the power consumption of model training, and providing a new idea for the use of models.

[0131] Furthermore, the calling data layer determination module 802 is specifically used for:

[0132] Determine the data processing layer for training the target training sample in the model training phase;

[0133] According to the data processing layer trained by the target training sample, a data processing layer to be called is determined from at least two data processing layers of the target model.

[0134] Furthermore, the target model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

[0135] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0136] like Fig. 9 As shown, it is a block diagram of an electronic device for implementing model training or model use method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0137] like Fig. 9As shown, the electronic device includes: one or more processors 901, a memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 901 is taken as an example.

[0138] The memory 902 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the model training or model use method provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the model training or model use method provided in the present application.

[0139] The memory 902 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the model training or model use method in the embodiments of the present application (for example, the attached Figure 7 The training sample construction module 701 and the model training module 702 shown in the figure, or the attached Figure 8 The processor 901 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 902, that is, the model training or model use method in the above method embodiment is realized.

[0140] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of an electronic device that implements model training or a model use method, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely disposed relative to the processor 901, and these remote memories may be connected to an electronic device that implements model training or a model use method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0141] The electronic device implementing the model training or model using method may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903 and the output device 904 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0142] The input device 903 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device that implements model training or model use method, such as input devices such as touch screen, keypad, mouse, track pad, touch pad, indicator rod, one or more mouse buttons, trackball, joystick, etc. The output device 904 may include a display device, an auxiliary lighting device (e.g., LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0143] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0144] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0146] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0147] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0148] According to the technical solution of the embodiment of the present application, when the coverage of the data source to which the data features belong is inconsistent and there is missing data, in order to ensure the accuracy of the trained machine learning model, it is not a simple supplement of missing features (wherein, simply supplementing the missing features cannot ensure the accuracy of the supplemented features), nor is it to train multiple machine learning models for data sources with different coverage rates to perform task prediction (wherein, training multiple machine learning models is costly and occupies a lot of resources). Instead, the data features are divided into multiple training samples according to the coverage of the data source to which they belong, and each training sample corresponds to a training stage, and different data processing layers of a machine learning model are trained in stages. Thereby, it is achieved that there is no need to supplement missing features, only one machine learning model is trained, and subsequently, according to the coverage of the data source to which the data features to be predicted belong, different data processing layers are selected to be called, so that task prediction can be accurately performed, the model training effect is improved, and the accuracy of subsequent task prediction is improved, while saving resources and reducing the power consumption of model training, providing a new idea for the training and use of models.

[0149] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0150] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A model training method, comprising: Acquire a data feature set including at least two data sources; wherein the at least two data sources are at least two of a Tieba data source, a search engine data source, and a Weibo data source; Determining, according to the data feature set, the number of features of the at least two data sources and the number of target features; Determining coverage of the at least two data sources according to the number of features of the at least two data sources and the number of target features; According to the coverage of the at least two data sources, at least two training samples are constructed using the data features of the at least two data sources; wherein the training samples are associated with at least one data source; Using the at least two training samples, at least two data processing layers in the machine learning model are trained to obtain a target model; wherein different training samples train different data processing layers; The step of constructing at least two training samples based on the coverage of the at least two data sources and using the data features of the at least two data sources includes: Dividing the at least two data sources into at least two groups according to coverage of the at least two data sources; Selecting a current group of data sources from the at least two groups of data sources, and using data features of the current group of data sources and data features of a data source in a previous training sample as a current training sample; The coverage rate of the current group of data sources is lower than the coverage rate of the data sources in the previous training sample.

2. The method according to claim 1, wherein: Using the at least two training samples to train at least two data processing layers in the machine learning model includes: According to the correlation between the training sample and the number of layers to be trained, determine the data processing layer to be trained for the current training sample from at least two data processing layers in the machine learning model; Based on the trained data processing layer in the machine learning model, using the current training sample to train the data processing layer to be trained by the current training sample; The trained data processing layer is obtained by training with a training sample used before the current training sample.

3. The method according to claim 1, wherein: Using the at least two training samples to train at least two data processing layers in the machine learning model includes: At least one data processing layer located after the trained data processing layer in the machine learning model is used as a candidate training layer, and the candidate training layer is trained using the current training sample; If the training result of the candidate training layer meets the convergence condition, the candidate training layer is used as the data processing layer for the current training sample training, and the training of the machine learning model by the current training sample is completed.

4. The method according to any one of claims 1 to 3, wherein: The machine learning model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

5. A method for using a model, using a target model trained by the method according to any one of claims 1 to 4, comprising: According to the coverage of the data source associated with the sample to be predicted, a target training sample associated with the sample to be predicted is determined from at least two training samples constructed in the model training phase; wherein the data source associated with the sample to be predicted includes at least two of a Tieba data source, a search engine data source, and a Weibo data source; Determining, according to the target training sample, a data processing layer to be called from at least two data processing layers of the target model; According to the data processing layer to be called, task prediction is performed on the sample to be predicted.

6. The method according to claim 5, wherein: Determining a data processing layer to be called from at least two data processing layers of the target model according to the target training sample, including: Determine the data processing layer for training the target training sample in the model training phase; According to the data processing layer trained by the target training sample, a data processing layer to be called is determined from at least two data processing layers of the target model.

7. The method according to claim 5 or 6, wherein: The target model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

8. A model training device, comprising: The coverage determination module specifically includes: A feature set acquisition unit, used to acquire a data feature set including at least two data sources; wherein the at least two data sources are at least two of a Tieba data source, a search engine data source, and a Weibo data source; A feature quantity determination unit, configured to determine the feature quantity and target feature quantity of the at least two data sources according to the data feature set; A coverage determination unit, configured to determine the coverage of the at least two data sources according to the number of features of the at least two data sources and the number of target features; A training sample construction module, used to construct at least two training samples according to the coverage of the at least two data sources and using the data features of the at least two data sources; wherein the training samples are associated with at least one data source; A model training module, used to train at least two data processing layers in the machine learning model using the at least two training samples to obtain a target model; wherein different training samples train different data processing layers; Wherein, the training sample construction module includes: a data source grouping unit, configured to divide the at least two data sources into at least two groups according to coverage rates of the at least two data sources; A training sample determination unit, configured to select a current group of data sources from the at least two groups of data sources, and use data features of the current group of data sources and data features of a data source in a previous training sample as a current training sample; The coverage rate of the current group of data sources is lower than the coverage rate of the data sources in the previous training sample.

9. The device according to claim 8, wherein: The model training module is specifically used for: According to the correlation between the training sample and the number of layers to be trained, determine the data processing layer to be trained for the current training sample from at least two data processing layers in the machine learning model; Based on the trained data processing layer in the machine learning model, using the current training sample to train the data processing layer to be trained by the current training sample; The trained data processing layer is obtained by training with a training sample used before the current training sample.

10. The device according to claim 8, wherein: The model training module is also specifically used for: At least one data processing layer located after the trained data processing layer in the machine learning model is used as a candidate training layer, and the candidate training layer is trained using the current training sample; If the training result of the candidate training layer meets the convergence condition, the candidate training layer is used as the data processing layer for the current training sample training, and the training of the machine learning model by the current training sample is completed.

11. The device according to any one of claims 8 to 10, wherein: The machine learning model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

12. A model using device, implemented using a target model trained by the method according to any one of claims 1 to 4, comprising: A sample analysis module, used to determine a target training sample associated with the sample to be predicted from at least two training samples constructed in the model training phase according to the coverage of the data source associated with the sample to be predicted; wherein the data source associated with the sample to be predicted includes at least two of a Tieba data source, a search engine data source, and a Weibo data source; A calling data layer determination module is used to determine the data processing layer to be called from at least two data processing layers of the target model according to the target training sample; The task prediction module is used to perform task prediction on the sample to be predicted according to the data processing layer to be called.

13. The device according to claim 12, wherein: The calling data layer determination module is specifically used for: Determine the data processing layer for training the target training sample in the model training phase; According to the data processing layer trained by the target training sample, a data processing layer to be called is determined from at least two data processing layers of the target model.

14. The device according to claim 12 or 13, wherein: The target model is a tree model; at least two data processing layers in the tree model are at least two decision trees.

15. An electronic device, wherein: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model training method described in any one of claims 1-4, or execute the model usage method described in any one of claims 5-7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the model training method described in any one of claims 1-4, or to execute the model usage method described in any one of claims 5-7.