Large model-based application deployment method and device, equipment and medium
Patent Information
- Application Number
- CN202611249478.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]相关技术中,当前的基于模型上下文协议(Model Context Protocol,MCP)的服务在实际应用过程中存在环境适配困难和规模化部署能力不足的显著问题
[0010]根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,其中,计算机程序在被处理器执行时能够实现上述基于大模型的应用部署方法。
Smart Images

Figure CN123011258A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the field of large model and application deployment technology, specifically to an application deployment method, apparatus, electronic device, computer-readable storage medium and computer program product based on a large model. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] In related technologies, current services based on Model Context Protocol (MCP) suffer from significant problems in practical applications, including difficulties in environment adaptation and insufficient large-scale deployment capabilities. Under existing technologies, migrating such MCP services to the service application platform relies heavily on developers manually analyzing Dockerfiles and rewriting application build and runtime logic. This approach is inefficient and makes it difficult to achieve large-scale automated service deployment.
[0004] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention
[0005] This disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for deploying applications based on a large model.
[0006] According to one aspect of this disclosure, a method for deploying an application based on a large model is provided, comprising: obtaining a first deployment file of a target application to be deployed, wherein the first deployment file is used to deploy the target application in a first container environment; invoking the large model to perform semantic parsing on the first deployment file to obtain structured deployment description information, wherein the deployment description information characterizes multiple deployment operations in the first deployment file, the multiple deployment operations including multiple items such as dependency installation, environment configuration, or service startup; generating an instruction sequence adapted to the target deployment environment based on the deployment description information and system environment information of the target deployment environment, wherein the target deployment environment is incompatible with the first deployment file, the instruction sequence including mapping instructions of the multiple deployment operations in the target deployment environment; and executing the instruction sequence in the target deployment environment to deploy the target application.
[0007] According to another aspect of this disclosure, an application deployment apparatus based on a large model is provided, comprising: an acquisition unit configured to acquire a first deployment file of a target application to be deployed, wherein the first deployment file is used to deploy the target application in a first container environment; a parsing unit configured to invoke the large model to perform semantic parsing on the first deployment file to obtain structured deployment description information, wherein the deployment description information characterizes multiple deployment operations in the first deployment file, the multiple deployment operations including multiple of dependency installation, environment configuration, or service startup; a generation unit configured to generate an instruction sequence adapted to the target deployment environment based on the deployment description information and system environment information of the target deployment environment, wherein the target deployment environment is incompatible with the first deployment file, and the instruction sequence includes mapping instructions of the multiple deployment operations in the target deployment environment; and a deployment unit configured to execute the instruction sequence in the target deployment environment to deploy the target application.
[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described large-model-based application deployment method.
[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to execute the above-described application deployment method based on a large model.
[0010] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, is capable of implementing the above-described application deployment method based on a large model.
[0011] According to one or more embodiments of this disclosure, application deployment efficiency can be improved.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 A schematic diagram of an exemplary system in which various methods described herein may be implemented, according to exemplary embodiments of the present disclosure; Figure 2 A flowchart is shown of an application deployment method based on a large model according to an exemplary embodiment of the present disclosure; Figure 3 A flowchart is shown of an application deployment method based on a large model according to an exemplary embodiment of the present disclosure; Figure 4 A structural block diagram of a large-model-based application deployment apparatus according to an exemplary embodiment of the present disclosure is shown; Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0015] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0016] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0017] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0018] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0019] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.
[0020] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of application deployment methods based on large models.
[0021] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105 and / or 106 under a Software as a Service (SaaS) model.
[0022] exist Figure 1In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.
[0023] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to send application deployment requests or application deployment files. The client devices can provide an interface that allows users to interact with the client devices. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.
[0024] Client devices 101, 102, 103, 104, 105, and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various categories and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0025] Network 110 can be any type of network well known to those skilled in the art, and can support data communication using any of a variety of available protocols (including, but not limited to, TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0026] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0027] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0028] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0029] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.
[0030] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different categories. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.
[0031] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be different categories of databases, such as key-value stores, object stores, or regular stores supported by a file system.
[0032] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.
[0033] In related technologies, current services based on the Model Context Protocol (MCP) suffer from significant challenges in environmental adaptation and large-scale deployment capabilities during practical applications. Specifically, the service runtime environment in real-world application scenarios is based on multiple operating system versions, particularly various older versions. These older operating systems often lack basic dynamic libraries (such as glibc) or compilation toolchains, thus failing to directly support the runtime environment upon which the latest MCP services depend. Furthermore, open-source MCP services are typically built on standard container images (such as Docker), while some service application platforms use self-developed container technologies (such as Matrix containers). These differ significantly in runtime semantics, underlying dependency loading mechanisms, and startup methods, and self-developed containers typically do not support standard container nesting. Therefore, under current technology, migrating such MCP services to the service application platform relies heavily on developers manually analyzing Dockerfiles and rewriting application build and runtime logic, a method that is inefficient and difficult to scale. In addition, existing solutions lack intelligent automated processing and batch deployment capabilities, making it difficult to support the rapid deployment and operation management of large-scale MCP services.
[0034] Based on this, this disclosure provides an application deployment method based on a large model. The large model is used to perform semantic parsing on the container build script of the application, extract its underlying build logic, and then combine it with the system characteristics of the target deployment environment to perform instruction-level reconstruction. This enables cross-environment runtime reconstruction based on executable instructions, thereby achieving automatic deployment of applications for target deployment environments with incompatible scripts, improving application deployment efficiency, and facilitating the large-scale batch deployment of applications in heterogeneous systems.
[0035] Figure 2 A flowchart of a large-model-based application deployment method 200 according to an exemplary embodiment of this disclosure is shown. Figure 2 As shown, method 200 includes: Step S201: Obtain the first deployment file of the target application to be deployed, wherein the first deployment file is used to deploy the target application in the first container environment; Step S202: Call the large model to perform semantic parsing on the first deployment file to obtain structured deployment description information. The deployment description information represents multiple deployment operations in the first deployment file, including multiple deployment operations such as dependency installation, environment configuration, or service startup. Step S203: Based on the deployment description information and the system environment information of the target deployment environment, generate an instruction sequence adapted to the target deployment environment. The target deployment environment is incompatible with the first deployment file. The instruction sequence includes mapping instructions for various deployment operations in the target deployment environment. Step S204: Execute the command sequence in the target deployment environment to deploy the target application.
[0036] By applying the application deployment method 200 described above, a large model can be used to perform semantic parsing of the application's container build script, extract its underlying build logic, and then combine it with the system characteristics of the target deployment environment to perform instruction-level reconstruction, thereby achieving cross-environment runtime reconstruction based on executable instructions. This decouples and extracts the application deployment logic that was originally bound to a specific container environment, enabling highly automated and accurate cross-environment application deployment and environment reconstruction even when the target deployment environment is incompatible with the original deployment files. This improves application deployment efficiency and facilitates large-scale batch deployment of applications in heterogeneous systems.
[0037] In some examples, the target application to be deployed can be any service application, such as a server application of the Model Context Protocol (MCP).
[0038] In some examples, the first deployment file is a build script or configuration file used after the target application has been developed to define how to package, configure, and run the target application in a standard isolated container environment (i.e., the first container environment, such as a native Docker container environment). For example, the first deployment file can be a standard Dockerfile, which includes a base system image declaration, system-level software installation instructions, application working directory settings, environment variable declarations, application startup commands, etc. In a typical application deployment scenario (e.g., deploying the target application in the first container environment), a standard container engine reads this first deployment file and then builds the image layer by layer in the first container environment and instantiates and deploys the target application accordingly.
[0039] In some examples, the first deployment file can be obtained through multiple means. For instance, the application deployment system can automatically fetch the source code package containing the file from a specific project repository on an open-source code hosting platform (such as GitHub), or it can be directly uploaded to the application repository by developers through a code submission platform and then fetched and read by the system.
[0040] According to some embodiments, the first deployment file includes the source code of the target application and / or the dependency description information of the target application. This allows the source code and / or dependency description information of the target application to be obtained as part of the first deployment file, thus providing richer and more comprehensive contextual support for the subsequent semantic parsing of the large model. Consequently, the large model can, based on recognizing basic deployment operation information (such as system tool installation commands), more accurately and deeply understand the internal dependency structure (such as dependency libraries, variable dependencies, etc.) and constraint information of the target application, thereby more accurately handling version conflicts or improving the accuracy of hybrid runtime topology planning.
[0041] In some examples, during step S202, the system invokes a large model that has undergone specific task-specific fine-tuning (SFT), such as a large-scale natural language and code processing model, and inputs the text content of the first deployment file and task prompts. The task prompts instruct the large model to perform semantic parsing of the first deployment file, thereby extracting key application deployment logic, topological dependencies of deployment operations, etc. Thus, based on its code understanding and logical reasoning capabilities, the large model decomposes the deployment task according to the task prompts, performs abstract syntax tree-level parsing and classification of the instruction intent in the script, and transforms the unstructured text into structured semantic data (structured deployment description information) that the system can read and process.
[0042] In some examples, the structured deployment description information obtained from parsing a large model can be a data structure with node attributes and directed dependency edges, such as an execution graph. In other examples, the structured deployment description information can also be a structured semantic description document (e.g., JSON / YAML format). Structured deployment description information is used to clearly describe the operational process of deploying the target application and the information required for that operation. For example, it can be divided into multiple dimensions based on functionality, such as basic runtime, system tool dependencies, application-level dependencies, environment variables, directory layout, etc.
[0043] It should be understood that the various deployment operations in the first deployment file cover all the lifecycle actions required for an application to run from scratch. Specifically, dependency installation may include downloading and installing the underlying toolchain through the operating system's package manager, obtaining third-party business libraries through the language-level package manager, etc. Environment configuration involves establishing the expected working directory context on the host machine, setting global or local system environment variables, and making necessary port mapping declarations. Service startup refers to the entry point instruction that triggers the execution of the application's main process after all underlying dependencies and the runtime environment are ready.
[0044] In one example, a large model is used to process the target application's Dockerfile, source code, and dependency description files. After parsing the input information, the large model extracts key semantic information such as build steps (e.g., RUN or COPY instructions), dependency installation logic, startup entry points (e.g., CMD or ENTRYPOINT instructions), and system-level low-level dependencies (e.g., glibc or gcc), and then outputs structured execution semantics (e.g., execution graphs) to achieve the transformation from unstructured build scripts to structured semantics.
[0045] In a more specific implementation example, the system first performs AST-level parsing on the Dockerfile to extract basic runtime semantics. For example, it identifies the instruction "FROM python:3.11-slim" as the Python runtime, Python main version 3.11, and the Debian Slim system dependency environment. Simultaneously, the system extracts system dependency installation semantics. For instance, after parsing the instruction "RUN apt-get install curl git build-essential ssh ...", it generates a set of build toolchain dependencies, a set of network tool dependencies, and a set of SSH execution environment dependencies, and further maps them to the software installation strategy corresponding to the target host environment. Furthermore, the system can also extract multi-runtime environment semantics. For example, when it identifies that the build process involves using nvm to install Node.js 22.18.0 and using rustup to install the Rust toolchain, it recognizes that the service belongs to a hybrid runtime project of Python, Node.js, and Rust, and then automatically builds a multi-runtime dependency topology covering these three. For environment variable propagation semantics, such as "ENV PATH=..." and "ENV NVM_DIR=...", the system extracts the inheritance and dependency relationships between environment variables to accurately reconstruct the variable propagation chain in the target deployment environment. For working directory and file layout semantics, such as "WORKDIR / workspaces / serena" and "COPY . / workspaces / serena / ", the system can map them to generate the corresponding project directory structure and path context in the target deployment environment. Based on the structured deployment description information obtained from the above parsing process, more accurate automatic application deployment based on command sequences can be further achieved.
[0046] According to the embodiments provided in this disclosure, the target deployment environment refers to the container base that actually hosts the target application. Since the target deployment environment may use an operating system that is incompatible with the deployment files of the target application, lack package management tools that support the deployment file requirements, or not support the standard container nesting engine, the native Docker container driver script cannot be directly executed and instantiated within it. Therefore, method 200 is required to generate instructions to complete the application deployment.
[0047] In some examples, objective state parameters of the target deployment environment, such as system environment information, hardware architecture, and operating system, are included. These parameters include the operating system distribution type and version number, system kernel version, CPU hardware architecture, and the system's default underlying dynamic library version. In some examples, when implementing step S203, the system receives the structured deployment description information output in step S202 and analyzes it in conjunction with the current target deployment environment's system environment information. Specifically, it analyzes the gap between the application's original deployment script requirements and the application's carrying capacity in the current target deployment environment, thereby generating various mapping instructions for deployment operations in the target deployment environment. For example, it performs a baseline comparison between the application dependency requirements represented by the deployment description information and the actual conditions of the target deployment environment, and then generates an instruction code stream that can be legally invoked in the target deployment environment by filling in missing dependencies and converting package management instructions.
[0048] In some examples, the mapping instructions for various deployment operations in the target deployment environment refer to instructions that, after system-level semantic transformation, dependency degradation compensation, or runtime path rewriting, can complete the equivalent deployment intent in the target deployment environment.
[0049] In one example, the system parses the target application's Dockerfile and translates the standard Docker semantics into executable instructions for the target deployment environment. For instance, it converts the native "RUN" semantics into pre-compiled execution instructions, "ENV" semantics into system environment injection configurations for the target environment, and "CMD" semantics into startup scripts adapted to the characteristics of the target deployment environment. This enables the automatic conversion of the target application from container image-driven deployment to instruction-driven deployment.
[0050] According to some embodiments, step S203, generating an instruction sequence adapted to the target deployment environment based on the deployment description information and the system environment information of the target deployment environment, includes: in response to determining that the system environment information indicates that the target deployment environment lacks target dependency content matching the deployment description information, obtaining target dependency information adapted to the target deployment environment based on the dependency content, wherein the dependency content includes runtime content or dependencies; and generating an instruction sequence based on the deployment description information and the target dependency information. By proactively identifying dependency deficiencies, compilation failures caused by the inability to find corresponding dependency packages or package version conflicts during the actual deployment and execution of the target application can be effectively reduced, improving the success rate of application deployment and thus facilitating the large-scale batch deployment of applications in heterogeneous systems.
[0051] In one example, when it is determined that the target deployment environment lacks dependencies that match the deployment description information, the system can automatically compare the dependencies (such as the required language interpreter version and underlying shared library version) in the parsed structured deployment description information with the collected system environment information. If it is found that the required version of the component is not found in the target environment's system package manager software source, or that the version of the core underlying library that comes with the target system is too low to meet the application requirements, it can be determined that the current target deployment environment lacks matching target dependencies.
[0052] In some examples, the target dependencies lacking in the target deployment environment might include higher versions of high-level programming language runtimes (e.g., the application requires a higher version of Python, while older systems only provide lower versions), specific versions of base dynamic link libraries (such as a higher version of glibc), or specific system-level compilation toolchains. The corresponding target dependency information refers to data from alternative acquisition solutions determined by the system to resolve this deficiency, such as the download address, hash checksum, and decompression path of a compatible compressed package in the pre-compiled artifact library of the application service platform.
[0053] In some examples, target dependencies include runtime content or dependencies. Runtime content refers to the underlying language interpreter or virtual machine environment that supports application code execution, while dependencies refer to system-level toolkits or network libraries that the target application needs to call during runtime or build. For example, in a real-world scenario, the original project requires Python 3.12 as a runtime content dependency, but the target CentOS environment itself lacks a compatible version. Another example is the apt-get instruction declared in the Dockerfile, which is a system dependency installation operation, but this instruction cannot be executed in a CentOS environment managed by yum packages.
[0054] According to some embodiments, obtaining target dependency information adapted to the target deployment environment based on dependency content includes: determining the compatibility scores of multiple pre-compiled candidate dependency components with system environment information; and determining the target dependency component from the multiple candidate dependency components based on their compatibility scores to obtain target dependency information. By quantitatively scoring the compatibility of multiple pre-compiled candidate dependency components, a more stable or compatible dependency component can be selected for the target deployment system using an optimized strategy, reducing trial-and-error costs, improving the accuracy of dependency content replacement, and thus increasing the success rate of automatic application deployment.
[0055] In some examples, pre-compiled candidate dependency components refer to a collection of binary components or dynamic link libraries that have been pre-compiled and packaged in the offline phase. This pre-compilation operation can, for example, be performed on a high-version operating system. During dependency pre-compilation, the system uses a cross-compilation toolchain to pre-generate directly executable artifacts for different architectures and underlying versions for various language ecosystems and system libraries, and categorizes them into libraries for use by low-version systems (e.g., potential low-version target deployment environments).
[0056] In a specific example, offline dependency pre-compilation operations include pre-compiling Python wheel packages, Node modules, and C / C++ dynamic libraries. Based on this, multiple version-compatible forms can be built for the pre-compiled artifacts, such as packaging compatible artifacts for different underlying versions of environments like glibc 2.12 and glibc 2.17.
[0057] In some examples, the step of determining the compatibility score can be implemented based on a preset evaluation algorithm, such as evaluating based on the feature data of the target deployment environment and the metadata of each candidate dependency component. For example, the operating system version, instruction set matching degree, and version difference of the underlying library can be evaluated to obtain the compatibility score of each candidate dependency component, and then the target dependency component with the highest compatibility score is selected.
[0058] In some examples, to further improve system efficiency, pre-compiled components can be managed based on a cache reuse mechanism to reduce the risk of failure when forcibly compiling source code in low-version systems, reduce repeated build operations, and improve the batch deployment efficiency of the target application.
[0059] According to some embodiments, the deployment description information includes various instructions corresponding to different deployment operations. Based on the deployment description information and target dependency information, generating an instruction sequence includes: replacing dependency installation instructions for target dependency content determined based on the deployment description information with instructions for loading target dependency components; and determining the instruction sequence based on the replacement result. By directly replacing incompatible installation instructions with instructions for loading pre-compiled components, the smoothness of the instruction-driven application deployment process can be improved.
[0060] Dependency installation instructions refer to commands declared in the original first deployment file that rely on the native container operating system's own package management system for downloading and installing (e.g., apt-get install). Instructions for loading target dependencies refer to the set of instructions that pull pre-compiled components from the target deployment environment and then correctly configure them to the target path through basic commands such as decompression and copying.
[0061] In one example, if the `apt-get` instruction in the Dockerfile cannot be executed on the target deployment environment (e.g., CentOS), the system can automatically convert the instruction into the CentOS-compatible `yum` command, or into an installation strategy that pulls pre-compiled dependencies locally. In another example, this step can be used to implement runtime version correction. For instance, if the original project requires Python 3.12, but the target CentOS environment lacks a compatible version, the system will no longer issue compilation and installation instructions, but will automatically replace them with direct execution instructions that pull and load an ABI-compatible Python 3.12 pre-compiled runtime.
[0062] According to some embodiments, method 200 further includes: generating runtime correction instructions based on system environment information of the target deployment environment and pre-compiled target dependent components, wherein the runtime correction instructions are used to adapt the runtime environment of the target deployment environment to the pre-compiled target dependent components; and updating the instruction sequence based on the runtime correction instructions. Thus, by generating and executing runtime correction instructions, a compatible context can be built for the application to be deployed, enabling the pre-compiled components to run successfully in the target deployment environment, thereby achieving automatic deployment of the target application.
[0063] In some examples, runtime fixes refer to configuration script commands used to dynamically refactor the application process context or adjust underlying call pointers. For instance, runtime fixes can adapt the target environment to newly distributed pre-compiled target dependencies at a local runtime level by rewriting system environment variables, mounting temporary paths, or modifying application-level configuration files. This prevents the application from incorrectly calling system-provided components at startup, thereby improving the smoothness of the target application deployment.
[0064] In some examples, during the actual runtime adaptation phase, the system implements runtime correction operations including glibc compatibility layer injection, underlying system call replacement, or access path rewriting. Runtime correction instructions for runtime compatibility repair may include, for example, automatically correcting Python version constraints in the application-level configuration file pyproject.toml; automatically injecting compatible dynamic library files (openssl or glibc) into the runtime directory; and automatically supplementing and exporting key environment variables such as PATH and LD_LIBRARY_PATH before the startup command. Based on the aforementioned mapping instructions for various deployment operations, the instruction refactoring results based on dependency analysis and replacement, and the runtime correction instructions for runtime compatibility repair, a deployment script that can be directly executed by the target deployment environment can be generated to achieve accurate deployment of the target application in heterogeneous environments.
[0065] According to some embodiments, step S203, generating an instruction sequence adapted to the target deployment environment based on deployment description information and system environment information of the target deployment environment, includes: determining the execution dependency topology between various deployment operations based on deployment description information; rearranging the corresponding instructions of each of the various deployment operations based on the execution dependency topology and system environment information of the target deployment environment; and determining the instruction sequence based on the rearrangement result. By rearranging instructions based on the extracted execution dependency topology, an application deployment instruction flow that conforms to the system characteristics of the target deployment environment can be obtained while preserving the objective dependency logic of application startup, thereby improving the accuracy and smoothness of automatic application deployment in heterogeneous environments.
[0066] In some examples, when determining the execution dependency topology among multiple deployment operations, the system can perform pre- and post-processing analysis of data flow and resource state flow for each operation node in the deployment description information. For instance, it is clear that the creation of a virtual environment necessarily depends on the readiness of the underlying runtime, while service startup depends on the complete installation of all third-party libraries. Based on the aforementioned mutual constraints, the system can, for example, construct a graph topology representing the sequence of operations to characterize the objective dependency logic of application startup.
[0067] Based on the execution dependency topology and the specific initialization constraints of the target deployment environment, multiple steps of application deployment can be reorganized. For example, the corresponding instructions for system environment preparation, application layer isolation construction, and business package retrieval can be logically rearranged on the timeline to meet the requirements of the target deployment environment.
[0068] According to some embodiments, based on the system environment information of the execution dependency topology and the target deployment environment, the rearrangement of multiple deployment operations includes: dividing the corresponding instructions of each deployment operation into multiple execution stages based on the system environment information of the execution dependency topology and the target deployment environment; and generating an instruction sequence based on the execution order of the multiple execution stages. By dividing the deployment logic into multiple structured execution stages, the modularization of application deployment tasks can be achieved, thereby improving the stability of application deployment execution, facilitating more efficient troubleshooting, enabling progress control and fault rollback at the execution stage granularity, and facilitating large-scale batch deployment of the target application.
[0069] In one example, the linearly arranged steps in the Dockerfile of the target application (MCP service), such as dependency downloading, environment variable setting, and venv creation, can be reorganized into a runtime initialization phase, a toolchain installation phase, a Python virtual environment phase, and a service startup phase. This reordering mechanism creates a phased deployment execution flow adapted to the target deployment environment. Based on this, the executable instruction sequence generated from this phased deployment execution flow can perform the following operations: create an isolated Python virtual environment; install environment-corrected dependency packages; and build the MCP service runtime environment. In another example, after the service starts, a script can automatically send network protocol requests such as initialize / tools / list to verify the service's functional status in the target environment, thereby achieving application deployment verification and improving the accuracy of automated deployment.
[0070] Figure 3 A flowchart of a large-model-based application deployment method 300 according to an exemplary embodiment of this disclosure is shown. Figure 3 As shown, method 300 includes: Step S301: Obtain the container deployment file for the MCP service to be deployed. In this example, the container deployment file for the MCP service could be, for example, a Dockerfile used to build a Docker image.
[0071] Step S302: Call the large model to perform semantic parsing on the container deployment file to obtain structured deployment description information.
[0072] Step S303: Based on the deployment description information and the system environment information of the target deployment environment, generate mapping instructions for various deployment operations in the target deployment environment.
[0073] Step S304: In response to the determination of system environment information indicating that the target deployment environment lacks target dependency content that matches the deployment description information, determine the pre-compiled target dependency components based on the target dependency content.
[0074] Step S305: Replace the dependency installation instructions for the target dependency content with instructions for loading the target dependency components.
[0075] Step S306: Generate runtime correction instructions based on the system environment information of the target deployment environment and the pre-compiled target dependency components.
[0076] Step S307: Determine the execution dependency topology between various deployment operations based on the deployment description information.
[0077] Step S308: Based on the system environment information of the execution dependency topology and the target deployment environment, rearrange the corresponding mapping instructions of various deployment operations.
[0078] Step S309: Mapping instructions in the target deployment environment based on multiple deployment operations, the replacement result of step S305, the rearrangement result of step S308, and the runtime correction instructions generate an instruction sequence. Step S310: Execute the instruction sequence in the target deployment environment to deploy the target application.
[0079] According to one aspect of this disclosure, an application deployment apparatus based on a large model is also provided. Figure 4 A structural block diagram of a large-model-based application deployment apparatus 400 according to an exemplary embodiment of the present disclosure is shown. Figure 4 As shown, the device 400 includes: The acquisition unit 401 is configured to acquire a first deployment file of the target application to be deployed, wherein the first deployment file is used to deploy the target application in a first container environment; The parsing unit 402 is configured to call the large model to perform semantic parsing on the first deployment file to obtain structured deployment description information, wherein the deployment description information represents multiple deployment operations in the first deployment file, including multiple deployment operations such as dependency installation, environment configuration, or service startup. The generation unit 403 is configured to generate an instruction sequence adapted to the target deployment environment based on deployment description information and system environment information of the target deployment environment. The target deployment environment is incompatible with the first deployment file, and the instruction sequence includes mapping instructions for various deployment operations within the target deployment environment. Deployment unit 404 is configured to execute a sequence of instructions in the target deployment environment to deploy the target application.
[0080] According to some embodiments, the generation unit 403 includes: an acquisition subunit configured to, in response to a determination of system environment information indicating that the target deployment environment lacks dependency content that matches the deployment description information, acquire target dependency information adapted to the target deployment environment based on the dependency content, wherein the dependency content includes runtime content or dependencies; and a generation subunit configured to generate an instruction sequence based on the deployment description information and the target dependency information.
[0081] According to some embodiments, the acquisition subunit includes: a first determining module configured to determine the compatibility scores of a plurality of pre-compiled candidate dependency components with system environment information; and a second determining module configured to determine the target dependency component from the plurality of candidate dependency components based on the compatibility scores of the plurality of candidate dependency components, so as to obtain target dependency information.
[0082] According to some embodiments, the deployment description information includes various deployment operations and their corresponding instructions. The generation subunit includes: a replacement module, configured to replace the dependency installation instructions for the target dependency content determined based on the deployment description information with instructions for loading the target dependency components; and a third determination module, configured to determine the instruction sequence based on the replacement result.
[0083] According to some embodiments, the apparatus 400 further includes: a second generation unit configured to generate runtime correction instructions based on system environment information of the target deployment environment and pre-compiled target dependent components, wherein the runtime correction instructions are used to adapt the runtime environment of the target deployment environment to the pre-compiled target dependent components; and an adding unit configured to update the instruction sequence based on the runtime correction instructions.
[0084] According to some embodiments, the generation unit 403 includes: a first determining subunit configured to determine the execution dependency topology among multiple deployment operations based on deployment description information; a rearrangement subunit configured to rearrange the corresponding instructions of each of the multiple deployment operations based on the execution dependency topology and system environment information of the target deployment environment; and a second determining subunit configured to determine the instruction sequence based on the rearrangement result.
[0085] According to some embodiments, the reordering subunit is configured to: divide the corresponding instructions of various deployment operations into multiple execution stages based on system environment information of the execution dependency topology and the target deployment environment; and generate an instruction sequence based on the execution order of the multiple execution stages.
[0086] According to some embodiments, the first deployment file includes the source code of the target application and / or the dependency description information of the target application.
[0087] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0088] According to another aspect of this disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described large-model-based application deployment method.
[0089] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause the computer to execute the above-described application deployment method based on a large model.
[0090] According to another aspect of this disclosure, a computer program product is also provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described application deployment method based on a large model.
[0091] refer to Figure 5 The present invention describes a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0092] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0093] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to device 500. Input unit 506 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 507 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, a hard disk and an optical disk. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0094] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the large-model-based application deployment method. For example, in some embodiments, the large-model-based application deployment method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the large-model-based application deployment method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the large-model-based application deployment method by any other suitable means (e.g., by means of firmware).
[0095] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0096] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0097] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0098] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0099] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0100] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0101] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0102] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.
Claims
1. An application deployment method based on a large model, comprising: Obtain the first deployment file of the target application to be deployed, wherein the first deployment file is used to deploy the target application in the first container environment; The large model is invoked to perform semantic parsing on the first deployment file to obtain structured deployment description information, wherein the deployment description information represents multiple deployment operations in the first deployment file, including multiple deployment operations such as dependency installation, environment configuration, or service startup; Based on the deployment description information and the system environment information of the target deployment environment, an instruction sequence adapted to the target deployment environment is generated, wherein the target deployment environment is incompatible with the first deployment file, and the instruction sequence includes mapping instructions for the various deployment operations in the target deployment environment; and The instruction sequence is executed in the target deployment environment to deploy the target application.
2. The method of claim 1, wherein, The step of generating an instruction sequence adapted to the target deployment environment based on the deployment description information and the system environment information of the target deployment environment includes: In response to determining that the system environment information indicates that the target deployment environment lacks target dependency content matching the deployment description information, target dependency information adapted to the target deployment environment is obtained based on the dependency content, wherein the dependency content includes runtime content or dependencies; and The instruction sequence is generated based on the deployment description information and the target dependency information.
3. The method of claim 2, wherein, The step of obtaining target dependency information adapted to the target deployment environment based on the target dependency content includes: Determine the compatibility scores of multiple pre-compiled candidate dependency components with the system environment information; and Based on the compatibility scores of the multiple candidate dependency components, the target dependency component is determined from the multiple candidate dependency components to obtain the target dependency information.
4. The method of claim 3, wherein, The deployment description information includes the corresponding instructions for each of the various deployment operations, and generating the instruction sequence based on the deployment description information and the target dependency information includes: Replace the dependency installation instructions for the target dependency content determined based on the deployment description information with instructions for loading the target dependency components; and The instruction sequence is determined based on the replacement result.
5. The method of claim 3 or 4, further comprising: Based on the system environment information of the target deployment environment and the pre-compiled target dependent components, runtime correction instructions are generated, wherein the runtime correction instructions are used to adapt the runtime environment of the target deployment environment to the pre-compiled target dependent components; and The instruction sequence is updated based on the runtime correction instructions.
6. The method according to any one of claims 1-5, wherein, The step of generating an instruction sequence adapted to the target deployment environment based on the deployment description information and the system environment information of the target deployment environment includes: The execution dependency topology among the various deployment operations is determined based on the deployment description information; Based on the system environment information of the execution dependency topology and the target deployment environment, the instructions for the various deployment operations are rearranged; and The instruction sequence is determined based on the rearrangement result.
7. The method of claim 6, wherein, The system environment information based on the execution dependency topology and the target deployment environment, which is used to rearrange the various deployment operations, includes: Based on the execution dependency topology and the system environment information of the target deployment environment, the instructions corresponding to each of the various deployment operations are divided into multiple execution stages; and The instruction sequence is generated based on the execution order of the multiple execution stages.
8. The method according to any one of claims 1-7, wherein, The first deployment file includes the source code of the target application and / or the dependency description information of the target application.
9. An application deployment device based on a large model, comprising: The acquisition unit is configured to acquire a first deployment file of the target application to be deployed, wherein the first deployment file is used to deploy the target application in a first container environment; The parsing unit is configured to invoke the large model to perform semantic parsing on the first deployment file to obtain structured deployment description information, wherein the deployment description information represents multiple deployment operations in the first deployment file, including multiple deployment operations such as dependency installation, environment configuration, or service startup; A generation unit is configured to generate an instruction sequence adapted to the target deployment environment based on the deployment description information and the system environment information of the target deployment environment, wherein the target deployment environment is incompatible with the first deployment file, and the instruction sequence includes mapping instructions for the various deployment operations in the target deployment environment; and The deployment unit is configured to execute the sequence of instructions in the target deployment environment to deploy the target application.
10. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
12. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-8.
