Deployment method, device and system of deep learning model

By dividing the deep learning model into a data processing module, a training evaluation module and an automatic update module, and using configuration files for control, it solves the problem of the lack of automated deployment processes in the existing technology, achieves efficient model deployment and update, and improves efficiency. Work efficiency and system fault tolerance.

CN110928553BInactive Publication Date: 2024-09-13CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910984396.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-16
Publication Date
2024-09-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There is a lack of automated deployment processes in the application and project development of deep learning models in the existing technology, which results in developers needing to manually complete complex steps such as model training, parameter debugging, and model release. The work efficiency is low, and after model iteration or parameter modification, it is necessary to Repeated operations can easily affect the system due to operational errors.

Method used

Provides a deployment method for deep learning models. By receiving configuration files uploaded by users, the deep learning models are divided into data processing modules, training evaluation modules and automatic update modules. Each module runs independently and uses configuration files for association and control to achieve Automate the deployment process to improve fault tolerance and robustness.

Benefits of technology

It simplifies the project online process, saves time and energy, improves work efficiency, enhances the flexibility and automation of the system, and reduces the risk of manual operation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110928553B
    Figure CN110928553B
Patent Text Reader

Abstract

The present application relates to the field of model monitoring technology, and in particular to a deployment method, apparatus, computer equipment and storage medium for a deep learning model, comprising: receiving a configuration file uploaded by a user, wherein the configuration file is associated with a data processing module, a training evaluation module and an automatic update module of the deep learning model; reading module configuration information in the configuration file, processing user data in a data platform through the data processing module according to the module configuration information, training the processed user data through the training evaluation module to obtain a training result, and evaluating the training result to obtain model evaluation information; the present solution performs process control on each module through the module configuration information of the configuration file, thereby making the entire deployment process more flexible and simple, and improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of model monitoring technology, and in particular to a deployment method, apparatus, computer equipment and storage medium for a deep learning model. Background Art

[0002] In the era of artificial intelligence, deep learning, as a powerful technology, has begun to change every aspect of our lives, and applications and projects based on deep learning models are emerging in an endless stream.

[0003] At present, in the application and project development process based on deep learning models, there is no automated deployment process for model training, parameter debugging, and model release. As a result, developers not only need to complete the above steps manually offline, but also need to repeat the above steps after model iteration or parameter modification. This operation process is relatively complicated and the work efficiency is relatively low. Summary of the invention

