Containerized deployment method and device, computer equipment, readable storage medium and program product

By combining a large model analysis layer and a multi-agent collaboration layer, business code is automatically parsed and analyzed to generate dependency graphs and risk information, solving the problem of low efficiency in traditional containerization transformation and achieving efficient containerization deployment.

CN121070523APending Publication Date: 2025-12-05BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511232604.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Traditional containerization transformation is inefficient due to the subjectivity of manual analysis, making it difficult to deploy containers efficiently.

Method used

A large model analysis layer is used to parse and detect risks in business code, generate dependency graphs and risk information, and combine it with a multi-agent collaboration layer to perform multi-dimensional analysis, generate containerization transformation solutions and deploy them.

Benefits of technology

Automated code parsing and risk detection reduce the complexity of manual operations and improve the accuracy of code analysis and the efficiency of containerized deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121070523A_ABST
    Figure CN121070523A_ABST
Patent Text Reader

Abstract

The invention relates to a containerized deployment method and device, computer equipment, a computer readable storage medium and a computer program product. The method is applied to a containerized deployment system, the containerized deployment system comprises a large model analysis layer and a multi-agent cooperation layer, and the method comprises the following steps: obtaining a business code of an original application; performing code analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code; performing cooperative processing on the dependency graph and the risk information based on each agent in the multi-agent cooperative layer to obtain a plurality of sub-schemes in containerization transformation, and performing summary analysis on each sub-scheme to obtain a containerization scheme; and performing containerization deployment on the original application according to the containerization scheme. By adopting the method, the efficiency of containerization deployment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, in particular to a containerization deployment method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND

[0002] With the development of cloud computing and micro-service architecture, in order to ensure the efficient operation of the application in different environments, it is necessary to containerize the traditional application, and then deploy the application in the container cloud.

[0003] In the traditional technology, the developers manually analyze and split the business code of the original application, determine the micro-service modules adapted to the original application, and analyze the containerization scheme of the whole application for each micro-service module, and determine the containerization transformation scheme of the original application. Finally, the developers perform containerization deployment according to the containerization transformation scheme.

[0004] However, in the current traditional technology, the containerization transformation is performed manually, which is limited by the subjectivity of manual analysis, resulting in poor efficiency of containerization deployment. SUMMARY

[0005] Therefore, it is necessary to provide a containerization deployment method, device, computer equipment, computer readable storage medium and computer program product to solve the above technical problems.

[0006] In a first aspect, the present application provides a containerization deployment method, which is applied to a containerization deployment system including a large model analysis layer and a multi-agent collaboration layer, and the method comprises:

[0007] obtaining the business code of the original application;

[0008] performing code analysis and risk detection processing on the business code according to the large model analysis layer, to obtain a dependency graph and risk information corresponding to the business code;

[0009] performing collaboration processing on the dependency graph and the risk information by each agent in the multi-agent collaboration layer, to obtain a plurality of sub-schemes in the containerization transformation, and performing summary analysis on each sub-scheme to obtain a containerization scheme;

[0010] performing containerization deployment on the original application according to the containerization scheme.

[0011] In one of the embodiments, the large model analysis layer comprises a syntax parser, a feature extraction hybrid model, a customized large model, and a risk detection component; the code parsing analysis and risk detection processing of the business code according to the large model analysis layer to obtain the dependency graph and risk information corresponding to the business code comprises:

[0012] parsing the code structure of the business code according to the syntax parser to obtain code structure information;

[0013] extracting features of the business code and the code structure information according to the feature extraction hybrid model to obtain a code feature vector;

[0014] identifying the dependency relationship of the code feature vector based on the customized large model to obtain a dependency graph;

[0015] performing risk detection processing on the code feature vector based on the risk detection component to obtain risk information.

[0016] In one of the embodiments, the customized large model comprises an input layer, an encoding layer, a relationship reasoning layer, and an output layer; the code feature vector obtained by extracting features of the business code and the code structure information according to the feature extraction hybrid model comprises:

[0017] performing semantic understanding on the business code according to the input layer, and performing label injection on the code structure information to obtain code structured information;

[0018] extracting features of the code structured information according to the encoding layer to obtain a code feature vector containing semantic features and structural features;

[0019] the dependency graph obtained by identifying the dependency relationship of the code feature vector based on the customized large model comprises:

[0020] identifying element nodes contained in the code feature vector based on the relationship reasoning layer, and connecting the association relationship between each of the element nodes to obtain edge information;

[0021] identifying the association relationship corresponding to the edge information based on the element nodes and the edge information to obtain a dependency relationship classification result, and obtaining a dependency graph based on the dependency relationship classification result.

[0022] In one of the embodiments, after the code parsing analysis and risk detection processing of the business code according to the large model analysis layer to obtain the dependency graph and risk information corresponding to the business code, the method further comprises:

[0023] In a tree node corresponding to each dependency tree included in the dependency graph, a risk level corresponding to the risk information is determined;

[0024] Based on the risk level and the association relationship of the tree nodes in the dependency graph, an analysis report is generated and output for display.

[0025] In one embodiment, the multi-agent collaboration layer includes a mirror construction agent, a component splitting agent, and a resource evaluation agent; the dependency graph and the risk information are processed by each agent in the multi-agent collaboration layer respectively to obtain multiple sub-schemes in the containerization transformation, including:

[0026] Based on the identification of the dependency graph by the component splitting agent, independent modules in the dependency graph are determined, and component splitting is performed according to the independent modules to obtain a sub-scheme corresponding to the component splitting agent;

[0027] Based on the analysis and processing of the dependency graph, the risk information, and the sub-scheme corresponding to the component splitting agent by the mirror construction agent and the resource evaluation agent respectively, a sub-scheme corresponding to the mirror construction agent and a sub-scheme corresponding to the resource evaluation agent are obtained.

[0028] In one embodiment, the containerization deployment system further includes a configuration generation component; the containerization deployment of the original application according to the containerization scheme includes:

[0029] Performing environment demand analysis on the to-be-deployed environment of the containerization scheme according to the configuration generation component to determine environment parameters corresponding to the to-be-deployed environment;

[0030] Based on the environment parameters, parameter value filling is performed on the initial configuration file in the containerization scheme to obtain a target configuration file;

[0031] Establishing a communication connection with a target cloud platform and performing containerization deployment of the original application according to the target configuration file and the target cloud platform.

[0032] In a second aspect, the application also provides a containerization deployment device, which is applied to a containerization deployment system including a large model analysis layer and a multi-agent collaboration layer, and the device includes:

[0033] An acquisition module for acquiring business code of an original application;

