CN113064599B - Deployment method and device for machine learning model prediction online service - Google Patents
Deployment method and device for machine learning model prediction online service Download PDFInfo
- Publication number
- CN113064599B CN113064599B CN202110370662.8A CN202110370662A CN113064599B CN 113064599 B CN113064599 B CN 113064599B CN 202110370662 A CN202110370662 A CN 202110370662A CN 113064599 B CN113064599 B CN 113064599B
- Authority
- CN
- China
- Prior art keywords
- operator
- model
- machine learning
- online
- computing interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000010801 machine learning Methods 0.000 title claims abstract description 84
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000012545 processing Methods 0.000 claims abstract description 96
- 238000012549 training Methods 0.000 claims abstract description 49
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 23
- 238000009795 derivation Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004140 cleaning Methods 0.000 claims description 4
- 238000011161 development Methods 0.000 abstract description 22
- 238000004364 calculation method Methods 0.000 abstract description 14
- 238000006243 chemical reaction Methods 0.000 abstract description 4
- 238000012821 model calculation Methods 0.000 abstract description 3
- 238000004883 computer application Methods 0.000 abstract description 2
- 230000018109 developmental process Effects 0.000 description 21
- 230000008569 process Effects 0.000 description 15
- 238000013473 artificial intelligence Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- ZLIBICFPKPWGIZ-UHFFFAOYSA-N pyrimethanil Chemical compound CC1=CC(C)=NC(NC=2C=CC=CC=2)=N1 ZLIBICFPKPWGIZ-UHFFFAOYSA-N 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a deployment method and a device for predicting online service by a machine learning model, and relates to the technical field of computer application, wherein the method comprises the steps of firstly carrying out feature processing on offline data acquired in advance by utilizing a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface; the method comprises the steps of generating a model on-line service, generating a model calculation result by training operators of a machine learning algorithm by using a model training set, generating a trained machine learning model, determining an operator link according to the operators of feature processing and the trained machine learning model, and finally generating the model on-line service based on a first on-line calculation interface and a second on-line calculation interface in the operator link, wherein the model on-line service is used for processing data requested in real time. The method can replace manual code conversion, improves the efficiency of model development, and reduces the possibility of error introduction and the cost of online model deployment.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to a deployment method and device for predicting online services by a machine learning model.
Background
With the advent of massive data, artificial intelligence technology has evolved rapidly, wherein machine learning technology is commonly applied to mine beneficial value from massive data records (e.g., financial data, internet data, etc.), and more machine learning models are deployed in the form of online services. In a standard machine learning development process, the original data is processed by features to form a feature wide table, and model training is carried out by the feature wide table to obtain a machine learning model. When the model is used, the trained model is required to be deployed as a model prediction service interface, the request data is processed by the same feature processing logic as in the development process to form a feature wide table, and then the model prediction service interface is called to obtain a prediction result.
In the process of model construction, in most cases, python or R language is adopted to perform model development work, and then feature calculation logic is converted into java language for deployment. Because different languages are used for generating the feature broad table during model development and model deployment, a code translation process inevitably exists, the current common solution is to use manpower to perform code conversion, which is time-consuming and labor-consuming, has the possibility of bug introduction, and increases the cost of solving the actual business problem by using the artificial intelligence AI (Artificial Intelligence) model technology.
Disclosure of Invention
The invention aims to provide a deployment method and device for predicting online services by a machine learning model, so as to solve the technical problems of time and labor waste and low development efficiency of manual code conversion in the prior art.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
In a first aspect, an embodiment of the present invention provides a deployment method of a machine learning model prediction online service, where the deployment method includes performing feature processing on pre-acquired offline data by using a feature processing operator to generate a model training set, where the feature processing operator includes a first online computing interface and a second online computing interface, training an operator of a machine learning algorithm by using the model training set to generate a trained machine learning model, where the operator of the trained machine learning model includes a first online computing interface, determining an operator link according to the feature processing operator and the trained machine learning model, where the operator link includes the feature processing operator and the trained operator of the machine learning model, and generating a model online service based on the first online computing interface and the second online computing interface in the operator link, where the model online service is used to process data requested in real time and generate a model calculation result.
In some possible embodiments, before the step of performing feature processing on the offline data acquired in advance to generate the model training set, the method further comprises determining an operator of the feature processing and an operator of a machine learning algorithm, acquiring the offline data of the modeling scene, and determining the offline modeling training set.
In some possible embodiments, the operators of the feature processing include a first operator and a second operator, the operators of the machine learning algorithm include the first operator, the first operator includes a first online computing interface and a first offline computing interface, and the second operator includes a second online computing interface and a second offline computing interface.
In some possible embodiments, the first operator generates a configuration file when performing offline calculation, where the configuration file is used to calculate the calculation logic of the first operator.
In some possible embodiments, the feature processing includes one or more of data cleansing, data population, and feature derivation, the operator of the feature processing is a second operator if the feature processing is the data cleansing or the data population, and the operator of the feature processing is a first operator or the first operator and the second operator if the feature processing is the feature derivation.
In some possible implementations, the operator link includes a plurality of first operators and a plurality of second operators, and the step of generating the model online service based on the first online computing interface and the second online computing interface in the operator link includes calling all of the first operators and the second operators in the operator link, and generating the model online service based on the first online computing interface of the first operators and the second online computing interface of the second operators.
In some possible embodiments, the first operator is a Estimator-type operator, and the second operator is a transducer-type operator.
The embodiment of the invention provides a deployment device of machine learning model prediction online service, which comprises a feature processing module, a training module, a determining module and an online service generating module, wherein the feature processing module is used for performing feature processing on pre-acquired offline data by utilizing a feature processing operator to generate a model training set, the feature processing operator comprises a first online computing interface and a second online computing interface, the training module is used for training an operator of a machine learning algorithm by utilizing the model training set to generate a trained machine learning model, the operator of the trained machine learning model comprises a first online computing interface, the determining module is used for determining an operator link according to the feature processing operator and the trained machine learning model, the operator link comprises the feature processing operator and the trained operator of the machine learning model, and the online service generating module is used for generating model online service based on the first online computing interface and the second online computing interface in the operator link and is used for processing real-time request data to generate a model computing result.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, and a processor, where the memory stores a computer program executable on the processor, and the processor implements the steps of the method according to any one of the first aspects when the processor executes the computer program.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the first aspects.
The invention provides a deployment method and device for machine learning model prediction online service, the method comprises the steps of firstly carrying out feature processing on offline data obtained in advance by utilizing a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface, then training an operator of a machine learning algorithm by utilizing the model training set to generate a trained machine learning model, determining an operator link according to the feature processing operator and the trained machine learning model, and finally generating model online service based on the first online computing interface and the second online computing interface in the operator link, wherein the model online service is used for processing data requested in real time to generate a model computing result. By the method, the process of manually converting codes can be replaced, the efficiency of model development is improved, the possibility of introducing errors is reduced, and the cost of online model deployment is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for deploying a machine learning model predictive online service according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of a development flow of two operators in a deployment method of machine learning model prediction online service according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a deployment device for predicting online services by using a machine learning model according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In a standard machine learning development process, the original data is processed by features to form a feature wide table, and model training is carried out by the feature wide table to obtain a machine learning model. When the model is used, the trained model is required to be deployed as a model prediction service interface, the request data is processed by the same feature processing logic as in the development process to form a feature wide table, and then the model prediction service interface is called to obtain a prediction result. The execution efficiency of languages (such as python, R and the like) used for model development is insufficient, the existing development flow cannot meet the online business scene with timeliness requirements, for example, online credit auditing generally requires second-level feedback results, and an advertisement column recommendation position in an application program requires millisecond-level response, so that the recommendation results can be returned when a client opens the application program. But the languages such as java, scal and the like which can meet the aging requirement are inconvenient to directly develop the model. Therefore, in most cases, the python and R languages are adopted to carry out model development work, feature calculation logic is converted into java language to be deployed during model deployment, and the actual prediction workflow is a real-time request to execute the java feature processing logic first and then call model service.
In the process of model construction, in most cases, python or R language is adopted to perform model development work, and then feature calculation logic is converted into java language for deployment. Because different languages are used for generating the feature broad table during model development and model deployment, a code translation process inevitably exists, the current common solution is to use manpower to perform code conversion, which is time-consuming and labor-consuming, has the possibility of bug introduction, and increases the cost of solving the actual business problem by using the artificial intelligence AI (Artificial Intelligence) model technology.
In view of this, the embodiment of the present invention provides a method and an apparatus for deploying a machine learning model prediction online service, and for facilitating understanding of the present embodiment, first, a method for deploying a machine learning model prediction online service disclosed in the embodiment of the present invention will be described in detail, with reference to a flowchart of a method for deploying a machine learning model prediction online service shown in fig. 1, where the method may be executed by an electronic device, and mainly includes the following steps S110 to S140:
S110, performing feature processing on the offline data acquired in advance by using a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface;
The feature processing comprises one or more of data cleaning, data filling and feature deriving, wherein an operator of the feature processing is a second operator if the feature processing is data cleaning or data filling, and the operator of the feature processing is a first operator or the first operator and the second operator if the feature processing is feature deriving.
As a specific example, the first operator is a Estimator-type operator and the second operator is a transducer-type operator. The Estimator type operator includes an offline computing interface and an online computing interface, and the Estimator type operator also includes an offline computing interface and an online computing interface.
Feature processing typically involves a number of steps, some of which employ a transducer-type operator, some of which use a Estimator-type operator, and which type of operator is used is determined by the computational logic of the computational step. In general, data cleansing and data population mostly use a transducer-type operator, while feature derivation is relatively complex, and according to the difference of calculation logic, a significant part of feature derivation adopts a Estimator-type operator, and a part of feature derivation adopts a transducer-type operator.
The main difference between the two operators is that when feature processing logic needs to be executed in the model prediction process, the transducer type operator is only related to the calculation logic, and the Estimator type operator is also related to parameters generated by feature processing execution in model training.
S120, training operators of a machine learning algorithm by using a model training set to generate a trained machine learning model;
Wherein the operator of the trained machine learning model comprises a first online computing interface;
S130, determining an operator link according to the operator of the feature processing and the trained machine learning model, wherein the operator link comprises the operator of the feature processing and the operator of the trained machine learning model;
and S140, generating model online service based on the first online computing interface and the second online computing interface in the operator link, wherein the model online service is used for processing the data of the real-time request and generating a model computing result.
In one embodiment, before the step of generating the model training set by using the feature processing operator to perform feature processing on the offline data acquired in advance, the feature processing operator and the machine learning algorithm operator should be generally determined, and then the offline data of the modeling scene is acquired to determine the offline modeling training set.
The operator of the feature processing comprises a first operator and a second operator, the operator of the machine learning algorithm comprises the first operator, the first operator comprises a first online computing interface and a first offline computing interface, and the second operator comprises a second online computing interface and a second offline computing interface. And when the first operator performs offline calculation, generating a configuration file, wherein the configuration file is used for calculating the calculation logic of the first operator.
As a specific example, the feature processing generally comprises a plurality of operators, and most of the operators comprise both types Estimator and Transformer operators, and the operators of the machine learning algorithm may be one operator or a plurality of operators, and all operators are Estimator operators. Since the operator link generated in the above step S130 includes the operators of the feature processing and the operators of the trained machine learning model, the operator link includes a plurality of first operators and a plurality of second operators, that is, the operator link includes a plurality of first online computing interfaces and a plurality of second online computing interfaces.
The step of generating the model online service based on the first online computing interface and the second online computing interface in the operator link may then comprise first invoking all the first operators and the second operators in the operator link, and then generating the model online service based on the first online computing interface of the first operator and the second online computing interface of the second operator. Wherein the first operator is Estimator type operator, and the second operator is a transducer type operator. According to the method, the feature processing and machine learning model prediction are packaged into one operator link, namely, feature processing and model prediction functions are packaged and issued, so that the online workload is reduced.
The invention provides a deployment method and device for machine learning model prediction online service, the method comprises the steps of firstly carrying out feature processing on offline data obtained in advance by utilizing a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface, then training an operator of a machine learning algorithm by utilizing the model training set to generate a trained machine learning model, determining an operator link according to the feature processing operator and the trained machine learning model, and finally generating model online service based on the first online computing interface and the second online computing interface in the operator link, wherein the model online service is used for processing data requested in real time to generate a model computing result. By the method, the process of manually converting codes can be replaced, the efficiency of model development is improved, the possibility of introducing errors is reduced, and the cost of online model deployment is reduced.
Describing the most common flow of AI model development using the python language, one embodiment includes the following:
Firstly, an algorithm operator commonly used in an AI modeling service needs to be constructed, wherein the common operator comprises two major types of feature processing and machine learning algorithm, and the feature processing comprises data cleaning, data filling, feature derivation and the like. These operators can be divided into two classes, transformer type and Estimator.
The output result of the type operator is only related to single input data, such as data filling, comprehensive operation of a plurality of fields, character string segmentation and other operators. The computational logic of such operators in offline model development and online prediction is exactly the same, and the computational interface can be implemented by directly invoking python code in java or scala language, as shown in part (a) of fig. 2.
And Estimator-type operators, wherein the output result of the operator is not only related to the input single data, but also related to the whole training sample set. Such as normalization, prediction of the model, etc. Normalization is performed by calculating normalized transformation parameters according to the entire training sample set, and prediction of the model is performed by training a model to predict according to the input data. Such operators, when computed offline, generate a configuration file that is used to document the computing logic of the operator. In the online prediction, the configuration file and the python code need to be loaded in the java or scala language environment at the same time so as to obtain an output result according to the input single piece of data, as shown in part (B) of fig. 2.
By constructing the two types of operators, the support interfaces of scala and python languages are written, so that the corresponding codes can be serviced online. When Estimator type operator online prediction is performed, a configuration file and python codes are required to be loaded in java or scala language environment simultaneously, so that an output result can be obtained according to single input data. And machine learning specific computing logic is componentized. When Estimator type operators predict online, configuration files and python codes are required to be loaded in java or scala language environments simultaneously to obtain output results according to single input data, so that corresponding components are required to be developed for Estimator type computing logic, and rapid deployment is realized.
The method comprises the steps of obtaining modeling scene, reading offline data of any modeling scene to be used as a training set of offline modeling, carrying out feature engineering on the read offline data, calculating required modeling features to generate a model training set, and inputting the model training set into a machine learning algorithm operator to carry out model training.
After training, the operators used above and the corresponding model files are input into a model compiler to generate model online service, and the calculation logic of the model compiler is that a characteristic processing operator and a machine learning algorithm operator are connected in series in the sequence used in offline calculation (namely, the specific processing operator is firstly used and then the machine learning algorithm operator is used) to generate an operator link, and the real-time online calculation interfaces of the operators are sequentially called. And finally, inputting the data requested in real time into the model online service, and outputting the model calculation result in real time.
The deployment method for the machine learning model prediction online service provided by the embodiment of the application integrates the development and deployment of the machine learning model, can automatically generate the deployment code and deploy online after the development is completed, and saves a great amount of development manpower. The feature development operators are divided into two types, namely a Transformer and Estimator, and different processing modes are used, so that the consistency of the code developed by the features in two states of training and deployment is ensured, and logic bug possibly occurring in the code rewriting process is avoided.
The embodiment of the invention also provides a deployment device of the machine learning model prediction online service, referring to fig. 3, the device comprises:
The feature processing module 310 is configured to perform feature processing on the offline data acquired in advance by using a feature processing operator to generate a model training set;
the training module 320 is configured to train an operator of the machine learning algorithm by using the model training set to generate a trained machine learning model;
A determining module 330, configured to determine an operator link according to the feature-processed operator and the trained machine learning model, where the operator link includes the feature-processed operator and the trained machine learning model operator;
The online service generating module 340 is configured to generate a model online service based on the first online computing interface and the second online computing interface in the operator link, where the model online service is configured to process the data requested in real time, and generate a model computing result.
The deployment device of the machine learning model prediction online service provided by the embodiment of the application can be specific hardware on equipment or software or firmware installed on the equipment. The device provided by the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned. It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein. The deployment device of the machine learning model prediction online service provided by the embodiment of the application has the same technical characteristics as the deployment method of the machine learning model prediction online service provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the application also provides electronic equipment, in particular to the electronic equipment, which comprises a processor and a storage device, wherein the storage device is stored with a computer program which, when being run by the processor, executes the method according to any one of the embodiments.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 400 includes a processor 40, a memory 41, a bus 42 and a communication interface 43, where the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42, and the processor 40 is configured to execute executable modules, such as computer programs, stored in the memory 41.
The memory 41 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and the at least one other network element is achieved via at least one communication interface 43 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc.
Bus 42 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
The memory 41 is configured to store a program, and the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40 or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in processor 40. The processor 40 may be a general-purpose processor including a central Processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), a digital signal processor (DIGITAL SIGNAL Processing, DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable GATE ARRAY (FPGA), a Programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 41 and the processor 40 reads the information in the memory 41 and in combination with its hardware performs the steps of the method described above.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It should be noted that like reference numerals and letters indicate like items in the drawings, and thus, once an item is defined in one drawing, no further definition or explanation thereof is required in the subsequent drawings, and furthermore, the terms "first", "second", "third", etc. are used solely for distinguishing descriptions and are not to be construed as indicating or implying relative importance.
It should be noted that the foregoing embodiments are merely illustrative embodiments of the present invention, and not restrictive, and the scope of the invention is not limited to the embodiments, and although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any modification, variation or substitution of some of the technical features of the embodiments described in the foregoing embodiments may be easily contemplated within the scope of the present invention, and the spirit and scope of the technical solutions of the embodiments do not depart from the spirit and scope of the embodiments of the present invention.
Claims (8)
1. A method for deploying a machine learning model predictive online service, comprising:
Performing feature processing on the offline data acquired in advance by using a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface;
Training operators of a machine learning algorithm by using the model training set to generate a trained machine learning model, wherein the operators of the algorithm of the trained machine learning model comprise a first online computing interface, the operators of the feature processing comprise a first operator and a second operator, the operators of the machine learning algorithm comprise the first operator, the first operator comprises a first online computing interface and a first offline computing interface, the second operator comprises a second online computing interface and a second offline computing interface, the first operator is Estimator type operators, and the second operator is a Transformer type operator;
determining an operator link according to the operator of the feature processing and the trained machine learning model, wherein the operator link comprises the operator of the feature processing and the operator of the trained machine learning model;
Generating model online service based on the first online computing interface and the second online computing interface in the operator link, wherein the model online service is used for processing data of real-time requests and generating model computing results.
2. The method for deploying a machine learning model predictive online service of claim 1, further comprising, prior to the step of characterizing the pre-acquired offline data to generate the model training set:
determining an operator of feature processing and an operator of a machine learning algorithm;
offline data of the modeling scene is acquired, and an offline modeling training set is determined.
3. The method of claim 1, wherein the first operator generates a configuration file when performing offline computation, the configuration file being used for computing the computing logic of the first operator.
4. The method of claim 3, wherein the feature processing comprises one or more of data cleansing, data population, and feature derivation;
If the feature processing is the data cleaning or the data filling, an operator of the feature processing is a second operator;
and if the feature processing is feature derivation, the operator of the feature processing is a first operator or a first operator and a second operator.
5. The method of deploying a machine learning model predictive online service of claim 2 wherein the operator link comprises a plurality of first operators and a plurality of second operators, the step of generating a model online service based on the first online computing interface and the second online computing interface in the operator link comprising:
Invoking all of the first operators and the second operators in the operator link;
Generating a model online service based on the first online computing interface of the first operator and the second online computing interface of the second operator.
6. A deployment apparatus for machine learning model predictive online services, comprising:
the feature processing module is used for carrying out feature processing on the offline data acquired in advance by utilizing a feature processing operator to generate a model training set, wherein the feature processing operator comprises a first online computing interface and a second online computing interface;
the training module is used for training operators of the machine learning algorithm by utilizing the model training set to generate a trained machine learning model, wherein the operators of the trained machine learning model comprise a first online computing interface;
The device comprises a determining module, a characteristic processing module and a training module, wherein the determining module is used for determining an operator link according to the operator of the characteristic processing and the trained machine learning model, the operator link comprises an operator of the characteristic processing and an operator of the trained machine learning model, the operator of the characteristic processing comprises a first operator and a second operator, the operator of the machine learning algorithm comprises the first operator, the first operator comprises a first online computing interface and a first offline computing interface, the second operator comprises a second online computing interface and a second offline computing interface, the first operator is Estimator type operator, and the second operator is a Transformer type operator;
The online service generation module is used for generating model online service based on the first online computing interface and the second online computing interface in the operator link, and the model online service is used for processing data of real-time requests and generating model computing results.
7. An electronic device comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method of any of the preceding claims 1 to 5.
8. A computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions, the computer-executable instructions, when invoked and executed by a processor, cause the processor to perform the method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110370662.8A CN113064599B (en) | 2021-04-06 | 2021-04-06 | Deployment method and device for machine learning model prediction online service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110370662.8A CN113064599B (en) | 2021-04-06 | 2021-04-06 | Deployment method and device for machine learning model prediction online service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113064599A CN113064599A (en) | 2021-07-02 |
CN113064599B true CN113064599B (en) | 2025-02-07 |
Family
ID=76566039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110370662.8A Active CN113064599B (en) | 2021-04-06 | 2021-04-06 | Deployment method and device for machine learning model prediction online service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113064599B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111523676A (en) * | 2020-04-17 | 2020-08-11 | 第四范式(北京)技术有限公司 | Method and device for assisting machine learning model to be online |
CN111611239A (en) * | 2020-04-17 | 2020-09-01 | 第四范式(北京)技术有限公司 | Method, device, equipment and storage medium for realizing automatic machine learning |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11282208B2 (en) * | 2018-12-24 | 2022-03-22 | Adobe Inc. | Identifying target objects using scale-diverse segmentation neural networks |
CN112446499B (en) * | 2019-08-30 | 2024-11-01 | 西门子医疗股份公司 | Improving performance of machine learning models for automatic quantification of coronary artery disease |
-
2021
- 2021-04-06 CN CN202110370662.8A patent/CN113064599B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111523676A (en) * | 2020-04-17 | 2020-08-11 | 第四范式(北京)技术有限公司 | Method and device for assisting machine learning model to be online |
CN111611239A (en) * | 2020-04-17 | 2020-09-01 | 第四范式(北京)技术有限公司 | Method, device, equipment and storage medium for realizing automatic machine learning |
Also Published As
Publication number | Publication date |
---|---|
CN113064599A (en) | 2021-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109343857B (en) | Method, apparatus and storage medium for deploying machine learning model on line | |
CN109308254B (en) | Test method, test device and test equipment | |
CN111708760B (en) | Model migration deployment method, device, electronic equipment and storage medium | |
CN110879776A (en) | Test case generation method and device | |
CN111722873A (en) | Code reconstruction method, device, equipment and medium | |
CN113268403A (en) | Time series analysis and prediction method, device, equipment and storage medium | |
CN113064599B (en) | Deployment method and device for machine learning model prediction online service | |
CN112712181A (en) | Model construction optimization method, device, equipment and readable storage medium | |
CN116016270B (en) | Switch test management method, device, electronic device and storage medium | |
CN113760713B (en) | Test method, system, computer system and medium | |
CN110795424B (en) | Characteristic engineering variable data request processing method and device and electronic equipment | |
CN111176624B (en) | Method and device for generating stream type calculation index | |
CN110045985B (en) | Targetlink model calibration parameter setting method, device, equipment and medium | |
CN108255802B (en) | Universal text parsing architecture and method and device for parsing text based on architecture | |
CN111611117A (en) | Hard disk fault prediction method, device, equipment and computer readable storage medium | |
CN117436429B (en) | Document export method, device, computer equipment and storage medium | |
CN115878079B (en) | Demand management method, device, electronic equipment and storage medium | |
CN116911406B (en) | Wind control model deployment method and device, computer equipment and storage medium | |
CN114296796B (en) | Code verification method, device, storage medium and processor | |
CN114003211A (en) | A sun code generation and analysis method, device, electronic device and medium | |
CN116860591A (en) | Test script generation method and device | |
CN116542768A (en) | Method for processing batch transaction, electronic device, storage medium and program product | |
CN119474131A (en) | Query statement generation method and device, electronic device and storage medium | |
CN119294535A (en) | Labeling method and device for equipment knowledge graph data | |
CN119336295A (en) | A method and device for generating scripts based on product requirements |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |