CN115437647A - Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium - Google Patents

Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium Download PDF

Info

Publication number
CN115437647A
CN115437647A CN202211011412.6A CN202211011412A CN115437647A CN 115437647 A CN115437647 A CN 115437647A CN 202211011412 A CN202211011412 A CN 202211011412A CN 115437647 A CN115437647 A CN 115437647A
Authority
CN
China
Prior art keywords
model
algorithm
deep learning
service
learning model
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.)
Pending
Application number
CN202211011412.6A
Other languages
Chinese (zh)
Inventor
廖伟胜
李俊茂
林冯军
曾炜
王晖
李革
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202211011412.6A priority Critical patent/CN115437647A/en
Publication of CN115437647A publication Critical patent/CN115437647A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method, a device, a terminal and a storage medium for deploying micro-services adaptive to multiple frames, wherein the method comprises the following steps: acquiring algorithm frame information in an algorithm management interface, and storing the algorithm frame information of corresponding fields through a Mysql database; acquiring submitted algorithm name information, and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information; and calling inference application service adapted to the trained deep learning model through the model management layer, and deploying micro-service corresponding to the trained deep learning model according to the inference application service. The method calls the adaptive inference application service through the model management layer, standardizes the difference of model storage modes trained by different frames, unifies the training, inference resource specification and storage requirements of the model, can be compatible with a plurality of frames and different types of hardware equipment, and is convenient for a user to efficiently and quickly deploy the deep learning model application service.