[0034] An analysis processing module for performing code analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code;

[0035] The cooperation processing module is configured to perform cooperation processing on the dependency graph and the risk information respectively by each agent in the multi-agent cooperation layer, to obtain a plurality of sub-schemes in the containerization reconstruction, and to perform summary analysis on each of the sub-schemes to obtain a containerization scheme.

[0036] The deployment module is configured to perform containerization deployment on the original application according to the containerization scheme.

[0037] In one of the embodiments, the large model analysis layer includes a syntax parser, a feature extraction hybrid model, a customized large model, and a risk detection component; the parsing processing module is specifically configured to parse a code structure of the business code according to the syntax parser to obtain code structure information;

[0038] The feature extraction hybrid model is configured to perform feature extraction on the business code and the code structure information to obtain a code feature vector;

[0039] The customized large model is configured to perform dependency relationship identification on the code feature vector to obtain a dependency graph;

[0040] The risk detection component is configured to perform risk detection processing on the code feature vector to obtain risk information.

[0041] In one of the embodiments, the customized large model includes an input layer, an encoding layer, a relationship reasoning layer, and an output layer; the parsing processing module is specifically configured to perform semantic understanding on the business code according to the input layer, and to perform label injection on the code structure information to obtain code structured information;

[0042] The encoding layer is configured to perform feature extraction on the code feature vector to obtain a code feature vector containing semantic features and structural features;

[0043] The relationship reasoning layer is configured to identify element nodes contained in the code feature vector, and to connect the associated relationships between each of the element nodes to obtain edge information;

[0044] The element nodes and the edge information are configured to identify the associated relationships corresponding to the edge information to obtain a dependency relationship classification result, and to obtain a dependency graph based on the dependency relationship classification result.

[0045] In one of the embodiments, the apparatus further includes:

[0046] The determination module is configured to determine a risk level corresponding to the risk information in each tree node corresponding to each dependency tree in the dependency graph;

[0047] The generating module is configured to generate an analysis report and output a display based on the risk level and the association relationship of the tree nodes in the dependency graph.

[0048] In one of the embodiments, the multi-agent cooperation layer includes a mirror construction agent, a component splitting agent, and a resource evaluation agent; the cooperation processing module is specifically configured to identify the dependency graph based on the component splitting agent, determine independent modules in the dependency graph, and perform component splitting according to the independent modules to obtain a sub-scheme corresponding to the component splitting agent;

[0049] The mirror construction agent and the resource evaluation agent analyze and process the dependency graph, the risk information, and the sub-scheme corresponding to the component splitting agent, respectively, to obtain a sub-scheme corresponding to the mirror construction agent and a sub-scheme corresponding to the resource evaluation agent.

[0050] In one of the embodiments, the containerization deployment system further includes a configuration generation component; the deployment module is specifically configured to perform environment demand analysis on a to-be-deployed environment of the containerization scheme based on the configuration generation component, and determine environment parameters corresponding to the to-be-deployed environment;

[0051] The environment parameters are used to fill in parameter values of an initial configuration file in the containerization scheme to obtain a target configuration file;

[0052] A communication connection with a target cloud platform is established, and the original application is containerized and deployed based on the target configuration file and the target cloud platform.

[0053] In a third aspect, the present application further provides a computer device including a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0054] Obtaining business code of an original application;

[0055] Performing code analysis and risk detection processing on the business code based on the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code;

[0056] Performing cooperation processing on the dependency graph and the risk information based on each agent in the multi-agent cooperation layer to obtain a plurality of sub-schemes in containerization reconstruction, and performing summary analysis on each of the sub-schemes to obtain a containerization scheme;

[0057] Performing containerization deployment on the original application based on the containerization scheme.

[0058] In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0059] obtaining a business code of an original application;

[0060] performing code analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code;

[0061] performing collaborative processing on the dependency graph and the risk information by each agent in the multi-agent collaboration layer to obtain a plurality of sub-schemes in containerization reconstruction, and performing summary analysis on each of the sub-schemes to obtain a containerization scheme;

[0062] performing containerization deployment on the original application according to the containerization scheme.

[0063] In a fifth aspect, the present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the following steps:

[0064] obtaining a business code of an original application;

[0065] performing code analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code;

[0066] performing collaborative processing on the dependency graph and the risk information by each agent in the multi-agent collaboration layer to obtain a plurality of sub-schemes in containerization reconstruction, and performing summary analysis on each of the sub-schemes to obtain a containerization scheme;

[0067] performing containerization deployment on the original application according to the containerization scheme.

[0068] The containerization deployment method, device, computer device, computer readable storage medium and computer program product described above, the method is applied to a containerization deployment system, the containerization deployment system comprises a large model analysis layer and a multi-agent collaboration layer. The large model analysis layer of the containerization deployment system can perform code analysis and risk detection processing on the business code of an original application, can identify the dependency relationship between each element in the business code and form a dependency graph, and can obtain risk information of each dependency relationship, which serves as the basis for data processing of the multi-agent collaboration layer, can reduce the complexity and error rate of manual operation, and can improve the accuracy of code analysis. Furthermore, the multi-agent collaboration layer can analyze and process the dependency graph and the risk information to obtain sub-schemes for containerization reconstruction, and can perform summary on the sub-schemes obtained based on multi-angle analysis to obtain a containerization scheme, which can further improve the efficiency of containerization deployment. BRIEF DESCRIPTION OF DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0070] Figure 1 A flowchart of a containerization deployment method in an embodiment;

[0071] Figure 2 A schematic diagram of a containerization deployment system in an embodiment;

[0072] Figure 3 A flowchart of a process of dependency relationship identification and risk detection on business code in an embodiment;

[0073] Figure 4 A flowchart of a process of data processing by a large model analysis layer in an embodiment;

[0074] Figure 5 A flowchart of a process of generating a dependency graph in an embodiment;

[0075] Figure 6 A flowchart of a process of generating an analysis report in an embodiment;

[0076] Figure 7 A schematic diagram of an analysis report instance in an embodiment;

[0077] Figure 8 A flowchart of a process of collaboration processing by a multi-agent collaboration layer in an embodiment;

[0078] Figure 9 A schematic diagram of collaboration processing by each agent in a multi-agent collaboration layer in an embodiment;

[0079] Figure 10 A flowchart of a process of generating a target configuration file and containerization deployment in an embodiment;

[0080] Figure 11 A structural block diagram of a containerization deployment apparatus in an embodiment;

[0081] Figure 12 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0082] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0083] It should be noted that the terms "first", "second", etc. used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" used in the present application and any variations thereof are intended to cover non-exclusive inclusion. The term "multiple" used in the present application refers to two or more. The term "and / or" used in the present application refers to one of the options or any combination of multiple options.

[0084] In one embodiment, as shown in Figure 1 A containerized deployment method is provided. In this embodiment, the method is applied to a terminal. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction of the terminal and the server. In this embodiment, the method is applied to a containerized deployment system including a large model analysis layer and a multi-agent collaboration layer. The method includes the following steps:

[0085] Step 102, obtaining the business code of the original application.

[0086] In the present application, the original application can be an application that has been deployed according to a traditional deployment method. The traditional deployment method is physical machine deployment or virtual machine deployment, that is, the process of directly installing and running an application program on a physical server or a virtual machine. Because the traditional deployment method has strong dependence on the environment, the traditional deployment method has high deployment complexity in different environments, and the traditional deployment method has poor scalability.

[0087] To improve the deployment efficiency of the original application and improve the efficiency of the original application running in different environments, the terminal can containerize the deployment of the original application, improve the deployment efficiency through containerized deployment, and reduce the dependence of application deployment and running on the environment. Then, before containerizing the deployment of the original application, the original application needs to be analyzed to determine the scheme for containerizing the deployment of the original application.

[0088] First, the developer can input the business code of the original application to the containerized deployment system, and then the large model analysis layer of the containerized deployment system in the terminal obtains the business code of the original application, so as to analyze the business code of the original application through the large model analysis layer.

[0089] At step 104, the business code is analyzed and risk detection processing is performed according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code.

[0090] The business code can be a complete application source code.

[0091] The dependency graph is used to represent the dependency relationship between each part of the business code.

[0092] In the embodiment of the application, the terminal performs deep analysis and risk assessment on the business code by using the large model analysis layer. The large model analysis layer has learned the syntax understanding and semantic reasoning ability of the business code in advance, and then, when the business code is input into the large model analysis layer, the large model analysis layer identifies the type of the original application, the elements contained in the business code, and analyzes the logic of the original code, and identifies the dependency relationship between the elements. In addition, the large model analysis layer has learned the knowledge of code vulnerabilities and potential risks in advance, for example, the large model analysis layer has learned the characteristics of code vulnerabilities and performance bottlenecks in the business code.

[0093] Specifically, after the terminal obtains the business code of the original application, the business code is provided as input to the large model analysis layer. The terminal scans the business code line by line through the large model analysis layer, automatically identifies the type of the original application according to the syntax rules of the programming language, for example, the type of the original application can be a Web (World Wide Web, global wide area network) application, a micro-service application, etc., and identifies the dependency relationship in the business code, for example, library file dependency, module dependency, etc., and then constructs a syntax tree corresponding to the business code. The syntax tree is a tree structure, which is used to represent each element and its relationship in the code in a graphical manner. By analyzing the syntax tree, the large model analysis layer can quickly locate and identify the dependency relationship of the business code.

[0094] Then, the terminal analyzes potential problems such as code vulnerabilities and performance bottlenecks based on the large model analysis layer, and outputs redundant codes, inefficient algorithms, and other optimization points in the source code. For example, for the analysis of code vulnerabilities, the large model compares the parsed code with the known vulnerability pattern library, and if it finds that there is a part in the business code that may cause a vulnerability, it is marked and the type of the vulnerability and the possible impact are specified; for the analysis of performance bottlenecks, the large model analyzes the performance bottlenecks of the code, for example, whether there is a lot of repeated calculation in the code, whether an inefficient algorithm is used, etc., and then determines the performance of the code by evaluating the complexity of the code.

[0095] Finally, in the process of code parsing analysis and risk detection processing, the large model analysis layer records the dependency relationship between each module in the code, including library file dependency, module dependency, etc. According to the dependency relationship, a dependency graph corresponding to the business code is generated. At the same time, the large model analysis layer collates all the risk information detected, including vulnerability type, risk level, possible impact, etc., to obtain the risk information corresponding to the business code.

[0096] In step 106, each agent in the multi-agent collaboration layer respectively processes the dependency graph and risk information to obtain multiple sub-schemes in the containerization reconstruction, and analyzes and summarizes each sub-scheme to obtain a containerization scheme.

[0097] In the embodiment of the application, when the large model analysis layer completes the analysis and processing of the business code and obtains the dependency graph and risk information, the terminal inputs the dependency graph and risk information into the multi-agent collaboration layer, and performs multi-dimensional analysis and processing on the dependency graph and risk information through the multi-agent collaboration layer. Different tasks are performed on the original application, such as image construction, component splitting and combination, resource evaluation, etc. In the image construction process, appropriate base images are selected and the deployment method of the application code in the image is determined according to the application type and the dependency relationship; in the component splitting and combination process, the independent service components that can be split out are determined by analyzing the functional modules of the original application, so as to improve the scalability and flexibility after containerization; in the resource evaluation process, the required computing, storage and network resources are evaluated by combining the performance requirements of the original application and the actual environment resource status.

[0098] Each agent in the multi-agent collaboration layer generates a sub-scheme related to its own task through information sharing and collaboration, including the image construction step, the component splitting and combination strategy, and the resource allocation plan. Then, the terminal analyzes and summarizes each sub-scheme, considers various factors comprehensively, and finally obtains a comprehensive and reasonable recommended scheme for application containerization reconstruction and deployment, i.e., a containerization scheme.

[0099] For the summary analysis of the sub-scheme, the multi-agent collaboration layer includes a scheme integration agent, which merges and optimizes the sub-schemes output by each agent to generate a containerization scheme. In the multi-task collaboration decision of the multi-agent collaboration layer, the multi-agent collaboration layer uses an auction algorithm for task allocation, uses a Nash equilibrium algorithm based on game theory to solve conflicts, and uses a Drools (a kind of open source business rule management system) rule engine to realize agent priority scheduling. At the same time, the terminal evaluates the indicators according to the following formula (1):

[0100] Score = α·Performance + β·Security + γ·Cost (1)

[0101] Performance represents the performance index of the containerization scheme, Security represents the security index of the containerization scheme, and Cost represents the resource index of the containerization scheme. α, β, and γ represent the weight coefficients of the performance index, the security index, and the resource index, respectively.

[0102] In step 108, the original application is containerized and deployed according to the containerization scheme.