[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect that there is no automated deployment process in the application or project development process based on deep learning models in the prior art, resulting in low work efficiency.

[0005] This application provides a deployment method for a deep learning model, comprising the following steps:

[0006] Receiving a configuration file uploaded by a user, wherein the configuration file is associated with a data processing module, a training evaluation module, and an automatic update module of a deep learning model;

[0007] Reading the module configuration information in the configuration file, processing the user data in the data platform through the data processing module according to the module configuration information, training the processed user data through the training evaluation module to obtain a training result, and evaluating the training result to obtain model evaluation information;

[0008] If there is a model update file in the model evaluation information, the deep learning model is updated and configured through the automatic update module according to the model update file.

[0009] In one embodiment, the step of processing the user data in the data platform through the data processing module according to the module configuration information includes:

[0010] Acquire user data in the data platform and a feature wide table corresponding to the user data according to the module configuration information;

[0011] The user data is preprocessed by the data processing module to obtain feature data, and the feature wide table is processed to obtain a data marking file.

[0012] In one embodiment, before the step of training and evaluating the processed user data through the training evaluation module to obtain model evaluation information, the step further includes:

[0013] Uploading the feature data and the data tag file to a specified path of the configuration file according to the module configuration information;

[0014] When the data marker file is detected in the designated path, the feature data is pulled from the designated path through the training evaluation module.

[0015] In one embodiment, before the step of training and evaluating the processed user data through the training evaluation module to obtain model evaluation information, the step further includes:

[0016] Detect whether there is a first model training file in the specified path, and if so, download the first model training file to the local computer through the training evaluation model;

[0017] The model indicators in the first model training file are evaluated according to the test data in the training evaluation model to obtain a first evaluation file.

[0018] In one embodiment, the step of training and evaluating the processed user data through the training evaluation module to obtain model evaluation information includes:

[0019] Using the first model training file to train the feature data to obtain a second model training file;

[0020] Evaluate the model indicators in the second model training file according to the test data in the training evaluation model to obtain a second evaluation file;

[0021] Model evaluation information is determined according to the first evaluation file and the second evaluation file.

[0022] In one embodiment, the step of determining model evaluation information according to the first evaluation file and the second evaluation file includes:

[0023] Obtaining the first evaluation file and the second evaluation file, and comparing the model index of the first evaluation file with the model index of the second evaluation file;

[0024] When the model index of the second evaluation file is greater than the model index of the first evaluation file, the second model training file corresponding to the second evaluation file is used as a model update file, and model evaluation information is generated.

[0025] In one embodiment, the step of updating and configuring the deep learning model through the automatic update module according to the model update file includes:

[0026] Pulling the model update file from the specified path to the automatic update module according to the module configuration information;

[0027] The training model is updated and configured through the update service unit of the automatic update module.

[0028] The present application also provides a deployment device for a deep learning model, which includes:

[0029] An information association module, used to receive a configuration file uploaded by a user, wherein the configuration file is associated with a data processing module, a training evaluation module, and an automatic update module of a training model;

[0030] A data processing module is used to read the module configuration information in the configuration file, process the user data in the data platform through the data processing module according to the module configuration information, train the processed user data through the training evaluation module to obtain a training result, and evaluate the training result to obtain model evaluation information;

[0031] A model update module is used to update and configure the deep learning model through the automatic update module according to the model update file if there is a model update file in the model evaluation information.

[0032] The present application also provides a computer device, characterized in that it includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps in the method for deploying a deep learning model as described in any one of the above embodiments.

[0033] The present application also provides a computer storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the steps of deploying the deep learning model as described in any of the above embodiments.

[0034] The above-mentioned deployment method, device, computer equipment and storage medium of the deep learning model receive the configuration file uploaded by the user, wherein the configuration file is associated with the data processing module, training evaluation module and automatic update module of the deep learning model; read the module configuration information in the configuration file, process the user data in the data platform through the data processing module according to the module configuration information, and train and evaluate the processed user data through the training evaluation module to obtain the model evaluation information; if there is a model update file in the model evaluation information, the deep learning model is updated and configured through the automatic update module according to the model update file. In this scheme, the deep learning model is deployed as a data processing module, a training evaluation module and an automatic update module, and each module is independent of each other, which increases the fault tolerance and robustness of the system; in addition, each module is associated with each other through a configuration file, and the processing flow of each module is controlled by the module configuration information in the configuration file, making the entire deployment process more flexible and simple, saving the time and energy spent on the project launch, and improving work efficiency.

[0035] Additional aspects and advantages of the present application will be given in part in the following description, which will become apparent from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0037] Figure 1 It is an application environment diagram of the deployment method of the deep learning model in the embodiment of the present application;

[0038] Figure 2 is a flow chart of a method for deploying a deep learning model according to an embodiment;

[0039] Figure 3 A flow chart of a method for determining model evaluation information according to a first evaluation file and a second evaluation file according to an embodiment;

[0040] Figure 4 A schematic diagram of the structure of a deployment device for a deep learning model according to an embodiment;

[0041] Figure 5 The diagram is a schematic diagram of the internal structure of a computer device according to an embodiment. DETAILED DESCRIPTION

[0042] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present application.

[0043] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0044] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0045] refer to Figure 1 As shown, Figure 1 is an application environment diagram of an embodiment of the present application; in this embodiment, the technical solution of the present application is implemented based on the server 110, such as Figure 1 In the embodiment, the server 110 receives the configuration file 120 uploaded by the user, and configures the relevant modules in the deep learning model 130 through the configuration file 120 to realize the relevant functions; in the embodiment of the present application, the server 110 receives the configuration file 120 uploaded by the user, searches for the corresponding deep learning model 130 through the configuration file 120, and reads the module configuration information in the configuration file 120 to realize the function of configuring the corresponding modules in the deep learning model 130; the server 110 here refers to a device that can realize various background functions.

[0046] In one embodiment, Figure 2 As shown, Figure 2 This is a flow chart of a method for deploying a deep learning model in an embodiment. In this embodiment, a method for deploying a deep learning model is proposed, which may specifically include the following steps:

[0047] S110: Receive a configuration file 120 uploaded by a user, wherein the configuration file 120 is associated with a data processing module, a training evaluation module, and an automatic update module of a deep learning model 130.

