CN110543946B - Method and apparatus for training a model - Google Patents

Method and apparatus for training a model Download PDF

Info

Publication number
CN110543946B
CN110543946B CN201810530387.XA CN201810530387A CN110543946B CN 110543946 B CN110543946 B CN 110543946B CN 201810530387 A CN201810530387 A CN 201810530387A CN 110543946 B CN110543946 B CN 110543946B
Authority
CN
China
Prior art keywords
model
configuration
data
initial
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810530387.XA
Other languages
Chinese (zh)
Other versions
CN110543946A (en
Inventor
刘昊骋
陈兴波
梁晓杰
刘玉忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201810530387.XA priority Critical patent/CN110543946B/en
Publication of CN110543946A publication Critical patent/CN110543946A/en
Application granted granted Critical
Publication of CN110543946B publication Critical patent/CN110543946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method and a device for training a model. One embodiment of the method comprises: receiving a model training request sent by a client, wherein the model training request comprises a target model type; matching the target model type with the model types in the historical model configuration set; in response to a successful match, performing the following first training step: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by a client aiming at the configuration data; and determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein the model parameters of the first initial target model are determined according to the model parameters of the historical model corresponding to the successfully matched model type. Therefore, the target model is obtained based on the configuration data training of the historical model, and the model training efficiency is improved.

Description

Method and apparatus for training a model
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for training a model.
Background
With the advent of massive data, artificial intelligence techniques have been rapidly developed, wherein machine learning techniques are commonly applied to mine beneficial data from massive data records. For example, financial businesses (credit, anti-fraud, marketing, etc.) rely on big data analysis and modeling mining, and developers need to write programs or use statistical modeling software to complete functions such as data processing, feature engineering, model training and model verification, which requires the developers to have strong encoding capability. In practice, learning and engineering practice costs exist for both coding and software, which is not favorable for fast model iteration.
Disclosure of Invention
The embodiment of the application provides a method and a device for training a model.
In a first aspect, an embodiment of the present application provides a method for training a model, where the method includes: receiving a model training request sent by a client, wherein the model training request comprises a target model type; matching the target model type with model types in a historical model configuration set, wherein the historical model configuration set comprises model types, configuration data of historical models corresponding to the model types and model parameters; in response to a successful match, performing the following first training step: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; and determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to the successfully matched model type.
In some embodiments, the above method further comprises: in response to the matching being unsuccessful, performing the following second training step: acquiring initial configuration data and initial model parameters corresponding to the target model type from a pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client, wherein the initial model configuration set comprises the model type, the initial configuration data corresponding to the model type and the initial model parameters; receiving second configuration modification data sent by the client aiming at the initial configuration data; and determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain a target model, wherein model parameters of the second initial target model are determined according to initial model parameters corresponding to the type of the target model in the initial model configuration set.
In some embodiments, the first training step and the second training step further comprise the following model validation steps: verifying the target model by using a preset verification data set to obtain a verification result; and sending the verification result to the client so that the client presents the verification result to a user.
In some embodiments, the first training step and the second training step further comprise: receiving third configuration modification data sent by the client, wherein the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard condition; and continuously training the target model by using the third configuration modification data, and executing the model verification step after the training is finished.
In some embodiments, the first training step and the second training step further comprise: responding to a release request sent by the client, and releasing the target model, wherein the release request is sent after the user determines that the verification result reaches the standard reaching condition; and updating the configuration data and the model parameters of the target model into the historical model configuration set.
In some embodiments, the first configuration modification data comprises at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
In a second aspect, an embodiment of the present application provides an apparatus for training a model, where the apparatus includes: the model training device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive a model training request sent by a client, and the model training request comprises a target model type; the matching unit is configured to match the target model type with model types in a historical model configuration set, wherein the historical model configuration set comprises model types, configuration data of historical models corresponding to the model types and model parameters; a first training step execution unit configured to, in response to a successful matching, execute a first training step of: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; and determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to the successfully matched model type.
In some embodiments, the above apparatus further comprises: a second training step performing unit configured to perform, in response to the matching being unsuccessful, a second training step of: acquiring initial configuration data and initial model parameters corresponding to the target model type from a pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client, wherein the initial model configuration set comprises the model type, the initial configuration data corresponding to the model type and the initial model parameters; receiving second configuration modification data sent by the client aiming at the initial configuration data; and determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain a target model, wherein model parameters of the second initial target model are determined according to initial model parameters corresponding to the target model type in the initial model configuration set.
In some embodiments, the first training step performing unit and the second training step performing unit are further configured to: verifying the target model by using a preset verification data set to obtain a verification result; and sending the verification result to the client so that the client presents the verification result to a user.
In some embodiments, the first training step performing unit and the second training step performing unit are further configured to: receiving third configuration modification data sent by the client, wherein the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard condition; and continuously training the target model by using the third configuration modification data, and executing the model verification step after the training is finished.
In some embodiments, the first training step performing unit and the second training step performing unit are further configured to: responding to a release request sent by the client, and releasing the target model, wherein the release request is sent after the user determines that the verification result reaches the standard reaching condition; and updating the configuration data and the model parameters of the target model into the historical model configuration set.
In some embodiments, the first configuration modification data comprises at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
In a third aspect, an embodiment of the present application provides a server, where the server includes: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
The method and the device for training the model, provided by the embodiment of the application, firstly receive a model training request sent by a client, then match a target model type with a model type in a historical model configuration set, and in response to successful matching, execute the following first training step: the configuration data of the historical model corresponding to the successfully matched model type is sent to the client, the first configuration modification data sent by the client aiming at the configuration data is received, then the first initial target model is determined according to the configuration data and the first configuration modification data, the first initial target model is trained, the target model is obtained, and therefore the target model is obtained based on the historical model configuration data training, and the model training efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for training a model according to the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for training a model according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a method for training a model according to the present application;
FIG. 5 is a schematic illustration of data stored by an executing subject of the method for training a model of the present application with respect to a marketing model.
FIG. 6 is a schematic block diagram of one embodiment of an apparatus for training models according to the present application;
FIG. 7 is a block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the method for training a model or the apparatus for training a model of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for data displayed on the terminal devices 101, 102, 103. The background server may analyze and perform other processing on the received data such as the model training request, and feed back a processing result (e.g., configuration data) to the terminal device.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for training the model provided in the embodiment of the present application is generally performed by the server 105, and accordingly, the apparatus for training the model is generally disposed in the server 105. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for training a model according to the present application is shown. The method for training the model comprises the following steps:
step 201, receiving a model training request sent by a client.
In this embodiment, an executing agent (e.g., the server 105 shown in fig. 1) of the method for training a model may receive a model training request from a client, with which a user inputs information, through a wired connection or a wireless connection, where the model training request may include a target model type. Here, the user may refer to a modeler who builds a model by using the client. The above object model type may refer to a type of the object model. In practice, the types of models required for different business domains are also different. For example, the types of models required for the financial business segment may include a credit model, an anti-fraud model, a marketing model, and so forth, wherein the credit model may be used to score credit for the financial customer, the anti-fraud model may be used to predict whether the financial customer is a fraudulent customer, and the marketing model may be used to identify potential customers.
Generally, the execution subject may present a graphical interface for sending a model training request to the user through a client used by the user, and the user may send the model training request including a target model type to the execution subject through the graphical interface. For example, the user may send a model training request to the executing agent by directly entering the target model type or clicking on a target model type option presented in the graphical interface.
Step 202, matching the target model type with the model types in the historical model configuration set.
In this embodiment, the execution subject may match the target model type received in step 201 with the model types in the historical model configuration set. The historical model configuration set may include a model type, and configuration data and model parameters of a historical model corresponding to the model type. The configuration data may include sample data, machine learning algorithm data, data feature extraction method data, and the like. Here, the history model may be a model obtained by the user or another user by performing the subject training in the past. The configuration data of the historical model may refer to data configured when training the historical model. Such as sample data, machine learning algorithm data, data feature extraction method data, and so forth. The sample data may be sample data used in training the historical model, the machine learning algorithm data may represent a machine learning method used in training the historical model, and the data feature extraction method data may represent a feature engineering used in training the historical model and used for extracting features from the sample data.
Step 203, in response to the matching being successful, a first training step is performed.
In this embodiment, if the target model type is the same as a certain model type in the historical model configuration set, the execution subject may determine that the target model type matches the model type in the historical model configuration set successfully. In response to determining that the matching is successful, the executing entity may execute a first training step, where the first training step specifically includes the following:
step 2031, sending the configuration data of the history model corresponding to the successfully matched model type to the client.
Here, the execution body may send, to the client, configuration data of a historical model corresponding to a model type successfully matched with the target model type in the historical model configuration set, so that the client may present the configuration data to a user.
Step 2032, receiving the first configuration modification data sent by the client for the configuration data.
Here, the execution body may receive first configuration modification data sent by the client for the configuration data. In practice, after the user views the configuration data sent by the execution main body through the graphical interface displayed by the client, the configuration data displayed on the graphical interface can be modified according to actual needs. For example, sample data is modified, e.g., some sample data is deleted or some sample data is added. As another example, the machine learning algorithm is replaced. As another example, a replacement feature engineering. The client may send first configuration modification data to the execution body for a user's modification of the configuration data.
In some optional implementations of this embodiment, the first configuration modification data may include at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
Step 2033, determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model.
Here, the executing agent may first determine a first initial target model based on the configuration data and the first configuration modification data. And determining the model parameters of the first initial target model according to the model parameters of the historical model corresponding to the successfully matched model type. As an example, the execution subject may modify, according to the first configuration modification data, configuration data of a history model corresponding to the successfully matched model type, and use the history model after modifying the configuration data as the first initial target model. And the model parameters of the first initial model are the model parameters of the historical model corresponding to the successfully matched model type. Then, the executing agent may train the first initial target model using the sample data modified according to the first configuration modification data, thereby obtaining the target model.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for training a model according to the present embodiment. In the application scenario of fig. 3, a user needs to train to obtain a marketing model, and the user sends a model training request to the server 302 through the client 301. Wherein the model training request comprises a target model type "marketing model". After receiving the model training request, the server 302 may match the "marketing model" with the model types in the historical model configuration set, so as to determine whether the historical model configuration set includes a historical model whose model type is the "marketing model", and if so, the matching is successful. In response to a successful match, the service segment 302 may perform the following first training step: 1) sending configuration data of a historical model with a model type of 'marketing model' to the client 301 for display by the client; 2) a user sends first configuration modification data according to configuration data displayed by a client 301, and a server 302 receives the first configuration modification data sent by the client 302 aiming at the configuration data; 3) the server 302 determines a first initial target model according to the configuration data and the first configuration modification data, and trains the first initial target model to obtain a target model. Wherein the model parameters of the first initial target model are determined according to the model parameters of the historical model of which the model type is the marketing model.
According to the method provided by the embodiment of the application, the historical model trained in the past is fully utilized, and the target model is obtained based on the configuration data training of the historical model, so that the model training efficiency is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for training a model is illustrated. The process 400 of the method for training a model includes the steps of:
step 401, receiving a model training request sent by a client.
In this embodiment, an executing agent (e.g., the server 105 shown in fig. 1) of the method for training a model may receive a model training request from a client, with which a user inputs information, through a wired connection or a wireless connection, where the model training request may include a target model type. The above object model type may refer to a type of the object model.
Step 402, matching the target model type with the model types in the historical model configuration set.
In this embodiment, the execution subject may match the target model type received in step 401 with a model type in a historical model configuration set, where the historical model configuration set may include the model type and configuration data and model parameters of a historical model corresponding to the model type. The configuration data may include sample data, machine learning algorithm data, data feature extraction method data, and the like. Here, the historical model may be a model that the user or another user has obtained by performing the subject training in the past, and the arrangement data of the historical model may be data arranged when training the historical model.
Step 403, in response to the matching being successful, performing a first training step:
in this embodiment, if the target model type is the same as a certain model type in the historical model configuration set, the executing entity may determine that the target model type is successfully matched with the model type in the historical model configuration set, and in response to determining that the matching is successful, the executing entity may execute a first training step, where the first training step specifically includes the following steps:
step 4031, the configuration data of the history model corresponding to the successfully matched model type is sent to the client.
Here, the execution body may send, to the client, configuration data of a historical model corresponding to a model type successfully matched with the target model type in the historical model configuration set, so that the client may present the configuration data to a user.
Step 4032, receive the first configuration modification data sent by the client for the configuration data.
Here, the execution body may receive first configuration modification data sent by the client for the configuration data.
Step 4033, determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model.
Here, the executing entity may first determine a first initial target model according to the configuration data and the first configuration modification data, where model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to a successfully matched model type.
In response to an unsuccessful match, a second training step is performed, step 404.
In this embodiment, in response to the target model type not matching the model types in the historical model configuration set, the executing entity may perform a second training step. Wherein, the second training step comprises the following steps:
step 4041, obtaining initial configuration data and initial model parameters corresponding to the target model type from the pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client.
Here, the execution body may store an initial model configuration set in advance, where the initial model configuration set may include various model types, and initial configuration data and initial model parameters corresponding to the model types. The execution main body may obtain initial configuration data corresponding to the target model class from the initial model configuration set, and send the obtained initial configuration data to the client, so that the client can display the initial configuration data to a user.
In practice, the initial configuration data and the initial model parameters corresponding to each model type in the initial model configuration set may be set by a technician according to actual experience. For example, when a technician determines that the configuration data and the model parameters of the model type "marketing model" are the following first data according to actual experience, the trained marketing model has a good effect. At this time, the technician may take the following first data as initial configuration data and initial model parameters corresponding to the model type "marketing model". The first data may include: sample data { sample 1, sample 2 … …, sample N }, where N is a positive integer; machine learning algorithm "logistic regression"; a data feature extraction method of 'binning + WOE'; model parameters "learning rate X, positive and negative sample weights Y, regularization parameters Z, … …", and so on.
As an example, various data related to model training may be stored in the execution subject described above in advance. Taking the marketing model as an example, fig. 5 exemplifies part of data stored by the execution subject for the marketing model. The business database of the executing entity may be pre-stored with sample data related to the training marketing model, such as the age, deposit, transaction amount, etc. of the client. The execution main body may further store various machine learning algorithms required for building the marketing model, for example, a logistic regression algorithm, a GBDT algorithm (Gradient Boosting decision tree), a random forest algorithm, a deep neural network algorithm, and the like. The execution body may further store feature engineering for various machine learning algorithms, for example, the following feature engineering may be stored for a logistic regression algorithm: feature binning + WOE (weight of Evidence) coding, feature binning + Onehot coding (One-Hot Encoding), Minmax normalization, Z-Score normalization, and the like. The execution body may further store preferred model parameters for various feature projects, for example, a smaller learning rate and a smaller regularization parameter may be set after the features are processed by using feature binning + WOE coding.
It should be noted that the data in fig. 5 is only illustrative and not limiting of the data stored by the execution main body. In actual use, other data can be stored in the execution main body according to actual needs.
Step 4042, receiving second configuration modification data sent by the client for the initial configuration data.
Here, the execution body may receive second configuration modification data transmitted by the client with respect to the initial configuration data. Wherein the second configuration modification data comprises at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
Step 4043, determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain the target model.
Here, the executing entity may determine a second initial target model according to the initial configuration data and the second configuration modification data, and train the second initial target model to obtain the target model, where the model parameters of the second initial target model are determined according to the initial model parameters corresponding to the target model type in the initial model configuration set.
In some optional implementation manners of this embodiment, the first training step and the second training step may further include the following model verification step:
and step S1, verifying the target model by using a preset verification data set to obtain a verification result.
Here, the execution body may have a verification data set stored therein in advance for each model type to verify the accuracy of the model. In this way, after the target model training is completed, the execution subject may use a preset verification data set to verify the target model, and obtain a verification result. As an example, the validation result of the model may include at least one of: accuracy, recall, ROC curves, K-S curves, and the like.
And step S2, sending the verification result to the client for the client to present the verification result to the user.
Here, the execution subject may send the verification result obtained in step S1 to the client, so that the client may present the verification result to the user.
In some optional implementations, the first training step and the second training step may further include the steps of:
and step S01, receiving third configuration modification data sent by the client.
Here, the execution main body may receive third configuration modification data sent by the client, where the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard reaching condition, and for example, the standard reaching condition may be that the accuracy is greater than a preset threshold. The third configuration modification data may include at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
And step S02, continuing to train the target model by using the third configuration modification data, and executing a model verification step after the training is finished.
Here, the executing agent may continue training the target model using the third configuration modification data, and execute the model verification step after the training is completed. As an example, the executing entity may first modify the configuration data of the target model according to the third configuration modification data, then continue to train the target model using the modified configuration data, and perform the model verification step after the training is completed.
In some optional implementations, the first training step and the second training step may further include the steps of:
step S11, in response to receiving the publishing request sent by the client, publish the target model.
Here, the execution agent may issue the target model in response to receiving an issue request sent by the client. As an example, the execution agent may publish a model file and model parameters of the target model, where the model file may include a model architecture. Here, the issue request may be sent after the user determines that the verification result meets the standard condition.
Step S12, the configuration data and model parameters of the target model are updated into the historical model configuration set.
Here, the execution agent may update the configuration data of the target model and the trained model parameters into a historical model configuration set. As an example, when the target model type is successfully matched with the model type in the historical model configuration set, the configuration data and the model parameters corresponding to the matched model type in the historical model configuration set may be updated to the configuration data and the model parameters of the target model; when the matching of the target model type and the model type in the historical model configuration set is unsuccessful, the target model type, the configuration data of the target model and the model parameter association can be stored in the historical model configuration set.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the process 400 of the method for training a model in this embodiment highlights a step of obtaining initial configuration data and initial model parameters from the initial model configuration set when the matching between the target model type and the model type in the historical model configuration set is unsuccessful, and since the initial configuration data and the initial model parameters in the initial model configuration set are set by a technician according to actual experience, efficient training of the model can be achieved.
With further reference to fig. 6, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for training a model, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied in various electronic devices.
As shown in fig. 6, the apparatus 600 for training a model of the present embodiment includes: a receiving unit 601, a matching unit 602 and a first training step executing unit 603. The receiving unit 601 is configured to receive a model training request sent by a client, where the model training request includes a target model type; the matching unit 602 is configured to match the target model type with a model type in a historical model configuration set, where the historical model configuration set includes the model type and configuration data and model parameters of a historical model corresponding to the model type; the first training step performing unit 603 is configured to perform, in response to a successful matching, the following first training step: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; and determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to the successfully matched model type.
In this embodiment, specific processing of the receiving unit 601, the matching unit 602, and the first training step executing unit 603 of the apparatus 600 for training a model and technical effects thereof can refer to the related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of this embodiment, the apparatus 600 further includes: a second training step performing unit (not shown in the figure) configured to perform, in response to the matching being unsuccessful, the following second training step: acquiring initial configuration data and initial model parameters corresponding to the target model type from a pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client, wherein the initial model configuration set comprises the model type, the initial configuration data corresponding to the model type and the initial model parameters; receiving second configuration modification data sent by the client aiming at the initial configuration data; and determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain a target model, wherein model parameters of the second initial target model are determined according to initial model parameters corresponding to the target model type in the initial model configuration set.
In some optional implementations of this embodiment, the first training step performing unit and the second training step performing unit are further configured to: verifying the target model by using a preset verification data set to obtain a verification result; and sending the verification result to the client so that the client presents the verification result to a user.
In some optional implementations of this embodiment, the first training step performing unit and the second training step performing unit are further configured to: receiving third configuration modification data sent by the client, wherein the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard condition; and continuously training the target model by using the third configuration modification data, and executing the model verification step after the training is finished.
In some optional implementations of this embodiment, the first training step performing unit and the second training step performing unit are further configured to: responding to a release request sent by the client, and releasing the target model, wherein the release request is sent after the user determines that the verification result reaches the standard reaching condition; and updating the configuration data and the model parameters of the target model into the historical model configuration set.
In some optional implementations of this embodiment, the first configuration modification data includes at least one of: sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use in implementing the 7-server of the embodiments of the present application. The server shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 706 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: a storage portion 706 including a hard disk and the like; and a communication section 707 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 707 performs communication processing via a network such as the internet. A drive 708 is also connected to the I/O interface 705 as needed. A removable medium 709 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 708 as necessary, so that a computer program read out therefrom is mounted into the storage section 706 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 707 and/or installed from the removable medium 709. The computer program, when executed by a Central Processing Unit (CPU)701, performs the above-described functions defined in the method of the present application.
It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a matching unit, and a first training step execution unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, a receiving unit may also be described as a "unit that receives a model training request sent by a client".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: receiving a model training request sent by a client, wherein the model training request comprises a target model type; matching the target model type with model types in a historical model configuration set, wherein the historical model configuration set comprises model types, configuration data of historical models corresponding to the model types and model parameters; in response to a successful match, performing the following first training step: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; and determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to the successfully matched model type.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements in which any combination of the features described above or their equivalents does not depart from the spirit of the invention disclosed above. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for training a model, comprising:
receiving a model training request sent by a client, wherein the model training request comprises a target model type;
matching the target model type with model types in a historical model configuration set, wherein the historical model configuration set comprises model types, configuration data of historical models corresponding to the model types and model parameters;
in response to a successful match, performing the following first training step: sending configuration data of a historical model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to a successfully matched model type;
in response to the matching being unsuccessful, performing the following second training step: acquiring initial configuration data and initial model parameters corresponding to the target model type from a pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client, wherein the initial model configuration set comprises the model type, the initial configuration data corresponding to the model type and the initial model parameters; receiving second configuration modification data sent by the client aiming at the initial configuration data; and determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain a target model, wherein model parameters of the second initial target model are determined according to initial model parameters corresponding to the type of the target model in the initial model configuration set.
2. The method of claim 1, wherein the first and second training steps further comprise the following model validation steps:
verifying the target model by using a preset verification data set to obtain a verification result;
and sending the verification result to the client so that the client can present the verification result to a user.
3. The method of claim 2, wherein the first training step and the second training step further comprise:
receiving third configuration modification data sent by the client, wherein the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard condition;
and continuously training the target model by using the third configuration modification data, and executing the model verification step after the training is finished.
4. The method of claim 2, wherein the first training step and the second training step further comprise:
responding to a release request sent by the client, and releasing the target model, wherein the release request is sent after the user determines that the verification result reaches a standard condition;
updating the configuration data and model parameters of the target model into the historical model configuration set.
5. The method of claim 1, wherein the first configuration modification data comprises at least one of:
sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
6. An apparatus for training a model, comprising:
a receiving unit configured to receive a model training request sent by a client, wherein the model training request comprises a target model type;
the matching unit is configured to match the target model type with model types in a historical model configuration set, wherein the historical model configuration set comprises model types, configuration data of historical models corresponding to the model types and the model types, and model parameters;
a first training step execution unit configured to, in response to a successful matching, execute a first training step of: sending configuration data of a history model corresponding to the successfully matched model type to the client; receiving first configuration modification data sent by the client aiming at the configuration data; determining a first initial target model according to the configuration data and the first configuration modification data, and training the first initial target model to obtain a target model, wherein model parameters of the first initial target model are determined according to model parameters of a historical model corresponding to a successfully matched model type;
a second training step execution unit configured to, in response to the matching being unsuccessful, execute the following second training step: acquiring initial configuration data and initial model parameters corresponding to the target model type from a pre-established initial model configuration set, and sending the initial configuration data and the initial model parameters to the client, wherein the initial model configuration set comprises the model type, the initial configuration data corresponding to the model type and the initial model parameters; receiving second configuration modification data sent by the client aiming at the initial configuration data; and determining a second initial target model according to the initial configuration data and the second configuration modification data, and training the second initial target model to obtain a target model, wherein model parameters of the second initial target model are determined according to initial model parameters corresponding to the type of the target model in the initial model configuration set.
7. The apparatus of claim 6, wherein the first and second training steps further comprise the following model validation steps:
verifying the target model by using a preset verification data set to obtain a verification result;
and sending the verification result to the client so that the client can present the verification result to a user.
8. The apparatus of claim 7, wherein the first training step and the second training step further comprise:
receiving third configuration modification data sent by the client, wherein the third configuration modification data is sent after the user determines that the verification result does not reach a preset standard condition;
and continuously training the target model by using the third configuration modification data, and executing the model verification step after the training is finished.
9. The apparatus of claim 7, wherein the first training step and the second training step further comprise:
responding to a release request sent by the client, and releasing the target model, wherein the release request is sent after the user determines that the verification result reaches a standard condition;
updating the configuration data and model parameters of the target model into the historical model configuration set.
10. The apparatus of claim 6, wherein the first configuration modification data comprises at least one of:
sample modification data, machine learning algorithm modification data, data feature extraction method modification data, model parameter configuration modification data and standard reaching condition setting modification data.
11. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201810530387.XA 2018-05-29 2018-05-29 Method and apparatus for training a model Active CN110543946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810530387.XA CN110543946B (en) 2018-05-29 2018-05-29 Method and apparatus for training a model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810530387.XA CN110543946B (en) 2018-05-29 2018-05-29 Method and apparatus for training a model