Description

Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of deep learning, in particular to a multi-frame-adaptive micro-service deployment method, a multi-frame-adaptive micro-service deployment device, a multi-frame-adaptive micro-service deployment terminal and a multi-frame-adaptive micro-service deployment storage medium.
Background
The deep learning framework mainly comprises various open source frameworks such as a Pyroch, a TensorFlow, a PaddlePaddle, a MindSpore and the like, and the storage formats of the trained models are different due to different frameworks and different model storage modes.
When a deep learning developer develops a deep learning application and deploys the deep learning application as a service, the deep learning developer often needs to develop a specific micro service according to different frames and storage formats and types of different models. If an inference tool already provided by an open source framework is used, for example, when service deployment is performed through a tfservering tool, it is considered that the tool does not support a model in a normal checkpoint and pb file format, for example, for a tensorflow model, the model needs to be converted into a tfservering format in advance before deployment; if a model developed by other computing frameworks needs to be deployed into an application, for example, when a model of a Pytorch framework uses a tfservingtool to perform service deployment, the model needs to be converted into an intermediate representation layer in advance, for example, an onnx file format, and then into a pb file format of tensorflow, and then an api interface of tfservingcan be called, which increases development difficulty, has high learning cost, and has a long deployment cycle.
In addition, in the service deployment stage, a specific monitoring port needs to be specified for the model application service, a model configuration file needs to be filled in advance, and meanwhile, specific computing resource equipment needs to be allocated; in the process, the service configuration file is not only complicated and easy to make mistakes, and the problem of calculation resource preemption cannot be avoided, but also the vacant node resources in the calculation cluster cannot be flexibly used, so that the method is obviously not suitable for large-scale model service deployment and is also not suitable for effective service expansion in a peak request period. Therefore, the current deployment mode faces the problems of long development process, complex operation, poor experience, difficult service management and the like.
Thus, the prior art has yet to be improved.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a multi-frame adaptive micro-service deployment method, apparatus, terminal and storage medium to solve the technical problem of complex operation of the existing deep learning model micro-service deployment method.
The technical scheme adopted by the invention for solving the technical problem is as follows:
in a first aspect, the present invention provides a multi-frame adaptive micro-service deployment method, including:
acquiring algorithm frame information in an algorithm management interface, and storing the algorithm frame information of a corresponding field through a Mysql database;
obtaining submitted algorithm name information, and sending a trained deep learning model in a training management layer to a model management layer according to the submitted algorithm name information;
and calling inference application service adapted to the trained deep learning model through the model management layer, and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
In one implementation, the algorithm framework information includes: algorithm name information, algorithm framework information, and model name information.
In one implementation manner, the obtaining algorithm frame information in the algorithm management interface and storing the algorithm frame information of the corresponding field in the Mysql database includes:
acquiring algorithm name information, algorithm frame information and model name information corresponding to each deep learning model in the algorithm management interface;
and storing the algorithm name information, the algorithm frame information and the model name information of the corresponding fields through a Mysql database to generate the mapping relation of the algorithm name information, the algorithm frame information and the model name information.
In one implementation, the obtaining submitted algorithm name information and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information includes:
acquiring submitted algorithm name information in the training management layer;
calling a corresponding data set and a training mirror image according to the submitted algorithm name information;
training according to the data set and the training mirror image to obtain the trained deep learning model;
and sending the trained deep learning model to the model management layer.
In one implementation, the training according to the data set and the training image to obtain the trained deep learning model includes:
training a corresponding algorithm according to the data set and the training mirror image to obtain a trained algorithm;
obtaining a model and version information corresponding to the trained algorithm according to the mapping relation between the algorithm name information and the model name information;
and storing according to the obtained model and version information to obtain the trained deep learning model.
In one implementation, the sending the trained deep learning model to the model management layer then includes:
storing the trained deep learning model in a designated object storage service according to configured formats and paths.
In one implementation, invoking, by the model management layer, an inference application service adapted to the trained deep learning model, and deploying a micro-service corresponding to the trained deep learning model according to the inference application service, includes:
packaging the trained deep learning model according to a configured file format;
and invoking inference application service adapted to the trained deep learning model according to preset service configuration information, and deploying micro-service corresponding to the packaged deep learning model.
In one implementation, the packaging the trained deep learning model according to a configured file format includes:
determining a format of a yaml file according to a frame corresponding to the trained deep learning model;
reading configuration parameters corresponding to the trained deep learning model from an api interface of a service management layer;
and packaging the trained deep learning model into a model in a yaml file format according to the read configuration parameters.
In one implementation manner, the invoking, according to preset service configuration information, an inference application service adapted to the trained deep learning model, and deploying a micro service corresponding to the packaged deep learning model includes:
according to the service configuration information set in the yaml file;
submitting the packaged deep learning model to a cluster scheduling and container service management layer for allocation processing of reasoning and computing resources;
and deploying micro-services corresponding to the packaged deep learning model according to the allocated reasoning computing resources.
In one implementation, the deploying of the micro-service corresponding to the encapsulated deep learning model according to the allocated computing resources includes:
constructing a derived class and loading a deep learning model packaged in an Apis layer;
selecting distributed reasoning computing resources, acquiring model input parameters through an exposed api interface, and returning reasoning response information;
and deploying micro-services corresponding to the packaged deep learning model according to the inference response information.
In a second aspect, the present invention provides a multi-frame adapted microservice deployment apparatus, comprising:
the algorithm management module is used for acquiring algorithm frame information in an algorithm management interface and storing the algorithm frame information of corresponding fields through a Mysql database;
the training management module is used for acquiring submitted algorithm name information and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information;
and the model management module is used for calling inference application service adapted to the trained deep learning model through the model management layer and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
In a third aspect, the present invention provides a terminal, including: a processor and a memory, wherein the memory stores a multi-framework adapted micro-service deployment program, and the multi-framework adapted micro-service deployment program is used for realizing the operation of the multi-framework adapted micro-service deployment method according to the first aspect when executed by the processor.
In a fourth aspect, the present invention further provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a multi-framework adapted micro-service deployment program, which is used to implement the operations of the multi-framework adapted micro-service deployment method according to the first aspect when executed by a processor.
The invention adopts the technical scheme and has the following effects:
the calculation frame of the model and the model name corresponding to the algorithm are uniquely identified by the algorithm management module, and the trained model is sent to the model management layer by using submitted algorithm information in the training management layer, so that the model is stored in the specified object storage service; and calling inference application container service adapted to the framework of the model according to the calculation framework to which the model belongs when the model service management layer deploys the service, and finally completing application deployment of the specific model service. In the process of deploying the model service, a user does not need to construct an inference mirror image by himself or only needs to store the model completed by the training code according to format requirements, service deployment can be completed according to the inference back ends of different computing frames, and the deep learning model application service can be conveniently and rapidly deployed by the user efficiently.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the embodiments or technical solutions of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow chart of a method of adapting multi-frame micro-service deployment in one implementation of the invention.
FIG. 2 is a block diagram of the overall design architecture of a multiple framework model container service one-key deployment scenario in one implementation of the invention.
FIG. 3 is a detailed block diagram of a multi-frame model container service one-key deployment scheme in one implementation of the invention.
Fig. 4 is a diagram of a backhaul layer inference service backend implementation in an implementation manner of the present invention.
Fig. 5 is a functional schematic of a terminal in one implementation of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Exemplary method
In the deep learning model service deployment stage, a specific monitoring port needs to be appointed for the model application service, a model configuration file needs to be filled in advance, and meanwhile, specific computing resource equipment needs to be allocated; in the process, the service configuration file is not only complicated and easy to make mistakes, and the problem of calculation resource preemption cannot be avoided, but also the vacant node resources in the calculation cluster cannot be flexibly used, so that the method is obviously not suitable for large-scale model service deployment and is also not suitable for effective service expansion in a peak request period. Therefore, the current deployment mode faces the problems of long development process, complex operation, poor experience, difficult service management and the like.
In view of the above technical problems, the present embodiment provides a method for deploying a micro-service that is adaptive to multiple frames, where an algorithm management module uniquely identifies a computation frame of a model and a model name corresponding to an algorithm, and a training management layer sends the trained model to the model management layer by using submitted algorithm information, and further stores the model in a specified object storage service; and calling inference application container service adapted to the framework of the model according to the calculation framework to which the model belongs when the model service management layer deploys the service, and finally completing application deployment of the specific model service. In the process of deploying the model service, a user does not need to construct an inference mirror image by himself, only needs to store a model completed by a training code according to format requirements, and then can complete service deployment according to inference back ends of different computing frames, so that the user can conveniently and rapidly deploy the deep learning model application service in an efficient manner.
As shown in fig. 1, an embodiment of the present invention provides a method for deploying a micro-service that adapts multiple frameworks, including the following steps:
and S100, acquiring algorithm frame information in an algorithm management interface, and storing the algorithm frame information of the corresponding field through a Mysql database.
In the embodiment, the multi-frame adaptive micro-service deployment method is applied to a terminal, which includes but is not limited to: computers and the like; the terminal is provided with a multi-framework model container service one-key deployment framework, and the multi-framework adaptive micro-service deployment method is implemented on the multi-framework model container service one-key deployment framework.
In the embodiment, an algorithm management module, a training task management module, a model storage module, inference container services exclusive to different computing frames and a unified model service management module API are designed, and the model storage format among a plurality of computing frames is standardized in consideration of the difference of computing hardware devices when different models execute inference services, so that a user can flexibly schedule and distribute computing resources on the premise of resource isolation, thereby realizing fast, standard and efficient training of the models and storage models and one-key deployment of a plurality of model services, and further reducing complex and tedious resource isolation and segmentation, service mirror image construction and development work of model microservice codes.
Specifically, in one implementation manner of the present embodiment, the step S100 includes the following steps:
step S101, obtaining algorithm name information, algorithm frame information and model name information corresponding to each deep learning model in the algorithm management interface;
step S102, storing the algorithm name information, the algorithm frame information and the model name information of the corresponding fields through a Mysql database, and generating the mapping relation of the algorithm name information, the algorithm frame information and the model name information.
In the present embodiment, as shown in fig. 2, the overall design of the multi-framework adapted deep learning model container micro-service one-key deployment scheme comprises, from bottom to top:
an Infrastructure layer, which is specifically a hardware device for training and reasoning, such as Cpu/Gpu/Ascend/Npu, and computing resources such as storage, network and the like;
a Scheduler layer which is a resource scheduling management layer and is responsible for training and reasoning application computing resource scheduling in the whole cluster;
the Backend layer is used for constructing reasoning service back ends of various frames, and carrying out adaptive packaging in a class form aiming at models of different calculation frame types so as to expose a model micro-service rest api interface;
and the Apis layer provides an algorithm management module, a training task management module, a model storage module and a service management module for a user, and the user can directly call the Apis layer through an interface or an interface.
In the embodiment, in a deep learning model container micro-service one-key deployment framework adapted to multiple frameworks, an Apis layer is provided with an algorithm management interface, a data management interface, a mirror image management interface, a training management interface, a model management interface and a service management interface; the algorithm management interface is provided with a plurality of deep learning models and algorithm frame information corresponding to each deep learning model; wherein the algorithm framework information comprises: algorithm name information, algorithm framework information, and model name information.
Further, by obtaining algorithm name information, algorithm frame information and model name information corresponding to each deep learning model in the algorithm management interface, the Mysql database can be used to store the algorithm name information, the algorithm frame information and the model name information of corresponding fields, so as to generate a mapping relation of the algorithm name information, the algorithm frame information and the model name information, and obtain a unique identifier of a calculation frame of the model and a model name corresponding to the algorithm.
As shown in fig. 1, in an implementation manner of the embodiment of the present invention, the method for deploying a multi-frame adapted microservice further includes the following steps:
and S200, acquiring submitted algorithm name information, and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information.
In this embodiment, in a training management interface of an Apis layer, each user may submit a model training task in the training management interface; then, the system can train the corresponding algorithm according to the algorithm name information and the corresponding mapping relation by acquiring the algorithm name information in the submitted task, and further send the trained deep learning model in the training management layer to the model management layer so as to implement the corresponding deployment work through the model management layer.
Specifically, in one implementation manner of the present embodiment, the step S200 includes the following steps:
step S201, obtaining submitted algorithm name information in the training management layer;
step S202, calling a corresponding data set and a training mirror image according to the submitted algorithm name information;
step S203, training according to the data set and the training mirror image to obtain the trained deep learning model;
and step S204, sending the trained deep learning model to the model management layer.
And S205, storing the trained deep learning model in a specified object storage service according to the configured format and path.
In this embodiment, as shown in fig. 3, the implementation of the multi-frame-adaptive deep learning model container micro-service one-key deployment scheme includes three parts:
an algorithm management module interface of the Apis layer is used for associating algorithms and models under various frameworks and keeping a mapping relation;
after a user submits a task, calls a data set and a training mirror image, and finishes training a specific algorithm, the training task management module can automatically acquire a model and a version corresponding to the algorithm and the model according to the mapping relation between the algorithm and the model; wherein each time the model is trained, a version is added. The algorithm management module completes the information binding of the model and the algorithm;
the model storage module can provide automatic storage and version management functions of the model for the user after the training task is completed; the automatic storage is carried out according to a uniform storage format and a storage path: storing the newly added or deleted model version;
the service management layer provides a uniform API (application programming interface) for different model services, and service configuration encapsulation in the form of yaml files can be provided for models of different frameworks.
Specifically, in a training task management module, a corresponding data set and a training mirror image are called according to a training task submitted by a user and algorithm name information in the task; the called data set is from a data set management module, and the called training mirror image is from a mirror image management module; and then, training the algorithm in the training task according to the called data set and the training mirror image to obtain a trained deep learning model.
Specifically, in one implementation manner of this embodiment, step S203 includes the following steps:
step S203a, training a corresponding algorithm according to the data set and the training image to obtain a trained algorithm;
step S203b, obtaining a model and version information corresponding to the trained algorithm according to the mapping relation between the algorithm name information and the model name information;
and step S203c, storing the obtained model and version information to obtain the trained deep learning model.
In this embodiment, when an algorithm in a task is trained, the data set management module searches for a corresponding data set name and a corresponding data set version according to algorithm name information, and sends a matched data set to a training management layer; the mirror image management module searches corresponding mirror image names and mirror image version information according to the algorithm name information and sends the matched mirror image files to a training management layer; meanwhile, the algorithm management module searches corresponding algorithm frame information and model name information according to the algorithm name information and sends the matched algorithm frame and model to the training management layer.
Further, the training management layer trains the corresponding algorithm according to the data set and the training image to obtain the trained algorithm, then obtains the model and version information corresponding to the trained algorithm according to the mapping relation between the algorithm name information and the model name information, and stores the obtained model and version information to obtain the trained deep learning model.
As shown in fig. 1, in an implementation manner of the embodiment of the present invention, the method for deploying a multi-frame adapted microservice further includes the following steps:
and step S300, calling inference application service adapted to the trained deep learning model through the model management layer, and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
In this embodiment, the inference application service adapted to the trained deep learning model is called through the model management layer, the trained deep learning model is deployed in the corresponding K8S cluster, and the micro service corresponding to the trained deep learning model is deployed through inference of the inference hardware device.
Specifically, in one implementation manner of the present embodiment, the step S300 includes the following steps:
step S301, packaging the trained deep learning model according to a configured file format;
and step S302, invoking inference application service adapted to the trained deep learning model according to preset service configuration information, and deploying micro-service corresponding to the packaged deep learning model.
In this embodiment, the model storage module may provide the user with the automatic storage and version management functions of the model after the training task is completed; the service management layer provides a uniform API (application programming interface) interface for different model services, the interior of the service management layer can provide service configuration encapsulation in a yaml file format for models with different frames, configuration parameters of different models are automatically read and filled from an API interface of the service management layer, and the configuration parameters comprise model _ uri, model _ volume _ path, model _ id, model _ version and the like, are encapsulated into a yaml file format and are submitted to the Backend layer.
Specifically, in one implementation manner of the present embodiment, the step S301 includes the following steps:
step S301a, determining a format of a yaml file according to a frame corresponding to the trained deep learning model;
step S301b, reading configuration parameters corresponding to the trained deep learning model from an api interface of a service management layer;
and S301c, packaging the trained deep learning model into a model in a yaml file format according to the read configuration parameters.
In the embodiment, a set of normalized model loading and reasoning interfaces is provided for different computing frameworks in the backhaul layer; in a Scheduler scheduling layer, submitting service configuration information set in the yaml file to a K8s cluster scheduling and container service management module for allocation processing of reasoning and computing resources; and finally, providing reasoning capability of the model micro-service after service deployment is completed.
Specifically, in one implementation manner of this embodiment, the step S302 includes the following steps:
step S302a, according to the service configuration information set in the yaml file;
step S302b, submitting the packaged deep learning model to a cluster scheduling and container service management layer for allocation processing of reasoning and computing resources;
and S302c, deploying micro-services corresponding to the packaged deep learning model according to the distributed inference calculation resources.
In this embodiment, as shown in fig. 4, the inference service backend of different computing frameworks implements derivation through a seldon component base class, seldon component is a base class in an Mlflow package, and includes a computing inference logic of an application service, and the inference backend of different frameworks constructs a derivative class by inheriting the seldon component class and rewriting the method of the base class (constructing a derivative class is an inference backend that implements different computing frameworks).
Specifically, in one implementation manner of this embodiment, the step S302c includes the following steps:
step S302c-1, constructing a derived class and loading a deep learning model packaged in an Apis layer;
s302c-2, selecting the distributed reasoning calculation resources, acquiring model input parameters through the exposed api interface, and returning reasoning response information;
and S302c-3, deploying micro-services corresponding to the packaged deep learning model according to the reasoning response information.
In this embodiment, a model stored in an Apis layer according to specifications is loaded in a self.load _ model method in a seldon component, in the method, a final inference resource can be selected by selecting a device parameter (device is a computing resource, such as gpu or cpu), an input parameter is obtained through an api interface exposed by the self.predict method, and an inference result is returned; the method for self-loading _ model comprises the steps of reading a model file path and loading a model.
In the obtained input parameters, the input parameters of different models are different, such as pictures, texts and the like, and the inference result is adapted to the result required by each model, such as category information, text information and the like; in the obtained input parameters, an input parameter is stored in a parameter X of the ndarray type, and the return parameter may be a data type such as np. The service inference back end of the backups layer can be compatible with models of different frameworks for application deployment.
In this embodiment, the model management layer submits information such as a task name, a model version, and a storage path to the system, and the system automatically constructs a service configuration file according to information such as a model object storage path, a service type, service description information, inference resource specifications, a model calculation frame name, a frame inference mirror name, and a frame inference mirror version in the service configuration module.
In the K8S cluster, computing resource allocation is carried out according to the service configuration file, then a service mirror image, a model micro-service and a model container are automatically constructed, and deployment work of a deep learning model is completed; and in the inference application service management module, configuring a service name, a service inference path, a service api interface, service operation information and the like according to service deployment information in the K8S cluster.
In the embodiment, an algorithm management module, a training task management module, a model storage module, the dedicated reasoning container service back ends of different computing frames and a unified model service management layer API are designed, so that the model deployment container micro-service application of different deep learning frames is compatible and supported.
The embodiment achieves the following technical effects through the technical scheme:
according to the different framework models, the automatic storage of the models can be completed according to the pre-information of algorithm management, data set management and mirror image management, and the framework information and the model files are mapped and bound; when the deployment model is applied, additional model conversion is not needed to be considered, different reasoning service back-end images in backups layers can be automatically matched according to the models and the calculation frame information thereof, and the deployment model is more flexible; when a user deploys model services, a model service configuration file is not required to be additionally constructed, after the model and the related information of the resource specification are acquired from a service creation interface by service management and are delivered to a scheduler scheduling layer, the service configuration file is automatically generated, cluster computing resources are automatically acquired, the service configuration file is automatically constructed, a model service mirror image is automatically constructed, container micro-services are automatically constructed and started, and one-key deployment is simple and efficient; and the user is allowed to develop reasoning service back ends with more framework types, and the system is more extensible.
Exemplary device
Based on the above embodiment, the present invention further provides a multi-frame adapted microservice deployment apparatus, including:
the algorithm management module is used for acquiring algorithm frame information in an algorithm management interface and storing the algorithm frame information of corresponding fields through a Mysql database;
the training management module is used for acquiring submitted algorithm name information and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information;
and the model management module is used for calling inference application service adapted to the trained deep learning model through the model management layer and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
Based on the above embodiments, the present invention further provides a terminal, and a schematic block diagram thereof may be as shown in fig. 5.
The terminal includes: the system comprises a processor, a memory, an interface, a display screen and a communication module which are connected through a system bus; wherein the processor of the terminal is configured to provide computing and control capabilities; the memory of the terminal comprises a storage medium and an internal memory; the storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of an operating system and a computer program in the storage medium; the interface is used for connecting external equipment, such as mobile terminals, computers and the like; the display screen is used for displaying corresponding information; the communication module is used for communicating with a cloud server or a mobile terminal.
The computer program is operable when executed by a processor to perform operations of a method of adapting multi-frame microservice deployment.
It will be understood by those skilled in the art that the block diagram of fig. 5 is a block diagram of only a portion of the structure associated with the inventive arrangements and is not intended to limit the terminals to which the inventive arrangements may be applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a terminal is provided, which includes: the processor and the memory, the memory stores a multi-framework adapted micro-service deployment program, and the multi-framework adapted micro-service deployment program is used for realizing the operation of the multi-framework adapted micro-service deployment method when being executed by the processor.
In one embodiment, a storage medium is provided, wherein the storage medium stores a multi-framework adapted micro-service deployment program, and the multi-framework adapted micro-service deployment program is used for implementing the operation of the multi-framework adapted micro-service deployment method as above when being executed by a processor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by instructing relevant hardware by a computer program, and the computer program may be stored in a non-volatile storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory.
In summary, the present invention provides a method, an apparatus, a terminal and a storage medium for adapting multi-frame microservice deployment, wherein the method comprises: acquiring algorithm frame information in an algorithm management interface, and storing the algorithm frame information of a corresponding field through a Mysql database; acquiring submitted algorithm name information, and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information; and calling inference application service adapted to the trained deep learning model through the model management layer, and deploying micro-service corresponding to the trained deep learning model according to the inference application service. The method calls the adaptive inference application service through the model management layer, standardizes the difference of model storage modes trained by different frames, unifies the training, inference resource specification and storage requirements of the model, can be compatible with a plurality of frames and different types of hardware equipment, and is convenient for a user to efficiently and quickly deploy the deep learning model application service.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (13)