[0103] In the embodiment of the present application, the terminal containerizes and deploys the original application according to the containerization scheme. First, the terminal constructs an image according to the image construction step in the containerization scheme, and integrates the original application code into the image according to the selected suitable base image and the established deployment method. Then, the terminal splits or combines the functional modules of the original application according to the component splitting and combining strategy, and encapsulates the independent components into separate containers. Then, the terminal allocates the required computing resources, storage resources, and network resources to each container according to the resource allocation plan. It ensures that each container can obtain sufficient resources to meet its performance requirements, while avoiding the waste caused by excessive allocation of resources. Finally, as shown in Figure 2 the terminal deploys all the configured containers to the target environment, manages and monitors the containers through a container orchestration tool (for example, Kubernetes), and ensures that the original application runs stably and efficiently in the containerized environment, thus completing the containerization deployment of the original application.

[0104] In the above containerization deployment method, the analysis and risk detection of the business code of the original application are performed by the large model analysis layer of the containerization deployment system, which can identify the dependency relationships between elements in the business code and form a dependency graph, as well as the risk information of each dependency relationship, which serves as the basis for data processing of the multi-agent collaboration layer. This can reduce the complexity and error rate of manual operation and improve the accuracy of code analysis. Furthermore, through the analysis and processing of the dependency graph and risk information by the multi-agent collaboration layer, the sub-scheme for containerization transformation is obtained, and the containerization scheme is obtained by summarizing the sub-schemes obtained based on multi-angle analysis, which can further improve the efficiency of containerization deployment.

[0105] In an exemplary embodiment, the large model analysis layer includes a syntax parser, a feature extraction hybrid model, a customized large model, and a risk detection component, as shown in Figure 3 Step 104 includes steps 302 to 308. Among them:

[0106] In step 302, the code structure of the business code is parsed according to the syntax parser to obtain code structure information.

[0107] In the embodiment of the present application, as shown in Figure 4As shown, the terminal first performs semantic understanding analysis on the input source code through the large model analysis layer to obtain code structure information.

[0108] In one specific embodiment, as shown, the large model analysis layer further includes a source code preprocessing module. The source code preprocessing module is configured to perform preliminary semantic understanding on the business code, uses an ANTLR (Another Tool for Language Recognition) grammar parser to construct a language-specific parser, can support 12 languages such as Java, Python, and Go, and parses the code structure by generating an abstract syntax tree (AST) to identify classes, functions, and dependency import statements, and obtain code structure information. Figure 2

[0109] Step 304: According to the feature extraction hybrid model, the business code and the code structure information are subjected to feature extraction to obtain a code feature vector.

[0110] In the embodiments of the present application, the terminal further extracts features from the business code according to the feature extraction hybrid model to obtain a code feature vector that can be directly analyzed and processed by the customized large model. The feature extraction hybrid model can use a TF-IDF+Word2Vec hybrid model to extract key features from the business code and the code structure information, and convert the extracted key features into a code feature vector that can be directly analyzed and processed by the customized large model.

[0111] Step 306: Based on the customized large model, the code feature vector is subjected to dependency relationship identification to obtain a dependency graph.

[0112] In the embodiments of the present application, after obtaining the code feature vector, the terminal inputs the code feature vector into the customized large model, and identifies the dependency relationship of the code feature vector through the customized large model. The customized large model uses the knowledge and algorithms learned by itself to analyze the correlation and dependency relationship between each part of the code feature vector. For example, a function can depend on other functions or classes, and different modules can also have a relationship of mutual calling. Through identification and sorting of these dependency relationships, a dependency graph is finally generated. The dependency graph visually shows the dependency relationship between each element in the code, which helps developers clearly understand the overall architecture and internal relationship of the code, and provides a reference basis for subsequent containerization analysis.

[0113] Step 308: Based on the risk detection component, the code feature vector is subjected to risk detection processing to obtain risk information.

[0114] ​In the embodiments of the present application, finally, the terminal utilizes the risk detection component to perform comprehensive risk detection processing on the code feature vector. The risk detection component is built-in with a series of rules and algorithms for identifying various risks that may exist in the code. The risks may include security vulnerabilities, such as SQL injection, cross-site scripting, etc.; or performance problems, such as low code efficiency, excessive resource occupation, etc. Through risk detection analysis of the code feature vector, the risk detection component can accurately locate these potential security and performance risks and generate detailed risk information. The risk information can include the type, location, and possible impact of the risks, etc.

[0115] In the embodiments, the business code is parsed by the syntax parser and an abstract syntax tree is generated, which can accurately identify classes, functions, and dependency import statements in the code, obtain code structure information, and use the feature extraction hybrid model to extract features from the business code and the code structure information to obtain a code feature vector that can be directly processed by the customized large model for further analysis. Then, the customized large model identifies the dependency relationship of the code feature vector to generate an intuitive dependency graph, which provides a reference for containerization analysis, and finally the risk detection component performs comprehensive risk detection on the code feature vector to accurately identify potential security vulnerabilities and performance problems in the code and generate a risk report containing detailed information such as risk type, location, and impact, thereby improving the efficiency of containerization analysis.

[0116] In one exemplary embodiment, the customized large model includes an input layer, an encoding layer, a relationship reasoning layer, and an output layer, as shown in Figure 5 Step 304 includes steps 502 to 508. Among them:

[0117] Step 502, according to the input layer, the semantic understanding of the business code is performed, and the code structure information is marked and injected to obtain the code structured information.

[0118] Among them, the customized large model is built based on CodeBERT (a double-peak pre-training model for programming language and natural language processing).

[0119] In the embodiments of the present application, the input layer of the customized large model is used to enhance the structural information of the input to adapt to the analysis of the code dependency. Since the input of CodeBERT is a text sequence, and the dependency of the code is closely related to the structure, special processing is required for the business code. First, the code structure information is marked and injected, including Tokenization of the program code, i.e., after semantic understanding, the terminal performs Tokenization operation on the program code, splits the source code into CodeBERT sub-word Token, for example, splits the source code into "def", "func_name" and variable name, etc., and ensures the integrity of the function name, variable name and other identifiers, so that the customized large model can better understand the basic composition unit of the business code. Second, the terminal marks and injects the code structure information of the business code through the customized large model, specifically including inserting abstract syntax tree node type marks to identify the syntax role of the code elements; adding position coding marks such as line number and column number to distinguish the spatial position of the code elements; adding special marks to the function, variable and other key elements to facilitate the positioning of the customized large model. Finally, the terminal obtains the code structured information as the data for subsequent feature extraction.

[0120] In step 504, the code structured information is feature extracted according to the encoding layer to obtain a code feature vector containing semantic features and structural features.

[0121] In the embodiments of the present application, the terminal inputs the code structured information obtained by the input layer into the encoding layer, and feature extracts the code structured information through the encoding layer to obtain a code feature vector containing semantic features and structural features.