Publications (2)

Publication Number Publication Date
CN110543946A CN110543946A (en) 2019-12-06
CN110543946B true CN110543946B (en) 2022-07-05

Family

ID=68700834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810530387.XA Active CN110543946B (en) 2018-05-29 2018-05-29 Method and apparatus for training a model

Country Status (1)

Country Link
CN (1) CN110543946B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925558B (en) * 2019-12-09 2022-05-17 支付宝(杭州)信息技术有限公司 Model joint training method and device
CN111027771A (en) * 2019-12-10 2020-04-17 浙江力石科技股份有限公司 Scenic spot passenger flow volume estimation method, system and device and storable medium
CN111078659B (en) * 2019-12-20 2023-04-21 腾讯科技(深圳)有限公司 Model updating method, device, computer readable storage medium and computer equipment
CN111144652B (en) * 2019-12-26 2023-08-08 浙江力石科技股份有限公司 Tour comfort algorithm and trend prediction based method, system and device
CN111126604B (en) * 2019-12-31 2024-02-02 北京奇艺世纪科技有限公司 Model training method, device, server and storage medium
CN111210022B (en) * 2020-01-09 2024-05-17 深圳前海微众银行股份有限公司 Backward model selecting method, apparatus and readable storage medium
WO2021139462A1 (en) * 2020-01-09 2021-07-15 深圳前海微众银行股份有限公司 Stepwise model selection method and device, and readable storage medium
CN113554450A (en) * 2020-04-24 2021-10-26 阿里巴巴集团控股有限公司 Data model training and data processing method, device, equipment and storage medium
CN114372569A (en) * 2020-10-14 2022-04-19 新智数字科技有限公司 Data measurement method, data measurement device, electronic equipment and computer readable medium
CN112561082A (en) * 2020-12-22 2021-03-26 北京百度网讯科技有限公司 Method, device, equipment and storage medium for generating model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722753A (en) * 2012-06-01 2012-10-10 江南大学 Method for modeling Takagi-Sugeno-Kang (TSK) fuzzy system with mankind learning ability
US8311967B1 (en) * 2010-05-14 2012-11-13 Google Inc. Predictive analytical model matching
CN104156359A (en) * 2013-05-13 2014-11-19 腾讯科技(深圳)有限公司 Linking information recommendation method and device
CN107343151A (en) * 2017-07-31 2017-11-10 广东欧珀移动通信有限公司 image processing method, device and terminal
CN107742536A (en) * 2017-10-16 2018-02-27 成都黑杉科技有限公司 The method and device of information processing
CN107766396A (en) * 2017-03-03 2018-03-06 平安医疗健康管理股份有限公司 resource data management method and device
CN107766940A (en) * 2017-11-20 2018-03-06 北京百度网讯科技有限公司 Method and apparatus for generation model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10438132B2 (en) * 2015-12-16 2019-10-08 Accenture Global Solutions Limited Machine for development and deployment of analytical models

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8311967B1 (en) * 2010-05-14 2012-11-13 Google Inc. Predictive analytical model matching
CN102722753A (en) * 2012-06-01 2012-10-10 江南大学 Method for modeling Takagi-Sugeno-Kang (TSK) fuzzy system with mankind learning ability
CN104156359A (en) * 2013-05-13 2014-11-19 腾讯科技(深圳)有限公司 Linking information recommendation method and device
CN107766396A (en) * 2017-03-03 2018-03-06 平安医疗健康管理股份有限公司 resource data management method and device
CN107343151A (en) * 2017-07-31 2017-11-10 广东欧珀移动通信有限公司 image processing method, device and terminal
CN107742536A (en) * 2017-10-16 2018-02-27 成都黑杉科技有限公司 The method and device of information processing
CN107766940A (en) * 2017-11-20 2018-03-06 北京百度网讯科技有限公司 Method and apparatus for generation model