1. A method for adapting multi-frame microservice deployment, comprising:
acquiring algorithm frame information in an algorithm management interface, and storing the algorithm frame information of corresponding fields through a Mysql database;
obtaining submitted algorithm name information, and sending a trained deep learning model in a training management layer to a model management layer according to the submitted algorithm name information;
and calling inference application service adapted to the trained deep learning model through the model management layer, and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
2. The method for multi-frame adapted micro-service deployment according to claim 1, wherein the algorithm frame information comprises: algorithm name information, algorithm framework information, and model name information.
3. The multi-frame-adaptive micro-service deployment method as claimed in claim 2, wherein the obtaining of the algorithm frame information in the algorithm management interface stores the algorithm frame information of the corresponding field through a Mysql database, and comprises:
acquiring algorithm name information, algorithm frame information and model name information corresponding to each deep learning model in the algorithm management interface;
and storing the algorithm name information, the algorithm frame information and the model name information of the corresponding fields through a Mysql database to generate the mapping relation of the algorithm name information, the algorithm frame information and the model name information.
4. The method for multi-frame-adapted micro-service deployment as claimed in claim 1, wherein the obtaining of submitted algorithm name information and sending of the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information comprises:
acquiring submitted algorithm name information in the training management layer;
calling a corresponding data set and a training mirror image according to the submitted algorithm name information;
training according to the data set and the training mirror image to obtain the trained deep learning model;
and sending the trained deep learning model to the model management layer.
5. The method for multi-frame-adapted microservice deployment according to claim 4, wherein said training based on said data set and said training image to obtain said trained deep learning model comprises:
training a corresponding algorithm according to the data set and the training mirror image to obtain a trained algorithm;
obtaining a model and version information corresponding to the trained algorithm according to the mapping relation between the algorithm name information and the model name information;
and storing the obtained model and version information to obtain the trained deep learning model.
6. The multi-frame adapted micro-service deployment method as claimed in claim 4, wherein said sending said trained deep learning model to said model management layer, thereafter comprises:
storing the trained deep learning model in a designated object storage service according to the configured format and path.
7. The method for deploying multi-frame adaptive micro-services according to claim 1, wherein invoking, by the model management layer, an inference application service adapted to the trained deep learning model, and deploying micro-services corresponding to the trained deep learning model according to the inference application service comprises:
packaging the trained deep learning model according to a configured file format;
and invoking inference application service adapted to the trained deep learning model according to preset service configuration information, and deploying micro-service corresponding to the packaged deep learning model.
8. The method for multi-frame-adapted microservice deployment according to claim 7, wherein said packaging said trained deep learning model according to a configured file format comprises:
determining a format of the yaml file according to a frame corresponding to the trained deep learning model;
reading configuration parameters corresponding to the trained deep learning model from an api interface of a service management layer;
and packaging the trained deep learning model into a model in a yaml file format according to the read configuration parameters.
9. The method for deploying multi-frame adapted micro-services according to claim 8, wherein the invoking an inference application service adapted to the trained deep learning model according to preset service configuration information to deploy micro-services corresponding to the packaged deep learning model comprises:
according to the service configuration information set in the yaml file;
submitting the packaged deep learning model to a cluster scheduling and container service management layer for allocation processing of reasoning and computing resources;
and deploying the micro-service corresponding to the packaged deep learning model according to the distributed inference calculation resources.
10. The method for deploying multi-frame adapted micro-services according to claim 9, wherein deploying micro-services corresponding to the encapsulated deep learning model according to the allocated computing resources comprises:
constructing a derived class, and loading a deep learning model packaged in an Apis layer;
selecting distributed reasoning computing resources, acquiring model input parameters through an exposed api interface, and returning reasoning response information;
and deploying the micro-service corresponding to the packaged deep learning model according to the inference response information.
11. An adaptive multi-frame microservice deployment device, comprising:
the algorithm management module is used for acquiring algorithm frame information in an algorithm management interface and storing the algorithm frame information of corresponding fields through a Mysql database;
the training management module is used for acquiring submitted algorithm name information and sending the trained deep learning model in the training management layer to the model management layer according to the submitted algorithm name information;
and the model management module is used for calling inference application service adapted to the trained deep learning model through the model management layer and deploying micro-service corresponding to the trained deep learning model according to the inference application service.
12. A terminal, comprising: a processor and a memory, the memory storing an adapted multi-framework micro-service deployment program, the adapted multi-framework micro-service deployment program when executed by the processor being configured to implement the operations of the adapted multi-framework micro-service deployment method according to any of claims 1-10.
13. A storage medium, which is a computer-readable storage medium, and which stores a multi-framework adapted micro-service deployment program, and when the multi-framework adapted micro-service deployment program is executed by a processor, the multi-framework adapted micro-service deployment program is configured to implement the operation of the multi-framework adapted micro-service deployment method according to any one of claims 1 to 10.
CN202211011412.6A 2022-08-23 2022-08-23 Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium Pending CN115437647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211011412.6A CN115437647A (en) 2022-08-23 2022-08-23 Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211011412.6A CN115437647A (en) 2022-08-23 2022-08-23 Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115437647A true CN115437647A (en) 2022-12-06

