Model deployment method and apparatus, computer device, and storage medium

By receiving user-input data and writing back information, as well as reading data retrieval scripts and code files, generating model deployment files, and automatically deploying the target model using an application container engine, the problem of large manual workload and low deployment efficiency in existing technologies is solved, achieving efficient model deployment and resource optimization.

CN115712441BActive Publication Date: 2026-11-24CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211411314.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2026-11-24
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

Existing model deployment methods involve a large amount of manual work and are inefficient. In particular, in deep learning modeling scenarios, the large model files result in long export times and cumbersome operations.

Method used

By receiving user-input data and writing it back, reading data retrieval scripts and code files, generating model deployment files, and automatically deploying the target model using the application container engine, manual operations are reduced.

Benefits of technology

It improves the efficiency of model deployment, reduces the manual workload for users, enhances the user experience, and reduces the waste of system resources through automated deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712441B_ABST
    Figure CN115712441B_ABST
Patent Text Reader

Abstract

This application belongs to the field of artificial intelligence and relates to a model deployment method, including: determining whether a model deployment request triggered by a user has been received; if so, displaying a preset information filling page and receiving data write-back information input by the user on the information filling page; reading a data retrieval script corresponding to a model identifier from a first preset file; reading a code file and a model file corresponding to the model identifier from a second preset file; generating a model deployment file of the target model based on the data write-back information, the data retrieval script, the code file, and the model file; and deploying the target model based on a preset application container engine and the model deployment file. This application also provides a model deployment device, a computer device, and a storage medium. Furthermore, this application relates to blockchain technology, whereby the model deployment file can be stored in the blockchain. This application can automatically deploy the target model based on the model deployment file, which is beneficial for improving the deployment efficiency of the target model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to model deployment methods, apparatus, computer equipment and storage media. Background Technology

[0002] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or computers-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0003] In the field of artificial intelligence, model deployment is an important research direction. Currently, most platforms in the industry, such as Jupyter and VS Code, only support online model training. If online model deployment is required, it is necessary to manually re-export the code, data, etc. After exporting, the model file, image, data, and other related content must be selected again during the model deployment process, and the model must be run again. Due to the large size of model files in some deep learning modeling scenarios, the export process is time-consuming, cumbersome, and involves a large amount of manual work, resulting in low model deployment efficiency. Summary of the Invention

[0004] The purpose of this application is to provide a model deployment method, apparatus, computer equipment, and storage medium to solve the technical problems of existing model deployment methods, such as large manual workload and low model deployment efficiency.

[0005] To address the aforementioned technical problems, this application provides a model deployment method, employing the following technical solution: Determine whether a user-triggered model deployment request has been received; wherein the model deployment request carries a model identifier of the target model that has been developed; If so, display the preset information filling page and receive the data write-back information entered by the user on the information filling page; Read the data retrieval script corresponding to the model identifier from the first preset file; Read the code file and model file corresponding to the model identifier from the second preset file; The model deployment file of the target model is generated based on the data write-back information, the data retrieval script, the code file, and the model file; The target model is deployed based on the preset application container engine and the model deployment file.

[0006] Furthermore, the step of deploying the target model based on the preset application container engine and the model deployment file specifically includes: Based on the application container engine, the data write-back information, the data retrieval script, the code file, and the model file are obtained from the model deployment file; Obtain the preset Docker image from the code file; and, Obtain environment dependency information from the code file; The data write-back information, the data retrieval script, the model file, and the environment dependency information are loaded into the target directory corresponding to the Docker image, and the model file is triggered to run in the target directory to deploy the target model.

[0007] Furthermore, prior to the step of obtaining the preset Docker image from the code file, the method further includes: Parse the tool information that the target model depends on for execution from the code file; Package the tool information to generate a corresponding Docker image; Store the Docker image in the target directory within the code file.

[0008] Furthermore, after the step of deploying the target model based on the preset application container engine and the model deployment file, the method further includes: Receive the scheduling task information corresponding to the target model input by the user; Based on the scheduling task information, a scheduling task corresponding to the target model is generated; Determine the resource allocation rules corresponding to the scheduling task; The scheduling task is executed based on the resource allocation rules.