[0048] Since applications and projects based on the deep learning model 130 require developers to manually complete model training, parameter debugging, and model publishing offline, it is rather cumbersome; and after model iteration or parameter modification, the above operations need to be repeated; manual execution of model training and publishing processes may affect the entire system due to operational errors.

[0049] Therefore, in this step, the manual operation is changed into an automated operation procedure controlled by parameters, and the deep learning model 130 is further divided into three modules, namely, a data processing module, a training and evaluation module, and an automatic update module. Through the independent operation of each module, the fault tolerance and robustness of the deep learning model 130 can be improved.

[0050] In addition, in this step, the configuration file 120 is uploaded by the developer without relying on other environments. Each deep learning model 130 has a unique model_code, also known as a model identification bit. The configuration file 120 identifies the corresponding deep learning model 130 in the model training platform through the model identification bit. When the corresponding deep learning model 130 is identified, the configuration file 120 can be matched with the deep learning model 130. Correspondingly, the data processing module, training evaluation module and automatic update module in the deep learning model 130 are associated with the configuration file 120, and the entire deployment process is uniformly configured and controlled through the configuration file 120.

[0051] Among them, the data processing module mainly selects column data collected from different data platforms according to the needs of different deep learning models 130, and preprocesses these column data into data information required by the model, and then transfers these data information to other modules of the model according to the configuration process of the configuration file 120.

[0052] The training and evaluation module mainly detects whether there is data information uploaded by the data processing module under the agreed path according to the configuration process in the configuration file 120, and trains and evaluates the model based on the data information and model training parameters, and then transfers the trained model information to other modules of the model according to the configuration process of the configuration file 120.

[0053] The automatic update module mainly detects whether there is model information uploaded by the training evaluation module under the agreed path through the configuration process in the configuration file 120, and performs configuration updates when the model is updated.

[0054] S120: Read the module configuration information in the configuration file 120, process the user data in the data platform through the data processing module according to the module configuration information, train the processed user data through the training evaluation module to obtain training results, and evaluate the training results to obtain model evaluation information.

[0055] In this step, the configuration file 120 is configured with module configuration information, and each module in the deep learning model 130 can read the configuration content in the module configuration information through an agreed path, and perform configuration operations on the corresponding module through the configuration content.

[0056] The configuration operation of the corresponding module includes processing the user data in the data platform through the data processing module according to the module configuration information, and training and evaluating the processed user data through the training evaluation module to obtain model evaluation information.

[0057] In the above process, in order to ensure data security, the data platform and the processor (such as GPU) model training platform are independent and isolated from each other, and the data platform cannot execute overly complex logic. Therefore, in each training cycle, the data platform needs to send the complete feature wide table and the metadata (metadata, i.e., the columns of the wide table) of the feature wide table to the processor model training platform for certain processing. Of course, different training models select corresponding feature columns from the feature wide table as needed, and transmit the corresponding feature columns and metadata to the data processing module in the training model, that is, the user data of the data platform is processed through the data processing module.

[0058] When the data processing module receives the user data sent by the data platform, it preprocesses the corresponding feature columns and metadata in the user data so that the processed user data can be trained and evaluated through the training and evaluation module, and further obtain model evaluation information.

[0059] The above-mentioned process of training and evaluating these processed user data through the training and evaluation module includes initializing the model, and after the initialization operation, using the pulled processed user data and the training parameters corresponding to the model to train the model to obtain a model file, and then evaluating the model indicators of the model file according to the test data corresponding to the model, and finally obtaining model evaluation information. Based on the model evaluation information, it can be determined whether there is a model update file.

[0060] Of course, the training parameters of different models are determined by the training model submission script, and the model training task is started regularly after the scheduled task startup script reads the config file to obtain the relevant model parameters.

[0061] S130: If there is a model update file in the model evaluation information, the deep learning model 130 is updated and configured through the automatic update module according to the model update file.

[0062] In this step, after the user data in the data platform is processed by the data transmission module and the training evaluation module respectively according to the module configuration information in the above step S120, the model evaluation information is obtained. The model evaluation information includes the newly trained model parameters, model indicators, test data, etc. According to the model evaluation information, it can be determined whether to start the automatic update module.

[0063] For example, when a model update file is detected in the model evaluation information, the deep learning model 130 is configured and updated through the automatic update module according to the model update file.

[0064] The above-mentioned automatic update module includes an update service unit, and the update service unit specifically includes a Tf-serving model service subunit and a model real-time update subunit.