Family

ID=84244280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211011412.6A Pending CN115437647A (en) 2022-08-23 2022-08-23 Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115437647A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116009960A (en) * 2023-02-14 2023-04-25 花瓣云科技有限公司 Target micro-service migration method, system and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116009960A (en) * 2023-02-14 2023-04-25 花瓣云科技有限公司 Target micro-service migration method, system and electronic equipment
CN116009960B (en) * 2023-02-14 2024-01-23 花瓣云科技有限公司 Target micro-service migration method, system and electronic equipment

Similar Documents

Publication Publication Date Title
CN107562472B (en) Micro-service system and method based on docker container
CN108614726B (en) Virtual machine creation method and device
CN109684054A (en) Information processing method and device, electronic equipment and memory
CN112035228B (en) Resource scheduling method and device
CN110413288A (en) Using dispositions method, device, server and storage medium
CN111984270A (en) Application deployment method and system
CN109446648B (en) Simulation service establishing method and device
CN111858101A (en) Cloud architecture system-oriented adaptation method, device, equipment and storage medium
CN112395736A (en) Parallel simulation job scheduling method of distributed interactive simulation system
CN114296933A (en) Implementation method of lightweight container under terminal edge cloud architecture and data processing system
CN115525396A (en) Application management method and device based on cloud protogenesis
CN115437647A (en) Multi-frame-adaptive micro-service deployment method, device, terminal and storage medium
CN112698930B (en) Method, device, equipment and medium for obtaining server identification
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN111683005B (en) Internet of things intelligent gateway equipment and construction method thereof
CN112732677A (en) Block link point deployment method, device, equipment and storage medium
CN116360918A (en) Modeling data processing method, modeling data processing device, computer equipment and storage medium
CN116436794A (en) OPC real-time data integration and control method based on Internet of things model
CN113568603B (en) Component object creating and interface method calling method, terminal and storage device
CN115202820A (en) Method, device and equipment for creating Pod unit and storage medium
CN115328611A (en) Virtual machine management method, device, server and readable storage medium
CN115344361A (en) Management method and management system of computing nodes
CN110971665A (en) Management method, system, equipment and storage medium for interfacing multi-type storage
CN110050291B (en) Aggregation platform, demand owner and methods thereof

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