[0009] Furthermore, the step of determining the resource allocation rules corresponding to the scheduling task specifically includes: The first preset cluster is used as the data retrieval and computing resource for the target model in executing the scheduled task; The second preset cluster is used as the model running resource for the target model when executing the scheduling task; The third preset cluster is used as the data write-back resource for the target model when executing the scheduling task.

[0010] Furthermore, after the step of receiving the data write-back information input by the user on the information filling page, the method further includes: Generate and display information confirmation information corresponding to the data write-back information; Determine whether the user input has been received regarding the modification operation of the data write-back information; If so, the data write-back information is modified based on the modification operation to obtain the modified target data write-back information; The step of generating the model deployment file of the target model based on the data write-back information, the data retrieval script, the code file, and the model file includes: The model deployment file of the target model is generated based on the target data write-back information, the data retrieval script, the code file, and the model file.

[0011] Furthermore, the model deployment request also carries the user's identity information, and the step of displaying the preset information population page specifically includes: Extract the user identity information from the model deployment request; Determine whether the user's identity information is stored in the preset whitelist; If so, obtain the user's biometric information; The user is authenticated based on the biometric information, and it is determined whether the authentication is successful. If authentication is successful, proceed with the step of displaying preset information to populate the page.

[0012] To address the aforementioned technical problems, this application also provides a model deployment device, which employs the following technical solution: The first judgment module is used to determine whether a model deployment request triggered by a user has been received; wherein, the model deployment request carries the model identifier of the target model that has been developed. The first receiving module is used to display a preset information filling page if the condition is met, and to receive data write-back information input by the user on the information filling page. The first reading module is used to read the data retrieval script corresponding to the model identifier from the first preset file; The second reading module is used to read the code file and model file corresponding to the model identifier from the second preset file; The first generation module is used to generate a model deployment file for the target model based on the data write-back information, the data retrieval script, the code file, and the model file. The deployment module is used to deploy the target model based on a preset application container engine and the model deployment file.

[0013] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution: Determine whether a user-triggered model deployment request has been received; wherein the model deployment request carries a model identifier of the target model that has been developed; If so, display the preset information filling page and receive the data write-back information entered by the user on the information filling page; Read the data retrieval script corresponding to the model identifier from the first preset file; Read the code file and model file corresponding to the model identifier from the second preset file; The model deployment file of the target model is generated based on the data write-back information, the data retrieval script, the code file, and the model file; The target model is deployed based on the preset application container engine and the model deployment file.

[0014] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below: Determine whether a user-triggered model deployment request has been received; wherein the model deployment request carries a model identifier of the target model that has been developed; If so, display the preset information filling page and receive the data write-back information entered by the user on the information filling page; Read the data retrieval script corresponding to the model identifier from the first preset file; Read the code file and model file corresponding to the model identifier from the second preset file; The model deployment file of the target model is generated based on the data write-back information, the data retrieval script, the code file, and the model file; The target model is deployed based on the preset application container engine and the model deployment file.

[0015] Compared with the prior art, the embodiments of this application have the following main advantages: Upon receiving a model deployment request triggered by a user, this application first displays a preset information population page and receives data write-back information input by the user on the information population page. Then, it reads the data retrieval script corresponding to the model identifier from a first preset file, and the code file and model file corresponding to the model identifier from a second preset file. Subsequently, based on the data write-back information, data retrieval script, code file, and model file, it generates a model deployment file for the target model. Finally, it deploys the target model based on a preset application container engine and the model deployment file. This embodiment of the application, by constructing a model deployment file corresponding to the target model, can automatically deploy the target model based on this model deployment file, thereby reducing the user's manual deployment workload, improving the deployment efficiency of the target model, and enhancing the user experience. Attached Figure Description

[0016] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 A flowchart of an embodiment of the model deployment method according to this application; Figure 3 This is a schematic diagram of the structure of one embodiment of the model deployment apparatus according to this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0019] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0021] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0022] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0023] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0024] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0025] It should be noted that the model deployment method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the model deployment device is generally set in the server / terminal device.

[0026] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0027] Continue to refer to Figure 2 A flowchart of an embodiment of the model deployment method according to this application is shown. The model deployment method includes the following steps: Step S201: Determine whether a user-triggered model deployment request has been received; wherein the model deployment request carries the model identifier of the target model that has been developed.

