Generation method and device of development operation and maintenance system, equipment and medium
Through the large language model, natural language is transformed into structured data, workflow tasks of development, operation and maintenance systems are generated, and tool chains are integrated, which solves the problem of low automation and intelligence levels in the generation process of DevOps system, and realizes automated generation and deployment. Improves system stability and flexibility.
Patent Information
- Application Number
- CN202411363295.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-07
AI Technical Summary
The level of automation and intelligence in the generation process of existing DevOps systems is low, resulting in complex environment configuration, difficulty in integrating tool chains, and the need to manually write pipeline scripts, which consumes a lot of manpower and time, and lacks flexibility, and cannot adapt to rapidly changing needs.
Use large language models to convert natural language into structured data, assemble model data, generate workflow tasks for development, operation and maintenance systems, and integrate them into the basic framework, generate and run toolchain installation and deployment scripts, and automatically complete compilation, packaging and deployment. , reduce the manual coding error rate, improve system stability and automation intelligence level.
Generating the development and operation and maintenance system through large language models reduces the error rate caused by manual coding, improves the system stability and automation intelligence level, shortens the development cycle, and improves the automation and intelligence level of the generation of the development and operation and maintenance system.
Smart Images

Figure CN119271207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a method, device, equipment and medium for generating a development and operation and maintenance system. Background Art
[0002] At present, in the field of artificial intelligence technology, the Development Operations (DevOps) system needs to be manually built and installed. During the manual construction and installation process, there are disadvantages such as complex environment configuration, difficult tool chain integration, and the need to manually write pipeline scripts. The construction and maintenance of traditional DevOps systems require a lot of manpower and time costs, and lack flexibility and cannot adapt to rapidly changing needs.
[0003] Therefore, in the generation process of the existing DevOps system, the level of automation and intelligence is low and there are certain limitations. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment and medium for generating a development and operation and maintenance system in response to the above-mentioned deficiencies in the prior art, so as to solve the practical problem of low automation and intelligence levels in the generation process of the development and operation and maintenance system in the prior art.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for generating a development and operation system, the method comprising:
[0007] The large language model converts the natural language into structured data, and assembles the model data according to the structured data, wherein the natural language is used to represent the task information of the development and operation system to be generated, and the structured data includes a plurality of initial task nodes;
[0008] Generate a workflow task for a development and operation system according to the model data, wherein the workflow task includes a plurality of workflow task nodes;
[0009] Building the basic framework of the development and operation system, integrating the workflow tasks into the basic framework, determining and integrating the development and operation system tool chains of each workflow task node according to each workflow task node, generating installation and deployment scripts of each development and operation system tool chain from the large language model, and running the installation and deployment scripts of each development and operation system tool chain to install and deploy the tools in each development and operation system tool chain;
[0010] Determine the prompt words of the large language model, and generate execution scripts corresponding to each system module, wherein the system modules include: a compilation module, a packaging module, and a deployment module;
[0011] The development and operation system is generated according to the execution scripts corresponding to the system modules and the preset execution parameters.
[0012] As an optional implementation method, the large language model converts natural language into structured data, including:
[0013] Recognize the natural language by the large language model and output a recognition result;
[0014] Determine whether the recognition result is structured data, and if not, convert the recognition result into structured data through a data conversion module.
[0015] As an optional implementation, assembling the model data according to the structured data includes:
[0016] Determine task information of tools for each initial task node and task execution information of each initial task node;
[0017] Model data is assembled according to the structured data, the task information and the task execution information.
[0018] As an optional implementation, generating a workflow task of a development and operation system according to the model data includes:
[0019] Assembling a workflow according to the model data and generating a definition file of the workflow;
[0020] According to the task type of the workflow task node, each target workflow task node is defined in the workflow definition file to generate the workflow task of the development and operation system, wherein the target workflow task node is used to indicate the workflow task node of the task implementation code to be bound.
[0021] As an optional implementation, the step of integrating the workflow task into the basic framework includes:
[0022] According to the task type of the workflow task node, each of the target workflow task nodes is bound to each of the task implementation codes.
[0023] As an optional implementation method, the generation of installation and deployment scripts for various development and operation system tool chains by the large language model includes:
[0024] Inputting the installation and deployment information of the development and operation system tool chain of each workflow task node into the large language model;
[0025] The large language model generates installation and deployment scripts for each development and operation system tool chain according to the installation and deployment information.
[0026] As an optional implementation method, after installing and deploying the development and operation system tool chains, the method further includes:
[0027] According to the target workflow task nodes, the business logic of the target workflow task nodes is added to the workflow task node of the task implementation code to be bound.
[0028] In a second aspect, an embodiment of the present application provides a device for generating a development and operation system, the device comprising:
[0029] An assembly module, used to convert natural language into structured data by a large language model, and assemble model data according to the structured data, wherein the natural language is used to represent task information of the development and operation system to be generated, and the structured data includes a plurality of initial task nodes;
[0030] A generation module, used to generate a workflow task for a development and operation system according to the model data, wherein the workflow task includes a plurality of workflow task nodes;
[0031] The generation module is further used to build the basic framework of the development and operation system, integrate the workflow tasks into the basic framework, determine and integrate the development and operation system tool chains of each workflow task node according to each workflow task node, generate installation and deployment scripts of each development and operation system tool chain from the large language model, and run the installation and deployment scripts of each development and operation system tool chain to install and deploy the tools in each development and operation system tool chain;
[0032] The generation module is further used to determine the prompt words of the large language model and generate execution scripts corresponding to each system module, wherein the system module includes: a compilation module, a packaging module and a deployment module;
[0033] The generation module is further used to generate the development and operation system according to the execution scripts corresponding to the system modules and the preset execution parameters.
[0034] As an optional implementation, the assembly module is specifically used for:
[0035] Recognize the natural language by the large language model and output a recognition result;
[0036] Determine whether the recognition result is structured data, and if not, convert the recognition result into structured data through a data conversion module.
[0037] As an optional implementation, the assembly module is specifically used for:
[0038] Determine task information of tools for each initial task node and task execution information of each initial task node;
[0039] Model data is assembled according to the structured data, the task information and the task execution information.
[0040] As an optional implementation, the generating module is specifically used for:
[0041] Assembling a workflow according to the model data and generating a definition file of the workflow;
[0042] According to the task type of the workflow task node, each target workflow task node is defined in the workflow definition file to generate the workflow task of the development and operation system, wherein the target workflow task node is used to indicate the workflow task node of the task implementation code to be bound.
[0043] As an optional implementation, the generating module is specifically used for:
[0044] According to the task type of the workflow task node, each of the target workflow task nodes is bound to each of the task implementation codes.
[0045] As an optional implementation, the generating module is specifically used for:
[0046] Inputting the installation and deployment information of the development and operation system tool chain of each workflow task node into the large language model;
[0047] The large language model generates installation and deployment scripts for each development and operation system tool chain according to the installation and deployment information.
[0048] As an optional implementation, the generating module is further used for:
[0049] According to the target workflow task nodes, the business logic of the target workflow task nodes is added to the workflow task node of the task implementation code to be bound.
[0050] In a third aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating a development and operation system as described in the first aspect above.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a development and operation system as described in the first aspect above are executed.
[0052] The beneficial effects of this application are:
[0053] The present application provides a method, device, equipment and medium for generating a development and operation system, wherein a large language model converts the task information of the development and operation system to be generated represented by natural language into structured data including multiple initial task nodes, and assembles the model data according to each initial task node in the structured data. According to the model data, a workflow is assembled to generate a workflow task of the development and operation system including multiple workflow task nodes, and the workflow task of the development and operation system is integrated into the basic framework of the development and operation system. The large language model generates and runs the installation and deployment script of the development and operation system tool chain of the workflow task node, and completes the installation and deployment of the tools in the development and operation system tool chain of each workflow task node. The prompt words of the large language model are assembled, and the execution scripts and execution parameters corresponding to the compilation module, packaging module and deployment module are generated according to the prompt words, and the execution scripts are respectively run according to the execution parameters to automatically complete the compilation, packaging and deployment of the development and operation system. The use of a large language model to generate a development and operation system reduces the error rate caused by manual coding, improves system stability, and improves the automation and intelligence level of generating a development and operation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flowchart of a method for generating a development and operation system provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a natural language provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a workflow task of a development and operation and maintenance system provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a process of converting natural language into structured data in a method for generating a development and operation system provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of a flow chart of assembling a method for generating a development and operation system provided in an embodiment of the present application to obtain model data;
[0060] Figure 6 A flowchart of a workflow task for generating a development and operation and maintenance system according to a method for generating a development and operation and maintenance system provided in an embodiment of the present application;
[0061] Figure 7 A flow chart of the method for generating a development and operation system according to an embodiment of the present application for generating an installation and deployment script for each development and operation system tool chain;
[0062] Figure 8 A module structure diagram of a generation device for a development and operation and maintenance system provided in an embodiment of the present application;
[0063] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0065] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0066] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0067] In the field of artificial intelligence technology, traditional DevOps systems require manual construction and installation, complex environment configuration, difficult tool chain integration, and manual writing of pipeline scripts, which consumes a lot of manpower and time costs, lacks flexibility, cannot adapt to rapidly changing needs, and has a low level of automation and intelligence.
[0068] Based on the above problems, the embodiment of the present application proposes a method for generating a development and operation system, which uses a large language model to automatically generate a development and operation system based on natural languages such as form files or process pictures. Applying the large language model to the generation of the development and operation system can flexibly define the process tasks of the development and operation system, and there is no need to manually build and install, configure the environment, integrate the tool chain, and write scripts, which shortens the development cycle of the development and operation system and greatly improves the automation and intelligence level of generating the development and operation system.
[0069] Figure 1 This is a flow chart of a method for generating a development and operation system provided in an embodiment of the present application. The execution subject of this method can be any computer device with computing and processing capabilities. Figure 1 As shown, the method includes:
[0070] S101. Converting natural language into structured data by a large language model, and assembling model data based on the structured data, wherein the natural language is used to represent task information of a development and operation system to be generated, and the structured data includes a plurality of initial task nodes.
[0071] Optionally, natural languages such as form files, flowcharts, and textual expressions are input into a large language model, and the large language model converts the task information of the DevOps system to be generated represented by the natural language into structured data including multiple initial task nodes, for example, the structured data includes specific process configuration and management tasks of the DevOps system. According to each initial task node in the structured data, model data is assembled, and the model data is used to intelligently generate a DevOps system. Among them, the data structure of the model data can be of any type, and the data structure type of the data model is not specifically limited here.
[0072] Figure 2 A schematic diagram of a natural language provided in an embodiment of the present application, such as Figure 2 As shown, the natural language is a pipeline task flow chart of the DevOps system, which represents the task information of the DevOps system to be generated, that is, the pipeline task flow of the DevOps system. The image recognition and analysis capabilities of the large language model are used to analyze and understand the pipeline task flow chart and convert it into structured data. For example, the converted structured data is as follows: [
[0074] {"step":"Start","next":"Submit code"},
[0075] {"step":"Submit code","next":"Code scanning"},
[0076] {"step":"Code scanning","condition":"Failed","next":"End"},
[0077] {"step":"Code scanning","condition":"Pass","next":"Build check"},
[0078] {"step":"Build check","condition":"Failed","next":"End"},
[0079] {"step":"Build check","condition":"Pass","next":"Unit test"},
[0080] {"step":"Unit test","condition":"Failed","next":"End"},
[0081] {"step":"Unit test","condition":"Pass","next":"Packaging"},
[0082] {"step":"Packaging","next":"Environmental check"},
[0083] {"step":"Environment Check","next":"Deployment"},
[0084] {"step":"deploy","next":"quality check, test"},
[0085] {"step":"Quality inspection, testing","next":"End"},
[0086] {"step":"End","next":""} ]
[0088] The converted structured data includes multiple initial task nodes such as code submission, code scanning, build checking, unit testing, etc. of the DevOps system.
[0089] S102: Generate a workflow task for developing an operation and maintenance system according to the model data, wherein the workflow task includes a plurality of workflow task nodes.
[0090] Optionally, a workflow is assembled according to the model data to generate a workflow task of the DevOps system, wherein the workflow task of the DevOps system includes a plurality of workflow task nodes, and each workflow task node corresponds to each initial task node one by one. Figure 3 The schematic diagram of the workflow task of the development and operation system provided in the embodiment of the present application is shown in FIG. Figure 3 , corresponding to the multiple initial task nodes of the DevOps system such as code submission, code scanning, build checking, unit testing, etc. in the structured data converted in the aforementioned embodiment, the workflow tasks of the DevOps system include multiple workflow task nodes such as code submission, code scanning, build checking, unit testing, etc.
[0091] S103. Build the basic framework of the development and operation system, integrate the workflow tasks into the basic framework, determine and integrate the development and operation system tool chain of each workflow task node according to each workflow task node, generate the installation and deployment script of each development and operation system tool chain by the large language model, and run the installation and deployment script of each development and operation system tool chain to install and deploy the tools in each development and operation system tool chain.
[0092] Optionally, a code empty framework of the system is prepared based on a preset development language, a basic framework of the DevOps system is built, and the workflow tasks of the DevOps system are integrated into the basic framework of the DevOps system. According to each workflow task node, the DevOps system tool of each workflow task node is determined, and the DevOps system tools of each workflow task node are respectively integrated into the DevOps system tool chain of each workflow task node, and the installation and deployment script of the DevOps system tool chain of each workflow task node is generated by the large language model, and the installation and deployment script of the DevOps system tool chain is run to complete the installation and deployment of each tool on the DevOps tool chain of each workflow task node.
[0093] S104, determining the prompt words of the large language model, and generating execution scripts corresponding to each system module, the system modules including: a compilation module, a packaging module, and a deployment module.
[0094] Optionally, according to the corpus and the instruction set, the prompt words of the large language model are assembled, and the execution scripts corresponding to the compilation module, packaging module and deployment module are generated according to the prompt words, and the execution parameters corresponding to the compilation module, packaging module and deployment module are reserved according to the prompt words. Among them, the execution parameters are used to indicate the variables required when running the execution script.
[0095] S105: Generate a development and operation system according to the execution scripts corresponding to the system modules and the preset execution parameters.
[0096] Optionally, according to the variables required to run each execution script indicated in the execution parameters corresponding to each system module, the execution script corresponding to the compilation module, the execution script corresponding to the packaging module, and the execution script corresponding to the deployment module are run respectively, so as to automatically complete the compilation, packaging and deployment of the DevOps system, generate and publish the DevOps system code, and then generate a DevOps system.
[0097] In this embodiment, the task information of the development and operation system to be generated represented by the natural language is converted into structured data including multiple initial task nodes by the large language model, and the model data is assembled according to each initial task node in the structured data. The workflow is assembled according to the model data to generate the workflow task of the development and operation system including multiple workflow task nodes, and the workflow task of the development and operation system is integrated into the basic framework of the development and operation system. The installation and deployment script of the development and operation system tool chain of the workflow task node is generated and run by the large language model to complete the installation and deployment of the tools in the development and operation system of each workflow task node. The prompt words of the large language model are assembled, and the execution scripts and execution parameters corresponding to the compilation module, packaging module and deployment module are generated according to the prompt words, and the execution scripts are run according to the execution parameters, and the compilation, packaging and deployment of the development and operation system are automatically completed. The use of the large language model to generate the development and operation system reduces the error rate caused by manual coding, improves the stability of the system, and improves the automation and intelligence level of the generation of the development and operation system.
[0098] The following is a detailed description of the process of converting natural language into structured data using a large language model.
[0099] Figure 4 A flow chart of converting natural language into structured data in a method for generating a development and operation system provided in an embodiment of the present application, such as Figure 4 As shown, the step of converting natural language into structured data by the large language model in the above step S101 includes:
[0100] S401, recognizing natural language by a large language model and outputting the recognition result.
[0101] Optionally, the large language model understands the requirements of the task information of the DevOps system to be generated represented by the natural language, automatically extracts key information, and outputs the recognition result. The data type of the recognition result can be structured data and unstructured data.
[0102] S402: Determine whether the recognition result is structured data; if not, convert the recognition result into structured data through a data conversion module.
[0103] Optionally, according to the data type of the recognition result, it is determined whether the recognition structure output by the large language model is structured data. If so, the model data is assembled according to the structured data. If not, the data type of the recognition result output by the large language model is converted by the data conversion module, and the recognition result is converted into structured data.
[0104] In this embodiment, the large language model understands the requirements of the task information of the development and operation system to be generated represented by the natural language, extracts key information and outputs the recognition result. According to the data type of the recognition result, it is determined whether the recognition structure output by the large language model is structured data. If not, the data type of the recognition result output by the large language model is converted by the data conversion module, and the recognition result is converted into structured data. Structured data has clear fields and attributes, which is convenient for assembling model data according to structured data.
[0105] The following is a detailed description of the process of assembling model data based on structured data.
[0106] Figure 5 A flow chart of assembling the generation method of the development and operation system provided in the embodiment of the present application to obtain the model data, such as Figure 5 As shown, the step of assembling the model data according to the structured data in the above step S101 includes:
[0107] S501: Determine task information of a tool of each initial task node and task execution information of each initial task node.
[0108] Optionally, according to each initial task node in the structured data, the tools that need to be installed and the operations that need to be added for each initial task node are determined, and then the task information of the tools of each initial task node and the task execution information of each initial task node are determined. Among them, the task information of the tools of the initial task node can represent the tools that need to be installed for the initial task node, and the task execution information of the initial task node can represent the operations that need to be added for the initial task node.
[0109] Exemplarily, referring to the structured data converted in the aforementioned embodiment, in the initial task node {"step":"code scanning","condition":"fail","next":"end"}, the task information of the tool is "integrationTools":"SonarQube", indicating that the initial task node needs to install the SonarQube code scanning tool, and the task execution information is "operators":"install,triggerScan", indicating that the initial task node needs to add a scan trigger operation.
[0110] S502: Assemble model data according to the structured data, task information and task execution information.
[0111] Optionally, according to each initial task node in the structured data, the specific model data structure of each initial task node is improved, and the task information of the tool of each initial task node and the task execution information of each initial task node are added to each initial task node to assemble the model data. The task information of the tool of each initial task node and the task execution information of each initial task node are both stored in the model data as structured description data.
[0112] Exemplarily, referring to the structured data converted in the aforementioned embodiment, in the initial task node {"step":"code scanning","condition":"fail","next":"end"}, the task information of the tool of the initial task node "integrationTools":"SonarQube" and the task execution information of the initial task node "operators":"install,triggerScan"} are added to assemble {"step":"code scanning","condition":"fail","next":"end","integrationTools":"SonarQube","operators":"install,triggerScan"}.
[0113] In this embodiment, according to each initial task node in the structured data, the tools that need to be installed and the operations that need to be added for each initial task node are determined, and then the task information of the tools of each initial task node and the task execution information of each initial task node are determined. The task information of the tools of each initial task node and the task execution information of each initial task node are added to each initial task node, and the model data is assembled. The specific model data structure of each initial task node is enriched and improved.
[0114] The following is a detailed description of the process of generating workflow tasks for a development and operation system based on model data.
[0115] Figure 6 A flow chart of a workflow task for generating a development and operation and maintenance system according to a method for generating a development and operation and maintenance system provided in an embodiment of the present application, such as Figure 6 As shown, the step of generating a workflow task for a development and operation system according to the model data in the above step S102 includes:
[0116] S601. Assemble the workflow according to the model data and generate a workflow definition file.
[0117] Optionally, according to the model data, the workflow assembly module analyzes and assembles the process structure elements such as initial tasks, events, gateways, sequence flows, etc. contained in the model data, and converts the designed process structure elements into model elements in the Business Process Model and Notation (BPMN) specification. According to the BPMN standard, the specific tags and attributes of each element are defined to obtain the defined BPMN model elements. According to the defined BPMN model elements, a BPMN XML file is written to obtain the workflow definition file. Among them, the BPMN XML file is a way to define a BPMN diagram in XML format.
[0118] S602. Define each target workflow task node in the workflow definition file according to the task type of the workflow task node, and generate a workflow task for the development and operation system, wherein the target workflow task node is used to indicate the workflow task node of the task implementation code to be bound.
[0119] Optionally, according to the task type of each workflow task node in the workflow definition file, each target workflow task node to which the task implementation code needs to be bound is determined, wherein the target workflow task node is used to indicate the workflow task node to which the task implementation code is to be bound. A node processing class of each target workflow task node is defined in the workflow definition file to supplement the business logic of each target workflow task node to generate a workflow task of the DevOps system.
[0120] Exemplarily, the activiti:class attribute is used on the target workflow task node in the workflow definition file to specify a Java class as the node processing class of the target workflow task node. This node processing class will be called when the process execution reaches the target workflow task node, and then the business logic of the target workflow task node will be executed during the workflow execution.
[0121] In this embodiment, the workflow assembly module analyzes and assembles the process structure elements contained in the model data according to the model data, and converts them into model elements in the business process model and notation specification. According to the business process model and notation standard, the specific labels and attributes of each element are defined to obtain the defined business process model and notation model elements, and the definition file of the workflow is written according to the defined business process model and notation model elements. According to the task type of each workflow task node in the workflow definition file, each target workflow task node that needs to be bound to the task implementation code is determined. The node processing class of each target workflow task node is defined in the workflow definition file to supplement the business logic of each target workflow task node to generate the workflow tasks of the development and operation system. The workflow is assembled by the workflow assembly module, and the workflow tasks of the development and operation system are efficiently and accurately generated.
[0122] As an optional implementation, the step of integrating the workflow task into the basic framework in the above step S103 includes:
[0123] According to the task type of the workflow task node, each target workflow task node is bound to each task implementation code.
[0124] Optionally, based on the task type of the workflow task node and the node processing class of the target workflow task node defined in the workflow definition file, an entry code is created to generate task implementation codes corresponding to each target workflow task node, and each target workflow task node is bound to each task implementation code and integrated into the basic framework of the DevOps system.
[0125] In this embodiment, according to the task type of the workflow task node and the node processing class of the target workflow task node, an entry code is created to generate the task implementation code corresponding to each target workflow task node. Each target workflow task node is bound to each task implementation code to integrate the workflow task into the basic framework.
[0126] The following is a detailed description of the process of generating installation and deployment scripts for various development and operation system tool chains from a large language model.
[0127] Figure 7 A flow chart of the method for generating the installation and deployment scripts of various tools provided in the development and operation system according to the embodiment of the present application is shown in FIG. Figure 7 As shown, the step of generating the installation and deployment scripts of the tool chains of each development and operation system by the large language model in the above step S103 includes:
[0128] S701. Input the installation and deployment information of the development and operation system tool chain of each workflow task node into the large language model.
[0129] Optionally, the installation and deployment information of the DevOps system tool chain of each workflow task node is respectively input into the large language model, wherein the installation and deployment information of the DevOps system tool chain of the workflow task node may include the names of the tools to be installed and deployed on the DevOps system tool chain of the workflow task node, such as SonarQube tool, Maven tool, etc.
[0130] S702: Generate installation and deployment scripts for each development and operation system tool chain based on the installation and deployment information using the large language model.
[0131] Optionally, the large language model analyzes and identifies the installation and deployment information of the DevOps system tool chain of the workflow task node, and generates an installation and deployment script for the DevOps system tool chain of the workflow task node, so as to run the installation and deployment script for the DevOps system tool chain of the workflow task node, and install and deploy various tools on the DevOps system tool chain of the workflow task node, such as the SonarQube tool, the Maven tool, etc.
[0132] In this embodiment, the installation and deployment information of the development and operation system tool chain of each workflow task node is respectively input into the large language model, and the large language model analyzes and identifies the installation and deployment information, and generates the installation and deployment script of the development and operation system tool chain of the workflow task node, so as to run the installation and deployment script of the development and operation system tool chain of the workflow task node, and install and deploy each tool on the development and operation system tool chain of the workflow task node. The installation and deployment of each tool in the development and operation system tool chain of each workflow task node is automatically completed based on the large language model.
[0133] As an optional implementation, the steps after installing and deploying each development and operation system tool chain in the above step S103 further include:
[0134] According to each target workflow task node, the business logic of each target workflow task node is added to the workflow task node of the task implementation code to be bound.
[0135] Optionally, according to each target workflow task node and the code entry created in the above embodiment, the task implementation code of the workflow task node is bound to the defined workflow task node to be bound with the task implementation code, and the business logic of each target workflow task node is added. Figure 3 According to the code bound to the target workflow task node of code scanning, the task implementation code corresponding to the code scanning action is bound in the code entry, and the business logic of code scanning is added to the target workflow task node of code scanning, so that when the target workflow task node of code scanning is executed during the workflow execution process, the business logic of code scanning is executed.
[0136] In this embodiment, according to each target workflow task node and the created code entry, the task implementation code of the workflow task node is bound to the predefined workflow task node to be bound task implementation code, and the business logic of each target workflow task node is added. When each target workflow task node is executed during the workflow execution process, the business logic of each target workflow task node is executed.
[0137] Based on the same inventive concept, an embodiment of the present application also provides a device for generating a development and operation and maintenance system corresponding to the method for generating a development and operation and maintenance system. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the method for generating a development and operation and maintenance system in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0138] Figure 8 The module structure diagram of the generation device of the development and operation system provided in the embodiment of the present application is as follows: Figure 8 As shown, the device comprises:
[0139] The assembly module 801 is used to convert natural language into structured data by a large language model, and assemble model data based on the structured data, wherein the natural language is used to represent the task information of the development and operation system to be generated, and the structured data includes multiple initial task nodes.
[0140] The generation module 802 is used to generate a workflow task for developing an operation and maintenance system according to the model data, wherein the workflow task includes a plurality of workflow task nodes.
[0141] The generation module 802 is also used to build the basic framework of the development and operation and maintenance system, integrate the workflow tasks into the basic framework, determine and integrate the tools of each workflow task node according to each workflow task node, generate the installation and deployment script of each tool from the large language model, and run the installation and deployment script of each tool to install and deploy each tool.
[0142] The generation module 802 is also used to determine the prompt words of the large language model and generate execution scripts corresponding to each system module. The system modules include: a compilation module, a packaging module and a deployment module.
[0143] The generation module 802 is further used to generate a development and operation system according to the execution scripts corresponding to the system modules and the preset execution parameters.
[0144] As an optional implementation, the assembly module 801 is specifically used for:
[0145] The natural language is recognized by a large language model and the recognition result is output.
[0146] Determine whether the recognition result is structured data, and if not, convert the recognition result into structured data through a data conversion module.
[0147] As an optional implementation, the assembly module 801 is specifically used for:
[0148] Determine the task information of the tool of each initial task node and the task execution information of each initial task node.
[0149] Model data is assembled based on structured data, task information and task execution information.
[0150] As an optional implementation manner, the generating module 802 is specifically used for:
[0151] According to the model data, assemble the workflow and generate the workflow definition file.
[0152] According to the task type of the workflow task node, each target workflow task node is defined in the workflow definition file to generate a workflow task for the development and operation system, wherein the target workflow task node is used to indicate the workflow task node of the task implementation code to be bound.
[0153] As an optional implementation manner, the generating module 802 is specifically used for:
[0154] According to the task type of the workflow task node, each target workflow task node is bound to each task implementation code.
[0155] As an optional implementation manner, the generating module 802 is specifically used for:
[0156] The installation and deployment information of the tools of each workflow task node is input into the large language model.
[0157] The large language model generates installation and deployment scripts for each tool based on the installation and deployment information.
[0158] As an optional implementation, the generating module 802 is further configured to:
[0159] According to each target workflow task node, the business logic of each target workflow task node is added to the workflow task node of the task implementation code to be bound.
[0160] The present application also provides a computer device, such as Fig. 9 , which is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, includes: a processor 91, a memory 92 and a bus 93. The memory 92 stores machine-readable instructions executable by the processor 91 (for example, Figure 8The assembly module 801 in the device and the execution instructions corresponding to the generation module 802, etc.), when the computer device is running, the processor 91 and the memory 92 communicate through the bus 93, and when the machine-readable instructions are executed by the processor 91, the steps of the generation method of the development and operation system in the above embodiment are executed.
[0161] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a development and operation system in the above embodiment are executed.
[0162] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0163] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0164] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A method for generating a development and operation system, characterized in that: include: The large language model converts the natural language into structured data, and assembles the model data according to the structured data, wherein the natural language is used to represent the task information of the development and operation system to be generated, and the structured data includes a plurality of initial task nodes; Generate a workflow task for a development and operation system according to the model data, wherein the workflow task includes a plurality of workflow task nodes; Building the basic framework of the development and operation system, integrating the workflow tasks into the basic framework, determining and integrating the development and operation system tool chains of each workflow task node according to each workflow task node, generating installation and deployment scripts of each development and operation system tool chain from the large language model, and running the installation and deployment scripts of each development and operation system tool chain to install and deploy the tools in each development and operation system tool chain; Determine the prompt words of the large language model, and generate execution scripts corresponding to each system module, wherein the system modules include: a compilation module, a packaging module, and a deployment module; The development and operation system is generated according to the execution scripts corresponding to the system modules and the preset execution parameters.
2. The method according to claim 1, characterized in that The large language model converts natural language into structured data, including: Recognize the natural language by the large language model and output a recognition result; Determine whether the recognition result is structured data, and if not, convert the recognition result into structured data through a data conversion module.
3. The method according to claim 1, characterized in that The step of assembling the model data according to the structured data includes: Determine task information of tools for each initial task node and task execution information of each initial task node; Model data is assembled according to the structured data, the task information and the task execution information.
4. The method according to claim 1, characterized in that: Generating a workflow task for a development and operation system according to the model data includes: Assembling a workflow according to the model data and generating a definition file of the workflow; According to the task type of the workflow task node, each target workflow task node is defined in the workflow definition file to generate the workflow task of the development and operation system, wherein the target workflow task node is used to indicate the workflow task node of the task implementation code to be bound.
5. The method according to claim 4, characterized in that The step of integrating the workflow task into the basic framework includes: According to the task type of the workflow task node, each of the target workflow task nodes is bound to each of the task implementation codes.
6. The method according to claim 4, characterized in that The generation of installation and deployment scripts for each development and operation system tool chain by the large language model includes: Inputting the installation and deployment information of the development and operation system tool chain of each workflow task node into the large language model; The large language model generates installation and deployment scripts for each development and operation system tool chain according to the installation and deployment information.
7. The method according to claim 6, characterized in that After installing and deploying the development and operation system tool chains, the following steps are also included: According to the target workflow task nodes, the business logic of the target workflow task nodes is added to the workflow task node of the task implementation code to be bound.
8. A device for generating a development and operation system, characterized in that: The device comprises: An assembly module, used to convert natural language into structured data by a large language model, and assemble model data according to the structured data, wherein the natural language is used to represent task information of the development and operation system to be generated, and the structured data includes a plurality of initial task nodes; A generation module, used to generate a workflow task for a development and operation system according to the model data, wherein the workflow task includes a plurality of workflow task nodes; The generation module is further used to build the basic framework of the development and operation system, integrate the workflow tasks into the basic framework, determine and integrate the development and operation system tool chains of each workflow task node according to each workflow task node, generate installation and deployment scripts of each development and operation system tool chain from the large language model, and run the installation and deployment scripts of each development and operation system tool chain to install and deploy the tools in each development and operation system tool chain; The generation module is further used to determine the prompt words of the large language model and generate execution scripts corresponding to each system module, wherein the system module includes: a compilation module, a packaging module and a deployment module; The generation module is further used to generate the development and operation system according to the execution scripts corresponding to the system modules and the preset execution parameters.
9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating a development and operation system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a development and operation system according to any one of claims 1 to 7 are executed.
Citation Information
Cited By
Operation and maintenance method and device based on large language model and computer program product
CN120179276A