Service processing method, device, computer equipment and storage medium

By receiving model training requests in the algorithm platform and automatically determining the target server to build and run the environment, it solves the problem of model training environment construction and deployment workload caused by differences in the environment of different algorithm engineers, and improves model training efficiency.

CN113448730BActive Publication Date: 2024-09-20JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110729562.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-29
Publication Date
2024-09-20
Estimated Expiration
2041-06-29

AI Technical Summary

Technical Problem

Different algorithm engineers in the algorithm platform have different development habits and programming capabilities, which results in algorithm scripts that need to be run in specific environments. This results in a heavy burden on the construction and deployment of the model training environment, lack of automation, and affects efficiency.

Method used

By receiving model training requests, the target server is automatically determined based on the server resource requirements and current server status of the model to be trained, and a running environment is built on it to realize automatic training of the model.

Benefits of technology

It reduces the workload of algorithm engineers, improves the efficiency of model training, and realizes the automatic construction and automatic training of the model training environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448730B
    Figure CN113448730B
Patent Text Reader

Abstract

The present disclosure proposes a service processing method, device, computer equipment and storage medium, and relates to the field of computer technology. The method includes: receiving a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set and the server resources required by the model to be trained; when the parameters in the training environment parameter set are all system default parameters, determining the target server according to the server resources required by the model to be trained and the current operating status of each server; sending the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, effectively improving the training efficiency of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a service processing method, device, computer equipment and storage medium. Background Art

[0002] The algorithm platform is a platform service that provides functions such as algorithm model training, testing, and deployment. Through the management capabilities provided by the platform, algorithm engineers can easily and quickly perform operations such as model training, testing, and online deployment. At the same time, the platform can also serve as an efficient tool for developers to learn algorithm training and optimize algorithm models.

[0003] To train an algorithm model on an algorithm platform, you first need to build a training environment. Since algorithm engineers have different development habits and programming abilities, the algorithm scripts they develop also need to run in a specific environment. Currently, common algorithm platforms usually have algorithm engineers build training environments, and different training environments need to be built for different types of model training, which greatly increases the workload of algorithm engineers. Therefore, it is crucial to automatically build a training environment and automatically train algorithm models through an algorithm platform. Summary of the invention

[0004] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0005] The first embodiment of the present disclosure provides a service processing method, including:

[0006] Receive a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained;

[0007] When all parameters in the training environment parameter set are system default parameters, determining a target server according to server resources required by the model to be trained and the current operating status of each server;

[0008] The data packet and the training environment parameter set are sent to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0009] Preferably, the model training request also includes a client identifier, and after sending the data packet and the training environment parameter set to the target server, it also includes:

[0010] Receiving the model parameters returned by the target server;

[0011] The model parameters are sent to a client corresponding to the client identifier.

[0012] Preferably, the model training request also includes a client identifier, and after sending the data packet and the training environment parameter set to the target server, it also includes:

[0013] Receiving the model training monitoring log sent by the target server;

[0014] The model training monitoring log is sent to the client corresponding to the client identifier.

[0015] Preferably, the current operating status of the server includes the number of models currently being trained by the server and the remaining resources of the server, and determining the target server according to the server resources required by the model to be trained and the current operating status of each server includes:

[0016] Determine candidate servers based on the number of models currently being trained on each server;

[0017] Any server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained is determined as the target server.

[0018] The second aspect of the present disclosure provides a method for processing a service, including:

[0019] Receiving a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set;

[0020] Acquire an environment resource package associated with each environment parameter in the training environment parameter set;

[0021] Running the environment resource package to build an operating environment for the model to be trained;

[0022] In the operating environment, a model training process is started to train the model to be trained based on the data packet.

[0023] Preferably, before starting the model training process, the method further includes:

[0024] Create a working directory corresponding to the model to be trained to store the data packet to be trained and temporary data during the model training process.

[0025] Preferably, after starting the model training process, the method further includes:

[0026] Start the model training log listener to listen to the training log corresponding to the model training process;

[0027] Returns the training log.

[0028] The third aspect of the present disclosure provides a service processing device, including:

[0029] A first receiving module is used to receive a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained;