[0028] In this embodiment, the model deployment method runs on an electronic device (e.g., Figure 1 The server / terminal device shown can obtain the model identifier via wired or wireless connection. It should be noted that the aforementioned wireless connection methods include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future-developed wireless connection methods. The aforementioned model deployment request is a user-triggered request to deploy the developed target model. The model identifier of the target model includes the model ID information of the target model. There is a one-to-one correspondence between the model and the model ID information. Furthermore, users can launch online model training tools and complete the online development of the target model, adding code files and model files for the target model. In addition, the mounting address of the target model's code files and model files can be set according to actual business needs. For example, the newly added target model's code files and model files can be synchronized to the first specified directory of the preset mounting files, so that the code files and model files of the target model can be automatically and quickly obtained subsequently.

[0029] Step S202: If yes, display a preset information filling page and receive the data write-back information entered by the user on the information filling page.

[0030] In this embodiment, the aforementioned information filling page is a pre-provided page for users to input data write-back information related to the target model. This data write-back information corresponds to the data write-back logic of the target model. Data write-back refers to the process of automatically filling relevant forms with data queried from electronic settings during data updates. The format of the aforementioned data write-back information can be data write-back SQL, and the relevant forms refer to Hive tables.

[0031] Step S203: Read the data retrieval script corresponding to the model identifier from the first preset file.

[0032] In this embodiment, the aforementioned data retrieval script specifically refers to the SQL script used for data preparation during target model training, and data acquisition can be completed based on this script. The aforementioned first preset file may refer to a pre-created script mounting file for storing script data. The aforementioned data retrieval script can be provided by the user and pre-entered into a second designated directory within the preset script mounting file, and the second designated directory stores the data retrieval script using the model identifier corresponding to the script as an index.

[0033] Step S204: Read the code file and model file corresponding to the model identifier from the second preset file.

[0034] In this embodiment, the aforementioned code file is a new code file added by the user after completing the online development of the target model according to actual business needs. This code file may include at least the runtime parameters, Docker image, and environment dependency information required to run the target model. The aforementioned model file includes the model data of the target model. After the target model development is completed, the model data remains fixed and includes at least the network parameters of each network layer in the target model, as well as the hierarchical information of each network layer. The aforementioned second preset file may refer to a pre-created mount file used to store the code file and model file.

[0035] Step S205: Generate the model deployment file of the target model based on the data write-back information, the data retrieval script, the code file, and the model file.

[0036] In this embodiment, the data write-back information, the data retrieval script, the code file, and the model file can be integrated to generate a model deployment file for the target model.

[0037] Step S206: Deploy the target model based on the preset application container engine and the model deployment file.

[0038] In this embodiment, the specific implementation process of deploying the target model based on the preset application container engine and the model deployment file will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0039] Upon receiving a user-triggered model deployment request, this application first displays a preset information population page and receives data write-back information entered by the user on the information population page. Then, it reads the data retrieval script corresponding to the model identifier from a first preset file, and the code file and model file corresponding to the model identifier from a second preset file. Subsequently, based on the data write-back information, data retrieval script, code file, and model file, it generates a model deployment file for the target model. Finally, it deploys the target model based on a preset application container engine and the model deployment file. This application, by constructing a model deployment file corresponding to the target model, can automatically deploy the target model based on this deployment file, reducing the user's manual deployment workload, improving the deployment efficiency of the target model, and enhancing the user experience.

[0040] In some alternative implementations, step S206 includes the following steps: The application container engine retrieves the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file.

[0041] In this embodiment, the application container engine is specifically Docker. It can obtain the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file based on Docker instructions related to information acquisition. Docker instructions may include Docker image instructions, Docker run instructions, etc.

[0042] Obtain the preset Docker image from the code file. And, In this embodiment, the aforementioned code file is a newly added code file after the user completes the online development of the target model according to actual business needs. This code file mainly includes the runtime parameters, Docker image, and environment dependency information required to run the target model. The process of building the aforementioned Docker image will be described in subsequent embodiments and will not be elaborated upon here.

[0043] Obtain environment dependency information from the code file.

[0044] In this embodiment, the environment dependency information includes the environment parameters required to run the above-mentioned model file.

[0045] The data write-back information, the data retrieval script, the model file, and the environment dependency information are loaded into the target directory corresponding to the Docker image, and the model file is triggered to run in the target directory to deploy the target model.