[0122] Specifically, the encoding layer uses CodeBERT as a basic encoder to process the code structured information. CodeBERT can output context-aware embeddings of the code, so that the embedding of each Token contains local context information. For functions, variables and other elements, the terminal extracts the corresponding code feature vector through the position of each element in the sequence (for example, the start / end index of the function) by using CodeBERT. The code feature vector contains both semantic features and structural features of the code, which is used as the input of subsequent relationship reasoning, and thus the powerful encoding capability of CodeBERT can be fully utilized to effectively integrate the semantic and structural information of the code, and provide strong support for accurately identifying the dependency relationship between the code elements.

[0123] Step 306 includes steps 506 to 508, wherein:

[0124] In step 506, the element nodes contained in the code feature vector are identified based on the relationship reasoning layer, and the association relationship between the element nodes is connected to obtain edge information.

[0125] In this embodiment, at the relational reasoning layer, the terminal first marks the functions, variables, statements, and other elements corresponding to the embeddings output by CodeBERT as nodes. Then, initial connections are made between elements and adjacent statements within the same scope to extract dependency objects and form edges. Next, the terminal propagates node information through a graph neural network (GNN), ensuring that the updated node features contain the global dependency context. Edge information represents the relationships between code elements and is a crucial intermediate result for identifying code dependencies. By identifying edge information, potential connections between elements can be mined from the code feature vector, providing a basis for the final dependency classification.

[0126] Step 508: Identify the association relationships corresponding to the edge information based on the element nodes and edge information to obtain the dependency relationship classification results, and obtain the dependency graph based on the dependency relationship classification results.

[0127] In this embodiment, at the output layer, for each candidate element pair, the terminal predicts dependency types such as "call," "reference," and "no dependency" using a fully connected layer and a Softmax function. If it is necessary to identify all possible dependencies, non-maximum suppression (NMS) is also used to filter out dependency pairs with high confidence. Based on the above dependency classification results, the output layer automatically parses configuration files such as pom.xml (Java) and requirements.txt (Python) to generate a dependency tree and finally a dependency graph.

[0128] In this embodiment, the business code is semantically understood and dependency relationships are identified step by step through the input layer, encoding layer, relational reasoning layer and output layer of a customized large model, and finally a dependency graph is generated, which can improve the efficiency of containerized analysis of the original application's business code.

[0129] In one exemplary embodiment, such as Figure 6 As shown, after step 106, the method further includes steps 602 to 604. Wherein:

[0130] Step 602: Determine the risk level corresponding to the risk information in the tree nodes corresponding to each dependency tree contained in the dependency graph.

[0131] In the embodiments of the present application, the dependency graph is composed of multiple dependency trees, and each dependency tree contains a plurality of tree nodes, each of which represents various elements in the business code, such as functions, variables, modules, etc. Specifically, the terminal performs security vulnerability detection through CVE vulnerability database matching and static analysis, performs performance bottleneck detection based on control flow graph for code complexity analysis, and performs code architecture smell detection using LCOM4 metric and according to SonarQube (an open source code quality management platform) rule engine to identify hard-coded configuration, empty catch block and other code smells. The risk information in the code has been obtained. At this time, the terminal needs to determine the risk level corresponding to the risk information in each tree node of the dependency graph. The determination of the risk level can provide an important basis for subsequent processing decisions.

[0132] In step 604, an analysis report is generated and output based on the risk level and the association relationship of the tree nodes in the dependency graph.

[0133] In the embodiments of the present application, after the risk level is determined, the terminal generates an analysis report using the risk level and the association relationship of the tree nodes in the dependency graph. The association relationship of the tree nodes in the dependency graph reflects the dependency and call relationship between the code elements, and in combination with the risk level, the risk status in the code can be comprehensively and systematically presented. Therefore, the analysis report can record the specific circumstances of each risk in detail, including the tree node (i.e. code element) where the risk is located, the risk level, the risk type (security vulnerability, performance bottleneck, code architecture smell, etc.) and the possible impact. The generated analysis report is output in a structured and visualized manner, which is convenient for developers to view and understand. For example, the analysis report can present the risk information in the form of charts, lists, etc., so that the developers can quickly locate and handle high-risk problems, and also help to evaluate and optimize the overall quality of the code.

[0134] As shown in FIG. 6, the analysis report is generated based on the risk level and the association relationship of the tree nodes in the dependency graph. Figure 7 As shown in FIG. 6, the analysis report is generated based on the risk level and the association relationship of the tree nodes in the dependency graph. Figure 7 As shown in FIG. 6, the analysis report is generated based on the risk level and the association relationship of the tree nodes in the dependency graph. As shown in FIG. 6, the analysis report is generated based on the risk level and the association relationship of the tree nodes in the dependency graph.

[0135] In this embodiment, the analysis report is generated based on the risk level and the tree node association relationship and is output and displayed in a structured and visualized manner. The report records the specific conditions of the risks in detail, including the tree node, the risk level, the type, and the possible influence, and is presented in the form of charts and lists for the developer to refer to, so as to facilitate the developer to quickly locate and handle high-risk problems and help to evaluate and optimize the overall quality of the code. The efficiency of application containerization reconstruction and deployment can be significantly improved, and the complexity and error rate of manual operation can be reduced. Compared with traditional static analysis tools such as SonarQube, the application also adds the code intention recognition capability, can automatically distinguish business logic and tool code, and the overall analysis accuracy is improved to more than 90%.

[0136] In an exemplary embodiment, the multi-agent cooperation layer includes a mirror building agent, a component splitting agent, and a resource evaluation agent. Figure 8 As shown, step 106 includes steps 802 to 804. Among them:

[0137] Step 802, based on the component splitting agent, the dependency graph is identified, the independent module in the dependency graph is determined, and the component splitting agent is split according to the independent module to obtain the sub-scheme corresponding to the component splitting agent.

[0138] In the embodiment of the application, as shown in Figure 9As shown, the component splitting agent includes independent module identification, hierarchical optimization algorithm, and microservice splitting. First, the independent module identification, the component splitting agent deeply analyzes the application structure based on the dependency graph of the application. The dependency graph details the dependency relationships between various elements (e.g., functions, variables, modules, etc.) in the business code, and the component splitting agent can accurately identify independent modules with relative independence. For stateless services, it uses Deployment for management; for stateful services, it uses StatefulSet management. Services communicate through Kubernetes Service, shared configurations are managed through ConfigMap, and sensitive information is injected through Secret. Independent modules can be independently run and maintained, and are the basis for subsequent splitting. Next, to achieve more efficient splitting and resource utilization, the terminal uses a hierarchical optimization algorithm that considers factors such as module dependency, coupling degree, and business logic relevance to optimize and adjust the hierarchical structure of the modules, making the relationships between modules more clear and reasonable and reducing unnecessary dependencies and interactions. Finally, after completing independent module identification and hierarchical optimization, the component splitting agent performs microservice splitting, based on the results of hierarchical optimization and business requirements, to split the application into multiple microservices. Each microservice corresponds to an independent container with clear functions and responsibilities and can be independently deployed, expanded, and managed. This facilitates subsequent containerized deployment and management, improving system maintainability, scalability, and resource utilization efficiency. At the same time, the terminal application hierarchical optimization genetic algorithm optimizes the Docker Layer component splitting. Ultimately, the terminal obtains the sub-scheme corresponding to the component splitting agent, which provides a basis for subsequent image building and resource assessment and specific recommendations for microservice division.