[0030] A first determination module is used to determine a target server according to server resources required by the model to be trained and the current operating status of each server when all parameters in the training environment parameter set are system default parameters;

[0031] The first sending module is used to send the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0032] Preferably, the model training request also includes a client identifier, and the device further includes:

[0033] A second receiving module, used for receiving the model parameters returned by the target server;

[0034] The second sending module is used to send the model parameters to the client corresponding to the client identifier.

[0035] Preferably, the model training request also includes a client identifier, and the device further includes:

[0036] A third receiving module is used to receive the model training monitoring log sent by the target server;

[0037] The third sending module is used to send the model training monitoring log to the client corresponding to the client identifier.

[0038] Preferably, the current operating status of the server includes the number of models currently being trained by the server and the remaining resources of the server, and the first determining module includes:

[0039] A first determining unit, configured to determine a candidate server according to the number of models currently being trained on each server;

[0040] The second determination unit is used to determine any server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained as the target server.

[0041] A fourth aspect of the present disclosure provides a service processing device, including:

[0042] A fourth receiving module is used to receive a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set;

[0043] An acquisition module, used to acquire an environment resource package associated with each environment parameter in the training environment parameter set;

[0044] A construction module, used to run the environment resource package to build an operating environment for the model to be trained;

[0045] The training module is used to start a model training process in the operating environment to train the model to be trained based on the data packet.

[0046] Preferably, it also includes:

[0047] The storage module is used to create a working directory corresponding to the model to be trained to store the data packets to be trained and temporary data during the model training process.

[0048] Preferably, it also includes:

[0049] A monitoring module, used to start a model training log listener to monitor the training log corresponding to the model training process;

[0050] The sending module is used to return the training log.

[0051] The fifth aspect embodiment of the present disclosure proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the service processing method proposed in the first aspect and / or second aspect embodiment of the present disclosure.

[0052] The sixth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the service processing method proposed in the first aspect and / or second aspect embodiment of the present disclosure.

[0053] The seventh aspect embodiment of the present disclosure proposes a computer program product. When the instruction processor in the computer program product executes, it executes the service processing method proposed in the first aspect and / or second aspect embodiment of the present disclosure.

[0054] The processing method, device, computer equipment and storage medium of the service provided by the present disclosure have the following beneficial effects:

[0055] First, the model training request is received through the general server of the algorithm platform. Then, when the parameters in the training environment parameter set are all system default parameters, the target server is determined according to the server resources required by the model to be trained and the current operating status of each server. Finally, the target server builds the operating environment of the model to be trained according to the training environment parameter set, and trains the model based on the model's data packet. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, which effectively reduces the workload of algorithm engineers and improves the training efficiency of the model.

[0056] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0058] Figure 1 A flowchart of a method for processing services provided by the first embodiment of the present disclosure;

[0059] Figure 2 A flowchart of a method for processing services provided by Embodiment 2 of the present disclosure;

[0060] Figure 3 A flowchart of a method for processing services provided in Embodiment 3 of the present disclosure;

[0061] Figure 4 A schematic diagram of the structure of a processing device for the service provided by Embodiment 4 of the present disclosure;

[0062] Figure 5 A schematic diagram of the structure of a processing device for the service provided by Embodiment 5 of the present disclosure;

[0063] Figure 6 A schematic diagram of the structure of a processing device for the service provided by Embodiment 6 of the present disclosure;

[0064] Figure 7 A flowchart of a method for processing services provided by Embodiment 7 of the present disclosure;

[0065] Figure 8 A flowchart of a method for processing services provided by Embodiment 8 of the present disclosure;

[0066] Fig. 9 A schematic diagram of the structure of a processing device for the service provided by Embodiment 9 of the present disclosure;

[0067] Fig.10A schematic diagram of the structure of a processing device for the service provided by Embodiment 10 of the present disclosure;

[0068] Fig.11 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0069] Embodiments of the present disclosure 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 intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0070] The following describes the service processing method, apparatus, computer device, and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.

[0071] Figure 1 A flowchart of a method for processing services provided by an embodiment of the present disclosure.