[0046] This application automatically deploys the target model based on the generated model deployment file corresponding to the target model. This eliminates the need for downloading various software or installing functional modules, and also eliminates the need for users to manually create images. This improves the deployment efficiency of the target model and enhances the user experience.

[0047] In some optional implementations of this embodiment, before the step of obtaining the preset Docker image from the code file, the electronic device may further perform the following steps: The tool information that the target model depends on is parsed from the code file.

[0048] In this embodiment, the aforementioned tool information refers to the software and functional modules upon which the target model depends for operation. The software may include, for example, Python, Anaconda, etc., and the functional modules may include basic functional modules such as Transflow.

[0049] The tool information is packaged to generate a corresponding Docker image.

[0050] In this embodiment, the tool information can be packaged and a corresponding Docker image can be generated based on the application container engine described above, so as to install the software and functional modules that the target model depends on into the Docker image.

[0051] Store the Docker image in the target directory within the code file.

[0052] In this embodiment, the target directory is a directory pre-set within the code file for storing image data.

[0053] After obtaining the code file of the target model, this application parses the tool information that the target model depends on from the code file, packages the tool information to generate a corresponding Docker image, and then stores the Docker image in the target directory within the code file. This allows the Docker image corresponding to the target model to be quickly found in the target directory, and the target model can then be deployed based on the obtained Docker image. Since the image file is automatically generated in advance, the user does not need to perform the image creation operation, which helps to improve the deployment efficiency of the target model and improve the user experience.

[0054] In some alternative implementations, after step S206, the electronic device may further perform the following steps: Receive the scheduling task information corresponding to the target model input by the user.

[0055] In this embodiment, the aforementioned scheduling task information may include at least information such as the scheduling period. The aforementioned scheduling period may refer to the time interval for running the aforementioned target model.

[0056] Based on the scheduling task information, a scheduling task corresponding to the target model is generated.

[0057] In this embodiment, the scheduling task may include timed data retrieval, model execution, and write-back processes for the target model.

[0058] Determine the resource allocation rules corresponding to the scheduling task.

[0059] In this embodiment, the resource allocation rule is a pre-built mechanism for decoupling and separating the data retrieval, model execution, and write-back of a timed model, thereby separating computing resources from model execution resources. The specific implementation process of determining the resource allocation rule corresponding to the scheduling task will be further described in detail in subsequent embodiments of this application, and will not be elaborated upon here.

[0060] The scheduling task is executed based on the resource allocation rules.

[0061] After deploying the target model based on the preset application container engine and the model deployment file, this application will further generate a scheduling task corresponding to the target model based on the scheduling task information input by the user. It will also determine the resource allocation rules corresponding to the scheduling task and then execute the scheduling task based on the resource allocation rules. This will minimize the resources when the scheduling task is executed, reduce system resource waste, improve system resource utilization, and enhance the intelligence of scheduling task processing.

[0062] In some optional implementations, determining the resource allocation rules corresponding to the scheduling task includes the following steps: The first preset cluster is used as the data retrieval and computing resource for the target model when executing the scheduled task.

[0063] In this embodiment, the first preset cluster is a Spark cluster supported by Hive, which contains available CPU resources.

[0064] The second preset cluster is used as the model running resource for the target model to execute the scheduling task.

[0065] In this embodiment, the second preset cluster is a GPU cluster resource.

[0066] The third preset cluster is used as the data write-back resource for the target model when executing the scheduling task.

[0067] In this embodiment, the third preset cluster is a Spark cluster supported by Hive, which contains available CPU resources.

[0068] This application determines the resource allocation rules corresponding to the scheduling task, namely, using a Spark cluster supported by Hive for data retrieval and computing resources, using GPU cluster resources for model execution, and using a Spark cluster supported by Hive for data write-back resources. This decouples and separates the data retrieval, model execution, and write-back of the scheduled model, achieving separation of computing resources and model execution resources. This enables the subsequent execution of the target model's scheduling task based on the resource allocation rules to minimize resources, reduce system resource waste, and improve the intelligence of the scheduling task.

[0069] In some optional implementations of this embodiment, after step S202, the electronic device may further perform the following steps: Generate and display information confirmation information corresponding to the data write-back information.

[0070] In this embodiment, the content of the aforementioned information confirmation information is not specifically limited and can be pre-written and generated according to actual usage needs. For example, the content of the information confirmation information may include: Please confirm whether the input data write-back information needs to be modified. If no modification is needed, click the confirm button; if modification is needed, click the modify button and modify the data write-back information.