[0065] The Tf-serving model service subunit can dynamically monitor model file updates and load them in real time. In addition, it can also send recommendation requests to the specified port to obtain the recommendation results returned by the corresponding model. After the Tf-serving service is started, it will only be restarted when the model version is updated.

[0066] The model that needs to be serviced should be written in the model.conf file according to the standard configuration format of Tf-serving, which includes model_code, model_path, and version strategy.

[0067] The model real-time update subunit mainly writes the model_code of the model that needs to be updated in real time into the model_update.conf file, and reads the model_update.conf file through the scheduled task script to start the model update process.

[0068] In addition, the model update process will periodically pull the model.done file (i.e., model marker file) directory on the training and evaluation module to the local directory according to the configured interval T, and then check which models have been updated. Finally, according to model_code, the model deployment file will be copied to the configuration directory corresponding to the model in Tf-serving to complete the model update.

[0069] The deployment method of the above-mentioned deep learning model 130 receives a configuration file 120 uploaded by a user, wherein the configuration file 120 is associated with a data processing module, a training evaluation module and an automatic update module of the deep learning model 130; reads the module configuration information in the configuration file 120, processes the user data in the data platform through the data processing module according to the module configuration information, and trains and evaluates the processed user data through the training evaluation module to obtain model evaluation information; if there is a model update file in the model evaluation information, updates the configuration of the deep learning model 130 through the automatic update module according to the model update file.

[0070] In this solution, the deep learning model 130 is deployed as a data processing module, a training evaluation module, and an automatic update module. The modules are independent of each other, which increases the fault tolerance and robustness of the system. In addition, the modules are associated with each other through the configuration file 120, and the module configuration information in the configuration file 120 controls the processing flow of each module, making the entire deployment process more flexible and simple, saving time and energy spent on project launch, and improving work efficiency.

[0071] In one embodiment, the step of processing the user data in the data platform through the data processing module according to the module configuration information in step S120 may include:

[0072] S121: acquiring user data in the data platform and a feature wide table corresponding to the user data according to the module configuration information;

[0073] S122: Preprocessing the user data by the data processing module to obtain feature data, and processing the feature wide table to obtain a data tag file.

[0074] In this embodiment, the configuration operation on the corresponding module includes processing the user data in the data platform through the data processing module according to the module configuration information.

[0075] Specifically, according to the needs of different models, corresponding feature columns are selected from the feature wide table, and the corresponding feature columns and metadata are transmitted to the data processing module in the training model, that is, the feature wide table of the data platform and user data are processed by the data processing module.

[0076] It is understandable that different feature data need to be processed during model training. Therefore, after receiving user data, the user data needs to be preprocessed to obtain corresponding feature data. This preprocessing process can be performed through machine learning.

[0077] For example, feature engineering is to convert raw data into useful feature data. First, the normalization method is used to scale the feature value range to a specific range, such as [0,1], and then the feature value is converted to 0 or 1 using the feature binarization method. For discrete features, for example, gender: {male, female}, one-hot encoding can be used to represent the feature as an m-dimensional vector, where m is the number of feature values. In the one-hot vector, only one dimension has a value of 1, and the rest are 0. Therefore, we can use the vector "1, 0" to represent "male" and the vector "0, 1" to represent "female".

[0078] In addition, in practical applications, the data we get is often incomplete, so we can also use the Imputer class of the preproccessing library to calculate missing values ​​​​of the data in order to obtain feature data that is more in line with user data.

[0079] After the user data is preprocessed, feature data corresponding to the user data is obtained, and a table_name.data.done.DT file is generated using the name of the feature wide table corresponding to the feature data as a data marking file.

[0080] In the above embodiment, when the data processing module receives the user data sent by the data platform, it preprocesses the corresponding feature columns and metadata in the user data so that the processed user data can be trained and evaluated through the training and evaluation module, and further obtain model evaluation information.

[0081] In one embodiment, before the step of training the processed user data through the training evaluation module to obtain a training result in step S120, and evaluating the training result to obtain model evaluation information, the following may also be included:

[0082] S123: uploading the characteristic data and the data mark file to a specified path of the configuration file 120 according to the module configuration information;

[0083] S124: After the data marker file is detected in the designated path, the feature data is pulled from the designated path through the training evaluation module.

[0084] In this embodiment, the feature data and the data marking file are obtained through the above steps S121 and S122, and then the complete feature data and the data marking file are uploaded to the model specified path (such as hdfs) through long-distance transmission.