[0072] The embodiment of the present disclosure takes the example that the processing method of the service is configured in the general server of the algorithm platform. The general server of the algorithm platform can be applied to any computer device so that the computer device can execute the processing function of the service.

[0073] Among them, the computer device can be a personal computer (PC), a cloud device, a mobile device, etc. The mobile device can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a car device, etc., which are hardware devices with various operating systems, touch screens and / or display screens.

[0074] It should be noted that in the embodiment of the present disclosure, the model training request is first received by the main server of the algorithm platform, and then the target server is determined according to the training request. Finally, the target server creates the operating environment and trains the model.

[0075] like Figure 1 As shown, the processing method of the service may include the following steps:

[0076] Step 101, receiving a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained.

[0077] In the embodiments of the present disclosure, the model requested for training can be any type of algorithm model. Each algorithm model can implement a function or provide a service, such as a Chinese word segmentation model, a speech recognition model, an image processing model, etc. The present disclosure does not limit this.

[0078] It is understandable that different clients can request to train the same model or different models. For each model to be trained, a model training request can be generated and sent to the main server of the algorithm platform.

[0079] Therefore, when the algorithm platform's main server receives multiple model training requests, it can put them into the training task queue according to the order in which they are received. Then the training task scheduling process selects one model training request from the training task queue for processing.

[0080] In the disclosed embodiment, the model training request may include a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained.

[0081] The data packet corresponding to the model to be trained may include the algorithm script, configuration file and training data of the model, and the algorithm script performs model training by reading the configuration file and training data.

[0082] It should be noted that when training a model, it is necessary to build an operating environment for the algorithm script, and building an operating environment requires corresponding resource packages, such as Python resource packages, etc. Since the operating environments corresponding to the algorithm scripts of different models may be different, the resource packages required to build the operating environments of different algorithm scripts are also different.

[0083] In the embodiment of the present disclosure, an environment resource package library can be established on the main server of the algorithm platform, wherein the environment resource package library can include multiple resource packages required for creating the operating environment of different algorithm scripts.

[0084] Therefore, the training environment parameter set in the model training request may include the type and version of the resource package required to build the operating environment of the algorithm script. The server can build the operating environment of the algorithm script by obtaining the resource package of the corresponding type and version from the environment resource package library of the algorithm platform.

[0085] It is understandable that certain server resources are required when performing model training. Therefore, in the embodiments of the present disclosure, the server resources required for the model to be trained in the model training request may include the server's running memory, storage space, etc., and the present disclosure does not limit this.

[0086] It should be noted that the above examples are only illustrative and cannot be used as a limitation on the model training request, the data packet corresponding to the model to be trained, the training environment parameter set and the server resources required for the model to be trained in the embodiments of the present disclosure.

[0087] Step 102, when all parameters in the training environment parameter set are system default parameters, determine the target server according to the server resources required by the model to be trained and the current operating status of each server.

[0088] In the embodiment of the present disclosure, an environment resource package library can be established on the main server of the algorithm platform, wherein the environment resource package library can include multiple resource packages required for creating the operating environment of different algorithm scripts.

[0089] Correspondingly, the training environment parameter set in the model training request may include the type and version of the resource package required to build the running environment of the algorithm script, such as tensorflow==1.15.0.

[0090] In the disclosed embodiment, the system default parameters may include the types and versions of all resource packages in the environment resource package library. When the parameters in the training environment parameter set are all system default parameters, the server can obtain resource packages of corresponding types and versions from the environment resource package library to build the operating environment of the algorithm script.

[0091] It is understandable that the algorithm platform can manage multiple servers for model training at the same time, and one server can train multiple models at the same time. When each server is training a model, its current operating status may be different.

[0092] In a possible implementation of the embodiment of the present disclosure, the current operating status of the server may include the number of models currently being trained by the server and the remaining resources of the server. Determining the target server based on the server resources required by the model to be trained and the current operating status of each server may include:

[0093] Candidate servers are determined based on the number of models currently being trained on each server.

[0094] Among them, when determining the candidate server, the maximum number of models that the server can train simultaneously can be pre-set. For example, the server can be set to train up to 3 models at a time, and when determining the candidate server, only servers with less than 3 current training tasks are selected. Alternatively, the server can be set to train up to 5 models at a time, and when determining the candidate server, only servers with less than 5 current training tasks are selected, and the present disclosure does not limit this.