[0071] Determine whether the user input has been received to modify the data write-back information.

[0072] In this embodiment, an information modification box will be displayed in advance. The modification operation may include the user's addition, deletion, replacement and other operations on the data write-back information within the information modification box.

[0073] If so, the data write-back information is modified based on the modification operation to obtain the modified target data write-back information.

[0074] In this embodiment, the data write-back information can be modified based on the user's input of modification operation for the data write-back information in the information modification box, thereby obtaining the modified target data write-back information. The step of generating the model deployment file of the target model based on the data write-back information, the data retrieval script, the code file, and the model file includes: The model deployment file of the target model is generated based on the target data write-back information, the data retrieval script, the code file, and the model file.

[0075] After receiving the data write-back information input by the user on the information filling page, this application will intelligently generate and display information confirmation information corresponding to the data write-back information. If a modification operation for the data write-back information input by the user is detected, the data write-back information will be modified based on the modification operation to obtain the modified target data write-back information. Subsequently, the model deployment file of the target model will be generated based on the modified target data write-back information, ensuring the data accuracy of the generated model deployment file and improving the user experience.

[0076] In some optional implementations of this embodiment, the model deployment request also carries the user's user identity information, and step S202 includes the following steps: The user identity information is extracted from the model deployment request.

[0077] In this embodiment, the user's identity information can be extracted from the model deployment request by parsing it. This user identity information may include the user's name or ID.

[0078] Determine whether the user's identity information is stored in the preset whitelist.

[0079] In this embodiment, the whitelist is a list of data pre-built according to actual business usage needs, and the whitelist stores the user identity information of legitimate employees.

[0080] If so, obtain the user's biometric information.

[0081] In this embodiment, the above-mentioned biometric information is not specifically limited, and may include one or more of the following: user's face image, pupil image, voiceprint information, etc.

[0082] The user is authenticated based on the biometric information, and it is determined whether the authentication is successful.

[0083] In this embodiment, target biometric information corresponding to user information can be obtained, and then the similarity between the target biometric information and the aforementioned biometric information can be calculated. If the similarity is greater than a preset similarity threshold, the user is determined to have passed authentication; if the similarity is less than the similarity threshold, the user is determined to have failed authentication. The value of the aforementioned similarity threshold is not specifically limited and can be set according to actual usage requirements.

[0084] If authentication is successful, proceed with the step of displaying preset information to populate the page.

[0085] When this application receives a model deployment request triggered by a user, it will also intelligently authenticate the user. Only after the user passes the multi-factor authentication will the application respond to the model deployment request and perform subsequent processing. This avoids responding to model deployment requests triggered by unauthorized users and improves the standardization and intelligence of the processing of model deployment requests.

[0086] It should be emphasized that, to further ensure the privacy and security of the above-mentioned model deployment files, the above-mentioned model deployment files can also be stored in a blockchain node.

[0087] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0088] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0089] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0090] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0091] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0092] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a model deployment apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0093] like Figure 3 As shown, the model deployment device 300 described in this embodiment includes: a first judgment module 301, a first receiving module 302, a first reading module 303, a second reading module 304, a first generation module 305, and a deployment module 306. Wherein: The first judgment module 301 is used to determine whether a model deployment request triggered by a user has been received; wherein, the model deployment request carries the model identifier of the target model that has been developed. The first receiving module 302 is used to display a preset information filling page if the condition is met, and to receive data write-back information input by the user on the information filling page. The first reading module 303 is used to read the data retrieval script corresponding to the model identifier from the first preset file; The second reading module 304 is used to read the code file and model file corresponding to the model identifier from the second preset file; The first generation module 305 is used to generate a model deployment file for the target model based on the data write-back information, the data retrieval script, the code file, and the model file. Deployment module 306 is used to deploy the target model based on a preset application container engine and the model deployment file.

[0094] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0095] In some optional implementations of this embodiment, the deployment module 306 includes: The first acquisition submodule is used to acquire the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file based on the application container engine; The second acquisition submodule is used to acquire a preset Docker image from the code file; and, The third acquisition submodule is used to obtain environment dependency information from the code file; The deployment submodule is used to load the data write-back information, the data retrieval script, the model file, and the environment dependency information into the target directory corresponding to the Docker image, and trigger the execution of the model file in the target directory to achieve the deployment of the target model.