[0139] Step 804, based on the image building agent and the resource evaluation agent, respectively analyzes and processes the dependency graph, risk information, and the sub-scheme corresponding to the component splitting agent to obtain the sub-scheme corresponding to the image building agent and the sub-scheme corresponding to the resource evaluation agent.

[0140] In the embodiment of the present application, after the component splitting agent completes component splitting and obtains a sub-solution, the mirror building agent and the resource evaluation agent respectively perform collaborative processing on the sub-solution, the dependency graph, and the risk information of the component splitting agent. The mirror building agent analyzes and processes according to the dependency graph, the risk information, and the sub-solution of the component splitting agent. The mirror building agent includes selecting a base image, generating a hierarchical suggestion, and image generation. First, the mirror building agent selects a suitable base image according to the language type and generates a hierarchical suggestion, finally completes the image generation suggestion for the micro service, and obtains the sub-solution corresponding to the mirror building agent. The resource evaluation agent includes an interface definition algorithm, code performance simulation, and resource evaluation. The resource evaluation agent also bases on the dependency graph, the risk information, and the sub-solution of the component splitting agent, calculates the resource demand through code performance simulation, and predicts the resource consumption by using the QoS (Quality of Service, service quality) guarantee LSTM, thereby obtaining the sub-solution corresponding to the resource evaluation agent. The work of the two agents is interrelated and cooperative, and their sub-solutions and the sub-solution of the component splitting agent together provide comprehensive and detailed information for subsequent solution integration, which helps to realize the containerization deployment of code and the reasonable allocation and management of resources.

[0141] In the embodiment, the component splitting agent identifies the dependency graph, determines independent modules, and completes the component splitting operation. By using appropriate management methods, communication means, and optimization algorithms, the sub-solution corresponding to the component splitting agent is finally obtained, which lays a foundation for subsequent mirror building and resource evaluation. The mirror building agent and the resource evaluation agent analyze and process based on the dependency graph, the risk information, and the sub-solution of the component splitting agent, and respectively obtain the sub-solutions corresponding to each other. The work of the two agents is interrelated and cooperative, and the three sub-solutions together provide comprehensive and detailed information for subsequent solution integration, which helps to realize the containerization deployment of code and the reasonable allocation and management of resources, and improves the efficiency of containerization analysis of business code.

[0142] In one exemplary embodiment, the containerization deployment system further includes a configuration generation component; as Figure 10 As shown, step 108 includes steps 1002 to 1006. Among them:

[0143] Step 1002: According to the environment demand analysis of the containerization solution by the configuration generation component on the to-be-deployed environment, the environment parameters corresponding to the to-be-deployed environment are determined.

[0144] In the embodiments of the present application, the configuration generation component undertakes the important task of comprehensively analyzing the containerization scheme to be deployed environment. First, the terminal determines the specific details of the application of containerization based on the containerization scheme, including image version, component configuration, and resource allocation information. Next, the bullet flies to analyze the target environment to which the actual container application is to be deployed from multiple dimensions. In terms of cloud platform type analysis, the terminal constructs a cloud platform feature matrix through the configuration generation component, and details the underlying resource management type of the environment, determines whether it is a virtualization mode, whether there is an IaaS (Infrastructure as a Service, Infrastructure as a Service) management platform, or a physical machine mode or bare metal mode, and determines the operating system version, kernel version, and CPU architecture of the target environment. For network configuration analysis, the terminal determines the physical networking, network topology, switch topology (for example, BGP (Border Gateway Protocol), IPIP (IP-in-IP, a tunneling protocol), etc.), network communication status of each host node, and special requirements for network segment division of the target environment. Security policy analysis focuses on the security configuration of the target environment, covering authentication, authentication, security software, encryption devices, and openable ports. Finally, the terminal determines the environment parameters corresponding to the to-be-deployed environment as the data for subsequent configuration file generation.

[0145] Step 1004, based on the environment parameters, the initial configuration file in the containerization scheme is filled with parameter values to obtain a target configuration file.

[0146] In the embodiments of the present application, after the environment parameters of the to-be-deployed environment are determined, the terminal fills in the parameter values of the initial configuration file. First, the image details are processed, and the terminal modifies and sets the parameters in the container application configuration in the image that depend on the target environment through the configuration generation component, for example, environment variable assignment, startup script input filling, application startup resource QoS setting, comparison of planned ports with target environment openable ports, determination of mounting information, etc. The final Dockerfile file is generated using the image template generation algorithm. In terms of component configuration generation, the Kubernetes template library is used to define resource templates such as Deployment, Service, Horizontal Pod Autoscaler (HPA), and support for environment variable injection (for example, the {{ env}} placeholder). For resource allocation files, the configuration generation component maps target environment parameters according to the dynamic parameters output by the resource evaluation agent, including CPU quota, memory limit, network policy, etc., and configures value injection according to different types such as development environment and production environment. Finally, the terminal accurately fills in the environment parameters into the initial configuration file, thereby obtaining the target configuration file. For example, the Kubernetes orchestration file is used to define the deployment method of the container in the Kubernetes cluster, including the configuration of resources such as deployment, service, ingress, configmap, etc., to realize the automatic deployment, expansion and management of the application.

[0147] Optionally, the terminal can also perform deployment testing on the generated target configuration file. Specifically, the terminal uses Kube-bench to perform security compliance checking, and uses Locust and Prometheus monitoring to perform stress testing until the configuration verification pass rate requirement (for example, the pass rate is greater than or equal to 99.5%) is met, thereby completing the testing of the target configuration file.

[0148] Step 1006, a communication connection with the target cloud platform is established, and the original application is containerized and deployed according to the target configuration file and the target cloud platform.