[0085] The training and evaluation module periodically trains the data labeling files in the specified path. When the data labeling files are detected, the transmitted feature data is pulled from the specified path to the local path. After the feature data is pulled, it enters the model evaluation and training process.

[0086] In one embodiment, before the step of training the processed user data through the training evaluation module to obtain a training result in step S120, and evaluating the training result to obtain model evaluation information, the following may also be included:

[0087] S125: Detect whether there is a first model training file in the specified path, and if so, download the first model training file to the local computer through the training evaluation model;

[0088] S126: Evaluate the model indicators in the first model training file according to the test data in the training evaluation model to obtain a first evaluation file.

[0089] In this embodiment, before training and evaluating the feature data through the training evaluation module, it is necessary to check whether there is a first model training file in the specified path. The first model training file refers to the model training file obtained through the training evaluation model before the training evaluation module starts the training script for model training.

[0090] If the first model training file does not exist in the specified path, the model is initialized and the feature data pulled on that day is used directly for model training; if the first model training file exists, the first model training file is downloaded to the local computer and loaded, and the model indicators are evaluated using the test_data in the training model, i.e. the test data, and the results are saved in the testMetric file, i.e. the first evaluation file, and then the model training is performed.

[0091] Among them, different model training parameters are determined by the training model submission script, and the model training task is started regularly after the scheduled task startup script reads the config file to obtain relevant model parameters.

[0092] In the above embodiment, it is detected whether there is a first model training file under the specified path, and the model index of the first model training file is evaluated using the test data in the training model, so as to compare the evaluation result with the newly trained model and track the model index effect in real time.

[0093] In one embodiment, the step of training the processed user data through the training evaluation module to obtain a training result, and evaluating the training result to obtain model evaluation information in step S120 may include:

[0094] S210: training the feature data using the first model training file to obtain a second model training file;

[0095] S220: Evaluate the model indicators in the second model training file according to the test data in the training evaluation model to obtain a second evaluation file;

[0096] S230: Determine model evaluation information according to the first evaluation file and the second evaluation file.

[0097] In this embodiment, after obtaining the first evaluation file according to the above steps S125 and S126, it is determined whether there is an incremental update to the model. When there is an incremental update, the first model training file is loaded, and the feature data obtained by the data processing module is trained using the first model training file to obtain the second model training file, and the second model training file is uploaded to the specified path.

[0098] After obtaining the second model training file, continue to use the test_data in the training model, that is, the test data to evaluate the model indicators, and save the results to the trainMetric file, that is, the second evaluation file.

[0099] After obtaining the first evaluation file and the second evaluation file, the final model evaluation information can be determined through the two files, and the model evaluation information can be uploaded to the specified path.

[0100] In one embodiment, Figure 3 As shown, Figure 3 This is a flow chart of a method for determining model evaluation information according to a first evaluation file and a second evaluation file according to an embodiment; the step of determining the model evaluation information according to the first evaluation file and the second evaluation file in step S230 may include:

[0101] S231: Acquire the first evaluation file and the second evaluation file, and compare the model index of the first evaluation file with the model index of the second evaluation file;

[0102] S232: When the model index of the second evaluation file is greater than the model index of the first evaluation file, use the second model training file corresponding to the second evaluation file as a model update file, and generate model evaluation information.

[0103] In this embodiment, the model training file is obtained by loading the previous training, the model performance on the test set is evaluated, and the testMetric file is obtained. Then, the new training data is used to train a new training model, and the performance on the test set is evaluated to obtain the trainMetric file.

[0104] When the model indicator in the trainMetric file is greater than the model indicator in the testMetric file, the second model training file obtained by the new training is output to the local path, and a model.done file named with model_name is generated as a model flag file indicating that the model update is completed. The absolute address of the second model training file is written into the model flag file. Finally, model evaluation information is generated based on the second model training file and the model flag file, and the model evaluation information is transmitted to the specified path.

[0105] Furthermore, when the indicator in the trainMetric file is less than or equal to the indicator in the testMetric file, the original first model training file is retained and the model is not updated until the model indicator of the newly trained model training file is greater than the original model indicator, and then the model is updated.

[0106] In the above embodiment, the model index of the first evaluation file is compared with the model index of the second evaluation file, so that the model training file corresponding to the evaluation file with the higher model index is used as the final model update file.

[0107] In one embodiment, in step S130, the step of updating and configuring the deep learning model 130 through the automatic update module according to the model update file may include:

[0108] S131: Pull the model update file from the specified path to the automatic update module according to the module configuration information;

[0109] S132: Update the configuration of the training model through the update service unit of the automatic update module.

[0110] In this embodiment, the Tf-serving model servicing subunit dynamically monitors model file updates and loads them in real time. The model update process will periodically pull the model marker files on the training and evaluation module to the local according to the configured interval T, and then check which models have been updated.

[0111] When it is detected that the model evaluation information under the specified path contains a model update file, the model update file is pulled to the local and loaded, and then the model update file is written to the model.conf file according to the Tf-serving configuration standard format.

[0112] The model real-time update subunit writes the model_code corresponding to the model update file in the model.conf file into the model_update.conf file, and reads the model_update.conf file through the scheduled task script to start the model update process.

[0113] In the above embodiment, the configuration and update of the model update file is performed through the automatic update module, which can simplify the work process and improve work efficiency.

[0114] In one embodiment, Figure 4 As shown, Figure 4 Schematic diagram of the structure of a deployment device for a deep learning model in an embodiment. In this embodiment, a deployment device for a deep learning model is provided, which includes: an information association module 210, a data processing module 220, and a model update module 230, wherein:

[0115] The information association module 210 is used to receive the configuration file 120 uploaded by the user, wherein the configuration file 120 is associated with the data processing module, the training evaluation module and the automatic update module of the training model.

[0116] Since applications and projects based on the deep learning model 130 require developers to manually complete model training, parameter debugging, and model publishing offline, it is rather cumbersome; and after model iteration or parameter modification, the above operations need to be repeated; manual execution of model training and publishing processes may affect the entire system due to operational errors.

[0117] Therefore, in this module, manual operation is transformed into an automated operation procedure controlled by parameters, and the deep learning model 130 is further divided into three modules, namely, a data processing module, a training and evaluation module, and an automatic update module. Through the independent operation of each module, the fault tolerance and robustness of the deep learning model 130 can be improved.

[0118] In addition, in this module, the developer uploads the configuration file 120 without relying on other environments. Each deep learning model 130 has a unique model_code, also known as a model identification bit. The configuration file 120 identifies the corresponding deep learning model 130 in the model training platform through the model identification bit. When the corresponding deep learning model 130 is identified, the configuration file 120 can be matched with the deep learning model 130. Correspondingly, the data processing module, training evaluation module and automatic update module in the deep learning model 130 are associated with the configuration file 120, and the entire deployment process is uniformly configured and controlled through the configuration file 120.

[0119] Among them, the data processing module mainly selects column data collected from different data platforms according to the needs of different deep learning models 130, and preprocesses these column data into data information required by the model, and then transfers these data information to other modules of the model according to the configuration process of the configuration file 120.

[0120] The training and evaluation module mainly detects whether there is data information uploaded by the data processing module under the agreed path according to the configuration process in the configuration file 120, and trains and evaluates the model based on the data information and model training parameters, and then transfers the trained model information to other modules of the model according to the configuration process of the configuration file 120.

[0121] The automatic update module mainly detects whether there is model information uploaded by the training evaluation module under the agreed path through the configuration process in the configuration file 120, and performs configuration updates when the model is updated.

[0122] The data processing module 220 is used to read the module configuration information in the configuration file 120, process the user data in the data platform through the data processing module according to the module configuration information, train the processed user data through the training evaluation module to obtain training results, and evaluate the training results to obtain model evaluation information.

[0123] In this module, the configuration file 120 is configured with module configuration information. Each module in the deep learning model 130 can read the configuration content in the module configuration information through an agreed path, and perform configuration operations on the corresponding module through the configuration content.

[0124] The configuration operation of the corresponding module includes processing the user data in the data platform through the data processing module according to the module configuration information, and training and evaluating the processed user data through the training evaluation module to obtain model evaluation information.

[0125] In the above process, in order to ensure data security, the data platform and the processor (such as GPU) model training platform are independent and isolated from each other, and the data platform cannot execute overly complex logic. Therefore, in each training cycle, the data platform needs to send the complete feature wide table and the metadata (metadata, i.e., the columns of the wide table) of the feature wide table to the processor model training platform for certain processing. Of course, different training models select corresponding feature columns from the feature wide table as needed, and transmit the corresponding feature columns and metadata to the data processing module in the training model, that is, the user data of the data platform is processed through the data processing module.

