Assembly line generation method and device based on low code visualization
Through the pipeline generation method based on low-code visualization, standardized variables and components, visual orchestration process and automated generation scripts are used to solve the problems of complex and lack of standardization in traditional pipeline configurations, and the rapid and accurate creation and management of pipelines are realized, reducing technology The threshold and improve development efficiency.
Patent Information
- Application Number
- CN202411875694.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional pipeline configuration and management methods require high technical capabilities for users. Especially for developers who do not have script writing experience, setting up and maintaining complex pipelines is very difficult, and the pipeline scripts lack standardization, which is not conducive to team collaboration and maintenance.
By defining standardized variables and components, visual orchestration processes, automated generation of scripts and environment configuration files, providing a pipeline generation method based on low-code visualization, helping users quickly and accurately create and manage pipelines.
It lowers the technical threshold for configuration and maintenance, improves development efficiency, reduces human errors, and promotes team collaboration and standardization of assembly lines.
Smart Images

Figure CN119440541A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software engineering technology, and in particular, to a pipeline generation method and device based on low-code visualization. Background Art
[0002] With the popularization of DevOps and continuous integration / continuous delivery (CI / CD) concepts, modern software development is gradually moving towards automation and rapid iteration. As an important part of DevOps, pipeline technology is widely used in processes such as code building, testing, and deployment to improve development efficiency and reduce manual operations. However, in actual applications, the traditional pipeline configuration and management method is to write scripts (such as Jenkinsfile, GitLab CI configuration files, etc.) to define the order of tasks, execution logic, and environment configuration. This method requires high technical capabilities of users, especially for developers who have no scripting experience. It is very difficult to set up and maintain complex pipelines. In addition, the inconsistent script styles and habits of different developers lead to a lack of standardization of pipeline scripts, which is not conducive to team collaboration and maintenance. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a pipeline generation method and device based on low-code visualization, which can help users quickly and accurately create and manage pipelines through standardized variables and components, visual orchestration processes, and automatic generation of scripts and environment configuration files, thereby lowering the technical threshold for configuration and maintenance, improving development efficiency and reducing human errors.
[0004] The present disclosure provides a pipeline generation method based on low-code visualization, including:
[0005] Define the standard variables required for pipeline execution, divide the functions required by the pipeline into standardized components and store them in the standard component library;
[0006] Acquire the target project type selected by the user, load the standard component library corresponding to the target project type, and construct a pipeline process in response to the user's orchestration operation on the standardized component;
[0007] In response to the user's parameter configuration operation on the standardized components, corresponding component parameters are configured for each of the standardized components, and a pipeline script is generated according to the component parameters and the pipeline process;
[0008] Create the environmental resources required to execute the pipeline script, and execute the standardized components in sequence according to the pipeline process.
[0009] In an optional implementation, obtaining a target project type selected by a user, loading the standard component library corresponding to the target project type, and constructing a pipeline process in response to an orchestration operation of the user on the standardized component, specifically includes:
[0010] In response to a project type selection operation performed by a user in a preset interactive interface, determining the target project type;
[0011] Load the corresponding standard component library according to the target project type, obtain the basic project information input by the user, and perform initialization configuration of the project according to the basic project information;
[0012] Determine a target component selected by a user in the standard component library, and determine an arrangement order of the target component in response to the arrangement operation of the user on the target component;
[0013] The pipeline process is generated according to the target components and the corresponding arrangement order.
[0014] In an optional implementation, in response to a user's parameter configuration operation on the standardized component, configuring corresponding component parameters for each standardized component specifically includes:
[0015] Providing the standard variables and the preferred parameters corresponding to each of the standard variables to the user through a preset interactive interface;
[0016] In response to the parameter configuration operation of the user on the standard variable, target component parameters are determined and the target component parameters are saved as a parameter configuration file.
[0017] In an optional implementation manner, after configuring corresponding component parameters for each of the standardized components, the method further includes:
[0018] Determine the build environment and deployment environment selected by the user, and generate a corresponding namespace configuration file, wherein the namespace configuration file is used to determine the resource isolation scope;
[0019] Generate a key configuration file, wherein the key configuration file includes at least an image repository key and an access key;
[0020] Configuring persistent storage requirements for the build environment and the deployment environment, and generating a persistent volume declaration configuration file, wherein the persistent volume declaration configuration file is used to meet data storage requirements during build and runtime;
[0021] The namespace configuration file, the key configuration file, and the persistent volume declaration configuration file are encapsulated to generate an environment configuration file.
[0022] In an optional implementation, creating the environment resources required for executing the pipeline script and sequentially executing the standardized components according to the pipeline process specifically includes:
[0023] Create a namespace according to the namespace configuration file, and load the image repository key and the access key corresponding to the key configuration file;
[0024] Initialize persistent storage according to the persistent volume declaration configuration file;
[0025] The standardized components are executed sequentially according to the execution order indicated by the pipeline process.
[0026] In an optional implementation, generating a pipeline script according to the component parameters and the pipeline process specifically includes:
[0027] Parsing the pipeline process to determine the standardized components arranged in the pipeline process and the execution order between the standardized components;
[0028] For each of the standardized components, extract the component parameters corresponding to the standardized component;
[0029] According to all the standardized components and the corresponding component parameters, the pipeline script is constructed and environment configuration information is added to the pipeline script.
[0030] In an optional implementation manner, the standard variables include at least basic project variables, environment variables, and configuration variables;
[0031] The basic project variables at least define the project name, code repository address, and branch name, which are used to uniformly manage different projects;
[0032] The environment variables at least define the build tool version, the operating environment configuration and resource restrictions, and are used to ensure the consistency of the operating environment;
[0033] The configuration variables at least define deployment parameters, operation parameters and monitoring parameters to support deployment requirements of applications in different environments.
[0034] The present disclosure also provides a pipeline generation device based on low-code visualization, including:
[0035] The variable definition and component division module is used to define the standard variables required for pipeline execution and divide the functions required by the pipeline into standardized components and store them in the standard component library;
[0036] A pipeline process construction module, used to obtain a target project type selected by a user, load the standard component library corresponding to the target project type, and construct a pipeline process in response to an orchestration operation of the user on the standardized component;
[0037] A pipeline script generation module, configured to configure corresponding component parameters for each of the standardized components in response to a user's parameter configuration operation on the standardized components, and to generate a pipeline script according to the component parameters and the pipeline process;
[0038] The pipeline execution device is used to create the environmental resources required for executing the pipeline script and execute the standardized components in sequence according to the pipeline process.
[0039] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned pipeline generation method based on low-code visualization, or the steps in any possible implementation of the above-mentioned pipeline generation method based on low-code visualization is performed.
[0040] An embodiment of the present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the above-mentioned pipeline generation method based on low-code visualization, or the steps in any possible implementation of the above-mentioned pipeline generation method based on low-code visualization.
[0041] The embodiments of the present disclosure also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the above-mentioned pipeline generation method based on low-code visualization, or the steps in any possible implementation of the above-mentioned pipeline generation method based on low-code visualization.
[0042] The disclosed embodiment provides a pipeline generation method and device based on low-code visualization, which defines the standard variables required for pipeline execution, divides the functions required for the pipeline into standardized components and stores them in a standard component library; obtains the target project type selected by the user, loads the standard component library corresponding to the target project type, and builds a pipeline process in response to the user's orchestration operation on the standardized component; in response to the user's parameter configuration operation on the standardized component, configures the corresponding component parameters for each of the standardized components, and generates a pipeline script based on the component parameters and the pipeline process; creates the environmental resources required to execute the pipeline script, and executes the standardized components in sequence according to the pipeline process. Through standardized variables and components, visual orchestration processes, automatic generation of scripts and environment configuration files, users can be helped to quickly and accurately create and manage pipelines, which reduces the technical threshold for configuration and maintenance, improves development efficiency and reduces human errors.
[0043] The disclosed embodiment combines the technology of low code, standardized component library and automated execution process, and solves the problems of high complexity of traditional pipeline creation, time-consuming environment configuration, inflexible execution process, etc. Through the introduction and dynamic loading of the standardized component library, the functions required by the pipeline are modularized and standardized for different project types to form a reusable component library. According to the target project type selected by the user, the corresponding standard component library is dynamically loaded, avoiding unnecessary resource waste and configuration errors. Through dynamic loading, the adaptability of the standardized component library is achieved, and different projects can reuse the same components, reducing the workload of manually adjusting components. In addition, the developer only needs to select the target project type, and the system can load the standard components that match it, avoiding the cumbersome process of manually searching and configuring components. At the same time, it supports users to configure parameters of standardized components through a visual interface, and automatically generates a complete pipeline script according to component parameters and pipeline process, without the need for users to manually write complex script codes. It allows non-technical personnel to quickly create and configure pipelines through a visual interface, avoiding deep dependence on scripting languages, avoiding syntax or logical errors that may be caused by users manually writing scripts, and improving the correctness and stability of pipeline configuration. Furthermore, before executing the pipeline script, the system automatically creates the required environmental resources (such as namespace, key configuration, persistent storage, etc.) according to component parameters and process requirements. Users do not need to manually manage environmental resources. The system automatically handles the entire process, reducing the workload of developers and operation and maintenance personnel.
[0044] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0046] Figure 1 A flowchart of a pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure is shown;
[0047] Figure 2 A flowchart of another pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure is shown;
[0048] Figure 3 A flowchart of another pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure is shown;
[0049] Figure 4 A schematic diagram of a pipeline generation device based on low-code visualization provided by an embodiment of the present disclosure is shown;
[0050] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0052] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0053] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0054] Research has found that with the popularization of DevOps and continuous integration / continuous delivery (CI / CD) concepts, modern software development is gradually moving towards automation and rapid iteration. As an important part of DevOps, pipeline technology is widely used in processes such as code building, testing, and deployment to improve development efficiency and reduce manual operations. However, in actual applications, the traditional pipeline configuration and management method is to write scripts (such as Jenkinsfile, GitLab CI configuration files, etc.) to define the order of tasks, execution logic, and environment configuration. This method requires high technical capabilities of users, especially for developers who do not have script writing experience. It is very difficult to set up and maintain complex pipelines. In addition, the inconsistent script styles and habits of different developers lead to a lack of standardization of pipeline scripts, which is not conducive to team collaboration and maintenance.
[0055] Based on the above research, the present disclosure provides a pipeline generation method and device based on low-code visualization, which defines the standard variables required for pipeline execution, divides the functions required for the pipeline into standardized components and stores them in the standard component library; obtains the target project type selected by the user, loads the standard component library corresponding to the target project type, and builds a pipeline process in response to the user's orchestration operation on the standardized component; in response to the user's parameter configuration operation on the standardized component, configures the corresponding component parameters for each of the standardized components, and generates a pipeline script based on the component parameters and the pipeline process; creates the environmental resources required to execute the pipeline script, and executes the standardized components in sequence according to the pipeline process. Through standardized variables and components, visual orchestration processes, automatic generation of scripts and environment configuration files, users can be helped to quickly and accurately create and manage pipelines, which reduces the technical threshold for configuration and maintenance, improves development efficiency and reduces human errors.
[0056] To facilitate understanding of this embodiment, a pipeline generation method based on low-code visualization disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the pipeline generation method based on low-code visualization provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device. The terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the pipeline generation method based on low-code visualization can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0057] See also Figure 1 As shown, it is a flowchart of a pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure, and the method includes steps S101 to S104, wherein:
[0058] S101. Define standard variables required for pipeline execution, divide the functions required by the pipeline into standardized components and store them in a standard component library.
[0059] In a specific implementation, standard variables required for pipeline execution are predefined and stored, the functions required by the pipeline are divided into standardized components, and input and output parameters and execution logic are preset for each component.
[0060] Here, standard variables refer to key parameters that are used repeatedly during the execution of the pipeline. By defining standard variables, you can ensure that different users use the same variable name and structure in different projects, reduce custom operations, and improve process consistency. Standard variables include at least basic project variables, environment variables, and configuration variables.
[0061] Among them, the project basic variables contain project-level information. The project name identifies the project to which the current pipeline belongs; the code repository address identifies the code storage location of the project, which is used for pulling and updating the code; the branch name identifies the code branch of the specified build, ensuring that the build and test operations are performed on the correct branch.
[0062] Among them, environment variables are used to describe the environment configuration of the pipeline operation to ensure the consistency of the execution environment, including: build tool version, such as Maven, Node.js and other version information, to ensure that it runs under the specified version to avoid problems caused by version differences; operating environment configuration: such as operating system, JDK version, etc., used to define the basic environment for construction and deployment; resource restrictions: specify the resources required for pipeline operation (such as CPU and memory restrictions) to avoid insufficient or wasted resources.
[0063] Configuration variables are used to manage specific parameters during building and deployment, including: deployment parameters: such as the target server address and port, to ensure that the application can be correctly deployed to the target environment; operation parameters: such as startup parameters and log levels, to control the running status of the application in different environments; monitoring parameters: define some monitoring indicators to facilitate subsequent monitoring of the running status of the pipeline or application.
[0064] In this way, by standardizing these variables, users can directly select or fill in the visual interface without having to define them themselves, which improves the consistency and maintainability of the pipeline.
[0065] Furthermore, the functions of the pipeline usually include multiple links such as building, testing, deployment, and packaging. In order to simplify the pipeline creation process, the functions of the pipeline are divided into standardized components, and these components are stored in a standard component library.
[0066] Here, each component completes an independent function through component modularization. Compilation components such as Maven compilation and Node compilation are responsible for compiling source code into executable binary files; construction components such as Docker image construction and product packaging are responsible for generating deployable construction products; deployment components such as Kubernetes deployment and service release are responsible for publishing construction products to the target environment. These components can be directly called by users and placed in the pipeline through visual orchestration, without the need to manually write code, thereby speeding up the pipeline construction process.
[0067] Each component contains predefined interfaces and parameters to ensure that different users can obtain the same behavior when using the component. Component parameter configuration is standardized, including input, output, dependencies, etc., to facilitate unified management and debugging. All components are centrally stored in the standard component library, and users can directly drag and drop components from the component library in the visual interface to build a pipeline.
[0068] In this way, the need for scripting can be reduced, and unified component library management can make functional modules more reusable and reduce maintenance costs.
[0069] As a possible implementation method, the necessary software environment and environment configuration templates can also be pre-installed to ensure the stability of construction and operation, including: pre-installed software environment: including the required compilation tools, build tools, etc., to ensure the integrity of the tools during the pipeline operation; preset environment configuration templates: including namespace configuration, key configuration, storage configuration, etc., to help users quickly set up the build environment; software version management mechanism: the system maintains software version information, and when the tool version needs to be updated or changed, it is automatically updated to the relevant pipeline to ensure the consistency of the environment.
[0070] S102: Acquire the target project type selected by the user, load the standard component library corresponding to the target project type, and construct a pipeline process in response to the user's orchestration operation on the standardized components.
[0071] In the specific implementation, the required project type (such as Java project, Node project) selected by the user through the interactive interface is determined, and the relevant standard component library is automatically loaded according to the selected project type. The user selects the required components from the system's standard component library and drags the components to the canvas through the visual interface to build a pipeline process.
[0072] For details, see Figure 2 As shown, it is a flowchart of another pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure, and the method includes steps S1021 to S1024, wherein:
[0073] S1021. In response to a project type selection operation performed by a user in a preset interactive interface, determine the target project type.
[0074] S1022: Load the corresponding standard component library according to the target project type, obtain the basic project information input by the user, and perform initialization configuration of the project according to the basic project information.
[0075] S1023: Determine the target component selected by the user in the standard component library, and determine the arrangement order of the target component in response to the arrangement operation of the user on the target component.
[0076] S1024. Generate the pipeline process according to the target components and the corresponding arrangement order.
[0077] In the specific implementation, in the visual interface, users can select the project type. The project type determines the component set and specific configuration required for the pipeline. For example, the project types may include: Web application projects (such as those based on Java, Python, Node.js, etc.): usually require compilation, packaging, testing, deployment and other components; microservice projects: usually require building microservice images, pushing images to container repositories, service registration and discovery and other components; data processing projects: may require data extraction, data processing script execution, result storage and other components. By selecting the target project type, the system can load the corresponding standard component library according to the specific requirements of the type, making the pipeline generation more accurate and in line with the project-specific build and deployment requirements.
[0078] Here, each project type has a corresponding standard component library, which is a predefined component collection that contains all functional modules that may be used by this type of project. The system will select the corresponding functional module based on the project type. For example, for a Web application project, the standard component library can include components such as compilation, testing, packaging, and deployment; for a machine learning project, it can include components such as data preprocessing, model training, and model evaluation.
[0079] When loading a component library, the system can set default parameters for each component or provide a pre-configured template so that users can quickly adjust it in subsequent operations. The contents of the standard component library are displayed in a visual interface, which is convenient for users to drag or select components. These component modules will be grouped and classified according to the project type to help users quickly find the required functional modules.
[0080] In this way, by loading the corresponding standard component library, it can be ensured that the components selected by the user meet the requirements of the current project type, avoiding the mixing of irrelevant components and simplifying the subsequent pipeline construction process.
[0081] Furthermore, after loading the standard component library of the target project type, users can arrange the standardized components through a visual interface. Users can drag the required components from the component library to the pipeline construction area and arrange the components according to the project execution process. For example, users can add code compilation components first, then test components, and finally deployment components. The order of arrangement will affect the execution order of the pipeline.
[0082] Optionally, some pipeline steps have dependencies. For example, a test component depends on the result of successful code compilation, and testing can only proceed after successful compilation. Therefore, users can set dependencies between components during the orchestration process so that the pipeline is executed in the correct order.
[0083] Here, through the above arrangement operation, the system will automatically generate a configuration file or script for the pipeline process. The pipeline process file includes: the component execution order is used to follow the order arranged by the user. The system records the execution order of the components to ensure that the pipeline flows according to the logic designed by the user; component parameter configuration: the specific parameter configuration of each component will also be recorded in the process file to ensure that it can be processed according to the parameters set by the user during execution. Dependency: The system will save the dependency between components to ensure that each component is executed in order and logically.
[0084] In this way, the generated pipeline process can be directly executed in the system or integrated into other systems for automated processing, which greatly simplifies the user's manual configuration process and reduces the chance of errors.
[0085] S103. In response to the user's parameter configuration operation on the standardized components, corresponding component parameters are configured for each of the standardized components, and a pipeline script is generated according to the component parameters and the pipeline process.
[0086] In a specific implementation, standard variables and preferred parameters corresponding to each standard variable are provided to the user through a preset interactive interface; in response to the user's parameter configuration operation for the standard variable, the target component parameters are determined and saved as a parameter configuration file.
[0087] Here, the system automatically associates standard variables and provides selection suggestions for the variables, allowing users to quickly select the appropriate configuration; the system verifies the integrity and legality of the parameters in real time, prompting users to correct potential problems, thereby improving the accuracy of the configuration; all parameters are saved as configuration files to ensure parameter consistency during pipeline execution.
[0088] Specifically, when users configure each standardized component, they can customize the parameters of the component through a visual interface. For example: Compilation component: users can set parameters such as compilation language (such as Java, Python), compilation options (such as optimization level, target version), etc. Test component: users can choose a test framework (such as JUnit, PyTest), set the test path or file, whether to generate a coverage report, etc. Deployment component: users can configure the target server's IP address, port, deployment directory, command to restart the service, etc. Build component: users can specify the version of the build tool (such as Maven, Gradle), build commands (such as clean, install), etc.
[0089] Among them, the parameter configuration items of each component may be different. The system will provide corresponding parameter fields and default values according to the type of component, and users can adjust them according to project requirements.
[0090] Furthermore, after the user completes the parameter configuration operation, the system will save these parameter values and generate a corresponding parameter configuration file for each component. During this process, the parameters entered by the user are checked to ensure that the parameter format is correct and the value is within the allowed range. For example, the format of the IP address, the range of the port number, the validity of the file path, etc.
[0091] Here, the parameter values entered by the user are mapped to the internal configuration format of the standardized component. This step converts the user input in the visual interface into executable code or configuration. For example, the "compile options" entered by the user in the interface are mapped to the buildOptions variable. The "test framework" entered by the user is mapped to the testFramework configuration item. Generate configuration files: Generate independent configuration files for component parameters or store all parameter sets in a global configuration file. The configuration file can be in JSON, YAML, XML and other formats so that it can be loaded and read when the pipeline is executed.
[0092] After configuring the component parameters, the system will generate the final pipeline script based on these parameters and the pipeline process. Parse the pipeline process to determine the standardized components arranged in the pipeline process and the execution order between the standardized components; for each standardized component, extract the component parameters corresponding to the standardized component; based on all standardized components and the corresponding component parameters, build the pipeline script and add environment configuration information to the pipeline script.
[0093] Here, the flowchart configured by the user in the pipeline orchestration stage is analyzed to determine the execution order of the components and the dependencies between them. According to the execution order and dependencies, the function code or commands of each component are gradually combined into a complete pipeline script. The commands and parameters of each stage are dynamically generated and filled according to the user's configuration.
[0094] As a possible implementation, after configuring the corresponding component parameters for each standardized component, an environment configuration file can also be generated by the following method. For details, see Figure 3 As shown, it is a flowchart of another pipeline generation method based on low-code visualization provided by an embodiment of the present disclosure, and the method includes steps S201 to S204, wherein:
[0095] S201. Determine the build environment and deployment environment selected by the user, and generate a corresponding namespace configuration file, where the namespace configuration file is used to determine the resource isolation scope.
[0096] S202: Generate a key configuration file, where the key configuration file at least includes an image repository key and an access key.
[0097] S203: Configure persistent storage requirements for the build environment and the deployment environment, and generate a persistent volume declaration configuration file, where the persistent volume declaration configuration file is used to meet data storage requirements during build and runtime.
[0098] S204, encapsulate the namespace configuration file, the key configuration file, and the persistent volume declaration configuration file to generate an environment configuration file.
[0099] In the specific implementation, during the environment configuration process, the user selects the build and deployment environment according to the needs, and the system automatically configures the relevant environment parameters and generates configuration files, including: generating a namespace configuration file to determine the resource isolation scope; generating a key configuration file, including image repository keys, access keys, etc., to ensure security; configuring persistent storage requirements, and generating PVC (persistent volume declaration) configuration to meet the data storage requirements during construction and runtime.
[0100] Here, the generation of the pipeline script also takes into account the system's environment variables or resource configuration information. For example: setting the version and path of the build tool; configuring the persistent storage path; setting the namespace of the deployment environment, the key file path, etc. If the user defines conditional execution logic (such as "deploy only when the test passes") when configuring the parameters, the system will add the corresponding judgment conditions to the script. In this way, the next step will be executed only when the specific conditions are met, ensuring the reliability of the pipeline, and the final generated script is saved as an executable file.
[0101] The generated pipeline script can be directly applied to the project and executed through the continuous integration (CI) or continuous delivery (CD) platform. For example, on the CI / CD platform, the generated script will automatically execute the pipeline process without user intervention, ensuring efficient compilation, testing, and deployment of the code. The pipeline script can be configured to run regularly to automatically trigger builds and releases. If the user needs to apply the same pipeline process to multiple similar projects, the pipeline can be quickly copied and reused by loading configuration files and scripts.
[0102] S104: Create the environment resources required to execute the pipeline script, and execute the standardized components in sequence according to the pipeline process.
[0103] In the specific implementation, after the pipeline script is generated, the system automatically creates the environmental resources required for execution, and executes each task component in sequence according to the order of the pipeline, creates a namespace, loads the environment configuration file and key, and ensures the isolation and security of resources; initializes persistent storage to meet the data requirements of the pipeline during execution; automatically executes each component of the pipeline according to the user configuration, and finally completes the project construction, testing, deployment and release.
[0104] Here, the creation of a namespace is mainly for resource isolation. In a complex pipeline environment, different pipelines or projects need to run in their own isolated environments to avoid resource conflicts and data pollution. In the previous step of generating configuration files, the system has generated a namespace configuration file, which defines the namespace name of the current pipeline. Based on the information in the namespace configuration file, the system calls the platform's namespace management command (such as Kubernetes' kubectl create namespace command) to generate an independent namespace for the current pipeline.
[0105] Here, in order to ensure that secure resources (such as image repositories, databases, etc.) can be accessed during the pipeline process, the system will load the corresponding key configuration in the environment resources. When the pipeline is executed, it may be necessary to pull the required build image from the image repository. The key configuration file contains the credential information of the image repository. The system will load the key into the namespace to ensure that the pipeline can access the image repository. If the pipeline needs to access specific APIs or external resources (such as cloud storage, databases, etc.), the system will load the access key into the environment variables for subsequent component calls. For example, load AWS keys or other API keys to allow specific components to use external services.
[0106] Here, in the pipeline, some operations may generate temporary files or intermediate data, which need to be stored in persistent storage to ensure data persistence and isolation. Read the persistent volume declaration configuration file: During the configuration file generation phase, the system has generated a persistent volume declaration configuration file, which defines the storage path, access mode, etc. of the persistent storage. Based on the information in the configuration file, the required persistent volume is initialized through the storage management command. Mount the persistent volume to the pipeline environment so that different components of the pipeline can access the storage area.
[0107] Furthermore, after the environment resource configuration is completed, the pipeline process is started and the standardized components are executed in sequence according to the predetermined order. Before each component is executed, the corresponding parameter settings will be loaded from the parameter configuration file. During the component execution process, the corresponding command or script is called according to the component type. After each component is executed, the system will record its output results and status (success or failure). If the execution of a component fails, the system will determine whether it is necessary to stop the pipeline or continue execution.
[0108] The disclosed embodiment provides a pipeline generation method based on low-code visualization, which defines the standard variables required for pipeline execution, divides the functions required for the pipeline into standardized components and stores them in a standard component library; obtains the target project type selected by the user, loads the standard component library corresponding to the target project type, and builds a pipeline process in response to the user's orchestration operation on the standardized component; in response to the user's parameter configuration operation on the standardized component, configures the corresponding component parameters for each of the standardized components, and generates a pipeline script based on the component parameters and the pipeline process; creates the environmental resources required to execute the pipeline script, and executes the standardized components in sequence according to the pipeline process. Through standardized variables and components, visual orchestration processes, automatic generation of scripts and environment configuration files, users can be helped to quickly and accurately create and manage pipelines, which reduces the technical threshold for configuration and maintenance, improves development efficiency and reduces human errors.
[0109] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0110] Based on the same inventive concept, the embodiments of the present disclosure also provide a pipeline generation device based on low-code visualization corresponding to the pipeline generation method based on low-code visualization. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the above-mentioned pipeline generation method based on low-code visualization in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0111] See also Figure 4 , Figure 4 A schematic diagram of a pipeline generation device based on low-code visualization provided in an embodiment of the present disclosure. Figure 4 As shown in , the low-code visualization-based pipeline generation device 400 provided in the embodiment of the present disclosure includes:
[0112] The variable definition and component division module 410 is used to define the standard variables required for pipeline execution, and divide the functions required by the pipeline into standardized components and store them in a standard component library.
[0113] The pipeline process construction module 420 is used to obtain the target project type selected by the user, load the standard component library corresponding to the target project type, and construct the pipeline process in response to the user's orchestration operation on the standardized component.
[0114] The pipeline script generation module 430 is used to configure corresponding component parameters for each of the standardized components in response to the user's parameter configuration operation on the standardized components, and generate a pipeline script according to the component parameters and the pipeline process.
[0115] The pipeline execution device 440 is used to create the environment resources required for executing the pipeline script and execute the standardized components in sequence according to the pipeline process.
[0116] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0117] The disclosed embodiment provides a pipeline generation device based on low-code visualization, which defines the standard variables required for pipeline execution, divides the functions required for the pipeline into standardized components and stores them in a standard component library; obtains the target project type selected by the user, loads the standard component library corresponding to the target project type, and builds a pipeline process in response to the user's orchestration operation on the standardized component; in response to the user's parameter configuration operation on the standardized component, configures the corresponding component parameters for each of the standardized components, and generates a pipeline script based on the component parameters and the pipeline process; creates the environmental resources required to execute the pipeline script, and executes the standardized components in sequence according to the pipeline process. Through standardized variables and components, visual orchestration processes, automatic generation of scripts and environment configuration files, users can be helped to quickly and accurately create and manage pipelines, which reduces the technical threshold for configuration and maintenance, improves development efficiency and reduces human errors.
[0118] Corresponds to Figures 1 to 3 The pipeline generation method based on low-code visualization in the present disclosure also provides an electronic device 500, such as Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present disclosure, including:
[0119] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including memory 521 and external memory 522; memory 521 here is also called internal memory, which is used to temporarily store operation data in processor 51 and data exchanged with external memory 522 such as hard disk. Processor 51 exchanges data with external memory 522 through memory 521. When the electronic device 500 is running, the processor 51 communicates with the memory 52 through bus 53, so that the processor 51 executes Figures 1 to 3 The steps of the low-code visualization-based pipeline generation method in.
[0120] The present disclosure also 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 pipeline generation method based on low-code visualization described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0121] The embodiments of the present disclosure also provide a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the pipeline generation method based on low-code visualization described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.
[0122] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0123] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0126] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A pipeline generation method based on low-code visualization, characterized in that: include: Define the standard variables required for pipeline execution, divide the functions required by the pipeline into standardized components and store them in the standard component library; Acquire the target project type selected by the user, load the standard component library corresponding to the target project type, and construct a pipeline process in response to the user's orchestration operation on the standardized component; In response to the user's parameter configuration operation on the standardized components, corresponding component parameters are configured for each of the standardized components, and a pipeline script is generated according to the component parameters and the pipeline process; Create the environmental resources required to execute the pipeline script, and execute the standardized components in sequence according to the pipeline process.
2. The method according to claim 1, characterized in that Acquiring the target project type selected by the user, loading the standard component library corresponding to the target project type, and building a pipeline process in response to the user's orchestration operation on the standardized component, specifically including: In response to a project type selection operation performed by a user in a preset interactive interface, determining the target project type; Load the corresponding standard component library according to the target project type, obtain the basic project information input by the user, and perform initialization configuration of the project according to the basic project information; Determine a target component selected by a user in the standard component library, and determine an arrangement order of the target component in response to the arrangement operation of the user on the target component; The pipeline process is generated according to the target components and the corresponding arrangement order.
3. The method according to claim 1, characterized in that In response to the user's parameter configuration operation on the standardized component, corresponding component parameters are configured for each of the standardized components, specifically including: Providing the standard variables and the preferred parameters corresponding to each of the standard variables to the user through a preset interactive interface; In response to the parameter configuration operation of the user on the standard variable, target component parameters are determined and the target component parameters are saved as a parameter configuration file.
4. The method according to claim 1, characterized in that: After configuring corresponding component parameters for each of the standardized components, the method further includes: Determine the build environment and deployment environment selected by the user, and generate a corresponding namespace configuration file, wherein the namespace configuration file is used to determine the resource isolation scope; Generate a key configuration file, wherein the key configuration file includes at least an image repository key and an access key; Configuring persistent storage requirements for the build environment and the deployment environment, and generating a persistent volume declaration configuration file, wherein the persistent volume declaration configuration file is used to meet data storage requirements during build and runtime; The namespace configuration file, the key configuration file, and the persistent volume declaration configuration file are encapsulated to generate an environment configuration file.
5. The method according to claim 4, characterized in that Creating the environment resources required to execute the pipeline script and executing the standardized components in sequence according to the pipeline process, specifically including: Create a namespace according to the namespace configuration file, and load the image repository key and the access key corresponding to the key configuration file; Initialize persistent storage according to the persistent volume declaration configuration file; The standardized components are executed sequentially according to the execution order indicated by the pipeline process.
6. The method according to claim 1, characterized in that Generate a pipeline script according to the component parameters and the pipeline process, specifically including: Parsing the pipeline process to determine the standardized components arranged in the pipeline process and the execution order between the standardized components; For each of the standardized components, extract the component parameters corresponding to the standardized component; According to all the standardized components and the corresponding component parameters, the pipeline script is constructed and environment configuration information is added to the pipeline script.
7. The method according to claim 1, characterized in that The standard variables include at least basic project variables, environment variables and configuration variables; The basic project variables at least define the project name, code repository address, and branch name, which are used to uniformly manage different projects; The environment variables at least define the build tool version, the operating environment configuration and resource restrictions, and are used to ensure the consistency of the operating environment; The configuration variables at least define deployment parameters, operation parameters and monitoring parameters to support the deployment requirements of the application in different environments.
8. A pipeline generation device based on low-code visualization, characterized in that: include: The variable definition and component division module is used to define the standard variables required for pipeline execution and divide the functions required by the pipeline into standardized components and store them in the standard component library; A pipeline process construction module, used to obtain a target project type selected by a user, load the standard component library corresponding to the target project type, and construct a pipeline process in response to an orchestration operation of the user on the standardized component; A pipeline script generation module, configured to configure corresponding component parameters for each of the standardized components in response to a user's parameter configuration operation on the standardized components, and to generate a pipeline script according to the component parameters and the pipeline process; The pipeline execution device is used to create the environmental resources required for executing the pipeline script and execute the standardized components in sequence according to the pipeline process.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the machine-readable instructions are executed by the processor, the steps of the low-code visualization-based pipeline generation method as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the pipeline generation method based on low-code visualization as described in any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Containerization-based resource scheduling method and device
CN112783653A
Visual assembly line arrangement method based on DAG (Directed Acyclic Graph) and related components
CN116028038A
Method and device for realizing data and resource isolation
CN116301820A
CI / CD configuration file generation method and device
CN118779026A
Cited By
Energy storage system firmware upgrading method and device, equipment, medium and program product
CN119668658A