[0095] Any server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained is determined as the target server.

[0096] Alternatively, a server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained and whose remaining resources are the largest can be determined as the target server.

[0097] Alternatively, a server whose remaining resources are greater than the server resources required by the model to be trained and whose type of model currently being trained is different from that of the model to be trained can be selected from the candidate servers as the target server.

[0098] It should be noted that the above examples are merely illustrative and cannot be used as limitations on the system default parameters, candidate servers, target servers, etc. in the embodiments of the present disclosure.

[0099] Step 103, sending the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0100] In the disclosed embodiment, a sub-server of an algorithm platform can be set in each server. After receiving the model training request and determining the target server, the main server of the algorithm platform can send the data packet and the training environment parameter set in the model training request to the sub-server corresponding to the target server. The sub-server then obtains the resource package of the corresponding type and version from the environment resource package library according to the training environment parameter set, builds the operating environment for model training, and finally the algorithm script in the data packet reads the configuration file and training data to perform model training.

[0101] In the disclosed embodiment, the model training request is first received through the general server of the algorithm platform, and then the target server is determined according to the server resources required by the model to be trained and the current operating status of each server when the parameters in the training environment parameter set are all system default parameters; finally, the target server builds the operating environment of the model to be trained according to the training environment parameter set, and trains the model based on the data packet of the model. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, which effectively reduces the workload of the algorithm engineer and improves the training efficiency of the model.

[0102] Through the analysis of the above embodiments, it can be known that the user can send a model training request to the main server of the algorithm platform so that the sub-server of the algorithm platform can automatically create an operating environment and automatically perform model training. It can be understood that the algorithm platform can receive training requests from different clients, and then train different types of models. In one possible implementation, if different clients send model training requests to the main server at the same time, in order to ensure that the sub-server can accurately return the model parameters to the corresponding client after the model training is completed, in the embodiment of the present disclosure, the model training request can also include a client identifier, so that after the target server completes the processing of the model training request, it can return the trained model parameters to the corresponding client according to the client identifier. The following is combined with Figure 2The above process is further explained.

[0103] Figure 2 FIG. 1 is a flow chart of a method for processing a service according to the second embodiment of the present disclosure. Figure 2 As shown, the processing method of the service may include the following steps:

[0104] Step 201, receiving a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, server resources required by the model to be trained, and a client identifier.

[0105] Step 202, when all parameters in the training environment parameter set are system default parameters, determine the target server according to the server resources required by the model to be trained and the current operating status of each server.

[0106] Step 203, sending the data packet, the training environment parameter set and the client identifier to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0107] The specific implementation of the above steps 201-203 can refer to the detailed description of other embodiments of the present disclosure, which will not be repeated here.

[0108] Step 204: Receive the model parameters returned by the target server.

[0109] Step 205: Send the model parameters to the client corresponding to the client identifier.

[0110] It is understandable that different clients can request to train the same model or different models.

[0111] For example, client 1# requests to train a Chinese word segmentation model, and client 2# requests to train an image processing model. Alternatively, both client 1# and client 2# request to train a Chinese word segmentation model, but the algorithm scripts and training data of the models are different.

[0112] In order to enable different clients to receive their respective training results, the model training requests sent by different clients may also include their respective client identifiers. After the target server completes the corresponding model training according to the training request, the training result may be returned to the corresponding client according to the client identifier.

[0113] For example, client 1# requests to train a Chinese word segmentation model. After the target server completes the training of the corresponding model, it can return the obtained model parameters to client 1# according to the client identifier corresponding to client 1#.

[0114] In addition, since the same client can send multiple model training requests, the target server will also return multiple training results according to the training requests. In order to distinguish the model training requests corresponding to each training result, the target server can include the corresponding model identifier when returning the training result.

[0115] For example, client 1# sends a Chinese word segmentation model training request and an image processing model training request in sequence, and finally determines that the target server for the Chinese word segmentation model is A and the target server for the image processing model is B. Server A trains the Chinese word segmentation model according to the training request and obtains the model parameters of the Chinese word segmentation model. When the model parameters of the Chinese word segmentation model are returned to client 1#, the model identifier corresponding to the Chinese word segmentation model is also returned to client 1#, so that client 1# returns the model parameters to the training request for the Chinese word segmentation model.

[0116] Similarly, server B trains the image processing model according to the training request to obtain the model parameters of the image processing model. When returning the model parameters of the image processing model to client 1#, the model identifier corresponding to the image processing model is also returned to client 1#, so that client 1# returns the model parameters to the training request of the image processing model.

[0117] In the disclosed embodiment, by adding the client identifier to the model training request, after the target server completes the training of the model, the training result of the target server can be returned to the corresponding client according to the client identifier, thereby meeting the client's model training needs. In addition, in the disclosed embodiment, by adding the corresponding model identifier to the training result returned by the target server, the client can distinguish the training results corresponding to different training requests, thereby enabling the client to request training of multiple models at one time.

[0118] Figure 3 FIG. 1 is a flow chart of a method for processing a service according to the third embodiment of the present disclosure. Figure 3 As shown, the processing method of the service may include the following steps:

[0119] Step 301, receiving a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, server resources required by the model to be trained, and a client identifier.

[0120] Step 302, when all parameters in the training environment parameter set are system default parameters, determine the target server according to the server resources required by the model to be trained and the current operating status of each server.

[0121] Step 303, sending the data packet, the training environment parameter set and the client identifier to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0122] For the specific implementation of the above steps 301-303, please refer to the detailed description of other embodiments of the present disclosure, which will not be repeated here.

[0123] Step 304: Obtain the model training monitoring log sent by the target server.

[0124] Step 305: Send the model training monitoring log to the client corresponding to the client identifier.

[0125] It is understandable that the model training process may take a long time. In order to enable the client to understand the progress of model training, in the disclosed embodiment, each server can be controlled to establish a model training monitoring log and return the model training monitoring log to the main server. For example, the server can be controlled to synchronously establish a model training monitoring log when starting the model training process. The model training log can monitor the model training process in real time until the model training is completed.

[0126] In the embodiment of the present disclosure, the target server can return the model training monitoring log to the general server at a set time interval, and then the general server returns the model training monitoring log to the corresponding client. For example, the monitoring log is returned once every hour, or once every two hours, etc., which is not limited in the present disclosure.

[0127] In the embodiment of the present disclosure, the target server may also return the model training monitoring log to the general server according to the progress of the model training, and the general server may then return the model training monitoring log to the corresponding client. For example, a monitoring log may be returned once for every 10% increase in the training completion degree, or once for every 20% increase in the training completion degree, etc., and the present disclosure does not limit this.

[0128] In the disclosed embodiment, the model training monitoring log is used to monitor the progress of the model training in real time, so that the client can understand the progress of the model training, thereby improving the reliability of the model training service.

[0129] In order to implement the above embodiments, the present disclosure also proposes a service processing device.

[0130] Figure 4 A schematic diagram of the structure of a processing device for services provided by an embodiment of the present disclosure.

[0131] like Figure 4As shown, the service processing device 100 may include: a first receiving module 110 , a first determining module 120 and a first sending module 130 .

[0132] Among them, the first receiving module 110 is used to receive a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set and server resources required by the model to be trained.

[0133] The first determination module 120 is used to determine the target server according to the server resources required by the model to be trained and the current operating status of each server when all the parameters in the training environment parameter set are system default parameters.

[0134] The first sending module 130 is used to send the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet.

[0135] Further, in a possible implementation of the embodiment of the present disclosure, the first determining module 120 includes:

[0136] The first determining unit 121 is used to determine a candidate server according to the number of models currently being trained on each server.

[0137] The second determining unit 122 is used to determine any server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained as a target server.

[0138] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0139] The processing device of the service of the disclosed embodiment first receives the model training request through the general server of the algorithm platform, and then determines the target server according to the server resources required by the model to be trained and the current operating status of each server when the parameters in the training environment parameter set are all system default parameters; finally, the target server builds the operating environment of the model to be trained according to the training environment parameter set, and trains the model based on the data packet of the model. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, which effectively reduces the workload of the algorithm engineer and improves the training efficiency of the model.