[0149] In the embodiments of the present application, when the target configuration file is generated and verified and tested, the terminal application is containerized deployed. First, the terminal establishes a communication connection with the target cloud platform (for example, Kubernetes or Docker Swarm). The establishment of this communication connection is the key to ensuring that the configuration file can be accurately transmitted to the target cloud platform. Then, the terminal containerizes and deploys the original application according to the characteristics of the target configuration file and the target cloud platform. In the deployment process, the parameters in the target configuration file will guide the cloud platform to complete the deployment, expansion and management of the application, and realize the automated deployment of the application. The connection process can be manually uploaded to the target environment, or can be issued by means of a third-party platform such as an operation and maintenance management platform, so as to realize the successful deployment of the original application in the form of containerization to the target cloud platform, and then complete the containerization deployment of the original application.

[0150] In the embodiments, the containerization scheme to be deployed environment is analyzed in multiple dimensions by the configuration generation component, and the environment parameters are accurately determined to provide a reliable data basis for subsequent configuration file generation. The initial configuration file is filled with parameter values based on the environment parameters to obtain the target configuration file, ensuring the adaptability of the configuration file to the target environment. The communication connection with the target cloud platform is established and containerized deployment is performed according to the target configuration file, realizing the automated deployment, expansion and management of the application. In addition, the target configuration file has high flexibility and scalability, supports multi-environment configuration version management, can adapt to the needs of different cloud platforms and environments, improves the efficiency of containerization deployment, and reduces the deployment risk and cost.

[0151] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.

[0152] Based on the same inventive concept, the embodiments of the present application also provide a containerized deployment apparatus for implementing the containerized deployment method described above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so the specific limitations in one or more containerized deployment apparatus embodiments provided below can refer to the limitations of the containerized deployment method described above, which will not be repeated here.

[0153] In one exemplary embodiment, as shown in Figure 11 A containerized deployment apparatus 1100 is provided, which is applied to a containerized deployment system including a large model analysis layer and a multi-agent collaboration layer. The containerized deployment apparatus 1100 includes:

[0154] An acquisition module 1101 is configured to acquire business code of an original application.

[0155] An analysis processing module 1102 is configured to perform code analysis and risk detection processing on the business code according to the large model analysis layer, to obtain a dependency graph and risk information corresponding to the business code.

[0156] A collaboration processing module 1103 is configured to perform collaboration processing on the dependency graph and the risk information based on each agent in the multi-agent collaboration layer, to obtain a plurality of sub-schemes in containerized transformation, and to perform summary analysis on each sub-scheme to obtain a containerization scheme.

[0157] A deployment module 1104 is configured to perform containerized deployment on the original application according to the containerization scheme.

[0158] In one embodiment, the large model analysis layer includes a syntax parser, a feature extraction hybrid model, a customized large model, and a risk detection component. The analysis processing module 1102 is specifically configured to parse the code structure of the business code according to the syntax parser to obtain code structure information.

[0159] The feature extraction hybrid model is used to perform feature extraction on the business code and the code structure information to obtain a code feature vector.

[0160] The customized large model is used to identify the dependency relationship of the code feature vector to obtain a dependency graph.

[0161] The risk detection component is used to perform risk detection processing on the code feature vector to obtain risk information.

[0162] In one embodiment, the customized large model includes an input layer, an encoding layer, a relationship reasoning layer, and an output layer. The analysis processing module 1102 is specifically configured to perform semantic understanding on the business code according to the input layer, and to perform label injection on the code structure information to obtain code structured information.

[0163] The code feature vector is feature-extracted according to the coding layer to obtain a code feature vector containing semantic features and structural features;

[0164] The element nodes contained in the code feature vector are identified based on the relationship reasoning layer, and the association relationships between the element nodes are connected to obtain edge information;

[0165] The association relationships corresponding to the edge information are identified based on the element nodes and the edge information to obtain a dependency relationship classification result, and a dependency graph is obtained based on the dependency relationship classification result.

[0166] In one of the embodiments, the containerization deployment apparatus 1100 further includes:

[0167] A determination module is configured to determine a risk level corresponding to the risk information in the tree nodes corresponding to the dependency trees contained in the dependency graph;

[0168] A generation module is configured to generate an analysis report and output a display based on the risk level and the association relationships of the tree nodes in the dependency graph.

[0169] In one of the embodiments, the multi-agent collaboration layer includes a mirror construction agent, a component splitting agent, and a resource evaluation agent; and the collaboration processing module 1103 is specifically configured to identify the dependency graph based on the component splitting agent, determine independent modules in the dependency graph, and perform component splitting according to the independent modules to obtain a sub-scheme corresponding to the component splitting agent.

[0170] The mirror construction agent and the resource evaluation agent analyze and process the dependency graph, the risk information, and the sub-scheme corresponding to the component splitting agent respectively to obtain a sub-scheme corresponding to the mirror construction agent and a sub-scheme corresponding to the resource evaluation agent.

[0171] In one of the embodiments, the containerization deployment system further includes a configuration generation component; and the deployment module 1104 is specifically configured to perform environment demand analysis on a to-be-deployed environment of the containerization scheme according to the configuration generation component to determine environment parameters corresponding to the to-be-deployed environment.

[0172] The initial configuration file in the containerization scheme is filled with parameter values based on the environment parameters to obtain a target configuration file;

[0173] A communication connection with a target cloud platform is established, and the original application is containerized and deployed according to the target configuration file and the target cloud platform.

[0174] Each of the modules in the containerized deployment apparatus can be implemented by software, hardware and combinations thereof in whole or in part. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to the modules.

[0175] In an exemplary embodiment, a computer device, which can be a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 12 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals, and the wireless communication can be achieved through WIFI, mobile cellular network, Near Field Communication (NFC) or other technologies. The computer program is executed by the processor to implement a containerized deployment method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, a trackball or a touchpad arranged on the shell of the computer device, or an external keyboard, a touchpad or a mouse, etc.

[0176] Those skilled in the art can understand that Figure 12 The structure shown in the above description is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0177] In an exemplary embodiment, a computer device is provided, which includes a memory and a processor, and the memory stores a computer program. The processor executes the computer program to implement the following steps:

[0178] Obtain the business code of the original application;

[0179] The business code is analyzed and risk detection processing is performed on the business code according to the large model analysis layer, to obtain dependency graph and risk information corresponding to the business code;

[0180] The dependency graph and the risk information are processed by each agent in the multi-agent cooperation layer respectively, to obtain a plurality of sub-schemes in containerization reconstruction, and each of the sub-schemes is analyzed to obtain a containerization scheme;

[0181] The original application is containerized and deployed according to the containerization scheme.

[0182] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0183] The code structure of the business code is parsed according to the syntax parser to obtain code structure information;

