CN115686733A - Service deployment method and device, electronic equipment and storage medium - Google Patents

Service deployment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115686733A
CN115686733A CN202110857289.9A CN202110857289A CN115686733A CN 115686733 A CN115686733 A CN 115686733A CN 202110857289 A CN202110857289 A CN 202110857289A CN 115686733 A CN115686733 A CN 115686733A
Authority
CN
China
Prior art keywords
mirror image
generating
image
type
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
CN202110857289.9A
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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202110857289.9A priority Critical patent/CN115686733A/en
Publication of CN115686733A publication Critical patent/CN115686733A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a service deployment method and device, electronic equipment and a storage medium. The service deployment method comprises the following steps: generating a first mirror image and a second mirror image based on a set development framework; the first mirror image represents a container mirror image used for model training; the second image represents a container image for service deployment; generating and training at least one algorithm model by calling the first mirror image; generating and deploying a first service based on one or more of the at least one algorithmic model by invoking the second image.

Description

Service deployment method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a service deployment method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of Artificial Intelligence (AI) technology, AI services play an increasingly important role in human life. The AI service construction generally comprises three steps of algorithm development, model training and service deployment. In the related technology, the development processes of algorithm development, model training and service deployment are mutually independent, the overall development efficiency is low, and the trained model cannot be directly deployed to the production environment for normal operation.
Disclosure of Invention
In view of this, embodiments of the present application mainly aim to provide a service deployment method, an apparatus, an electronic device, and a storage medium, so as to solve the problems in the related art that the overall development efficiency is low when an AI service is constructed, and a trained model cannot be directly deployed to a production environment for normal operation.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
the embodiment of the application provides a service deployment method, which comprises the following steps:
generating a first mirror image and a second mirror image based on a set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment;
generating and training at least one algorithm model by calling the first mirror image;
generating and deploying a first service based on one or more of the at least one algorithmic model by invoking the second image.
In the above solution, the generating a first mirror image and a second mirror image based on a set development framework includes:
generating a first type of logic code and a second type of logic code based on a set development framework;
generating the first mirror image based on the acquired set code part of the first type of logic codes and the first operating environment corresponding to the first type of logic codes;
generating the second mirror image based on the acquired set code part of the second type of logic codes and a second running environment corresponding to the second type of logic codes; wherein, the first and the second end of the pipe are connected with each other,
the first type of logic code represents logic code for model training; the second type of logic code characterizes logic code for service deployment.
In the above scheme, after the generating the first type of logic code and the second type of logic code, the method further includes:
extracting set code parts of the first type logic codes and the second type logic codes;
and storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
In the foregoing solution, after the generating the first mirror image and the second mirror image, the method further includes:
and configuring the corresponding relation between the first mirror image and the second mirror image and a starting command.
In the above solution, the generating and training at least one algorithm model by calling the first mirror image includes:
receiving first parameter information input by a user, and creating a first starting command based on the first parameter information;
inquiring the corresponding relation, and determining that the first starting command corresponds to the first mirror image;
calling the first mirror image, and generating and training at least one algorithm model corresponding to the first parameter information; wherein, the first and the second end of the pipe are connected with each other,
the first start command is used to start a model training task.
In the above solution, the first parameter information includes at least one of:
the name of the algorithm model;
describing an algorithm model;
and (4) taking the parameter value of the algorithm model.
In the above solution, the generating and deploying a first service based on one or more algorithm models in the at least one algorithm model by invoking the second mirror image includes:
receiving second parameter information input by a user, and creating a second starting command based on the second parameter information;
inquiring the corresponding relation, and determining that the second starting command corresponds to the second mirror image;
calling the second mirror image, and generating and deploying a first service based on one or more algorithm models corresponding to the second parameter information in the at least one algorithm model; wherein the content of the first and second substances,
the second starting command is used for starting a service deployment task, and the second parameter information at least comprises the name of the algorithm model.
An embodiment of the present application further provides a device for deploying a service, where the device includes:
the generating unit is used for generating a first mirror image and a second mirror image based on the set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment;
the training unit is used for generating and training at least one algorithm model by calling the first mirror image;
and the deployment unit is used for generating and deploying the first service based on one or more algorithm models in the at least one algorithm model by calling the second mirror image.
An embodiment of the present application further provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein,
the processor is adapted to perform the steps of any of the above methods when running the computer program.
Embodiments of the present application further provide a storage medium on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the above methods.
In the embodiment of the application, a first mirror image and a second mirror image are generated based on a set development framework, wherein the first mirror image represents a container mirror image used for model training, and the second mirror image represents a container mirror image used for service deployment. At least one algorithm model is generated and trained by calling the first mirror image. Generating and deploying the first service based on one or more of the at least one algorithmic model by invoking the second image. Therefore, the three steps of algorithm development, algorithm model training and service deployment are completed in the same development environment, the same flow can be shared for development, and the overall development efficiency in the process of constructing the AI service is improved. And by calling the second mirror image, the trained algorithm model can be directly deployed to the production environment to normally operate, so that the deployment difficulty of the AI service is reduced.
Drawings
Fig. 1 is a schematic implementation flow diagram of a service deployment method provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a service deployment method provided in an application embodiment of the present application;
fig. 3 is a schematic flowchart of another service deployment method provided in an application embodiment of the present application;
FIG. 4 is a schematic diagram of a device for deploying services provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware component structure of an electronic device according to an embodiment of the present application.
Detailed Description
AI is also known as machine intelligence and refers to the intelligence exhibited by machines manufactured by humans. Generally, AI refers to the implementation of human-like intelligence techniques by ordinary computer programs. Along with the continuous improvement of the technology level, the application of the AI is more and more extensive, and therefore, the whole process of developing, training, deploying and providing services of the AI model is more and more important. The AI platform can bear the functions of the whole process, so that data management, data exploration, algorithm development, model management, service deployment and the like become simpler, quicker and more efficient.
In the related art, jupyter notewood is generally deployed on a virtual machine for interactive computing, and data exploration and algorithm development are performed through Jupyter notewood. Based on a self-developed container mirror image, a Directed Acyclic Graph (DAG) is constructed by programming a Domain Specific Language (DSL), an algorithm template is generated based on the DAG, and model training can be repeatedly performed by using the algorithm template after different parameters are Specified, so that a well-trained model is obtained. And then independently constructing a mirror image for service deployment, and verifying and deploying the trained model based on the mirror image for service deployment. The container is a lightweight and portable software package, so that the application program can run in the same way in any environment, and the container contains content required by running the application program, such as running codes, running environments, system tools, system libraries, settings and the like. The container image is a static file containing the file system and configuration information for a particular container, and is the basis for starting a container. The entire contents of each type of service may be stored in a mirror and then started into a container. DSL is a programming language optimized for a specific type of problem, a higher level of abstraction, and is commonly used in the professional world. DAGs, also known as directed acyclic graphs, are commonly used to represent linear relationships between multiple entities.
Therefore, in the related art, when the AI service is constructed, the processes of algorithm development, model training and service deployment are mutually independent and cannot be developed by sharing the same environment. Due to the fact that no fixed flow tool exists, various errors are prone to occur in the development process. And the operation threshold is high, the user needs to know the container mirror operation, DSL, and the like. There are many operations in the flow that need to be repeatedly performed manually, resulting in low development efficiency. The training environment of the model is separated from the deployment environment of the service, and the trained model cannot be directly deployed and normally run.
That is to say, when an AI service is constructed, there are also technical problems that the overall development efficiency is low, and the trained model cannot be directly deployed to the production environment for normal operation.
Based on this, the embodiment of the application provides a service deployment method, a service deployment device, an electronic device and a storage medium, and a first mirror image and a second mirror image are generated based on a set development framework, wherein the first mirror image represents a container mirror image used for model training, and the second mirror image represents a container mirror image used for service deployment. At least one algorithm model is generated and trained by calling the first mirror image. Generating and deploying the first service based on one or more of the at least one algorithmic model by invoking the second image. Therefore, the three steps of algorithm development, algorithm model training and service deployment are completed in the same development environment, the development can be carried out by sharing the same flow, and the overall development efficiency in the process of constructing the AI service is improved. And by calling the second mirror image, the trained algorithm model can be directly deployed to the production environment to normally operate, so that the deployment difficulty of the AI service is reduced.
The present application will be described in further detail with reference to the following drawings and examples.
Fig. 1 is a schematic implementation flow diagram of a service deployment method provided in an embodiment of the present application. As shown in fig. 1, the method includes:
step 101: generating a first mirror image and a second mirror image based on a set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment.
Here, algorithm development is performed based on a set development framework, and a first image and a second image are generated. The first image characterizes a container image for model training and the second image characterizes a container image for service deployment. The defined development framework is provided by a defined container. In a specific development process, algorithm development can be carried out based on a basic mirror image provided by a set development framework, the basic mirror image has rich functions and can be compatible with various algorithm frameworks, and therefore initial data processing and algorithm development can be carried out based on the basic mirror image.
In practical applications, algorithm Development can be performed based on an Integrated Development Environment (IDE) framework and/or a data science Development framework Jupyterlab.
In one embodiment, the generating a first image and a second image based on the set development framework includes:
generating a first type of logic code and a second type of logic code based on a set development framework;
generating the first mirror image based on the acquired set code part of the first type of logic codes and a first running environment corresponding to the first type of logic codes;
generating the second mirror image based on the acquired set code part of the second type of logic codes and a second running environment corresponding to the second type of logic codes; wherein, the first and the second end of the pipe are connected with each other,
the first type of logic code characterizes logic code for model training; the second type of logic code characterizes logic code for service deployment.
Here, after algorithm development is performed based on a set development framework, a first type of logic code and a second type of logic code are obtained. The first type of logic code represents logic code for model training, and the second type of logic code represents logic code for service deployment.
And generating a first mirror image based on the acquired set code part of the first type of logic code and the corresponding first operating environment. The set code portions characterize the key code portions of each type of logical code. Specifically, the key code portion of the first type of logic code and the first execution environment are compressed and packaged into a first image. And after the first mirror image is obtained, storing the first mirror image into a mirror image list in a mirror image warehouse in the container.
And generating a second mirror image based on the acquired set code part of the second type logic code and the corresponding second operating environment. Specifically, the key code portion of the second type of logic code and the second execution environment are compressed and packaged into a second image. And after the second image is obtained, storing the second image into an image list in an image warehouse in the container.
In the generation of the image, only the key code portion of each type of logical code is used, and the entire logical code including the temporary code portion and the redundant code portion is not used, so that the generated image can be applied to various environments, and the application capability of the generated image can be improved.
After performing algorithm development based on the set development framework and generating the first type logic code and the second type logic code, the method may further include: and updating the basic mirror image based on the new operation environment of the basic mirror image after the algorithm development. Therefore, algorithm development can be carried out on the basis of more perfect basic mirror images in the subsequent development process, and the efficiency of algorithm development is improved.
In practical application, a user can compress and pack the key part of each type of logic code and the corresponding operating environment by clicking a setting key on a page provided by a development frame, so that a corresponding mirror image is generated.
The corresponding mirror image is generated through the set code part of the generated logic code and the corresponding running environment, so that the corresponding task is deployed based on the corresponding mirror image, all the development processes can be carried out in the same container, and the problem of incompatibility of the development environments is avoided.
In an embodiment, after the generating the first type of logic code and the second type of logic code, the method further comprises:
extracting set code parts of the first type logic codes and the second type logic codes;
and storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
Here, after the first type of logic code and the second type of logic code are generated, the set code portions of the first type of logic code and the second type of logic code are extracted. And storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
After the set code part of each type of logic code is stored in the set directory, when a corresponding mirror image is generated based on each type of logic code, the set directory can be accessed, the set code part of each type of logic code stored in the set directory is obtained, and then the corresponding mirror image is generated by combining the running environment corresponding to each type of logic code.
By storing the set code part of each type of logic code into the set catalog, the corresponding mirror image can be generated conveniently based on the key code part of each type of logic code, and the application capability of the generated mirror image is improved. And because the generated mirror image does not contain temporary code parts and redundant code parts, the memory occupied by the generated mirror image is reduced.
Step 102: and generating and training at least one algorithm model by calling the first mirror image.
Here, the container may be automatically trained to complete at least one algorithm model by invoking the first mirror and creating a model training task based on the algorithm template contained in the container itself. After the training is finished, storing the trained at least one algorithm model into a model warehouse in the container, wherein the storage catalog of the model warehouse is a first catalog.
In an embodiment, after the generating the first image and the second image, the method further comprises:
and configuring the corresponding relation between the first mirror image and the second mirror image and a starting command.
Here, after the first image and the second image are generated, the correspondence of each image with the start command is configured. The start command is used to start a task corresponding to the image. Exemplarily, the start command corresponding to the first image is configured to be/aip/image _ run/train _ start. And configuring a start command corresponding to the second mirror as/aip/image _ run/predict _ start.
By configuring the corresponding relation between the mirror image and the starting command in advance, when the mirror image is applied, the corresponding mirror image can be called and the corresponding task can be started based on the corresponding starting command, so that the development process is simplified, and the development efficiency is improved.
In one embodiment, the generating and training at least one algorithm model by calling the first mirror image includes:
receiving first parameter information input by a user, and creating a first starting command based on the first parameter information;
inquiring the corresponding relation, and determining that the first starting command corresponds to the first mirror image;
calling the first mirror image, and generating and training at least one algorithm model corresponding to the first parameter information; wherein the content of the first and second substances,
the first start command is used to start a model training task.
Here, first parameter information input by a user is received, and a first start command is created based on the first parameter information. The first start command is used to start a model training task.
In an embodiment, the first parameter information comprises at least one of:
the name of the algorithm model;
describing an algorithm model;
and (4) taking the parameter value of the algorithm model.
The first parameter information comprises at least one of the name of the algorithm model, the description of the algorithm model and the parameter value of the algorithm model, wherein the description of the algorithm model can be used for describing the purpose of the algorithm model. Illustratively, the first parameter information input by the user may be Local _ n _ estimators, the size of estimators, 150. The representation user wants to obtain a model of the local random forest, the description content is the number of the sub data sets in the random forest algorithm, and the specific number of the sub data sets is 150.
By receiving the parameter information input by the user, the algorithm model required to be obtained by the user is trained based on the input parameter information, and the obtaining difficulty of the algorithm model is reduced.
The method comprises the steps of constructing a first starting command based on first parameter information input by a user, and specifically, adding content contained in the first parameter information to the starting command to generate the first starting command. Exemplarily, in the case that the first parameter information includes three parameters, namely, a name of the algorithm model, a description of the algorithm model, and a parameter value of the algorithm model, all of the three parameters need to be added to the start command to generate the first start command. The specific fields of the first start command are as follows:
command:[bash,-c]
args:["{{inputs.parameters.start_run}}"]
parameters:
{name:start_run,value:"/aip/image_run/train_start.sh arg1 arg2 arg3"}
wherein, arg1, arg2, arg3 represent three parameters input by the user respectively.
Because the corresponding relation between the first mirror image and the starting command is configured in advance, after the first starting command is created, the corresponding relation is inquired, and the first mirror image corresponding to the first starting command can be obtained. Therefore, the first mirror image is called from the mirror image list, and the algorithm model corresponding to the name of the algorithm model in the first parameter information is generated and trained. Because the container comprises a plurality of algorithm templates, the task of model training can be created by combining the first parameter information input by the user and the first mirror image, and the container can automatically train to complete at least one algorithm model. Illustratively, the algorithm model name included in the first parameter information is a, and then the first mirror image is called to generate and train the completed algorithm model a.
In practical application, a Pipeline model Pipeline of a container completes data processing, model training and batch processing tasks. Pipeline realizes the streaming encapsulation and management of four steps of source data preprocessing, feature extraction, model training and verification, and can abstract the four steps into a pipelined work comprising a plurality of steps. The Pipeline contained in the container has three main purposes, namely model training based on parameter information input by a user, feature exploration and automatic selection of parameter information for model training.
After the first mirror image is called, the first mirror image is used as a parameter and is filled into a parameter list of Pipeline, first parameter information input by a user is also filled into the parameter list of the Pipeline, after resource configuration is carried out, a model training task is established, and training of an algorithm model is started.
Through the mode of packing the training flow by Pipeline, a user does not need to understand container docker, arranging management tool k8s, constructing operation period, training scheduling and other related knowledge, and can train the model only by inputting simple parameter information, so that the use threshold of the user is reduced. In some embodiments, contained within the container is also a Pipeline that dynamically generates a DAG based on the user-entered parameter information.
The training of the algorithm model is completed by calling the first mirror image based on the parameter information of the user, so that the difficulty of obtaining the algorithm model is reduced, and the training efficiency of the algorithm model is improved.
Step 103: generating and deploying a first service based on one or more of the at least one algorithmic model by invoking the second image.
Here, a first service is generated and deployed based on one or more of the trained at least one algorithmic model by invoking the second image.
It should be noted that the second image is not only a container image for service deployment, but also a container image for reasoning and verification. Therefore, after the second mirror image is called, the first catalog in the container is accessed, the trained at least one algorithm model is obtained from the model warehouse, inference verification is carried out on one or more algorithm models in the obtained at least one algorithm model based on the second mirror image, and after the verification result meets the set standard, deployment of the first service is carried out based on the verified one or more algorithm models.
In some embodiments, the second image may be used to inferentially validate the algorithm models already present in the container in addition to the algorithm models trained and completed in step S102. Specifically, after the second mirror image is called, the first directory is accessed, the existing algorithm model in the container is obtained from the model warehouse, the obtained algorithm model in the container is subjected to reasoning verification based on the second mirror image, and after the verification result meets the set standard, service deployment is performed based on the verified algorithm model in the container, so that the aims of quickly verifying and deploying the existing algorithm model in the container are fulfilled.
In practical application, the script of the second mirror image can be written in advance according to a set format, so that when the second mirror image is called, whether the algorithm model can be directly deployed in a production environment or not can be quickly verified based on the script.
In an embodiment, said generating and deploying a first service based on one or more of said at least one algorithmic model by invoking said second image comprises:
receiving second parameter information input by a user, and creating a second starting command based on the second parameter information;
inquiring the corresponding relation, and determining that the second starting command corresponds to the second mirror image;
calling the second mirror image, and generating and deploying a first service based on one or more algorithm models corresponding to the second parameter information in the at least one algorithm model; wherein the content of the first and second substances,
the second starting command is used for starting a service deployment task, and the second parameter information at least comprises the name of the algorithm model.
Here, second parameter information input by a user is received, the second parameter information including at least a name of the algorithm model. And creating a second starting command based on the second parameter information, and characterizing the task that the user wants to start the service deployment.
Because the corresponding relation between the second mirror image and the starting command is configured in advance, after the second starting command is created, the corresponding relation is inquired, and the second mirror image corresponding to the second starting command can be obtained. Therefore, the second mirror image is called, and the first service is generated and deployed based on one or more algorithm models corresponding to the second parameter information in the trained algorithm models. Illustratively, the name of the algorithm model in the second parameter information is B, and the trained algorithm model is A, B, C, D, then the second mirror image is called, and the algorithm model B is selected from the algorithm model A, B, C, D to generate and deploy the first service.
The service deployment of the algorithm model is completed by calling the second mirror image based on the parameter information of the user, and because the training environment and the service deployment environment of the algorithm model are both in the container, the problem of environment incompatibility during service deployment is avoided, and the service deployment efficiency of the algorithm model is improved.
Fig. 2 is a schematic flow chart of a service deployment method provided in an application embodiment of the present application, as shown in fig. 2:
it should be noted that all the processes in fig. 2 are completed in one container.
The method comprises the steps of calling a basic mirror image included in a Dockerfile package, carrying out algorithm development based on the basic mirror image to obtain a logic code for model training and a logic code for service deployment, namely a first class of logic code and a second class of logic code, generating the first mirror image based on a key code part of the first class of logic code and a corresponding operating environment, and generating the second mirror image based on a key code part of the second class of logic code and a corresponding operating environment. The Dockerfile package is a text document for combining mirror image commands, and is generally divided into four parts, namely a basic mirror image, maintainer information, mirror image operation instructions and execution instructions during container starting. The first image and the second image are stored in an image list, and the image list also comprises a base image and a plurality of external images. After algorithm development, a new runtime environment of the base image is saved and the base image is updated based on the new runtime environment.
When parameter information of a user is received, a first starting command is generated based on the parameter information, a first mirror image creation algorithm template/node is called based on the first starting command, and then a task of model training is created after resource configuration is carried out based on a value of the parameter information input by the user. And storing the trained algorithm model in a model warehouse.
And when another type of parameter information of the user is received, generating a second starting command based on the another type of parameter information, calling a second mirror image based on the second starting command, and selecting a corresponding algorithm model from a model warehouse for batch processing and web service deployment.
Fig. 3 is a schematic flow chart of another service deployment method provided in an application embodiment of the present application, as shown in fig. 3:
after algorithm development is carried out based on the basic mirror image, a first mirror image is generated, a starting command corresponding to the first mirror image is configured, and the first mirror image specifies a path for outputting/loading the trained algorithm model.
The container contains Pipeline, the first mirror image and parameter information input by a user are filled into a parameter list of the Pipeline to form the Pipeline capable of model training, a model training task is formed by combining numerical values of the parameter information input by the user after resource configuration is carried out, and training of the algorithm model is started.
The Pipeline contained in the container has three purposes, namely model training based on parameter information input by a user, feature exploration and model training by automatically selecting the parameter information.
In some application scenarios, contained within the container is also a Pipeline that dynamically generates a DAG based on user-entered parameter information. The DAG is composed of a plurality of nodes, each node corresponding to a different processing task.
In the embodiment of the application, a first mirror image and a second mirror image are generated based on a set development framework, wherein the first mirror image represents a container mirror image used for model training, and the second mirror image represents a container mirror image used for service deployment. At least one algorithm model is generated and trained by calling the first mirror image. Generating and deploying the first service based on one or more of the at least one algorithmic model by invoking the second image. Therefore, the three steps of algorithm development, algorithm model training and service deployment are completed in the same development environment, the same flow can be shared for development, and the overall development efficiency in the process of constructing the AI service is improved. And by calling the second mirror image, the trained algorithm model can be directly deployed to the production environment to normally operate, so that the deployment difficulty of the AI service is reduced.
In order to implement the method according to the embodiment of the present application, an embodiment of the present application further provides a service deployment apparatus, fig. 4 is a schematic diagram of the service deployment apparatus provided in the embodiment of the present application, please refer to fig. 4, where the apparatus includes:
a generating unit 401 configured to generate a first mirror image and a second mirror image based on the set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment.
A training unit 402, configured to generate and train to complete at least one algorithm model by invoking the first mirror image.
A deployment unit 403, configured to generate and deploy the first service based on one or more algorithm models of the at least one algorithm model by invoking the second image.
In an embodiment, the generating unit 401 is further configured to generate a first type of logic code and a second type of logic code based on a set development framework;
generating the first mirror image based on the acquired set code part of the first type of logic codes and the first operating environment corresponding to the first type of logic codes;
generating the second mirror image based on the acquired set code part of the second type of logic codes and a second running environment corresponding to the second type of logic codes; wherein the content of the first and second substances,
the first type of logic code characterizes logic code for model training; the second type of logic code characterizes logic code for service deployment.
In one embodiment, the apparatus further comprises: an extraction unit and a storage unit;
the extracting unit is used for extracting the setting code parts of the first type logic codes and the second type logic codes.
The storage unit is used for storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
In one embodiment, the apparatus further comprises: and the configuration unit is used for configuring the corresponding relation between the first mirror image and the second mirror image and the starting command.
In an embodiment, the training unit 402 is further configured to receive first parameter information input by a user, and create a first start command based on the first parameter information;
inquiring the corresponding relation, and determining that the first starting command corresponds to the first mirror image;
calling the first mirror image, and generating and training at least one algorithm model corresponding to the first parameter information; wherein the content of the first and second substances,
the first start command is used to start a model training task.
In an embodiment, the first parameter information comprises at least one of:
the name of the algorithm model;
describing an algorithm model;
and (4) taking the parameter value of the algorithm model.
In an embodiment, the deployment unit 403 is further configured to receive second parameter information input by a user, and create a second start command based on the second parameter information;
inquiring the corresponding relation, and determining that the second starting command corresponds to the second mirror image;
calling the second mirror image, and generating and deploying a first service based on one or more algorithm models corresponding to the second parameter information in the at least one algorithm model; wherein the content of the first and second substances,
the second starting command is used for starting a service deployment task, and the second parameter information at least comprises the name of the algorithm model.
In practical applications, the generating Unit 401, the training Unit 402, the deploying Unit 403, the extracting Unit, the storing Unit, and the configuring Unit may be implemented by a Processor in a terminal, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA).
It should be noted that: in the service deployment apparatus provided in the above embodiment, when displaying information, only the division of each program module is illustrated, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the processing described above. In addition, the service deployment apparatus and the service deployment method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Based on the hardware implementation of the program module, and in order to implement the method of the embodiment of the present application, an embodiment of the present application further provides an electronic device. Fig. 5 is a schematic diagram of a hardware component structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, the electronic device includes:
a communication interface 501 capable of performing information interaction with other devices such as network devices and the like;
the processor 502 is connected to the communication interface 501 to implement information interaction with other devices, and is configured to execute the method provided by one or more technical solutions of the terminal side when running a computer program. And the computer program is stored on the memory 503.
Specifically, the processor 502 is configured to generate a first image and a second image based on a set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment;
generating and training at least one algorithm model by calling the first mirror image;
generating and deploying a first service based on one or more of the at least one algorithmic model by invoking the second image.
In an embodiment, the processor 502 is further configured to generate a first type of logic code and a second type of logic code based on a set development framework;
generating the first mirror image based on the acquired set code part of the first type of logic codes and the first operating environment corresponding to the first type of logic codes;
generating the second mirror image based on the acquired set code part of the second type of logic code and a second running environment corresponding to the second type of logic code; wherein the content of the first and second substances,
the first type of logic code characterizes logic code for model training; the second type of logic code characterizes logic code for service deployment.
In an embodiment, after the generating of the first type of logic code and the second type of logic code, the processor 502 is further configured to extract a set code portion of the first type of logic code and the second type of logic code;
and storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
In an embodiment, after the generating the first image and the second image, the processor 502 is further configured to configure a correspondence between the first image and the second image and a start command.
In an embodiment, the processor 502 is further configured to receive first parameter information input by a user, and create a first start command based on the first parameter information;
inquiring the corresponding relation, and determining that the first starting command corresponds to the first mirror image;
calling the first mirror image, and generating and training at least one algorithm model corresponding to the first parameter information; wherein the content of the first and second substances,
the first start command is used to start a model training task.
In an embodiment, the first parameter information comprises at least one of:
the name of the algorithm model;
describing an algorithm model;
and (4) taking the parameter value of the algorithm model.
In an embodiment, the processor 502 is further configured to receive second parameter information input by a user, and create a second start command based on the second parameter information;
inquiring the corresponding relation, and determining that the second starting command corresponds to the second mirror image;
calling the second mirror image, and generating and deploying a first service based on one or more algorithm models corresponding to the second parameter information in the at least one algorithm model; wherein the content of the first and second substances,
the second starting command is used for starting a service deployment task, and the second parameter information at least comprises the name of the algorithm model.
Of course, in practice, the various components in the electronic device are coupled together by the bus system 504. It is understood that the bus system 504 is used to enable communications among the components. The bus system 504 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 504 in fig. 5.
The memory 503 in the embodiments of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 503 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a magnetic random access Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), synchronous Static Random Access Memory (SSRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), synchronous Dynamic Random Access Memory (SLDRAM), direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 503 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the processor 502 or implemented by the processor 502. The processor 502 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 502. The processor 502 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 502 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 503, and the processor 502 reads the program in the memory 503 to perform the steps of the aforementioned methods in conjunction with its hardware.
The processor 502 executes the program to implement the corresponding flow in the methods of the embodiments of the present application.
In an exemplary embodiment, the present application further provides a storage medium, i.e. a computer storage medium, specifically a computer readable storage medium, for example, including a memory 503 storing a computer program, which can be executed by a processor 502 to implement the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, terminal and method may be implemented in other manners. The above-described device embodiments are only illustrative, for example, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media capable of storing program code.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for deploying a service, the method comprising:
generating a first mirror image and a second mirror image based on a set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment;
generating and training at least one algorithm model by calling the first mirror image;
generating and deploying a first service based on one or more of the at least one algorithmic model by invoking the second image.
2. The service deployment method of claim 1, wherein generating the first image and the second image based on the set development framework comprises:
generating a first type of logic code and a second type of logic code based on a set development framework;
generating the first mirror image based on the acquired set code part of the first type of logic codes and the first operating environment corresponding to the first type of logic codes;
generating the second mirror image based on the acquired set code part of the second type of logic codes and a second running environment corresponding to the second type of logic codes; wherein the content of the first and second substances,
the first type of logic code characterizes logic code for model training; the second type of logic code characterizes logic code for service deployment.
3. The method for deploying services according to claim 2, wherein after the generating the first type of logic code and the second type of logic code, the method further comprises:
extracting set code parts of the first type logic codes and the second type logic codes;
and storing the setting code part of the first logic code and the setting code part of the second logic code in a setting directory.
4. The method for deploying services according to claim 1, wherein after the generating the first image and the second image, the method further comprises:
and configuring the corresponding relation between the first mirror image and the second mirror image and a starting command.
5. The method for deploying services according to claim 4, wherein the generating and training to complete at least one algorithmic model by invoking the first image comprises:
receiving first parameter information input by a user, and creating a first starting command based on the first parameter information;
inquiring the corresponding relation, and determining that the first starting command corresponds to the first mirror image;
calling the first mirror image, and generating and training at least one algorithm model corresponding to the first parameter information; wherein the content of the first and second substances,
the first start command is used to start a model training task.
6. The method of deploying services according to claim 5, wherein the first parameter information comprises at least one of:
the name of the algorithm model;
describing an algorithm model;
and (4) taking the parameter value of the algorithm model.
7. The service deployment method of claim 4, wherein the generating and deploying the first service based on one or more of the at least one algorithmic model by invoking the second image comprises:
receiving second parameter information input by a user, and creating a second starting command based on the second parameter information;
inquiring the corresponding relation, and determining that the second starting command corresponds to the second mirror image;
calling the second mirror image, and generating and deploying a first service based on one or more algorithm models corresponding to the second parameter information in the at least one algorithm model; wherein the content of the first and second substances,
the second starting command is used for starting a service deployment task, and the second parameter information at least comprises the name of the algorithm model.
8. An apparatus for deploying a service, the apparatus comprising:
the generating unit is used for generating a first mirror image and a second mirror image based on the set development framework; the first mirror image represents a container mirror image used for model training; the second image characterizes a container image for service deployment;
the training unit is used for generating and training at least one algorithm model by calling the first mirror image;
and the deployment unit is used for generating and deploying the first service based on one or more algorithm models in the at least one algorithm model by calling the second mirror image.
9. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor, wherein,
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 when running the computer program.
10. A storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110857289.9A 2021-07-28 2021-07-28 Service deployment method and device, electronic equipment and storage medium Pending CN115686733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110857289.9A CN115686733A (en) 2021-07-28 2021-07-28 Service deployment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110857289.9A CN115686733A (en) 2021-07-28 2021-07-28 Service deployment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115686733A true CN115686733A (en) 2023-02-03

Family

ID=85057733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110857289.9A Pending CN115686733A (en) 2021-07-28 2021-07-28 Service deployment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115686733A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117524445A (en) * 2023-10-19 2024-02-06 广州中康数字科技有限公司 Medical field artificial intelligence engineering platform based on micro-service and containerization technology

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117524445A (en) * 2023-10-19 2024-02-06 广州中康数字科技有限公司 Medical field artificial intelligence engineering platform based on micro-service and containerization technology

Similar Documents

Publication Publication Date Title
CN109189469B (en) Reflection-based android application micro-servitization method and system
CN108897567B (en) Method, device, equipment and storage medium for loading files by software based on Unity
US11667033B2 (en) Systems and methods for robotic process automation
JP5722448B2 (en) Image processing software development method, image processing software development apparatus, and image processing software development program
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN112819153A (en) Model transformation method and device
JP7196194B2 (en) Training Conversational Agents Using Natural Language
CN109542459A (en) Application program packaging method and device, computer installation and computer storage medium
CN111290778A (en) AI model packaging method, platform and electronic equipment
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
US20230177363A1 (en) Generation of query templates for knowledge-graph based question answering system
CN109144511B (en) Method and system for automatically generating numerical simulation graphical user interface
CN114912897A (en) Workflow execution method, workflow arrangement method and electronic equipment
CN113448678A (en) Application information generation method, deployment method, device, system and storage medium
CN115686733A (en) Service deployment method and device, electronic equipment and storage medium
CN115438768A (en) Model reasoning method, device, computer equipment and storage medium
CN114341847A (en) Correspondence of external operations on containers to mutation events
CN116227625A (en) Intelligent model development method, medium and equipment
CN114296883B (en) Light-load virtualized network experimental behavior simulator construction and scheduling method
US11640281B2 (en) Tool for introspection in object-oriented source code
CN115934093A (en) Applet cross-terminal application method, related device and computer storage medium
CN113177292B (en) Universal BIM secondary development implementation method and device
CN115292169A (en) UI automation test method and system
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
CN113485706A (en) DSL-based multi-technology stack front-end code generation method and device

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