[0140] Further, in a possible implementation of the embodiment of the present disclosure, see Figure 5 ,exist Figure 4 On the basis of the illustrated embodiment, the model training request also includes a client identifier, and the device also includes a second receiving module 140 and a second sending module 150 .

[0141] The second receiving module 140 is used to receive the model parameters returned by the target server.

[0142] The second sending module 150 is used to send the model parameters to the client corresponding to the client identifier.

[0143] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0144] Further, in a possible implementation of the embodiment of the present disclosure, see Figure 6 ,exist Figure 4 On the basis of the illustrated embodiment, the model training request also includes a client identifier, and the device also includes a third receiving module 160 and a third sending module 170 .

[0145] Among them, the third receiving module 160 is used to receive the model training monitoring log sent by the target server.

[0146] The third sending module 170 is used to send the model training monitoring log to the client corresponding to the client identifier.

[0147] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0148] Figure 7 A flowchart of another service processing method provided by an embodiment of the present disclosure.

[0149] The embodiment of the present disclosure takes the example that the processing method of the service is configured in the server of the algorithm platform. The server of the algorithm platform can be applied to any computer device so that the computer device can execute the processing function of the service.

[0150] like Figure 7 As shown, the processing method of the service may include the following steps:

[0151] Step 401, receiving a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set.

[0152] In the embodiment of the present disclosure, the model training instruction may correspond to the model training request received by the main server of the algorithm platform. For the specific implementation methods of the data packet and the training environment parameter set corresponding to the model to be trained in the training instruction, please refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0153] Step 402: Obtain an environment resource package associated with each environment parameter in the training environment parameter set.

[0154] Step 403: Run the environment resource data package to build the operating environment of the model to be trained.

[0155] In the embodiment of the present disclosure, an environment resource package library can be established on the main server of the algorithm platform, wherein the environment resource package library can include multiple resource packages required for creating the operating environment of different algorithm scripts.

[0156] Based on the training environment parameter set, the type and version of the resource package required to build the operating environment of the algorithm script of the model to be trained can be determined, and then the server obtains the resource package of the corresponding type and version from the environment resource package library, and builds the operating environment of the model to be trained by running the resource data package.

[0157] Step 404, in the operating environment, start the model training process to train the training model based on the data packet.

[0158] Among them, the data packet corresponding to the model to be trained may include the model's algorithm script, configuration file, and training data, etc. The algorithm script is run in the constructed operating environment, and the algorithm script performs model training by reading the configuration file and training data.

[0159] In the disclosed embodiment, the same server can start multiple model training processes at the same time to train multiple models to be trained respectively.

[0160] It should be noted that the above examples are merely illustrative and cannot be used as limitations on data packets in the embodiments of the present disclosure.

[0161] In the disclosed embodiment, first, according to the training environment parameter set in the model training instruction, an environment resource package associated with each environment parameter is obtained. Then, the environment resource package is run to build the operating environment of the model to be trained. Finally, the model training process is started, and the model to be trained is trained based on the data packet. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, which effectively improves the training efficiency of the model.

[0162] Figure 8 FIG. 8 is a flow chart of a method for processing a service according to an eighth embodiment of the present disclosure. Figure 8 As shown, the processing method of the service may include the following steps:

[0163] Step 501, receiving a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set.

[0164] Step 502: Obtain an environment resource package associated with each environment parameter in the training environment parameter set.

[0165] Step 503: Run the environment resource data package to build the operating environment of the model to be trained.

[0166] The specific implementation of the above steps 501-503 can refer to the detailed description of other embodiments of the present disclosure, which will not be repeated here.

[0167] Step 504, create a working directory corresponding to the model to be trained to store the data packets to be trained and temporary data during the model training process.

[0168] In the disclosed embodiment, multiple algorithm models can be trained simultaneously in the same server. Since each model to be trained has a corresponding data packet, a working directory can be established for each model to be trained to store the data packet of the model to be trained and temporary data during the model training process.