[0184] The code feature vector is obtained by extracting features of the business code and the code structure information according to the feature extraction hybrid model;

[0185] The dependency graph is obtained by identifying the dependency relationship of the code feature vector based on the customized large model;

[0186] The risk information is obtained by performing risk detection processing on the code feature vector based on the risk detection component.

[0187] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0188] The code structure information is obtained by performing semantic understanding on the business code and injecting labels into the code structure information according to the input layer;

[0189] The code feature vector containing semantic features and structural features is obtained by extracting features of the code structured information according to the coding layer;

[0190] The dependency graph is obtained by identifying the dependency relationship of the code feature vector based on the customized large model, including:

[0191] The element nodes contained in the code feature vector are identified based on the relationship reasoning layer, and the association relationship between each of the element nodes is connected to obtain edge information;

[0192] The association relationship corresponding to the edge information is identified based on the element nodes and the edge information to obtain a dependency relationship classification result, and the dependency graph is obtained based on the dependency relationship classification result.

[0193] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0194] In the tree nodes corresponding to each dependency tree included in the dependency graph, a risk level corresponding to the risk information is determined;

[0195] Based on the risk level and the association relationship of the tree nodes in the dependency graph, an analysis report is generated and output for display.

[0196] In one embodiment, the processor executing the computer program also implements the following steps:

[0197] Based on the component splitting agent, the dependency graph is identified, the independent modules in the dependency graph are determined, and the component splitting agent is obtained according to the independent modules.

[0198] Based on the image building agent and the resource evaluation agent, the dependency graph, the risk information, and the sub-scheme corresponding to the component splitting agent are analyzed and processed, respectively, to obtain the sub-scheme corresponding to the image building agent and the sub-scheme corresponding to the resource evaluation agent.

[0199] In one embodiment, the processor executing the computer program also implements the following steps:

[0200] According to the configuration generation component, environment demand analysis is performed on the to-be-deployed environment of the containerization scheme, and environment parameters corresponding to the to-be-deployed environment are determined.

[0201] Based on the environment parameters, parameter value filling is performed on the initial configuration file in the containerization scheme to obtain a target configuration file.

[0202] A communication connection with a target cloud platform is established, and the original application is containerized and deployed according to the target configuration file and the target cloud platform.

[0203] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in each of the above method embodiments.

[0204] In one embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in each of the above method embodiments.

[0205] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0206] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0207] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0208] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method of containerized deployment, characterized by, The method is applied to a containerized deployment system including a large model analysis layer and a multi-agent collaboration layer, and the method comprises: obtaining the business code of the original application; performing code analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code; based on the collaboration of each agent in the multi-agent collaboration layer, the dependency graph and the risk information are processed to obtain a plurality of sub-schemes in the containerization reconstruction, and each sub-scheme is analyzed to obtain a containerization scheme; containerize the original application according to the containerization scheme.

2. The method of claim 1, wherein, The large model analysis layer includes a syntax parser, a feature extraction hybrid model, a customized large model, and a risk detection component; the code analysis and risk detection processing of the business code according to the large model analysis layer to obtain the dependency graph and risk information corresponding to the business code, comprising: parsing the code structure of the business code according to the syntax parser to obtain code structure information; extracting features from the business code and the code structure information according to the feature extraction hybrid model to obtain code feature vectors; based on the customized large model, the code feature vectors are used to identify the dependency relationship to obtain a dependency graph; based on the risk detection component, the code feature vectors are used for risk detection processing to obtain risk information.

3. The method of claim 2, wherein, The customized large model includes an input layer, an encoding layer, a relationship reasoning layer, and an output layer; the code feature vectors are obtained by extracting features from the business code and the code structure information according to the feature extraction hybrid model, comprising: According to the input layer, the semantic understanding of the business code is obtained, and the code structure information is marked and injected to obtain code structured information; According to the coding layer, the code structured information is used for feature extraction to obtain code feature vectors containing semantic features and structural features; based on the customized large model, the code feature vectors are used to identify the dependency relationship to obtain a dependency graph, comprising: based on the relationship reasoning layer, the element nodes contained in the code feature vectors are identified, and the association relationship between each element node is connected to obtain edge information; based on the element nodes and the edge information, the association relationship corresponding to the edge information is identified to obtain a dependency relationship classification result, and a dependency graph is obtained based on the dependency relationship classification result.

4. The method according to claim 1 or 2, characterized in that, After the code analysis and risk detection processing of the business code according to the large model analysis layer to obtain the dependency graph and risk information corresponding to the business code, the method further comprises: determining the risk level corresponding to the risk information in the tree nodes corresponding to each dependency tree in the dependency graph; based on the risk level and the association relationship between the tree nodes in the dependency graph, an analysis report is generated and output for display.

5. The method of claim 1, wherein, The multi-agent cooperation layer includes a mirror building agent, a component splitting agent, and a resource evaluation agent; the dependency graph and the risk information are respectively processed by the agents in the multi-agent cooperation layer to obtain multiple sub-schemes in the containerization reconstruction, including: The component splitting agent identifies the dependency graph to determine independent modules in the dependency graph, and performs component splitting according to the independent modules to obtain a sub-scheme corresponding to the component splitting agent; The mirror building agent and the resource evaluation agent analyze and process the dependency graph, the risk information, and the sub-scheme corresponding to the component splitting agent to obtain a sub-scheme corresponding to the mirror building agent and a sub-scheme corresponding to the resource evaluation agent.

6. The method of claim 1, wherein, The containerization deployment system further includes a configuration generation component; the containerization deployment of the original application according to the containerization scheme includes: The configuration generation component analyzes the environment demand of the deployment environment of the containerization scheme to determine the environment parameters corresponding to the deployment environment; The environment parameters are used to fill the parameter values of the initial configuration file in the containerization scheme to obtain a target configuration file; A communication connection with a target cloud platform is established, and the original application is containerized and deployed according to the target configuration file and the target cloud platform.

7. An apparatus for containerized deployment, the apparatus comprising: The device is applied to a containerization deployment system including a large model analysis layer and a multi-agent cooperation layer, and includes: An acquisition module is configured to acquire business code of an original application; A parsing processing module is configured to perform code parsing analysis and risk detection processing on the business code according to the large model analysis layer to obtain a dependency graph and risk information corresponding to the business code; A cooperation processing module is configured to respectively process the dependency graph and the risk information by agents in the multi-agent cooperation layer to obtain multiple sub-schemes in the containerization reconstruction, and to perform summary analysis on each of the sub-schemes to obtain a containerization scheme; A deployment module is configured to containerize and deploy the original application according to the containerization scheme. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.