[0126] When the data processing module receives the user data sent by the data platform, it preprocesses the corresponding feature columns and metadata in the user data so that the processed user data can be trained and evaluated through the training and evaluation module, and further obtain model evaluation information.

[0127] The above-mentioned process of training and evaluating these processed user data through the training and evaluation module includes initializing the model, and after the initialization operation, using the pulled processed user data and the training parameters corresponding to the model to train the model to obtain a model file, and then evaluating the model indicators of the model file according to the test data corresponding to the model, and finally obtaining model evaluation information. Based on the model evaluation information, it can be determined whether there is a model update file.

[0128] Of course, the training parameters of different models are determined by the training model submission script, and the model training task is started regularly after the scheduled task startup script reads the config file to obtain the relevant model parameters.

[0129] The model update module 230 is used to update the deep learning model 130 through the automatic update module according to the model update file if there is a model update file in the model evaluation information.

[0130] In this module, the user data in the data platform is processed by the data transmission module and the training evaluation module respectively through the module configuration information in the above-mentioned data processing module 220 to obtain model evaluation information. The model evaluation information includes newly trained model parameters, model indicators, test data, etc. According to the model evaluation information, it can be determined whether to start the automatic update module.

[0131] For example, when a model update file is detected in the model evaluation information, the deep learning model 130 is configured and updated through the automatic update module according to the model update file.

[0132] The above-mentioned automatic update module includes an update service unit, and the update service unit specifically includes a Tf-serving model service subunit and a model real-time update subunit.

[0133] The Tf-serving model service subunit can dynamically monitor model file updates and load them in real time. In addition, it can also send recommendation requests to the specified port to obtain the recommendation results returned by the corresponding model. After the Tf-serving service is started, it will only be restarted when the model version is updated.

[0134] The model that needs to be serviced should be written in the model.conf file according to the standard configuration format of Tf-serving, which includes model_code, model_path, and version strategy.

[0135] The model real-time update subunit mainly writes the model_code of the model that needs to be updated in real time into the model_update.conf file, and reads the model_update.conf file through the scheduled task script to start the model update process.

[0136] In addition, the model update process will periodically pull the model.done file (i.e., model marker file) directory on the training and evaluation module to the local directory according to the configured interval T, and then check which models have been updated. Finally, according to model_code, the model deployment file will be copied to the configuration directory corresponding to the model in Tf-serving to complete the model update.

[0137] The deployment device of the above-mentioned deep learning model 130 receives a configuration file 120 uploaded by a user, wherein the configuration file 120 is associated with a data processing module, a training evaluation module and an automatic update module of the deep learning model 130; reads the module configuration information in the configuration file 120, processes the user data in the data platform through the data processing module according to the module configuration information, and trains and evaluates the processed user data through the training evaluation module to obtain model evaluation information; if there is a model update file in the model evaluation information, the deep learning model 130 is updated and configured through the automatic update model according to the model update file.

[0138] In this solution, the deep learning model 130 is deployed as a data processing module, a training evaluation module, and an automatic update module. The modules are independent of each other, which increases the fault tolerance and robustness of the system. In addition, the modules are associated with each other through the configuration file 120, and the module configuration information in the configuration file 120 controls the processing flow of each module, making the entire deployment process more flexible and simple, saving time and energy spent on project launch, and improving work efficiency.

[0139] For the specific definition of the deployment device of the deep learning model, please refer to the definition of the deployment method of the deep learning model above, which will not be repeated here. Each module in the above-mentioned deployment device of the deep learning model can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the terminal device in the form of hardware, or can be stored in the memory of the terminal device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0140] In one embodiment, a computer device is proposed, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for deploying the deep learning model of any of the above embodiments are implemented.

[0141] like Figure 5 As shown, Figure 5 Schematic diagram of the internal structure of a computer device of an embodiment. The computer device 310 includes a processor 314, a non-volatile storage medium 315, a memory 311 and a network interface 312 connected through a system bus 313. Among them, the non-volatile storage medium 315 of the computer device 310 stores an operating system 317 and a computer program 316. When the computer program 316 is executed by the processor 314, the processor 314 can implement the deployment method of the deep learning model. The processor 314 of the computer device 310 is used to provide computing and control capabilities to support the operation of the entire computer device 310. The memory 311 of the computer device 310 stores a computer program 316. When the computer program 316 is executed by the processor 314, the processor 314 can execute the deployment method of the deep learning model. The network interface 312 of the computer device 310 is used to connect and communicate with a mobile terminal.