[0169] In a possible implementation of the embodiment of the present disclosure, the working directory may include an input directory and an output directory. The input directory may store training data, configuration files, and model temporary files of the model to be trained. The output directory may store model parameters and related data after model training is completed.

[0170] It should be noted that the above examples are only illustrative and cannot be used as a limitation on the working directory in the embodiments of the present disclosure.

[0171] Step 505: In the operating environment, start the model training process to train the training model based on the data packet.

[0172] For the specific implementation of the above steps, please refer to the detailed description of other embodiments of the present disclosure, which will not be repeated here.

[0173] Step 506: Start the model training log listener to monitor the training log corresponding to the model training process.

[0174] Step 507, return the training log.

[0175] When the server is training the model, a log listener can be created. When the server starts the model training process, the log listener will simultaneously create a training listener log, which can be updated in real time according to the model training process until the model training is completed.

[0176] In the embodiment of the present disclosure, the specific implementation method of the target server returning the model training monitoring log to the main server can refer to the detailed description of other embodiments of the present disclosure and will not be repeated here.

[0177] In the disclosed embodiment, by establishing a working directory for each model to be trained, the synchronous training of multiple models is achieved. At the same time, through the model training monitoring log, the progress of model training is monitored in real time, so that the client can understand the progress of model training, thereby improving the reliability of model training service.

[0178] In order to implement the above embodiments, the present disclosure also proposes a service processing device.

[0179] Fig. 9 A schematic diagram of the structure of a processing device for services provided by an embodiment of the present disclosure.

[0180] like Fig. 9 As shown, the service processing device 200 may include: a receiving module 210, an acquisition module 220, a construction module 230 and a training module 240.

[0181] Among them, the receiving module 210 is used to receive model training instructions, wherein the training instructions include a data packet corresponding to the model to be trained and a training environment parameter set.

[0182] The acquisition module 220 is used to acquire the environment resource package associated with each environment parameter in the training environment parameter set.

[0183] The construction module 230 is used to run the environment resource package to build the operating environment of the model to be trained.

[0184] The training module 240 is used to start the model training process in the operating environment to train the training model based on the data packet.

[0185] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0186] The processing device of the service of the embodiment of the present disclosure first obtains the environment resource package associated with each environment parameter according to the training environment parameter set in the model training instruction. Then, the environment resource package is run to build the operating environment of the model to be trained. Finally, the model training process is started to train the model to be trained based on the data packet. In this way, the automatic construction of the model training environment and the automatic training of the model are realized, which effectively improves the training efficiency of the model.

[0187] Further, in a possible implementation of the embodiment of the present disclosure, see Fig.10 ,exist Fig. 9 On the basis of the illustrated embodiment, a storage module 250 , a monitoring module 260 and a sending module 270 may also be included.

[0188] Among them, the storage module 250 is used to create a working directory corresponding to the model to be trained to store the data packets to be trained and temporary data during the model training process.

[0189] The monitoring module 260 is used to start the model training log listener to monitor the training log corresponding to the model training process.

[0190] The sending module 270 is used to return the training log.

[0191] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0192] The processing device of the service of the embodiment of the present disclosure realizes the synchronous training of multiple models by establishing a working directory for each model to be trained. At the same time, the progress of model training is monitored in real time through the model training monitoring log, so that the client can understand the progress of model training, thereby improving the reliability of the model training service.

[0193] In order to implement the above embodiments, the present disclosure further proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the service processing method proposed in the above embodiments of the present disclosure is implemented.

[0194] In order to implement the above embodiments, the present disclosure further proposes a non-temporary computer-readable storage medium storing a computer program, which, when executed by a processor, implements a service processing method as proposed in the above embodiments of the present disclosure.

[0195] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product executes, the service processing method proposed in the above embodiments of the present disclosure is executed.

[0196] Fig.11 A block diagram of an exemplary computer device suitable for implementing embodiments of the present disclosure is shown. Fig.11 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0197] like Fig.11 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0198] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0199] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0200] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.11 not shown, usually called a "hard drive"). Although Fig.11 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0201] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0202] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0203] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.