[0096] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0097] In some optional implementations of this embodiment, the deployment module 306 further includes: The parsing submodule is used to parse the tool information that the target model depends on for running from the code file; The packaging submodule is used to package the tool information to generate the corresponding Docker image; The storage submodule is used to store the Docker image in the target directory within the code file.

[0098] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0099] In some optional implementations of this embodiment, the model deployment apparatus further includes: The second receiving module is used to receive the scheduling task information corresponding to the target model input by the user; The second generation module is used to generate a scheduling task corresponding to the target model based on the scheduling task information. The determination module is used to determine the resource allocation rules corresponding to the scheduling task; An execution module is used to execute the scheduling task based on the resource allocation rules.

[0100] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0101] In some optional implementations of this embodiment, the determining module includes: The first determining submodule is used to use the first preset cluster as the data retrieval and computing resource for the target model when executing the scheduling task; The second determining submodule is used to use the second preset cluster as the model running resource for the target model in executing the scheduling task; The third determining submodule is used to use the third preset cluster as the data write-back resource for the target model when executing the scheduling task.

[0102] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0103] In some optional implementations of this embodiment, the model deployment apparatus further includes: The third generation module is used to generate information confirmation information corresponding to the data write-back information and to display the information confirmation information; The second judgment module is used to determine whether the user input of a modification operation for the data write-back information has been received; The modification module is used to modify the data write-back information based on the modification operation if the condition is met, so as to obtain the modified target data write-back information. The first generation module includes: A generation submodule is used to generate a model deployment file for the target model based on the target data write-back information, the data retrieval script, the code file, and the model file.

[0104] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0105] In some optional implementations of this embodiment, the model deployment request also carries the user's identity information, and the first receiving module 302 includes: An extraction submodule is used to extract the user identity information from the model deployment request; The judgment submodule is used to determine whether the user's identity information is stored in the preset whitelist; The fourth acquisition submodule is used to acquire the user's biometric information if the condition is met. The verification submodule is used to authenticate the user based on the biometric information and determine whether the authentication is successful. The execution submodule is used to perform the steps of populating the page with preset information if the authentication is successful.

[0106] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the model deployment method in the aforementioned implementation method, and will not be repeated here.

[0107] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0108] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0109] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0110] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for model deployment methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0111] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the model deployment method.

[0112] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0113] Compared with the prior art, the embodiments of this application have the following main advantages: In this embodiment, upon receiving a model deployment request triggered by a user, the application first displays a preset information population page and receives data write-back information input by the user on the information population page. Then, it reads the data retrieval script corresponding to the model identifier from a first preset file, and the code file and model file corresponding to the model identifier from a second preset file. Subsequently, based on the data write-back information, the data retrieval script, the code file, and the model file, it generates a model deployment file for the target model. Finally, it deploys the target model based on a preset application container engine and the model deployment file. This embodiment, by constructing a model deployment file corresponding to the target model, can automatically deploy the target model based on this file, reducing the user's manual deployment workload, improving the deployment efficiency of the target model, and enhancing the user experience.

[0114] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the model deployment method as described above.

[0115] Compared with the prior art, the embodiments of this application have the following main advantages: In this embodiment, upon receiving a model deployment request triggered by a user, the application first displays a preset information population page and receives data write-back information input by the user on the information population page. Then, it reads the data retrieval script corresponding to the model identifier from a first preset file, and the code file and model file corresponding to the model identifier from a second preset file. Subsequently, based on the data write-back information, the data retrieval script, the code file, and the model file, it generates a model deployment file for the target model. Finally, it deploys the target model based on a preset application container engine and the model deployment file. This embodiment, by constructing a model deployment file corresponding to the target model, can automatically deploy the target model based on this file, reducing the user's manual deployment workload, improving the deployment efficiency of the target model, and enhancing the user experience.