[0142] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] In one embodiment, a computer storage medium is provided, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for deploying a deep learning model of any of the above embodiments.

[0144] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0145] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A deployment method for deep learning models, It is characterized in that The steps include: Receive a configuration file uploaded by a user, wherein the configuration file is associated with a data processing module, a training evaluation module, and an automatic update module of a deep learning model, and the module configuration information in the configuration file includes configuration content for correspondingly controlling a deployment process of the data processing module, the training evaluation module, and the automatic update module; Read the module configuration information in the configuration file, process the user data in the data platform through the data processing module according to the module configuration information, train the processed user data through the training evaluation module to obtain a training result, and evaluate the training result to obtain model evaluation information; If there is a model update file in the model evaluation information, updating and configuring the deep learning model through the automatic update module according to the model update file; Among them, the user data in the data platform is processed by the data processing module according to the module configuration information, and the processed user data is trained by the training evaluation module to obtain a training result, and the training result is evaluated to obtain model evaluation information, including: Acquire user data in the data platform and a feature wide table corresponding to the user data according to the module configuration information; Preprocessing the user data by the data processing module to obtain feature data, and processing the feature wide table to obtain a data tag file; Uploading the feature data and the data tag file to a specified path of the configuration file according to the module configuration information; When the data marker file is detected in the designated path, the feature data is pulled from the designated path by the training evaluation module; Evaluate the model indicators in the first model training file obtained from the specified path according to the test data in the training evaluation module to obtain a first evaluation file; Using the first model training file to train the feature data to obtain a second model training file; Evaluate the model indicators in the second model training file according to the test data in the training evaluation module to obtain a second evaluation file; The model index of the first evaluation file is compared with the model index of the second evaluation file. When the model index of the second evaluation file is greater than the model index of the first evaluation file, the second model training file corresponding to the second evaluation file is used as the model update file, and model evaluation information is generated.

2. The method for deploying a deep learning model according to claim 1, It is characterized in that Before the step of training the processed user data through the training evaluation module to obtain a training result and evaluating the training result to obtain model evaluation information, the method further includes: Detect whether there is a first model training file in the specified path, and if so, download the first model training file to the local through the training evaluation module.

3. The method for deploying a deep learning model according to claim 2, It is characterized in that The step of updating and configuring the deep learning model through the automatic update module according to the model update file includes: Pulling the model update file from the specified path to the automatic update module according to the module configuration information; The training model is updated and configured through the update service unit of the automatic update module.

4. A deployment device for a deep learning model, It is characterized in that include: An information association module, used to receive a configuration file uploaded by a user, wherein the configuration file is associated with a data processing module, a training evaluation module, and an automatic update module of a training model; A data processing module is used to read the module configuration information in the configuration file, process the user data in the data platform through the data processing module according to the module configuration information, train the processed user data through the training evaluation module to obtain a training result, and evaluate the training result to obtain model evaluation information; wherein, according to the module configuration information, the user data in the data platform is processed through the data processing module, and the processed user data is trained through the training evaluation module to obtain a training result, and the training result is evaluated to obtain the model evaluation information, including: Acquire user data in the data platform and a feature wide table corresponding to the user data according to the module configuration information; Preprocessing the user data by the data processing module to obtain feature data, and processing the feature wide table to obtain a data tag file; Uploading the feature data and the data tag file to a specified path of the configuration file according to the module configuration information; When the data marker file is detected in the designated path, the feature data is pulled from the designated path by the training evaluation module; Evaluate the model indicators in the first model training file obtained from the specified path according to the test data in the training evaluation module to obtain a first evaluation file; Using the first model training file to train the feature data to obtain a second model training file; Evaluate the model indicators in the second model training file according to the test data in the training evaluation module to obtain a second evaluation file; Compare the model index of the first evaluation file with the model index of the second evaluation file, and when the model index of the second evaluation file is greater than the model index of the first evaluation file, use the second model training file corresponding to the second evaluation file as a model update file, and generate model evaluation information; A model update module is used to update and configure the deep learning model through the automatic update module according to the model update file if there is a model update file in the model evaluation information.

5. A computer device, Features: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the deep learning model deployment method as described in any one of claims 1 to 3.

6. A computer storage medium, Features: The computer storage medium stores computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method for deploying a deep learning model as described in any one of claims 1 to 3.