[0204] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0205] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0206] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0207] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0208] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0209] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0210] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0211] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A service processing method, characterized in that: include: Receive a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained; When all parameters in the training environment parameter set are system default parameters, determining a target server according to server resources required by the model to be trained and the current operating status of each server; Sending the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet; The target server constructs an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet, including: The sub-server corresponding to the target server obtains the resource package of the corresponding type and version from the environment resource package library according to the training environment parameter set, builds the operating environment for model training, and finally reads the configuration file and training data from the algorithm script in the data package to perform model training. The environment resource package library includes a variety of resource packages required to create the operating environment of different algorithm scripts.

2. The method according to claim 1, characterized in that The model training request also includes a client identifier, and after sending the data packet and the training environment parameter set to the target server, further includes: Receiving the model parameters returned by the target server; The model parameters are sent to a client corresponding to the client identifier.

3. The method according to claim 1, characterized in that The model training request also includes a client identifier, and after sending the data packet and the training environment parameter set to the target server, further includes: Receiving the model training monitoring log sent by the target server; The model training monitoring log is sent to the client corresponding to the client identifier.

4. The method according to any one of claims 1 to 3, characterized in that: The current operating status of the server includes the number of models currently being trained by the server and the remaining resources of the server. The determining of the target server according to the server resources required by the model to be trained and the current operating status of each server includes: Determine candidate servers based on the number of models currently being trained on each server; Any server among the candidate servers whose remaining resources are greater than the server resources required by the model to be trained is determined as the target server.

5. A service processing method, characterized in that: include: Receiving a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set; Acquire an environment resource package associated with each environment parameter in the training environment parameter set; Running the environment resource package to build an operating environment for the model to be trained; In the operating environment, starting a model training process to train the model to be trained based on the data packet; The acquiring of the environment resource package associated with each environment parameter in the training environment parameter set includes: According to the training environment parameter set, the type and version of the resource package required for constructing the operating environment of the algorithm script of the model to be trained are determined, and the server obtains the resource package of the corresponding type and version from the environment resource package library; the environment resource package library includes a variety of resource packages required to create the operating environment of different algorithm scripts.

6. The method according to claim 5, characterized in that Before starting the model training process, the method further includes: Create a working directory corresponding to the model to be trained to store the data packet to be trained and temporary data during the model training process.

7. The method according to claim 5 or 6, characterized in that After starting the model training process, the method further includes: Start the model training log listener to listen to the training log corresponding to the model training process; Returns the training log.

8. A service processing device, characterized in that: include: A first receiving module is used to receive a model training request, wherein the training request includes a data packet corresponding to the model to be trained, a training environment parameter set, and server resources required by the model to be trained; A first determination module is used to determine a target server according to server resources required by the model to be trained and the current operating status of each server when all parameters in the training environment parameter set are system default parameters; A first sending module, configured to send the data packet and the training environment parameter set to the target server, so that the target server builds an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet; The target server constructs an operating environment according to the training environment parameter set, and trains the model to be trained in the operating environment based on the data packet, including: The sub-server corresponding to the target server obtains the resource package of the corresponding type and version from the environment resource package library according to the training environment parameter set, builds the operating environment for model training, and finally reads the configuration file and training data from the algorithm script in the data package to perform model training. The environment resource package library includes a variety of resource packages required to create the operating environment of different algorithm scripts.

9. A service processing device, characterized in that: include: A receiving module, used to receive a model training instruction, wherein the training instruction includes a data packet corresponding to the model to be trained and a training environment parameter set; An acquisition module, used to acquire an environment resource package associated with each environment parameter in the training environment parameter set; A construction module, used to run the environment resource package to build an operating environment for the model to be trained; A training module, used to start a model training process in the operating environment to train the model to be trained based on the data packet; The acquiring of the environment resource package associated with each environment parameter in the training environment parameter set includes: According to the training environment parameter set, the type and version of the resource package required for constructing the operating environment of the algorithm script of the model to be trained are determined, and the server obtains the resource package of the corresponding type and version from the environment resource package library; the environment resource package library includes a variety of resource packages required to create the operating environment of different algorithm scripts.

10. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the service processing method as claimed in any one of claims 1 to 7 is implemented.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the service processing method according to any one of claims 1 to 7 is implemented.

12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the service processing method according to any one of claims 1 to 7.