[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0117] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A model deployment method, characterized in that, Includes the following steps: Determine whether a user-triggered model deployment request has been received; wherein the model deployment request carries a model identifier of the target model that has been developed; If so, display the preset information filling page and receive the data write-back information entered by the user on the information filling page; Read the data retrieval script corresponding to the model identifier from the first preset file; Read the code file and model file corresponding to the model identifier from the second preset file; The model deployment file of the target model is generated based on the data write-back information, the data retrieval script, the code file, and the model file; The target model is deployed based on the preset application container engine and the model deployment file; The step of deploying the target model based on a preset application container engine and the model deployment file specifically includes: Based on the application container engine, the data write-back information, the data retrieval script, the code file, and the model file are obtained from the model deployment file; Obtain the preset Docker image from the code file; and, Obtain environment dependency information from the code file; The data write-back information, the data retrieval script, the model file, and the environment dependency information are loaded into the target directory corresponding to the Docker image, and the model file is triggered to run in the target directory to achieve the deployment of the target model; Specifically, the application container engine mentioned above is Docker. Based on Docker instructions related to information acquisition, it obtains the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file.

2. The model deployment method according to claim 1, characterized in that, Before the step of obtaining the preset Docker image from the code file, the method further includes: Parse the tool information that the target model depends on for execution from the code file; Package the tool information to generate a corresponding Docker image; Store the Docker image in the target directory within the code file.

3. The model deployment method according to claim 1, characterized in that, After the step of deploying the target model based on the preset application container engine and the model deployment file, the method further includes: Receive the scheduling task information corresponding to the target model input by the user; Based on the scheduling task information, a scheduling task corresponding to the target model is generated; Determine the resource allocation rules corresponding to the scheduling task; The scheduling task is executed based on the resource allocation rules.

4. The model deployment method according to claim 3, characterized in that, The step of determining the resource allocation rules corresponding to the scheduling task specifically includes: The first preset cluster is used as the data retrieval and computing resource for the target model in executing the scheduled task; The second preset cluster is used as the model running resource for the target model when executing the scheduling task; The third preset cluster is used as the data write-back resource for the target model when executing the scheduling task.

5. The model deployment method according to claim 1, characterized in that, After the step of receiving the data write-back information entered by the user on the information filling page, the method further includes: Generate and display information confirmation information corresponding to the data write-back information; Determine whether the user input has been received regarding the modification operation of the data write-back information; If so, the data write-back information is modified based on the modification operation to obtain the modified target data write-back information; The step of generating the model deployment file of the target model based on the data write-back information, the data retrieval script, the code file, and the model file includes: The model deployment file of the target model is generated based on the target data write-back information, the data retrieval script, the code file, and the model file.

6. The model deployment method according to claim 1, characterized in that, The model deployment request also carries the user's user identity information, and the step of displaying the preset information to populate the page specifically includes: Extract the user identity information from the model deployment request; Determine whether the user's identity information is stored in the preset whitelist; If so, obtain the user's biometric information; The user is authenticated based on the biometric information, and it is determined whether the authentication is successful. If authentication is successful, proceed with the step of displaying preset information to populate the page.

7. A model deployment device, characterized in that, include: The first judgment module is used to determine whether a model deployment request triggered by a user has been received; wherein, the model deployment request carries the model identifier of the target model that has been developed. The first receiving module is used to display a preset information filling page if the condition is met, and to receive data write-back information input by the user on the information filling page. The first reading module is used to read the data retrieval script corresponding to the model identifier from the first preset file; The second reading module is used to read the code file and model file corresponding to the model identifier from the second preset file; The first generation module is used to generate a model deployment file for the target model based on the data write-back information, the data retrieval script, the code file, and the model file. The deployment module is used to deploy the target model based on a preset application container engine and the model deployment file; The deployment module includes: The first acquisition submodule is used to acquire the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file based on the application container engine; The second acquisition submodule is used to acquire a preset Docker image from the code file; and, The third acquisition submodule is used to obtain environment dependency information from the code file; The deployment submodule is used to load the data write-back information, the data retrieval script, the model file, and the environment dependency information into the target directory corresponding to the Docker image, and trigger the execution of the model file in the target directory to achieve the deployment of the target model; Specifically, the application container engine mentioned above is Docker. Based on Docker instructions related to information acquisition, it obtains the data write-back information, the data retrieval script, the code file, and the model file from the model deployment file.

8. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the model deployment method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that, when executed by a processor, implement the steps of the model deployment method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Heterogeneous distributed model processing method and device, equipment and storage medium

    CN112965936A

  • Service operation method and device

    CN113312100A

  • Distributed management method and system, and management system

    CN113472550A

  • Model deployment system, method and device and storage medium

    CN113961199A