CN113961199A - Model deployment system, method, device and storage medium - Google Patents

Model deployment system, method, device and storage medium Download PDF

Info

Publication number
CN113961199A
CN113961199A CN202011515129.8A CN202011515129A CN113961199A CN 113961199 A CN113961199 A CN 113961199A CN 202011515129 A CN202011515129 A CN 202011515129A CN 113961199 A CN113961199 A CN 113961199A
Authority
CN
China
Prior art keywords
target
model
deployment
file
server
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
CN202011515129.8A
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.)
Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Original Assignee
Shenzhen Pingan Zhihui Enterprise Information Management 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 Shenzhen Pingan Zhihui Enterprise Information Management Co ltd filed Critical Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Priority to CN202011515129.8A priority Critical patent/CN113961199A/en
Publication of CN113961199A publication Critical patent/CN113961199A/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/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The application relates to data processing, can be applied to the technical field of artificial intelligence, the embodiment of the application discloses a model deployment system, a method, a device and a storage medium, the system comprises a model deployment terminal, a model deployment server and electronic equipment deployed in a plurality of environments, wherein: the model deployment terminal is used for acquiring a target file associated with a target model and sending a deployment request aiming at the target model to the model deployment server; the model deployment server is used for acquiring and storing a target file according to the deployment request and sending deployment indication information aiming at the target model to target electronic equipment in a target environment; and the target electronic equipment in the target environment is used for acquiring the target file according to the deployment indication information and deploying the target model through the target file, so that the deployment efficiency of the target model is improved. The application relates to a blockchain technology, for example, a target file can be written into a blockchain for use in a target model deployment scenario and the like.

Description

Model deployment system, method, device and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to the field of neural networks, and more particularly, to a model deployment system, method, apparatus, and storage medium.
Background
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
In the field of AI, deployment of AI models is an important research direction. At present, the traditional AI model deployment method needs to rely on numerous third-party modules (such as an environment deployment module, a model operation module, and the like), and the deployment efficiency of the AI model is seriously affected due to the slow installation speed of the third-party modules. Therefore, how to improve the deployment efficiency of the AI model becomes an urgent problem to be solved.
Most of traditional models are developed by using python, the deployment of python programs is usually dependent on numerous software such as python, rpm, anaconda and the like, the installation is complex, and the model deployment is slow.
Disclosure of Invention
The embodiment of the application provides a model deployment system, a method, a device and a storage medium, which are beneficial to improving the deployment efficiency of a target model.
In one aspect, an embodiment of the present application provides a model deployment system, where the model deployment system includes a model deployment terminal, a model deployment server, and electronic devices deployed in multiple environments, where:
the model deployment terminal is used for acquiring a target file associated with a target model, determining a target environment to be deployed with the target model from the plurality of environments, and sending a deployment request aiming at the target model to a model deployment server; receiving and displaying a deployment result of the target model;
the model deployment server is used for acquiring the target file according to the deployment request and storing the target file to a target storage area; sending deployment indication information for the target model to a target electronic device in the target environment; receiving a deployment result of the target model returned by the target electronic equipment, and sending the deployment result of the target model to the model deployment terminal;
and the target electronic equipment in the target environment is used for acquiring the target file according to the deployment indication information, deploying the target model through the target file and returning a deployment result of the target model to the model deployment server.
In an embodiment, an application container engine Docker is pre-deployed in a target electronic device in the target environment, and the target electronic device in the target environment is specifically configured to:
acquiring a Docker mirror image, a model file and environmental information from the target file;
loading the model file and the environment information into a specified directory corresponding to the Docker mirror image;
and triggering the running of the model file in the specified directory.
In an embodiment, the deployment request carries a check code of the target file, and the model deployment server is specifically configured to:
comparing whether the check code of each pre-stored historical file is matched with the check code of the target file or not;
and if the check code of any history file is detected to be matched with the check code of the target file, storing the history file serving as the target file into a target storage area.
In an embodiment, the deployment request carries a check code of the target file, and the model deployment server is further configured to:
and if the check codes of the historical files are not matched with the check codes of the target files, file uploading indication information is sent to the model deployment terminal, and the file uploading indication information is used for indicating the model deployment terminal to send the target files to the model deployment server.
In one embodiment, the model deployment terminal is further configured to:
when file uploading indication information sent by the model deployment server is received, detecting whether the target file is a preset type of file;
if so, slicing the target file to obtain at least one slice file;
uploading the at least one slice file to the model deployment server so that the model deployment server integrates the at least one slice file to obtain the target file.
In one embodiment, the model deployment terminal is further configured to:
when a deployment query instruction for the target model is detected, displaying a deployment result through a deployment result display window, wherein the deployment result is used for indicating that the target model is successfully deployed or failed to be deployed, and the deployment result display window comprises a debugging button;
triggering and inputting debugging parameters through the debugging button;
and sending a debugging request aiming at the target model to any electronic equipment in the target environment, wherein the debugging request comprises the debugging parameters, so that the target model can be operated by any electronic equipment through the debugging parameters, and an operation result is returned to the model deployment terminal.
In an embodiment, the deployment indication information includes a storage address of the target file, and the target electronic device in the target environment is specifically configured to: and acquiring the target file from the target storage area according to the storage address.
In another aspect, an embodiment of the present application provides a model deployment method, where the method is performed by a target electronic device included in a target environment in a model deployment system, and the method includes:
acquiring deployment indication information aiming at a target model, which is sent by a model deployment server;
acquiring a target file associated with the target model according to the deployment indication information, and deploying the target model through the target file;
and returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
In another aspect, an embodiment of the present application provides a model deployment apparatus, where the apparatus is deployed in a target electronic device included in a target environment in a model deployment system, and the apparatus includes:
the communication module is used for acquiring deployment indication information aiming at the target model, which is sent by the model deployment server;
the processing module is used for acquiring a target file associated with the target model according to the deployment indication information and deploying the target model through the target file;
the communication module is further configured to return the deployment result of the target model to the model deployment server, so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
In another aspect, an embodiment of the present application provides an electronic device (for example, a target electronic device included in a target environment in a model deployment system), including a processor, a storage device, and a communication interface, where the processor, the storage device, and the communication interface are connected to each other, where the storage device is used to store a computer program that supports a terminal to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to perform the following steps:
acquiring deployment indication information aiming at a target model, which is sent by a model deployment server;
acquiring a target file associated with the target model according to the deployment indication information, and deploying the target model through the target file;
and returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
According to the embodiment of the application, the deployment indication information aiming at the target model sent by the model deployment server can be obtained, the target file associated with the target model is obtained according to the deployment indication information, and the target model is deployed through the target file. And further, returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to the corresponding model deployment terminal, and the model deployment terminal displays the deployment result. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, so that the deployment of the target model is independent of the installation and the downloading of third-party software, and the deployment efficiency of the target model is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or 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 application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a model deployment system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a model deployment method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a model deployment apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to fig. 1, an embodiment of the present application provides a model deployment system, where the model deployment system includes a model deployment terminal, a model deployment server, and an electronic device deployed in multiple environments, where the model deployment terminal may have a target application installed and run therein, or the model deployment terminal is the target application itself, and the target application may be used to provide a service related to model deployment, for example, a model deployment platform, where the model deployment terminal may be any one of the following: portable devices such as smart phones, tablets, laptops, etc., and desktop computers, etc. Accordingly, the application server is a server providing a corresponding model deployment service for the target application, which may be understood as a background server of the target application, and the application server may be an independent service device or a cluster device formed by a plurality of service devices.
The model deployment terminal is mainly used for providing an operation interface (for example, uploading a model-related file, querying a model deployment result, and the like) for model deployment for a user (such as a model engineer), and may include at least one of the following: APP (Application), web page (e.g., web page running in a browser within the model deployment terminal for presentation to a user for browsing, H5 web page, etc.), etc.; the model deployment server is used for providing model deployment service for the model deployment terminal so as to support the operation of the model deployment terminal. The plurality of environments may be divided into a native environment and a service environment divided according to a service, such as a recruitment environment, a training environment, and the like, and the electronic device in any environment may be a terminal device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like, or may be a server, which is not particularly limited in this application. Specifically, the method comprises the following steps:
the model deployment terminal is used for acquiring a target file associated with the target model, determining a target environment of the target model to be deployed from a plurality of environments, and sending a deployment request aiming at the target model to the model deployment server; and receiving and displaying the deployment result of the target model. The target model may refer to a model related to the field of artificial intelligence, such as a neural network model.
In a specific implementation, when a user (e.g., a model engineer) wants to deploy a target model, the user may log in a model deployment platform through a model deployment terminal, upload a target file associated with the target model through the model deployment platform, and after the target file is uploaded, the user inputs a deployment operation for the target model (e.g., the model deployment terminal displays a deployment button for the target model through a display page, and an operation input by the user for the deployment button, such as clicking, pressing, or voice, is the deployment operation). After detecting the deployment operation, the model deployment terminal may obtain the target file, determine a target environment of the target model to be deployed from the plurality of environments, and send a deployment request for the target model to the model deployment server.
The specific way of determining the target environment of the target model to be deployed from the multiple environments may be: before a user inputs deployment operation, a target environment to be deployed of a target model is set from a plurality of pre-deployed environments, and a model deployment terminal can mark the corresponding relation between the target model and the target environment. Subsequently, when the model deployment terminal detects a deployment operation input for the target model, a target environment to be deployed with the target model (i.e., a model having a correspondence relationship with the target model in the plurality of environments) may be determined from the plurality of environments based on the correspondence relationship.
The target file comprises a model file, environment information and a model operation file of the target model, wherein the model file mainly comprises model data of the target model, the model data is fixed and invariable after the target model is built, and the model data can comprise network parameters of each network layer in the target model and level information of each network layer; the environment information mainly comprises environment parameters of an environment required by the operation of the model file; the model operating file mainly comprises operating parameters required for operating the target file.
In one embodiment, when the deployment of the subsequent target model is implemented by a Docker, then the above-mentioned running file comprises a Docker image. The Docker is an open-source application container engine, so that developers can package their applications and dependency packages into a portable image, and then distribute the image to any popular Linux or Windows machine, and virtualization can be realized. The container completely uses a sandbox mechanism, and no interface exists among the containers; the docker mirror image is pre-provided with target model operation dependent software and a third-party module, wherein the dependent software is numerous pieces of software such as python, rpm, anaconda and the like; the third party module includes a basic function module (e.g., transflow), and the like.
The model deployment server is used for acquiring a target file according to the deployment request and storing the target file to a target storage area; sending deployment indication information aiming at a target model to target electronic equipment in a target environment; and receiving a deployment result of the target model returned by the target electronic equipment, and sending the deployment result of the target model to the model deployment terminal.
In specific implementation, there are multiple ways for the model deployment server to obtain the specific implementation of the target file according to the deployment request, which are as follows:
in a first mode
The deployment request directly carries the target file, and in this case, the model deployment server may directly obtain the target file from the deployment request.
Mode two
In this case, the model deployment server may acquire the check code of the target file from the deployment request, compare whether the check code of each pre-stored history file matches the check code of the target file, and store any history file as the target file in the target storage area if it is detected that the check code of any history file matches the check code of the target file.
The check code is identification information that the target file is different from other files, and the check code may include a cyclic redundancy check code (CRC), an information digest algorithm value (e.g., MD5), and the like. In an embodiment, after receiving the deployment request, the backend server may sequentially compare the check codes of the target file with the check codes of the pre-stored history files, and in the comparison process, if the check codes of the target file are the same as those of any one of the history files, the comparison may be stopped, the history file may be directly multiplexed, and the history file may be stored in the target storage area as the target file. By adopting the mode, the reuse rate of the target file can be improved, the network transmission of data between the model deployment terminal and the model deployment server is reduced, and the acquisition efficiency of the target file is improved.
Or in another embodiment, after the comparison between the check code of the target file and the check codes of all the historical files is finished, if it is detected that the check codes of all the historical files are not matched with the check code of the target file, file upload indication information may be sent to the model deployment terminal, where the file upload indication information is used to indicate the model deployment terminal to send the target file to the model deployment server.
Further, when the model deployment terminal receives file uploading instruction information sent by the model deployment server, whether the target file is a preset type file or not can be detected, if yes, the target file can be sliced to obtain at least one fragment file, and the at least one fragment file is uploaded to the model deployment server. After the model deployment server receives the at least one fragmented file, the at least one fragmented file can be integrated to obtain a target file, and the target file is stored in the target storage area. The target storage area may be a local storage area, a block chain, and a remote server (the remote server may be a common physical server, a server cluster, or a cloud server), which is not specifically limited in this application.
The preset type of file refers to a file with a memory greater than or equal to a memory threshold, and the model deployment terminal may detect whether the target file is greater than or equal to the memory threshold (for example, 20M), and if so, may determine that the target file is a preset type of file, that is, the target file is a "large file". In this case, at least one fragment file may be uploaded to the model deployment server in a breakpoint resuming manner.
The specific process of uploading at least one fragment file to the model deployment server by the model deployment terminal in a breakpoint continuous transmission mode includes:
and S10, after the model deployment terminal obtains at least one fragment file, numbering the fragment files according to the position sequence of the fragment files in the target file, generating a check code for each fragment file, and acquiring the identification information of the target file. Further, file fragment information including the number, the check code, the fragment file and the identification information of the target file of each fragment file may be generated for each fragment file, and the file fragment information of the target fragment file is sequentially uploaded according to the number sequence of each fragment, where the target fragment file is any one of at least one fragment file.
S11, after receiving the file fragment information of the target fragment file, the model deployment server may determine whether the target fragment file has been uploaded according to the number of the target fragment file, and if not, may store the file fragment information of the target fragment file for standby, and return the number of the next fragment file to be uploaded to the model deployment client.
And S12, the model deployment client uploads the file fragment information of the next fragment file of the target fragment file to the model deployment server according to the number of the next fragment file to be uploaded.
And S13, repeatedly executing the steps S11-S12 until the model deployment client finishes uploading the file fragment information of all the fragment files, the model deployment server can acquire the stored file fragment information of all the fragment files, acquire each fragment file and the check code of each fragment file from the file fragment information of all the fragment files, check whether the check code of each fragment file is correct, and if the check codes of all the fragment files are correct, merge all the fragment files to obtain the target file. The file merging method is to merge all the fragment files into one file in turn according to the serial numbers of the fragment files.
Or, if any one of the fragmented files has an incorrect verification code, the fragmented file may be marked as a file which fails to be uploaded (hereinafter referred to as a failed file), and the fragmented file information of the failed file is acquired again from the simulated deployment terminal.
In one embodiment, the target file may be composed of a plurality of subfiles, such as a model file, a file corresponding to the environment information, a model run file, and the like. In this case, the deployment request may carry check codes of each subfile in the target file, and after receiving the deployment request, the model deployment server may compare, in a similar manner as described above, whether the check codes of the prestored history files are the same as the check codes of the subfiles, and if it is detected that the check code of any history file is the same as the check code of the first subfile (which is any one of the subfiles), may directly multiplex the history file without the client re-uploading the first subfile; if it is detected that the check code of any history file is not the same as the check code of the second subfile (the second subfile is any one of the subfiles), file upload indication information may be sent to the client to indicate the client to upload the second subfile. By analogy, the model deployment server may obtain all the subfiles in the target file, that is, obtain the target file, in a similar manner as described above.
When the client uploads the second subfile, whether the second subfile is a file of a preset type or not can be detected, if so, the second subfile can be sliced, and at least one fragment file corresponding to the second subfile is uploaded to the model deployment server in a breakpoint continuous transmission mode, so that the second subfile is uploaded. The specific manner of uploading the at least one fragment file corresponding to the second subfile to the model deployment server by the breakpoint continuous transmission mode may refer to the above-mentioned description of uploading the at least one fragment file corresponding to the target file to the model deployment server, and is not described herein again.
And the target electronic equipment in the target environment is used for acquiring the target file according to the deployment indication information, deploying the target model through the target file and returning the deployment result of the target model to the model deployment server.
In one embodiment, the deployment instruction information includes a storage address of the target file, and the specific implementation manner of the target electronic device in the target environment acquiring the target file is as follows: and acquiring the target file from the target storage area according to the storage address. The target storage area may be a local storage area of the model deployment server, a block chain, a remote server (the remote server may be a common physical server, a server cluster, or a cloud server), and the like.
In an embodiment, an application container engine Docker is pre-deployed in a target electronic device in a target environment, and a specific implementation manner of the target electronic device deploying a target model through a target file may be as follows: and acquiring the Docker mirror image, the model file of the target model and the environment information from the target file, loading the model file and the environment information into a specified directory corresponding to the Docker mirror image, and triggering the running of the model file in the specified directory. Specifically, a Docker image instruction may be called to obtain a Docker image from the target file, a Docker run instruction is called to obtain a model file and environment information of the target model from the target file, the model file and the environment information of the target model are loaded into a specified directory corresponding to the Docker image, and the operation of the model file is triggered in the specified directory, so that the target model is deployed. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, the model is not required to be deployed depending on the downloading of numerous software such as python, rpm, anaconda and the like, the installation of a third-party module is not required, the version conflict depending on a package does not exist, and the model deployment efficiency is improved.
Further, the target electronic device may monitor the operation condition of the model file after triggering the operation of the model file in the designated directory, and may determine the deployment result of the target model based on the operation result and return the deployment result of the target model to the model deployment server through the Docker log record after the operation is finished. And if the deployment result is used for indicating that the target model is failed to deploy, the target electronic device can also return a Docker log to the model deployment server. The model deployment server can send the received deployment result and the Docker log to the model deployment terminal, and the model deployment terminal displays the deployment result and the Docker log.
For a user, the deployment result of the target model can be checked through the model deployment terminal, and if the deployment result is used for indicating that the target model is failed to deploy, the Docker log can be checked through the model deployment terminal to assist the user in locating the reason of the failure of the target model to deploy.
In an embodiment, after the model deployment terminal receives the deployment result, if the deployment result indicates that the target model is successfully deployed, the model deployment terminal may output a deployment success prompt message, so that a user can know that the target model is successfully deployed at the first time and log in a model deployment platform to test whether the target model can be normally used.
Or the deployment result may be actively queried by the user, specifically, when the user wants to query the deployment result of the target model, the model deployment platform may be logged in to input a deployment query instruction for the target model (for example, click a query button for the target model), and when the model deployment terminal detects the deployment query instruction for the target model, the deployment result may be displayed through a deployment result display window, where the deployment result display window includes a debugging button. Furthermore, a debugging button is used for triggering input of debugging parameters, a debugging request aiming at the target model is sent to any electronic device in the target environment, the debugging request comprises the debugging parameters, so that any electronic device can operate the target model through the debugging parameters, an operation result is returned to the model deployment terminal, and the operation result is displayed by the model deployment terminal. The input debugging parameters are associated with a task executed by the target model, for example, if the task executed by the target model is face recognition, the target parameter is a face image.
Further, after the model deployment terminal receives the operation result, if the target model is determined to be operated incorrectly based on the operation result, operation error prompt information can be output. In specific implementation, if the client detects that the target model runs wrongly, a Docker log can be acquired from any one of the electronic devices, the problem is located through the Docker log, and running error prompt information is generated based on the located problem and used for prompting the reason of the running error of the target model.
The embodiment of the present application provides a model deployment method, which is executed by a target electronic device included in a target environment in a model deployment system, and is applicable to the model deployment system, please refer to fig. 2, where the execution steps of the model deployment method include:
s201, acquiring deployment indication information aiming at the target model sent by the model deployment server.
The model deployment system comprises a model deployment terminal, a model deployment server and electronic equipment deployed in a plurality of environments. In one embodiment, when a user (e.g., a model engineer) wants to deploy a target model, the user may log in a model deployment platform through a model deployment terminal, upload a target file associated with the target model through the model deployment platform, and select a target environment to be deployed for the target model from a plurality of environments. Further, the model deployment terminal may obtain the target file, and send a deployment request for the target model to the model deployment server, where the deployment request includes the identification information of the target environment.
After receiving the deployment request, the model deployment server may obtain a target file according to the deployment request, store the target file in a target storage area, and send deployment instruction information for the target model to the target electronic device in the target environment according to the identification information of the target environment.
The target electronic device is any one or more electronic devices in a target environment. In a specific implementation, the model deployment server may monitor the operating state of each electronic device in the target environment, obtain the operating information of each electronic device, and determine the target electronic device from the target environment according to the operating information. For example, the electronic device in the operating state in the target environment may be determined as the target electronic device according to the operation information; or determining the electronic device with the remaining operating memory larger than the operating memory threshold value in the target environment as the target electronic device according to the operating information, and the like.
S202, acquiring a target file associated with the target model according to the deployment indication information, and deploying the target model through the target file.
In one embodiment, the deployment instruction information includes a storage address of the target file, and the specific implementation manner of the target electronic device in the target environment acquiring the target file is as follows: and acquiring the target file from the target storage area according to the storage address. The target storage area may be a local storage area of the model deployment server, a block chain, a remote server (the remote server may be a common physical server, a server cluster, or a cloud server), and the like, and the target storage area is pre-stored with a target file.
And S203, returning the deployment result of the target model to the model deployment server so that the model deployment server can issue the deployment result to the corresponding model deployment terminal, and the model deployment terminal can display the deployment result.
In an embodiment, an application container engine Docker is pre-deployed in a target electronic device in a target environment, and a specific implementation manner of the target electronic device deploying a target model through a target file may be as follows: and acquiring the Docker mirror image, the model file of the target model and the environment information from the target file, loading the model file and the environment information into a specified directory corresponding to the Docker mirror image, and triggering the running of the model file in the specified directory. Specifically, a Docker image instruction may be called to obtain a Docker image from the target file, a Docker run instruction is called to obtain a model file and environment information of the target model from the target file, the model file and the environment information of the target model are loaded into a specified directory corresponding to the Docker image, and the operation of the model file is triggered in the specified directory, so that the target model is deployed. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, the model is not required to be deployed depending on the downloading of numerous software such as python, rpm, anaconda and the like, the installation of a third-party module is not required, the version conflict depending on a package does not exist, and the model deployment efficiency is improved.
Further, the target electronic device may monitor the operation condition of the model file after triggering the operation of the model file in the designated directory, and may determine the deployment result of the target model based on the operation result and return the deployment result of the target model to the model deployment server through the Docker log record after the operation is finished. And if the deployment result is used for indicating that the target model is failed to deploy, the target electronic device can also return a Docker log to the model deployment server. The model deployment server can send the received deployment result and the Docker log to the model deployment terminal, and the model deployment terminal displays the deployment result and the Docker log.
For a user, the deployment result of the target model can be checked through the model deployment terminal, and if the deployment result is used for indicating that the target model is failed to deploy, the Docker log can be checked through the model deployment terminal to assist the user in locating the reason of the failure of the target model to deploy.
In the embodiment of the application, deployment indication information for a target model sent by a model deployment server can be obtained, a target file associated with the target model is obtained according to the deployment indication information, and the target model is deployed through the target file. And further, returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to the corresponding model deployment terminal, and the model deployment terminal displays the deployment result. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, so that the deployment of the target model is independent of the installation and the downloading of third-party software, and the deployment efficiency of the target model is improved.
The embodiment of the present application further provides a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is used for implementing the corresponding method described in the above embodiment.
Fig. 3 is a schematic structural diagram of a model deployment apparatus according to an embodiment of the present application.
In an implementation manner of the apparatus according to the embodiment of the present application, the apparatus is deployed in an electronic device in a target environment in a model deployment system, and the model deployment system further includes a model deployment terminal and a model deployment server. The device comprises the following structure.
A communication module 30, configured to obtain deployment indication information for a target model sent by a model deployment server;
a processing module 31, configured to obtain a target file associated with the target model according to the deployment indication information, and deploy the target model through the target file;
the communication module 30 is further configured to return the deployment result of the target model to the model deployment server, so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
In an embodiment, the deployment indication information includes a storage address of the target file, and the processing module 31 is specifically configured to:
and acquiring the target file from the target storage area according to the storage address.
In an embodiment, an application container engine Docker is pre-deployed in a target electronic device in the target environment, and the processing module 31 is specifically configured to:
acquiring a Docker mirror image, a model file and environmental information from the target file;
loading the model file and the environment information into a specified directory corresponding to the Docker mirror image;
and triggering the running of the model file in the specified directory.
In the embodiment of the present application, reference may be made to the description of relevant contents in the embodiments corresponding to the foregoing drawings for specific implementations of the foregoing modules.
In this embodiment of the application, the model deployment device may obtain deployment instruction information for the target model sent by the model deployment server, obtain a target file associated with the target model according to the deployment instruction information, and deploy the target model through the target file. And further, returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to the corresponding model deployment terminal, and the model deployment terminal displays the deployment result. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, so that the deployment of the target model is independent of the installation and the downloading of third-party software, and the deployment efficiency of the target model is improved.
Referring to fig. 4 again, the structure of the electronic device in the embodiment of the present application is schematically illustrated, and the electronic device in the embodiment of the present application includes a power supply module and the like, and includes a processor 401, a storage device 402, and a communication interface 403. The processor 401, the storage device 402 and the communication interface 403 can exchange data, and the processor 401 implements corresponding model deployment functions. The electronic device may be an electronic device included in a target environment in a model deployment system, and the model deployment system further includes a model deployment terminal and a model deployment server.
The storage device 402 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the storage device 402 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid-state drive (SSD), etc.; the storage means 402 may also comprise a combination of memories of the kind described above.
The processor 401 may be a Central Processing Unit (CPU) 401. In one embodiment, the processor 401 may also be a Graphics Processing Unit (GPU) 401. The processor 401 may also be a combination of a CPU and a GPU. In the server, a plurality of CPUs and GPUs can be included as needed to perform corresponding model deployment. In one embodiment, the storage device 402 is used to store program instructions. The processor 401 may invoke the program instructions to implement the various methods as described above in the embodiments of the present application.
In a first possible implementation, the processor 401 of the server calls the program instructions stored in the storage device 402 to obtain deployment indication information for the target model sent by the model deployment server; acquiring a target file associated with the target model according to the deployment indication information, and deploying the target model through the target file; and returning the deployment result of the target model to the model deployment server through a communication interface 403, so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
In an embodiment, the deployment indication information includes a storage address of the target file, and the processor 401 is specifically configured to:
and acquiring the target file from the target storage area according to the storage address.
In an embodiment, an application container engine Docker is pre-deployed in a target electronic device in the target environment, and the processor 401 is specifically configured to:
acquiring a Docker mirror image, a model file and environmental information from the target file;
loading the model file and the environment information into a specified directory corresponding to the Docker mirror image;
and triggering the running of the model file in the specified directory.
The implementation manner of the above modules can refer to the description of the relevant contents in the embodiments corresponding to the above figures.
In the embodiment of the application, the electronic device may obtain deployment indication information for the target model sent by the model deployment server, obtain a target file associated with the target model according to the deployment indication information, and deploy the target model through the target file. And further, returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to the corresponding model deployment terminal, and the model deployment terminal displays the deployment result. By adopting the mode, the target model can be automatically deployed through the target file associated with the target model, so that the deployment of the target model is independent of the installation and the downloading of third-party software, and the deployment efficiency of the target model is improved.
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 can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A model deployment system, comprising a model deployment terminal, a model deployment server, and electronic devices deployed in a plurality of environments, wherein:
the model deployment terminal is used for acquiring a target file associated with a target model, determining a target environment to be deployed with the target model from the plurality of environments, and sending a deployment request aiming at the target model to a model deployment server; receiving and displaying a deployment result of the target model;
the model deployment server is used for acquiring the target file according to the deployment request and storing the target file to a target storage area; sending deployment indication information for the target model to a target electronic device in the target environment; receiving a deployment result of the target model returned by the target electronic equipment, and sending the deployment result of the target model to the model deployment terminal;
and the target electronic equipment in the target environment is used for acquiring the target file according to the deployment indication information, deploying the target model through the target file and returning a deployment result of the target model to the model deployment server.
2. The system of claim 1, wherein an application container engine Docker is pre-deployed to a target electronic device in the target environment, and the target electronic device in the target environment is specifically configured to:
acquiring a Docker mirror image, a model file and environmental information from the target file;
loading the model file and the environment information into a specified directory corresponding to the Docker mirror image;
and triggering the running of the model file in the specified directory.
3. The system according to claim 1 or 2, wherein the deployment request carries a check code of the target file, and the model deployment server is specifically configured to:
comparing whether the check code of each pre-stored historical file is matched with the check code of the target file or not;
and if the check code of any history file is detected to be matched with the check code of the target file, storing the history file serving as the target file into a target storage area.
4. The system of claim 3, wherein the deployment request carries a check code of the target file, and the model deployment server is further configured to:
and if the check codes of the historical files are not matched with the check codes of the target files, file uploading indication information is sent to the model deployment terminal, and the file uploading indication information is used for indicating the model deployment terminal to send the target files to the model deployment server.
5. The system of claim 4, wherein the model deployment terminal is further configured to:
when file uploading indication information sent by the model deployment server is received, detecting whether the target file is a preset type of file;
if so, slicing the target file to obtain at least one slice file;
uploading the at least one slice file to the model deployment server so that the model deployment server integrates the at least one slice file to obtain the target file.
6. The system of claim 1, wherein the model deployment terminal is further configured to:
when a deployment query instruction for the target model is detected, displaying a deployment result through a deployment result display window, wherein the deployment result is used for indicating that the target model is successfully deployed or failed to be deployed, and the deployment result display window comprises a debugging button;
triggering and inputting debugging parameters through the debugging button;
and sending a debugging request aiming at the target model to any electronic equipment in the target environment, wherein the debugging request comprises the debugging parameters, so that the target model can be operated by any electronic equipment through the debugging parameters, and an operation result is returned to the model deployment terminal.
7. The system of claim 1, wherein the deployment indication information includes a storage address of the target file, and the target electronic device in the target environment is specifically configured to: and acquiring the target file from the target storage area according to the storage address.
8. A method of model deployment, the method comprising:
acquiring deployment indication information aiming at a target model, which is sent by a model deployment server;
acquiring a target file associated with the target model according to the deployment indication information, and deploying the target model through the target file;
and returning the deployment result of the target model to the model deployment server so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
9. A model deployment apparatus for deploying to a target electronic device included in a target environment in a model deployment system, the apparatus comprising:
the communication module is used for acquiring deployment indication information aiming at the target model, which is sent by the model deployment server;
the processing module is used for acquiring a target file associated with the target model according to the deployment indication information and deploying the target model through the target file;
the communication module is further configured to return the deployment result of the target model to the model deployment server, so that the model deployment server issues the deployment result to a corresponding model deployment terminal, and the model deployment terminal displays the deployment result.
10. A computer storage medium having stored thereon program instructions for implementing the method of claim 8 when executed.
CN202011515129.8A 2020-12-18 2020-12-18 Model deployment system, method, device and storage medium Pending CN113961199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011515129.8A CN113961199A (en) 2020-12-18 2020-12-18 Model deployment system, method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011515129.8A CN113961199A (en) 2020-12-18 2020-12-18 Model deployment system, method, device and storage medium

Publications (1)

Publication Number Publication Date
CN113961199A true CN113961199A (en) 2022-01-21

Family

ID=79459253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011515129.8A Pending CN113961199A (en) 2020-12-18 2020-12-18 Model deployment system, method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113961199A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443057A (en) * 2022-01-25 2022-05-06 北京百度网讯科技有限公司 Deployment of conversation model, conversation method, device, electronic equipment and storage medium
WO2023185726A1 (en) * 2022-03-28 2023-10-05 维沃移动通信有限公司 Model acquisition method, information sending method, information receiving method, device and network element

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443057A (en) * 2022-01-25 2022-05-06 北京百度网讯科技有限公司 Deployment of conversation model, conversation method, device, electronic equipment and storage medium
CN114443057B (en) * 2022-01-25 2023-03-24 北京百度网讯科技有限公司 Deployment of conversation model, conversation method, device, electronic equipment and storage medium
WO2023185726A1 (en) * 2022-03-28 2023-10-05 维沃移动通信有限公司 Model acquisition method, information sending method, information receiving method, device and network element

Similar Documents

Publication Publication Date Title
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
CN110995825B (en) Intelligent contract issuing method, intelligent node equipment and storage medium
CN111427803B (en) Automated random test method, apparatus, computer device and medium
AU2019403474A1 (en) Real time application error identification and mitigation
CN113961199A (en) Model deployment system, method, device and storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN111338656A (en) Method and device for installing software package to target host and computer equipment
CN111104158A (en) Software packaging method and device, computer equipment and storage medium
CN114116170A (en) Timed task execution method and device, computer equipment and storage medium
CN113946854A (en) File access control method and device and computer readable storage medium
US20230132560A1 (en) Infrastructure as code (iac) pre-deployment analysis via a machine-learning model
CN114237991A (en) Main/standby service switching method, device, equipment and medium based on cold standby mode
CN113672349A (en) Mirror image updating method, device, equipment and medium
CN113656378A (en) Server management method, device and medium
CN113419814A (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN107015827B (en) Embedded system and method for automatically operating third-party extension program thereof
CN111913720A (en) Program deployment method and device
CN113407438B (en) Module testing method, computer device, and storage medium
CN112596855B (en) Container creation method and device
CN117112037A (en) Cloud platform starting method and device, electronic equipment and storage medium
CN112182591B (en) Method for verifying web application trusted operating environment based on Linux system
WO2022220839A1 (en) Permission updates based on error messages
CN107341065B (en) Method and device for outputting debugging information
CN116955201A (en) Data development test method, device, equipment and medium
CN116009911A (en) Micro-service architecture upgrading method and device, computer equipment and storage medium

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