Also Published As

Publication number Publication date
CN110543946A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN110543946B (en) Method and apparatus for training a model
US10558984B2 (en) Method, apparatus and server for identifying risky user
CN107316083B (en) Method and apparatus for updating deep learning model
CN108520470B (en) Method and apparatus for generating user attribute information
CN107517251B (en) Information pushing method and device
CN111061956B (en) Method and apparatus for generating information
CN110929799B (en) Method, electronic device, and computer-readable medium for detecting abnormal user
CN110555451A (en) information identification method and device
US11222270B2 (en) Using learned application flow to predict outcomes and identify trouble spots in network business transactions
CN114004700A (en) Service data processing method and device, electronic equipment and storage medium
CN111798261A (en) Information updating method and device
CN114358147A (en) Training method, identification method, device and equipment of abnormal account identification model
CN113779346A (en) Method and device for identifying one person with multiple accounts
CN109840072B (en) Information processing method and device
US20170249697A1 (en) System and method for machine learning based line assignment
CN115795345A (en) Information processing method, device, equipment and storage medium
CN111598597A (en) Method and apparatus for transmitting information
US11030673B2 (en) Using learned application flow to assist users in network business transaction based apps
CN115983907A (en) Data recommendation method and device, electronic equipment and computer readable medium
CN114066603A (en) Post-loan risk early warning method and device, electronic equipment and computer readable medium
US20180198749A1 (en) Time and sentiment based messaging
CN114723455A (en) Service processing method and device, electronic equipment and storage medium
CN113807436A (en) User mining method and device, computer equipment and readable storage medium
CN113094595A (en) Object recognition method, device, computer system and readable storage medium
US20170213223A1 (en) System and method for verified merchant industry code assignment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant