A deployment method, device, electronic device and storage medium for an algorithm model

Through automated packaging and containerization technology, the rapid deployment and operation of machine learning algorithm models is achieved, solving the problems of low efficiency and poor adaptability of traditional deployment processes, and improving deployment efficiency and management flexibility.

CN117667118BActive Publication Date: 2025-02-14北京远舢智能科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311635594.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-02-14
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

The deployment and upgrade process of traditional machine learning algorithms is inefficient, requires the participation of experienced professionals, and is difficult to adapt to environmental changes and user feedback, resulting in model performance degradation or errors.

Method used

Through the automated packaging and containerization of the model, preset algorithms are used to deploy functional blocks and mirror deployment of container components to achieve rapid deployment and operation of the algorithm model without manual installation and configuration of the environment.

Benefits of technology

It improves model deployment efficiency, enhances model management flexibility, reduces the occurrence of human errors, and can better adapt to environmental changes and user feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117667118B_ABST
    Figure CN117667118B_ABST
Patent Text Reader

Abstract

The present disclosure provides a deployment method, device, electronic device and storage medium for an algorithm model, which obtains a list of code products; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through automated packaging and containerization, the model can be quickly deployed and run without manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for deploying an algorithm model. Background Art

[0002] With the widespread application of machine learning algorithms in various fields, more and more application scenarios require the deployment and upgrading of machine learning algorithm models, and the deployment and upgrading of machine learning algorithm models has become increasingly important. However, the traditional deployment and upgrade process often requires the participation of experienced professionals and is prone to errors. In addition, the deployment and upgrade process also needs to take into account factors such as environmental changes, user feedback, and model evolution.

[0003] Currently, containerized deployment technology uses container technology (such as Docker) to package machine learning models and their related dependencies into a container that can run independently. Through containerization technology, machine learning models can be quickly deployed and run in different environments while ensuring the isolation and consistency of the model and the environment. However, this method usually requires manual packaging and deployment of the entire container during the model upgrade process, and it still has low algorithm deployment efficiency. At the same time, when the environment changes, such as hardware configuration, version updates of dependencies, etc., it may cause the performance of the model to degrade or produce unexpected errors. Therefore, it has low flexibility in adapting to environmental changes and user feedback on model deployment and upgrades. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a method, device, electronic device and storage medium for deploying an algorithm model, which can quickly deploy and run the model through automatic packaging and containerization of the model without manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0005] The present disclosure provides a method for deploying an algorithm model, including:

[0006] Get the code artifact list corresponding to the target algorithm model;

[0007] Calling a preset algorithm deployment function block, determining a target code product according to a user's selection operation on the code product list, and determining a corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements;

[0008] Calling the preset image deployment container component through the preset algorithm deployment function block, pulling the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloading the preset deployment template corresponding to the preset algorithm deployment requirement;

[0009] Fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, execute the deployment step command locally, and deploy the target algorithm model to the target deployment container.

[0010] In an optional implementation, before obtaining the code product list corresponding to the target algorithm model, the method further includes:

[0011] Obtain the target algorithm, training data set, training environment, and training configuration parameters;

[0012] Calling a preset algorithm training function block, training the target algorithm under the training environment according to the training data set and the training configuration parameters, and generating the target algorithm model;

[0013] Calling a preset algorithm evaluation function block to evaluate the target algorithm model and determine the model evaluation index parameters;

[0014] According to the model evaluation index parameters and the preset index threshold, the target algorithm model that passes the evaluation is screened, and the target algorithm model is stored in a preset model library.

[0015] In an optional implementation, after deploying the target algorithm model to the target deployment container, the method further includes:

[0016] Calling a preset model upgrade function block to obtain a list of models included in the target deployment container;

[0017] According to the user's selection operation, determine the algorithm model to be upgraded and call the model upgrade interface corresponding to the preset image deployment container component to obtain the model attribute information corresponding to the algorithm model to be upgraded;

[0018] Acquire a corresponding code product according to the model attribute information, and verify the integrity of the code product;

[0019] The upgrade template corresponding to the algorithm model to be upgraded is adopted, and the algorithm to be upgraded is upgraded according to the upgrade operation steps carried by the upgrade template.

[0020] In an optional implementation, after deploying the target algorithm model to the target deployment container, the method further includes:

[0021] Calling a preset model test function block, testing the target algorithm model according to preset model test data and algorithm service scenarios, and obtaining test result data;

[0022] The test result data is visualized and fed back to the user.

[0023] In an optional implementation manner, for each of the upgrade templates, the upgrade template corresponds to an algorithm type, and the algorithm type corresponds to an implementation class of the upgrade process;

[0024] Each implementation class corresponds to an operation step for implementing the upgrade process.

[0025] In an optional implementation, after deploying the target algorithm model to the target deployment container, the method further includes:

[0026] Obtain the deployment execution status and deployment record log corresponding to the target algorithm model;

[0027] The deployment execution status and the deployment record log are returned to the preset algorithm deployment function block.

[0028] The present disclosure also provides a deployment device for an algorithm model, including:

[0029] A product list acquisition module is used to obtain the code product list corresponding to the target algorithm model;

[0030] A deployment configuration module is used to call a preset algorithm deployment function block, determine a target code product according to a user's selection operation on the code product list, and determine a corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements;

[0031] A template acquisition module, used to call a preset image deployment container component through the preset algorithm deployment function block, pull the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and download the preset deployment template corresponding to the preset algorithm deployment requirement;

[0032] The container deployment module is used to fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, execute the deployment step command locally, and deploy the target algorithm model to the target deployment container.

[0033] In an optional implementation manner, the device further includes an algorithm upgrading module, and the algorithm upgrading module is used to:

[0034] Calling a preset model upgrade function block to obtain a list of models included in the target deployment container;

[0035] According to the user's selection operation, determine the algorithm model to be upgraded and call the model upgrade interface corresponding to the preset image deployment container component to obtain the model attribute information corresponding to the algorithm model to be upgraded;

[0036] Acquire a corresponding code product according to the model attribute information, and verify the integrity of the code product;

[0037] The upgrade template corresponding to the algorithm model to be upgraded is adopted, and the algorithm to be upgraded is upgraded according to the upgrade operation steps carried by the upgrade template.

[0038] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the deployment method of the above-mentioned algorithm model is executed, or the steps in any possible implementation of the deployment method of the above-mentioned algorithm model are performed.

[0039] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the above-mentioned algorithm model deployment method, or the steps in any possible implementation of the above-mentioned algorithm model deployment method.

[0040] The embodiments of the present disclosure also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the above-mentioned algorithm model deployment method, or the steps in any possible implementation of the above-mentioned algorithm model deployment method.

[0041] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for deploying an algorithm model, which obtains a list of code products corresponding to a target algorithm model; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation on the list of code products, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through the automatic packaging and containerization of the model, the model can be quickly deployed and run without manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0042] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0044] Figure 1 A flowchart of a method for deploying an algorithm model provided by an embodiment of the present disclosure is shown;

[0045] Figure 2 A flowchart showing another method for deploying an algorithm model provided by an embodiment of the present disclosure is shown;

[0046] Figure 3 A schematic diagram of a deployment device of an algorithm model provided by an embodiment of the present disclosure is shown;

[0047] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0049] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0050] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0051] Research has found that currently, containerized deployment technology uses container technology (such as Docker) to package machine learning models and their related dependencies into a container that can run independently. Through containerization technology, machine learning models can be quickly deployed and run in different environments while ensuring the isolation and consistency of the model and the environment. However, this method usually requires manual packaging and deployment of the entire container during the model upgrade process, and it still has low algorithm deployment efficiency. At the same time, when the environment changes, such as hardware configuration, version updates of dependencies, etc., it may cause the model's performance to degrade or produce unexpected errors. Therefore, it has low flexibility in adapting to environmental changes and user feedback on model deployment and upgrades.

[0052] Based on the above research, the present disclosure provides a deployment method, device, electronic device and storage medium for an algorithm model, which obtains a list of code products corresponding to a target algorithm model; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation on the list of code products, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through the automatic packaging and containerization of the model, the model can be quickly deployed and run without manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0053] To facilitate understanding of this embodiment, a deployment method of an algorithm model disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the deployment method of the algorithm model provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the deployment method of the algorithm model can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0054] See also Figure 1 FIG. 1 is a flowchart of a method for deploying an algorithm model provided by an embodiment of the present disclosure, the method comprising steps S101 to S104, wherein:

[0055] S101. Obtain a list of code products corresponding to a target algorithm model.

[0056] In a specific implementation, the embodiment of the present application can be applied to a machine learning platform, and a code artifact list corresponding to a target algorithm model to be performed is obtained through a preset artifact list interface provided by the machine learning platform.

[0057] As a possible implementation, before obtaining the code product list, the following steps 1 to 4 may be performed:

[0058] Step 1: Obtain the target algorithm, training data set, training environment, and training configuration parameters.

[0059] Step 2: Call the preset algorithm training function block, train the target algorithm in the training environment according to the training data set and the training configuration parameters, and generate the target algorithm model.

[0060] Step 3: Call the preset algorithm evaluation function block to evaluate the target algorithm model and determine the model evaluation index parameters.

[0061] Step 4: According to the model evaluation index parameters and the preset index threshold, the target algorithm model that has passed the evaluation is screened, and the target algorithm model is stored in a preset model library.

[0062] In the specific implementation, by selecting the algorithm, training data set, training environment and other training-related configurations, the preset algorithm deployment function block in the machine learning platform is used to perform the training interface in the agent scheduling running environment, and the algorithm training is performed in the specified training environment to produce a specific model.

[0063] Afterwards, the machine learning platform application initiates model evaluation based on the model, deploys the function block through the preset algorithm to perform the evaluation interface in the proxy scheduling operation environment, performs the evaluation in the specified training environment, and outputs the model evaluation indicators. Models that pass the model evaluation indicators will be entered into the model library, and version management for the model will be supported.

[0064] S102, calling a preset algorithm deployment function block, determining a target code product according to a user's selection operation on the code product list, and determining a corresponding target deployment container and target deployment parameters according to preset algorithm deployment requirements.

[0065] In a specific implementation, the preset algorithm deployment function block included in the machine learning platform is called to display a list of code products to the user. In response to the user's selection operation in the list of code products, the target code product selected by the user is determined. The user can also use the preset algorithm deployment function block to select the target deployment container to which the target algorithm model needs to be deployed and the target deployment parameters required for the configuration process according to the algorithm deployment requirements.

[0066] Here, the target deployment parameters may include the deployment root path, the image package name and resource package name corresponding to the target code product, the modified configuration list, the startup script file name, etc.

[0067] Among them, the preset algorithm deployment function block has the ability to deploy containers (algorithms, strategies and other images) online, and relies on preset images to deploy container components to achieve product transmission and deployment and installation.

[0068] As a possible implementation method, the preset algorithm deployment function block obtains the specified product information and the address information corresponding to the mirror resource address identification type through the platform product list interface; the user selects the target code product and the target deployment container, including the server or node, through the line deployment function of the preset algorithm deployment function block, and then compiles the deployment script. The deployment script can have multiple deployment templates built in that can be edited by the user according to the requirements of the deployment method.

[0069] S103, calling the preset image deployment container component through the preset algorithm deployment function block, pulling the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloading the preset deployment template corresponding to the preset algorithm deployment requirement.

[0070] In the specific implementation, the preset algorithm deployment function block carries the target deployment parameters containing code product information and deployment scripts to call the online deployment interface of the preset image deployment container component. After receiving the deployment instruction, the preset image deployment container component downloads the product and verifies its integrity according to the image resource address corresponding to the target code product.

[0071] Here, the preset image deployment container component provides the capability of automatically deploying the image container through an interface. The preset algorithm deployment function block implements the image automatic deployment capability by calling the preset image deployment container component.

[0072] Among them, the interface of the preset image deployment container component mainly includes parameters: resource address, deployment template address, parameter information includes: supported deployment resource modes, such as OPS warehouse, FTP warehouse, etc.; parameter information existence type, including public parameters, private parameters, public parameters are parameters that all deployments need and must be passed, such as deployment root path, user download resource address storage path, private parameters are freely set for each deployment template.

[0073] Specifically, during the deployment resource download process, according to the image resource address identification type such as OPS, FTP, SFTP, etc., the image resource is pulled or downloaded to the deployment root path in the public parameters. For the image resource address identification type of SFTP or FTP, java download can be used; for the image resource address identification type of OPS, command / java can be used to pull.

[0074] S104: Fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, execute the deployment step command locally, and deploy the target algorithm model to the target deployment container.

[0075] In the specific implementation, the preset image deployment container component realizes the configuration of the deployment process through the deployment template to adapt to different deployment processes in different scenarios. It is downloaded to the local based on the deployment template address and the template content is read. In addition to the template command, the template also covers parameter descriptions, parameter types, whether it is required, and other attributes. Then, the parameter validity is verified to determine whether the necessary parameters have been passed in. After that, the step commands of the deployment process are constructed through the deployment template and the target deployment parameters, and the deployment process is realized by executing the command locally.

[0076] Here, the algorithm container is deployed through the environment management function of the machine learning platform. By selecting the algorithm environment image, specific deployment environment information, such as server or k8 node, and related deployment configuration information, that is, deployment template selection, and based on the deployment scheduling capability of the preset algorithm deployment function block controller, the docker containerization of the algorithm container is automatically deployed on the preset image deployment container component running environment.

[0077] Among them, since the deployment process is ever-changing, some require backup, some require pulling, and some require direct installation based on remote images, so it is necessary to use deployment templates to achieve free expansion of the deployment process.

[0078] As a possible implementation method, after the target algorithm model is deployed, the preset model testing function block can also be called to test the target algorithm model according to the preset model test data and algorithm service scenario to obtain test result data; the test result data can be visualized and fed back to the user.

[0079] Here, after the model is deployed, it supports the registration and test verification of the operating environment algorithm service in the service management, and the algorithm service interface is tested through test data. For common algorithm service scenarios, scenario-based algorithm testing functions are provided, such as visual guidance testing of common algorithms such as prediction, ORC recognition, face recognition, and behavior recognition, and the test results are presented more clearly and vividly in the form of visual charts.

[0080] As a possible implementation method, after the target algorithm model is deployed, the deployment execution status and deployment record log corresponding to the target algorithm model can also be obtained; the deployment execution status and the deployment record log are returned to the preset algorithm deployment function block.

[0081] Here, after receiving the request, the interface of the preset image deployment container component generates a unique deployment task instance ID and returns it to the requester. All verification deployment processes are executed asynchronously, and the status and logs are notified to the requester through Websocket.

[0082] The disclosed embodiment provides a method for deploying an algorithm model, which obtains a list of code products corresponding to a target algorithm model; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation on the list of code products, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through the automated packaging and containerization of the model, the model can be quickly deployed and run without the need for manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0083] See also Figure 2 As shown, it is a flowchart of another algorithm model deployment method provided by an embodiment of the present disclosure, the method includes steps S201 to S204, wherein:

[0084] S201. Call a preset model upgrade function block to obtain a list of models included in the target deployment container.

[0085] S202: According to the user's selection operation, determine the algorithm model to be upgraded and call the model upgrade interface corresponding to the preset image deployment container component to obtain model attribute information corresponding to the algorithm model to be upgraded.

[0086] S203: Obtain corresponding code products according to the model attribute information, and verify the integrity of the code products.

[0087] S204: Using the upgrade template corresponding to the algorithm model to be upgraded, and upgrading the algorithm to be upgraded according to the upgrade operation steps carried by the upgrade template.

[0088] In the specific implementation, the model upgrade is achieved through the environment management of the machine learning platform application, calling the preset algorithm training function block to select the specific algorithm operating environment, and then selecting the algorithm model that has passed the evaluation based on the algorithm library, and relying on the deployment scheduling capability of the preset algorithm deployment function block to deploy and iteratively upgrade the model in the preset image deployment container component algorithm operating environment.

[0089] Here, the preset algorithm deployment function block has the online upgrade function of model, strategy and other files, and relies on the preset image deployment container component to realize the transmission and upgrade installation functions of model, strategy files or packages, products, etc.

[0090] Specifically, in the online upgrade function of the preset algorithm deployment function block, select the server, present the installed algorithm or policy container, and display the model or policy list under the container. Here, you can obtain the model or policy version list under the algorithm or policy version through the machine learning platform and compare it with the existing list under the container.

[0091] Among them, existing models or policies support uninstallation, and installed models or policies support upgrade installation.

[0092] After that, click the upgrade and installation function to call the preset image deployment container component upgrade and installation interface, pass the model ID, version and other information, and the preset image deployment container component receives the upgrade and installation instruction, downloads the product through the model or policy address, and after verifying the integrity, upgrades it through the upgrade template corresponding to the model.

[0093] It should be noted that, taking into account different models or inconsistent processes and operation steps for policy upgrades, for each upgrade template, the upgrade template corresponds to an algorithm type, and the algorithm type corresponds to an implementation class of the upgrade process; each implementation class corresponds to the operation steps for implementing the upgrade process.

[0094] Specifically, move the product to the specified directory of the host machine, mount the host directory through docker-v during deployment and installation, and call the installation or loading interface on the algorithm side.

[0095] Here, if the algorithm side implements automatic monitoring of the directory and automatic loading, the step of calling the installation or loading interface on the algorithm side is omitted.

[0096] The disclosed embodiment provides a method for deploying an algorithm model, which obtains a list of code products corresponding to a target algorithm model; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation on the list of code products, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through the automated packaging and containerization of the model, the model can be quickly deployed and run without the need for manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0097] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0098] Based on the same inventive concept, the embodiments of the present disclosure also provide a deployment device for an algorithm model corresponding to the deployment method of the algorithm model. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the deployment method of the algorithm model in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0099] See also Figure 3 , Figure 3 A schematic diagram of a deployment device of an algorithm model provided in an embodiment of the present disclosure. Figure 3 As shown in , the deployment device 300 of the algorithm model provided in the embodiment of the present disclosure includes:

[0100] The artifact list acquisition module 310 is used to obtain the code artifact list corresponding to the target algorithm model.

[0101] The deployment configuration module 320 is used to call the preset algorithm deployment function block, determine the target code product according to the user's selection operation on the code product list, and determine the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements.

[0102] The template acquisition module 330 is used to call the preset image deployment container component through the preset algorithm deployment function block, pull the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and download the preset deployment template corresponding to the preset algorithm deployment requirement.

[0103] The container deployment module 340 is used to fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, execute the deployment step command locally, and deploy the target algorithm model to the target deployment container.

[0104] Optionally, the algorithm model deployment device 300 further includes an algorithm upgrade module, and the algorithm upgrade module is used to:

[0105] Calling a preset model upgrade function block to obtain a list of models included in the target deployment container;

[0106] According to the user's selection operation, determine the algorithm model to be upgraded and call the model upgrade interface corresponding to the preset image deployment container component to obtain the model attribute information corresponding to the algorithm model to be upgraded;

[0107] Acquire a corresponding code product according to the model attribute information, and verify the integrity of the code product;

[0108] The upgrade template corresponding to the algorithm model to be upgraded is adopted, and the algorithm to be upgraded is upgraded according to the upgrade operation steps carried by the upgrade template.

[0109] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0110] The embodiment of the present disclosure provides a deployment device for an algorithm model, which obtains a list of code products corresponding to a target algorithm model; calls a preset algorithm deployment function block, determines the target code product according to the user's selection operation on the list of code products, and determines the corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; calls a preset image deployment container component through the preset algorithm deployment function block, pulls the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloads the preset deployment template corresponding to the preset algorithm deployment requirements; fills the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, executes the deployment step command locally, and deploys the target algorithm model to the target deployment container. Through the automatic packaging and containerization of the model, the model can be quickly deployed and run without manual installation and configuration of the environment, thereby improving the efficiency of model deployment and the flexibility of model management.

[0111] Corresponds to Figure 1 and Figure 2 The deployment method of the algorithm model in the present disclosure also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present disclosure, including:

[0112] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including memory 421 and external memory 422; memory 421 here is also called internal memory, which is used to temporarily store operation data in processor 41 and data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through memory 421. When the electronic device 400 is running, the processor 41 communicates with the memory 42 through bus 43, so that the processor 41 executes Figure 1 and Figure 2 The steps of the deployment method of the algorithm model in .

[0113] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the algorithm model deployment method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0114] The embodiments of the present disclosure also provide a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the deployment method of the algorithm model described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.

[0115] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0116] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0118] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0119] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0120] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for deploying an algorithm model, characterized in that: include: Get the code artifact list corresponding to the target algorithm model; Calling a preset algorithm deployment function block, determining a target code product according to a user's selection operation on the code product list, and determining a corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; Calling the preset image deployment container component through the preset algorithm deployment function block, pulling the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and downloading the preset deployment template corresponding to the preset algorithm deployment requirement; Among them, the preset algorithm deployment function block obtains the specified product information and the address information corresponding to the mirror resource address identification type through the platform product list interface; the user selects the target code product and the target deployment container, including the server or node, through the online deployment function of the preset algorithm deployment function block, and then compiles the deployment script, which has multiple deployment templates built in that can be edited by the user according to the requirements of the deployment method; Fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, execute the deployment step command locally, and deploy the target algorithm model to the target deployment container; Call the preset model upgrade function block to obtain the model list included in the target deployment container; determine the algorithm model to be upgraded according to the user's selection operation and call the model upgrade interface corresponding to the preset image deployment container component to obtain the model attribute information corresponding to the algorithm model to be upgraded; obtain the corresponding code product according to the model attribute information, and verify the integrity of the code product; adopt the upgrade template corresponding to the algorithm model to be upgraded, and upgrade the algorithm to be upgraded according to the upgrade operation steps carried by the upgrade template; Among them, for each of the upgrade templates, the upgrade template corresponds to an algorithm type, and the algorithm type corresponds to an implementation class of the upgrade process; each implementation class corresponds to the operation steps of implementing the upgrade process; the target code product is moved to a specified directory of the host machine, and the host directory is mounted through docker-v during deployment and installation; and the installation or loading interface on the algorithm side is called.

2. The method according to claim 1, characterized in that: Before obtaining the code product list corresponding to the target algorithm model, the method further includes: Obtain the target algorithm, training data set, training environment, and training configuration parameters; Calling a preset algorithm training function block, training the target algorithm under the training environment according to the training data set and the training configuration parameters, and generating the target algorithm model; Calling a preset algorithm evaluation function block to evaluate the target algorithm model and determine the model evaluation index parameters; According to the model evaluation index parameters and the preset index threshold, the target algorithm model that passes the evaluation is screened, and the target algorithm model is stored in a preset model library.

3. The method according to claim 1, characterized in that After deploying the target algorithm model to the target deployment container, the method further includes: Calling a preset model test function block, testing the target algorithm model according to preset model test data and algorithm service scenarios, and obtaining test result data; The test result data is visualized and fed back to the user.

4. The method according to claim 1, characterized in that: After deploying the target algorithm model to the target deployment container, the method further includes: Obtain the deployment execution status and deployment record log corresponding to the target algorithm model; The deployment execution status and the deployment record log are returned to the preset algorithm deployment function block.

5. A deployment device for an algorithm model, characterized in that: include: A product list acquisition module is used to obtain the code product list corresponding to the target algorithm model; A deployment configuration module is used to call a preset algorithm deployment function block, determine a target code product according to a user's selection operation on the code product list, and determine a corresponding target deployment container and target deployment parameters according to the preset algorithm deployment requirements; A template acquisition module, used to call a preset image deployment container component through the preset algorithm deployment function block, pull the image resource corresponding to the target code product according to the image resource address corresponding to the target code product, and download the preset deployment template corresponding to the preset algorithm deployment requirement; Among them, the preset algorithm deployment function block obtains the specified product information and the address information corresponding to the mirror resource address identification type through the platform product list interface; the user selects the target code product and the target deployment container, including the server or node, through the online deployment function of the preset algorithm deployment function block, and then compiles the deployment script, which has multiple deployment templates built in that can be edited by the user according to the requirements of the deployment method; A container deployment module, used to fill the target deployment parameters into the corresponding position of the preset deployment template to generate a deployment step command, locally execute the deployment step command, and deploy the target algorithm model to the target deployment container; The device further includes an algorithm upgrading module, and the algorithm upgrading module is used for: Calling a preset model upgrade function block to obtain a list of models included in the target deployment container; According to the user's selection operation, determine the algorithm model to be upgraded and call the model upgrade interface corresponding to the preset image deployment container component to obtain the model attribute information corresponding to the algorithm model to be upgraded; Acquire a corresponding code product according to the model attribute information, and verify the integrity of the code product; Using the upgrade template corresponding to the algorithm model to be upgraded, and upgrading the algorithm to be upgraded according to the upgrade operation steps carried by the upgrade template; Among them, for each of the upgrade templates, the upgrade template corresponds to an algorithm type, and the algorithm type corresponds to an implementation class of the upgrade process; each implementation class corresponds to the operation steps of implementing the upgrade process; the target code product is moved to a specified directory of the host machine, and the host directory is mounted through docker-v during deployment and installation; and the installation or loading interface on the algorithm side is called.

6. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the deployment method of the algorithm model as described in any one of claims 1 to 4 are performed.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for deploying the algorithm model as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Server model deployment method, model processing method and device

    CN115708061A