Low-code software development system
By introducing project management, code generation, Jar package management, deployment management and method call modules in low-code development systems, using a large language model to generate code and manage dependencies through Jar package mode, the shortcomings of the existing system in back-end business logic and project deployment are solved, and efficient and stable Java project development and deployment are achieved.
Patent Information
- Application Number
- CN202510187249.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-02-20
AI Technical Summary
The existing low-code development systems have limited support for back-end business logic, interface management and project deployment, resulting in developers still needing to manually correct and optimize code, and insufficient performance and stability when processing large-scale concurrent tasks.
Provide a low-code software development system, including project management module, code generation module, Jar package management module, deployment management module and method calling module. The system uses a large language model to generate code and external dependency information in source code mode, manages shared and project-specific Jar packages through the Jar package mode, and implements flexible project deployment and dynamic method calls through independent class loaders.
It significantly improves development efficiency, reduces development costs, ensures the scalability and stability of the system, and is suitable for rapid construction and deployment of Java projects.
Smart Images

Figure CN119668576A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a low-code software development system. Background Art
[0002] With the growing demand for software development, traditional software development models have gradually exposed many problems. The traditional development process usually relies on developers to manually write a large amount of code, which is not only time-consuming and labor-intensive, but also prone to introducing errors and reducing development efficiency. Especially in projects in mainstream programming languages such as Java, developers often need to perform tedious operations such as interface definition, method writing, and dependency management. These repetitive tasks occupy a large amount of development resources and it is difficult to ensure the quality and consistency of the code.
[0003] In order to solve these problems, low-code development platforms came into being. Low-code development platforms help developers improve development efficiency and lower technical barriers by simplifying the coding process, providing visual design interfaces, and automatically generating code. However, most existing low-code development systems focus on the rapid construction of front-end interfaces, and their support for back-end business logic, interface management, and project deployment is still limited. Existing systems often lack flexible code generation mechanisms, effective external dependency management, and efficient project deployment solutions, resulting in developers still having to manually perform a large amount of code correction and optimization.
[0004] In addition, some low-code platforms still have deficiencies in task scheduling, load balancing, fault tolerance, etc., especially when processing large-scale concurrent tasks, performance and stability cannot be fully guaranteed. Therefore, while the existing low-code platforms improve development efficiency, they still face the challenge of not being able to fully meet the needs of complex projects. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a low-code software development system to eliminate or improve one or more defects existing in the prior art and solve the problem that the prior art cannot quickly build back-end business and perform project deployment.
[0006] One aspect of the present invention provides a low-code software development system, the system comprising: The project management module is used to obtain the user's creation requirements for Java projects, wherein the creation requirements include the creation form and the project requirement description; the creation form includes the source code mode and the Jar package mode; in the source code mode, the project requirement description includes the project function description, interface definition, interface call method definition, the response parameter type of the method and the required external dependencies; in the Jar package mode, the project requirement description annotates the interface name and description, interface call method name and description, parameter name, parameter type and the external dependencies required by the Java project in the form of annotations; A code generation module is used to use a preset large language model in the source code mode to take the project requirement description as input, generate a target project file outline according to the sample project file outline, and generate code and external dependency information for the required interface and method according to the structure of the target project file outline; improve the code based on the modification of error codes and comments verified by the user, and combine and generate content; The Jar package management module is used to obtain, in Jar package mode, a shared Jar package shared by multiple Java projects, a project Jar package annotated with the project requirement description for the current Java project, and an extended Jar package marked with external dependencies according to the sample project, so as to configure the current Java project; in source code mode, divide the generated content corresponding to the current Java project into the shared Jar package shared by multiple Java projects, the project Jar package, and the extended Jar package for management; A deployment management module, used to load the classes in the Java project through a class loader with an independent namespace, create a META-INF / services directory under the resource directory in the source code mode and the Jar package mode, create a file named with the full path of the interface, the content of the file is the fully qualified name of the interface implementation class, and deploy the generated content to complete the deployment of the Java project; load the interface implementation classes in the shared Jar package, the project Jar package and the extension Jar package according to the preset path under the resource directory based on the parent delegation mechanism and the independent class loader to complete the deployment of the JAVA project; The method calling module is used to dynamically load the Jar package in the Java project for calling based on the Java reflection mechanism.
[0007] In some embodiments, the system also includes: a Java project integrity verification module, which is used to perform an integrity review of the project function description, the interface definition, the method definition, the response parameter type and the external dependency of the deployed Java project according to the project requirement description, and generate a review result, and generate a prompt message when the integrity review fails.
[0008] In some embodiments, the system also includes: a code generation verification module, which is used to perform syntactic correctness, logical correctness and performance testing on the code generated by the code generation module, establish a code generation log to record the code generation process and record the test results; and incorporate the generated code into the version control system to record each generated code version and the corresponding project requirements.
[0009] In some embodiments, the system further includes: a code security detection module, which is used to provide a sandbox environment to isolate and test the security of the code, and to establish a code security test log to save the security test results.
[0010] In some embodiments, the code generation module combines with the Ftl template to generate the code and the pom.xml file for defining the external dependency.
[0011] In some embodiments, the deployment management module loads the shared Jar package according to a preset path in a resource directory based on a parent delegation mechanism and an independent class loader, including: Create a shared loader directory, download the shared Jar package to the shared loader directory, and put the storage path of the shared Jar package into the path URL array; Create a class loader instance ShareClassLoader, use AppClassLoader as the parent loader of ShareClassLoader, and load and initialize the interface implementation class of the shared Jar package according to the storage path recorded in the path URL array based on the parent delegation mechanism.
[0012] In some embodiments, the deployment management module loads the project Jar package and the extension Jar package according to a preset path in a resource directory based on a parent delegation mechanism and an independent class loader, including: Create a project loader directory and create a subfolder, and download the project Jar package and the extension Jar package to the project loader directory; Create a custom class loader instance MicroUdcClassLoader, load the interface implementation class in the project Jar package and the extension Jar package according to the storage path based on the parent delegation mechanism, and use the class loader instance ShareClassLoader as the parent loader of the custom class loader instance MicroUdcClassLoader.
[0013] In some embodiments, the system further comprises: The requirement mapping module is used to load a preset large language model to convert the Java project requirements described by the user based on natural language into the creation requirements in a standard format.
[0014] In some embodiments, the system further includes: a model management optimization module, configured to perform regular evaluation, testing, and update iterations on the large language model.
[0015] In some embodiments, the system also includes: an asynchronous task and distributed task management module, which is used to convert long-running Java project development tasks into asynchronous tasks and execute them asynchronously in the background, or divide the Java project development tasks into multiple subtasks and distribute them to multiple working nodes for execution.
[0016] The beneficial effects of the present invention are at least: In the low-code software development system described in the present invention, the project management module is responsible for obtaining the user's creation requirements for Java projects, including source code mode and Jar package mode. The code generation module uses a large language model in the source code mode to generate code and external dependency information as required. The Jar package management module manages the calling of shared Jar packages, project Jar packages and extension Jar packages as required in the Jar package mode. The deployment management module completes the deployment of the project based on the parent delegation mechanism through an independent class loader, and the method calling module dynamically calls the loaded Jar package based on the Java reflection mechanism. The system significantly improves development efficiency and reduces development costs through automated code generation and flexible deployment mechanisms, while ensuring the scalability and stability of the system, and is suitable for rapid construction and deployment of Java projects.
[0017] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0018] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings: Figure 1 This is a structural diagram of the low-code software development system described in one embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of the application logic of the low-code software development system described in one embodiment of the present invention.
[0021] Figure 3 This is a flowchart of the low-code software development system described in an embodiment of the present invention, which generates code by referencing a large language model thinking chain in source code mode.
[0022] Figure 4 Generate a project code flow chart for the low-code software development system described in one embodiment of the present invention.
[0023] Figure 5 A flowchart of loading a shared Jar package in the low-code software development system described in one embodiment of the present invention.
[0024] Figure 6 This is a flowchart of loading project Jar packages and extension Jar packages in the low-code software development system described in one embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0026] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0027] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0028] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0029] A low-code platform is a software development tool that allows developers to develop customized applications through graphical interfaces and model-driven logic, rather than relying entirely on traditional coding methods. Low-code platforms usually provide a series of pre-made modules and components, and users can quickly build applications that include user interfaces, business logic, workflows, and data flows by dragging and dropping, thereby reducing software development coding costs in all aspects.
[0030] The workflow engine is the core component of the low-code platform, responsible for managing and executing the workflow of the application. It supports the creation and configuration of workflows in a visual way, including tasks assignment, data processing and other operations. At the same time, it can also track and monitor the execution status of the workflow, and provide operation logs and error handling mechanisms. There are generally different types of workflow nodes designed in the workflow, such as start nodes, calculation nodes, branch nodes, etc. The combination of these nodes can realize complex business processes and make the visualization of business processes possible. However, with the increasing complexity of business logic, it also brings some limitations, such as complex orchestration. At present, many low-code platform workflows can only rely on complex workflow orchestration when facing complex business logic. More complex orchestration also means longer testing, which continuously reduces efficiency and goes against the original intention of using low-code platforms. Another example is poor scalability. Fixed workflow nodes limit the scalability of low-code platforms. When a complex business process requires a new type of node, it can only be achieved by redeveloping new nodes. The current low-code platform needs more flexible expansion capabilities to meet the growing business needs.
[0031] The purpose of this application is to provide a low-code platform. In the user-defined code node (User Design Code) in the workflow, facing complex business needs, users can develop Java projects through UDC. It should be noted that a Java project is a software project built on the Java language, which usually contains multiple modules and components to implement specific functions or services. In the present invention, it is the function that the user-defined code node needs to complete. For example, if the function that a node needs to complete is to send a government WeChat, then a corresponding Java project is created. In a Java project, one or more interfaces can be provided. An interface is an abstract type that is used to define the specifications of a set of methods, but does not provide a specific implementation. Separating the interface from the implementation facilitates maintenance and expansion. The method is the specific operation logic defined in the interface or class. It receives input parameters (request parameters), performs a series of operations, and returns output results (response parameters). The method is a specific implementation of the interface specification. The interface defines the specifications of a set of methods, which are usually abstract methods without specific implementations. Classes can inherit the declarations of these methods by implementing interfaces and provide specific implementations. In summary, a project is used to implement a large function. The project can contain multiple interfaces, each of which is used to define a small function, and each interface contains multiple methods for specific implementation of the function. That is, the project contains multiple interfaces, and the interfaces contain dependencies of multiple methods.
[0032] Dependencies refer to external libraries or modules that a project relies on during operation or construction. These dependencies are usually codes written by other developers or organizations to implement specific functions, such as database connection, logging, network communication, etc. By introducing these dependencies, developers can avoid reinventing the wheel and focus on the development of core business logic.
[0033] In Java projects, dependencies are introduced in the form of jar files. Jar files are a special file format used to package and store code and resources. We call this type of file a Jar package. After a developer develops a tool or function, he can package it into a jar file and share it with others. Others can use this jar file directly without rewriting the code.
[0034] In the present invention, the specific implementation of the method in the project may use external dependencies. The one used by a certain project alone is defined as an extended Jar package. If multiple projects use the Jar package, it is defined as a shared Jar package. After the project is packaged in the present invention, the project itself will be packaged, that is, the project Jar package. Although the project itself uses external dependencies, the Jar package does not include the actual code resources of the external dependencies, that is, the extended Jar package or the shared Jar package. Therefore, all three need to be deployed to the Java virtual machine running the workflow system.
[0035] Specifically, the present invention provides a low-code software development system, such as Figure 1 and 2 As shown, the system includes: a project management module, a code generation module, a Jar package management module, a deployment management module and a method calling module.
[0036] The project management module is used to obtain the user's creation requirements for Java projects. The creation requirements include the creation form and project requirement description; the creation forms include source code mode and Jar package mode; in the source code mode, the project requirement description includes project function description, interface definition, interface call method definition, method response parameter type and required external dependencies; in the Jar package mode, the project requirement description annotates the interface name and description, interface call method name and description, parameter name, parameter type and external dependencies required by the Java project in the form of annotations; The code generation module is used in source code mode to use a preset large language model to take the project requirement description as input, generate a target project file outline according to the sample project file outline, and generate code and external dependency information for the required interfaces and methods according to the structure of the target project file outline; based on user verification, the code is modified to improve error codes and comments, and the generated content is combined.
[0037] Large language models are language models trained on large text corpora and contain tens of billions of parameters or more. These models use similar Transformer architectures and pre-training objectives as small models, such as language modeling, but the main difference is the size of the model, the increase in training data, and computing resources. The performance of large language models often follows the law of expansion, that is, the increase in model size leads to improved performance. Large language models are widely used in natural language processing, text generation, and intelligent dialogue. They learn complex patterns and features through massive data training, and show strong generalization and prediction performance. Large language models are implemented based on Chain-of-Thought (CoT), a prompt technology used to improve the performance of large models on complex reasoning tasks such as mathematical problems, common sense reasoning, and symbolic reasoning. CoT breaks down complex problems into sub-problems and solves them step by step by requiring the large model to explicitly output the intermediate reasoning steps before outputting the final answer. These intermediate steps not only help the model gradually approach the correct answer, but also improve the interpretability of the model's decisions. The combination of big models and thought chains has the following advantages: Improve development efficiency. Big models can directly generate code frameworks based on sufficient prompts, which can greatly improve the development efficiency of project codes. Improve code robustness. Big models can help developers make up for areas that have not been considered and improve the robustness of project codes.
[0038] The code generation module is one of the core components of the low-code software development system. It is mainly responsible for automatically generating the code structure and content of the project according to the project requirements provided by the user in the source code mode. Its work mainly includes the following steps: Step S101: Input project requirement description.
[0039] In source code mode, users need to provide a detailed description of project requirements, including but not limited to: project function description, the main functions and business logic of the project; interface definition, the interface (API) that the project needs to provide to the outside world; method definition of interface calls, and specific method implementations within the interface. The response parameter type of the method, the data structure returned by the method. External dependencies, third-party libraries or frameworks required for the project to run. These requirement descriptions are the inputs of the code generation module, and the module will generate corresponding code based on this information.
[0040] Step S102: Generate a target project file outline.
[0041] The code generation module first uses a preset large language model (such as GPT, deepseek, etc.) to generate the file outline of the project. The file outline usually includes the basic files and directory structure of the project, such as: src / main / java, the Java source code directory of the project; src / main / resources, the resource file directory of the project (such as configuration files, template files, etc.); pom.xml (Maven project), the dependency management and build configuration files of the project.
[0042] Step S103: Generate code and external dependencies according to the outline.
[0043] After generating the file outline, the code generation module will generate specific code content according to the structure of the outline, including: interface code, which generates interface classes based on interface definitions. Method code, which generates method implementations based on method definitions. External dependency information, which adds user-specified external dependencies (such as dependent libraries or frameworks) to the project's configuration file (such as pom.xml).
[0044] Step S104: Code completion based on user verification.
[0045] The generated code may have some problems or errors, such as: incorrect code, the generated code may not conform to the syntax specification or business logic. Incorrect comments, the generated comments may not match the actual function of the code. Therefore, the code generation module will provide a user verification mechanism, allowing users to modify the incorrect code and correct the errors in the generated code; improve the comments, supplement or correct the comments in the code to more accurately describe the function and logic of the code.
[0046] Step S105: Combine and generate content.
[0047] After the user completes the review and modification, the code generation module will combine the generated code and external dependency information into a complete project content. The final project content includes: Complete source code, including interfaces, method implementations, etc. Configuration files, such as pom.xml, containing all external dependencies of the project. Comments, which accurately describe the code functions.
[0048] In some embodiments, the code generation module combines the Ftl template to generate code and a pom.xml file for defining external dependencies.
[0049] The Jar package management module is used to obtain the shared Jar package shared by multiple Java projects, the project Jar package annotated with the project requirement description for the current Java project, and the extended Jar package marked with external dependencies according to the sample project in the Jar package mode, so as to configure it as the current Java project; in the source code mode, the generated content corresponding to the current Java project is divided into the shared Jar package shared by multiple Java projects, the project Jar package and the extended Jar package for management. In the Jar package mode, the user does not need to define information such as projects in the system, but only needs to imitate the sample project coding. Use the annotations provided by the system and configure the resource files. The Jar package will be parsed during deployment to obtain project, interface and method information and save it to the database. For the generated content generated based on the source code mode, it is also divided and managed according to the shared Jar package, project Jar package and extended Jar package, and deployed.
[0050] In this low-code software development system, the Jar package mode is an efficient and reusable development method that allows users to annotate project requirements descriptions in the form of annotations and encapsulate this information into Jar packages, thereby achieving modularization and reuse of code. The main function of the Jar package management module is to generate and manage shared Jar packages shared by multiple Java projects, project Jar packages unique to the current Java project, and extended Jar packages that mark external dependencies based on project requirement description annotations in the Jar package mode.
[0051] A shared Jar package is a reusable module that is shared between multiple Java projects and is mainly used to provide common functions or libraries. A project Jar package is a Jar package that describes the requirements of the current Java project and contains project-specific functions and implementations. An extension Jar package is an optional Jar package that is used to add dependencies on external libraries or functional support that a project may need.
[0052] The deployment management module is used to load classes in Java projects through a class loader with an independent namespace. In source code mode and Jar package mode, a META-INF / services directory is created under the resource directory, a file named with the full path of the interface is created, and the content of the file is the fully qualified name of the interface implementation class, and the generated content is deployed to complete the deployment of the Java project; according to the preset path, the interface implementation classes in the shared Jar package, project Jar package, and extension Jar package are loaded based on the parent delegation mechanism and independent class loader under the resource directory to complete the deployment of the JAVA project. The difference is that in the Jar package mode, users need to use annotations to identify interfaces, methods and other information, while the source code mode has been saved in the database in advance. The deployment of both modes is loaded through the parent delegation mechanism and independent class loader. Specifically, the deployment management module is the core module used in the low-code software development system for the final deployment of Java projects. It implements the dynamic loading and deployment of classes in Java projects in source code mode and Jar package mode through class loaders.
[0053] In source code mode and Jar package mode, the specific operations include: Use a class loader with an independent namespace to load the project's classes. Perform resource directory operations and create a directory named META-INF / services in the project's resource directory. Create an interface full path file. In this META-INF / services directory, create a file named with the full path of the interface. For example, if the full path of the interface is com.example.MyInterface, the created file name is com.example.MyInterface. Fill in the fully qualified name of the interface implementation class. The content of the file is the fully qualified name of the interface implementation class. For example, if the implementation class of the interface com.example.MyInterface is com.example.impl.MyInterfaceImpl, the file content is com.example.impl.MyInterfaceImpl. Deploy the generated content. After completing the above operations, deploy the synthesized project content to complete the deployment process of the Java project.
[0054] Use a class loader with an independent namespace and perform class loading based on a parent delegation mechanism. According to the preset path, three types of Jar packages are loaded in the resource directory, namely: shared Jar package, project Jar package, and extension Jar package. A shared Jar package is a Jar package of common functions or libraries shared by multiple Java projects. For example, a Jar package that provides common functions such as logging and tool functions. A project Jar package is a Jar package that is unique to the current Java project and is generated using project requirement description annotations. For example, a Jar package that contains specific business logic, interface implementation, etc. An extension Jar package is a Jar package used to add external dependencies, marking the external dependencies required by the project. For example, a Jar package of extended functions related to a third-party library or framework. Load the interface implementation class. The class loader loads the interface implementation classes in the above-mentioned shared Jar package, project Jar package, and extension Jar package, thereby completing the deployment process of the Java project.
[0055] The method call module is used to dynamically load the Jar package in the Java project for calling based on the Java reflection mechanism. Java's reflection mechanism allows the program to check and manipulate the characteristics and behaviors of classes, objects, methods, fields, etc. at runtime. Through reflection, you can obtain class information at runtime and call its methods or constructors. This dynamism makes it possible to interact with the class even if you don't know the specific class name.
[0056] In some embodiments, the system also includes: a Java project integrity verification module, which is used to perform integrity review on the project function description, interface definition, method definition, response parameter type and external dependencies of the deployed Java project according to the project requirement description, and generate a review result, and generate a prompt message when the integrity review fails.
[0057] Specifically, first, parse the project requirement description and extract key information, such as project function description, interface definition, method definition, response parameter type and external dependencies; then, scan the deployed Java project through reflection mechanism or code parsing tool to obtain the actual function, interface, method, parameter type and dependency information of the project; then, compare the extracted requirement information with the actual project information one by one to check whether there is any missing or mismatch; if integrity problems are found, generate review results and provide detailed prompt information to point out the specific problem (such as missing interface, mismatched method parameter type, missing external dependency, etc.) so that developers can fix it.
[0058] In some embodiments, the system also includes: a code generation verification module, which is used to perform syntactic correctness, logical correctness and performance testing on the code generated by the code generation module, establish a code generation log to record the code generation process and record the test results; and incorporate the generated code into the version control system to record each generated code version and the corresponding project requirements.
[0059] Specifically, the implementation of the code generation verification module can be carried out through the following steps: 1) Syntax correctness verification: by calling the Java compiler API, the generated code file is used as input to check whether there are syntax errors. For example, the javax.tools.JavaCompiler tool class can be used to compile the code, capture exceptions and error information during the compilation process, and record and report syntax problems. 2) Logical correctness verification: design a series of unit test cases and use unit test frameworks such as JUnit to verify the logic of the code. Define the test scenario according to the project requirements, including normal input and boundary conditions, execute the test and record the test results to ensure that the code functions as expected. 3) Performance testing: for key methods and components in the code, use performance analysis tools such as JProfiler or statistics code running time and resource consumption, set performance indicators (such as response time, throughput), run performance tests, and record test results to verify whether the code meets performance requirements. 4) Logging: during the code generation process, use logging frameworks such as Log4j or SLF4J to record the intermediate state of code generation, method calls, error information, and test results. Write log information to a file or database for subsequent auditing and problem tracking. 5) Version control integration: After the code is generated, the generated code is added to the version control system through the API of the version control tool (such as Git's JGit library). Each generated code is treated as a new submission, recording the version information and the corresponding project requirement description, which is convenient for version management and backtracking.
[0060] In some embodiments, the system further includes: a code security detection module, which is used to provide a sandbox environment to isolate and test the security of the code, and to establish a code security test log to save the security test results.
[0061] The implementation of the code security detection module can be carried out through the following steps: 1) Sandbox environment isolation test: Create a controlled sandbox environment and deploy the code to be tested into the environment. The sandbox environment can limit the execution permissions of the code to prevent malicious code from causing harm to the system. For example, you can use Java's SecurityManager class to limit the file access, network access and other permissions of the code. 2) Static code analysis: Use static code analysis tools (such as SonarQube, FindBugs, Checkmarx and SpotBugs) to scan the code to detect potential security vulnerabilities and quality issues. These tools can detect common security issues such as SQL injection, cross-site scripting (XSS), command injection, etc. 3) Dynamic code analysis: Run the code in a sandbox environment, monitor its runtime behavior, and detect whether there are abnormal behaviors or security vulnerabilities. For example, you can monitor the file operations, network communications, memory usage and other behaviors of the code to discover potential security issues. 4) Establish a test log: During the test process, record all test results and related log information. The log should include information such as test time, test results, security issues found, and the severity of the problem. You can use a logging framework (such as Log4j or SLF4J) to record logs and save them to files or databases for subsequent analysis and tracking. 5) Generate test reports: Generate detailed test reports based on the test results. The reports should include a test overview, security issues found, detailed descriptions of the issues, recommended fixes, etc. The test reports can be output in HTML, PDF, or other formats for developers and security teams to view and analyze.
[0062] In some embodiments, the deployment management module loads the shared Jar package according to a preset path in a resource directory based on a parent delegation mechanism and an independent class loader, including steps S201-S202: Step S201: create a shared loader directory, download the shared Jar package to the shared loader directory, and put the storage path of the shared Jar package into the path URL array.
[0063] Step S202: Create a class loader instance ShareClassLoader, use AppClassLoader as the parent loader of ShareClassLoader, and load and initialize the interface implementation class of the shared Jar package according to the storage path recorded in the path URL array based on the parent delegation mechanism.
[0064] In some embodiments, the deployment management module loads the project Jar package and the extension Jar package according to the preset path in the resource directory based on the parent delegation mechanism and the independent class loader, including steps S301-S302: Step S301: Create a project loader directory and establish subfolders, and download the project Jar package and the extension Jar package to the project loader directory.
[0065] Step S302: Create a custom class loader instance MicroUdcClassLoader, load the interface implementation class in the project Jar package and the extension Jar package according to the storage path based on the parent delegation mechanism, and use the class loader instance ShareClassLoader as the parent loader of the custom class loader instance MicroUdcClassLoader.
[0066] In some embodiments, the system further includes: a requirement mapping module for loading a preset large language model to convert the Java project requirements described by the user based on natural language into creation requirements in a standard format.
[0067] Specifically, select a large language model that has been trained and is suitable for code generation functions, such as GPT-3, GPT-4, or other similar models. These models have the ability to understand natural language and generate standard format text. Receive Java project requirements based on natural language descriptions from users. These requirements may include project function descriptions, interface definitions, method definitions, response parameter types, and external dependencies. Use the powerful semantic parsing capabilities of the large language model to accurately understand each part of the user input. For example, to identify the requirement "I want to develop an e-commerce platform where users can buy goods and view orders", the model needs to parse it into project function descriptions, interface definitions, etc. Based on the parsing results, convert the natural language description into a standard format that meets the system requirements. This may include a standardized template for creating requirements, such as generating a JSON-formatted requirement document that contains fields such as project function descriptions, interface definitions, and method definitions. If the requirements entered by the user are vague or unclear, the model should be able to give prompts or ask the user for further clarification to ensure that the generated creation requirements are accurate. Verify the generated standard format creation requirements to ensure that they are formatted correctly and logically clear. For example, check whether the interface definition complies with the Java syntax specification, whether the method definition is complete and the parameter types are consistent, etc. If errors or inaccuracies are found, allow users to review and correct the conversion results to ensure that the final creation requirements fully meet the user's intentions. Establish detailed log records to record the entire mapping process from user input to standard format creation requirements, including user input, model parsing process, conversion results, and any user correction operations.
[0068] In some embodiments, the system further includes: an interface generation and visual design module, which allows users to construct a project display interface by dragging and dropping configurations, and automatically generates corresponding front-end codes.
[0069] In some embodiments, the system also includes: an asynchronous task and distributed task management module, which is used to convert long-running Java project development tasks into asynchronous tasks and execute them asynchronously in the background, or divide Java project development tasks into multiple subtasks and distribute them to multiple working nodes for execution.
[0070] The present invention is described below in conjunction with a specific embodiment: This embodiment provides a method for implementing a user-defined code node (User DesignCode) in a workflow in a low-code platform. The invention content is introduced below.
[0071] First, let’s introduce the usage process of UDC. Figure 2 As shown. In the face of complex business needs, users can develop a project for the business needs through the two modes provided by UDC. After the project function development and testing is completed, it will be packaged, where the shared dependencies between projects are used as shared Jar packages, the project itself is used as a project Jar package, and the dependencies are used as extended Jar packages, all of which are uploaded to the file system. After the project is deployed through the Jar package, the business needs can be met by using the UDC node in the low-code platform workflow and configuring the corresponding project and interface method information.
[0072] The following is a description of the functional architecture of UDC. Figure 1 The UDC functional module division is shown.
[0073] UDC is mainly composed of five modules, namely project management module, code generation module, Jar package management module, deployment management module and method call module. The project management module includes the management of projects, interfaces, methods and parameters. The Jar package management module includes the management of shared Jar packages, project Jar packages and project extension Jar packages.
[0074] The project concept proposed in this embodiment is a Java project. A project can correspond to multiple interfaces, and an interface can provide multiple methods. Each method can be configured and used in a workflow UDC node. At the same time, a method can configure request parameters and response parameters.
[0075] At the same time, in order to improve the scalability of UDC, this embodiment proposes two project modes: source code mode and Jar package mode.
[0076] A. Source code mode: If the project type is source code mode, the user needs to define the corresponding project, interface, and method information in the system. The system will generate a complete Java project based on this information. After downloading the project locally, the project functions can be improved in the local development environment.
[0077] From the above content, it can be seen that the project codes defined by UDC require a certain basic code framework. The large language model is very suitable for generating project codes through thinking chains based on this framework.
[0078] Therefore, the present invention is based on a large language model (such as GPT4) and can automatically generate project code according to user needs. After the user enters a detailed description of the project, he can choose to add a detailed description of the interface and method, or it can be automatically generated directly by the large model. After generating the basic project code, the user can modify and improve the code again through the large model by modifying the comments, thereby improving the development efficiency of the project.
[0079] The present invention designs a thinking chain to generate project codes, such as Figure 3 As shown, the following steps are included: 1. The big model generates a project document outline based on the detailed project description.
[0080] 2. The large model generates a detailed functional description of the method and detailed information on the request parameters and response parameters based on the detailed description of the project and the request parameters, response parameters and method name generated in step 1.
[0081] 3. The large model generates the specific code of the method and the dependency information used based on the detailed method information generated in step 2.
[0082] 4. The user modifies the comments in the code, and the large model modifies the code based on the modified comments.
[0083] When the project type is in source code mode, UDC will build a complete Java project based on the project, interface, method, and parameter information entered by the user. The specific process is as follows: Figure 4 shown.
[0084] First, you need to obtain project-related information and check the integrity of the information. If there is no interface under the project or no method under the interface, it is meaningless to generate the project. Then, create a project code directory under the user directory according to the project name, and create the code directory and resource directory in the Java project in turn. Finally, use the ftl template to create each specific code file and pom.xml file based on parameters, interfaces and other information.
[0085] At the same time, you need to create a META-INF / services directory under the resource directory, and create a file named with the full path of the interface in it. The file content is the fully qualified name of the interface implementation class. The project must include this configuration file to be correctly loaded in the subsequent deployment link.
[0086] B.Jar package mode: If the project type is Jar package mode, there is no need to define project information in the system. You only need to imitate the sample project coding. Use the annotations provided by the system and configure the resource files. The Jar package will be parsed during deployment to obtain project, interface and method information and save it to the database.
[0087] In the Jar package mode, you need to configure project-related information in the global-config.json file under the resource directory. After uploading, the system automatically reads and stores the project information. The present invention proposes the following annotations to obtain interface, method and other information: 1. @UdcField(name, type) is used to identify the parameter name and parameter type.
[0088] 2. @UdcInterface(value, name) is used to identify the interface name and description.
[0089] 3. @UdcMethod(value, name) is used to identify the method name and description.
[0090] At the same time, the present invention provides @Dinjection annotation for dependency injection for both modes. If the interface implementation class declares a class in the system Jar package, the annotation can identify the member variable and realize its loading in the deployment phase.
[0091] According to the UDC deployment mechanism, the project deployment takes the steps of loading the shared Jar package first and then loading the project Jar package and extension package. The details are as follows: First, you need to initialize the deployment environment. The specific deployment process is similar for source code mode and Jar package mode. However, the Jar package mode obtains parameter, interface and method information from the @UdcField, @UdcInterface, and @UdcMethod annotations mentioned above, and obtains project information from the global-config.json file in the resource directory. The source code mode directly uses the project management module to obtain interface, method and other information of all projects. All this information will be stored in a suitable data structure for subsequent use.
[0092] After initializing the deployment environment, follow Figure 5The process shown loads the shared Jar package. First, you need to create a / udc / shared-loader folder in the user directory and download all shared Jar packages to this path. And put the list of storage paths of all shared Jar packages into the URL type array. Create a new URLClassLoader instance ShareClassLoader, use AppClassLoader as the parent loader of ShareClassLoader, and initialize it with the shared Jar package path URL array. At this point, the shared Jar package is loaded.
[0093] After the shared Jar package is loaded, deploy the project Jar package and the extended Jar package. The specific process is as follows Figure 6 As shown: In the user directory, first create a folder named / udc / udc-loader, then further create subfolders according to the project name and version information and download the project Jar package and the extension Jar package. Create a MicroUdcClassLoader custom class loader instance for each project. This loader uses the path of the project Jar package and the extension Jar package as its loading path, and uses the previously created ShareClassLoader as its parent class loader.
[0094] Then, iterate through the fully qualified name list of all interfaces in the project and load each interface. Use the loadClass method of the class loader to load. Once the interface class is successfully loaded, use the load method provided by java.util.ServiceLoader to load the implementation class of the interface.
[0095] After the interface implementation class is loaded successfully, the member variables of the interface implementation class are obtained. If the member variables are marked by the @DInjection annotation, the corresponding dependencies are obtained from the Spring application context, and the Bean instance is injected into the field of the interface implementation class. Finally, the method request parameters in the interface implementation class are obtained, and the return parameter information is saved. At this point, the loading process of the project Jar package and the extension Jar package is declared complete.
[0096] C. Deployment Mechanism: In Java, class versioning and isolation are mainly implemented through class loaders. Each class loader has its own namespace, which means that classes loaded by different class loaders are considered different classes even if they are exactly the same. This mechanism is based on Java's Parent Delegation Model. The following are two key points for Java to implement class versioning and isolation: 1. Parent delegation mechanism In the parent delegation mechanism, when a class loader receives a class loading request, it will not immediately try to load the class itself, but delegate it to its parent class loader to try to load it. This is true for each layer of class loaders, so all class loading requests are passed to the top-level bootstrap class loader (Bootstrap ClassLoader). Only when the parent loader reports that it cannot complete the loading, the child class loader will try to load it itself. This ensures that the classes of the Java core library will not be reloaded, and also provides a mechanism for the child class loader to overwrite the classes in the parent class loader.
[0097] 2. Independent class loader By providing separate class loaders for different versions or different plugins, you can ensure that these classes are isolated in the JVM. Each class loader has its own class path, so the classes they load will not conflict with classes loaded by other class loaders.
[0098] Therefore, the present invention designs the following solutions to achieve version control of classes and isolation between different projects: First, to ensure that the classes in the shared package are not loaded repeatedly by the class loader, a parent delegation mechanism is adopted. AppClassLoader is used as the parent loader of the shared package class loader ShareClassLoader. ShareClassLoader loads the shared Jar packages of all projects, and the project's class loader MicroUdcClassLoader uses ShareClassLoader as the parent loader.
[0099] At the same time, to ensure that there is no conflict between class loading of different projects and different versions, each project will have its own independent loader for isolation. Each MicroUdcClassLoader is responsible for loading its own project Jar package and project extension Jar package.
[0100] D.UDC method call implementation method: After the project is successfully deployed, users can test all methods of the project, and can also select different interfaces and methods in different projects to call in the workflow. This method of dynamically loading Jar packages for calling is mainly based on the Java reflection mechanism. The reflection-related API provides a series of classes and interfaces to operate Class objects, mainly as follows: 1. java.lang.Class: Represents the object of a class and provides methods to obtain the fields, methods, and constructors of the class.
[0101] 2. java.lang.reflct.Field: Represents the attributes of a class and provides the ability to access and modify fields.
[0102] 3. java.lang.reflct.Method: represents the method of a class and provides the ability to call the method.
[0103] 4. java.lang.reflect.Constructor: represents the constructor of a class and provides the ability to create objects.
[0104] Based on the above reflection mechanism, the method call in the UDC can be completed. The java.lang.reflect.Method class obtained during deployment is obtained according to the project, interface and method information provided by the workflow node.
[0105] Then, according to the parameter information during the call, java.lang.java.lang.reflect.Constructor and java.lang.reflect.Field are used to construct the request parameters. Different library functions need to be called for different request parameters, such as JSON type. After the construction is completed, the class is added to the method parameter list.
[0106] Finally, call the invoke method provided by java.lang.reflect.Method to get the execution result of the method.
[0107] Corresponding to the above method, the present invention also provides an apparatus / system, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system implements the steps of the method described above.
[0108] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0109] In summary, in the low-code software development system described in the present invention, the project management module is responsible for obtaining the user's creation requirements for Java projects, including source code mode and Jar package mode. The code generation module uses a large language model in the source code mode to generate code and external dependency information as required. The Jar package management module manages the calling of shared Jar packages, project Jar packages and extension Jar packages as required in the Jar package mode. The deployment management module completes the deployment of the project based on the parent delegation mechanism through an independent class loader, and the method calling module dynamically calls the loaded Jar package based on the Java reflection mechanism. The system significantly improves development efficiency and reduces development costs through automated code generation and flexible deployment mechanisms, while ensuring the scalability and stability of the system, and is suitable for rapid construction and deployment of Java projects.
[0110] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0111] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0112] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A low-code software development system, characterized in that: The system comprises: The project management module is used to obtain the user's creation requirements for Java projects, wherein the creation requirements include the creation form and the project requirement description; the creation form includes the source code mode and the Jar package mode; in the source code mode, the project requirement description includes the project function description, interface definition, interface call method definition, the response parameter type of the method and the required external dependencies; in the Jar package mode, the project requirement description annotates the interface name and description, interface call method name and description, parameter name, parameter type and the external dependencies required by the Java project in the form of annotations; A code generation module is used to use a preset large language model in the source code mode to take the project requirement description as input, generate a target project file outline according to the sample project file outline, and generate code and external dependency information for the required interface and method according to the structure of the target project file outline; improve the code based on the modification of error codes and comments verified by the user, and combine and generate content; The Jar package management module is used to obtain, in Jar package mode, a shared Jar package shared by multiple Java projects, a project Jar package annotated with the project requirement description for the current Java project, and an extended Jar package marked with external dependencies according to the sample project, so as to configure the current Java project; in source code mode, divide the generated content corresponding to the current Java project into the shared Jar package shared by multiple Java projects, the project Jar package, and the extended Jar package for management; A deployment management module, used to load the classes in the Java project through a class loader with an independent namespace, create a META-INF / services directory under the resource directory in the source code mode and the Jar package mode, create a file named with the full path of the interface, the content of the file is the fully qualified name of the interface implementation class, and deploy the generated content to complete the deployment of the Java project; load the interface implementation classes in the shared Jar package, the project Jar package and the extension Jar package according to the preset path under the resource directory based on the parent delegation mechanism and the independent class loader to complete the deployment of the Java project; The method calling module is used to dynamically load the Jar package in the Java project for calling based on the Java reflection mechanism.
2. The low-code software development system according to claim 1, characterized in that: The system also includes: a Java project integrity verification module, which is used to perform an integrity review on the project function description, the interface definition, the method definition, the response parameter type and the external dependency of the deployed Java project according to the project requirement description, and generate a review result, and generate a prompt message when the integrity review fails.
3. The low-code software development system according to claim 1, characterized in that: The system also includes: a code generation verification module, which is used to test the grammatical correctness, logical correctness and performance of the code generated by the code generation module, establish a code generation log to record the code generation process and record the test results; and incorporate the generated code into the version control system to record each generated code version and the corresponding project requirements.
4. The low-code software development system according to claim 1, characterized in that: The system also includes: a code security detection module, which is used to provide a sandbox environment to isolate and test the security of the code, and to establish a code security test log to save the security test results.
5. The low-code software development system according to claim 1, characterized in that: The code generation module combines the Ftl template to generate the code and the pom.xml file for defining the external dependencies.
6. The low-code software development system according to claim 1, characterized in that: The deployment management module loads the shared Jar package according to the preset path in the resource directory based on the parent delegation mechanism and the independent class loader, including: Create a shared loader directory, download the shared Jar package to the shared loader directory, and put the storage path of the shared Jar package into the path URL array; Create a class loader instance ShareClassLoader, use AppClassLoader as the parent loader of ShareClassLoader, and load and initialize the interface implementation class of the shared Jar package according to the storage path recorded in the path URL array based on the parent delegation mechanism.
7. The low-code software development system according to claim 6, characterized in that: The deployment management module loads the project Jar package and the extension Jar package according to the preset path in the resource directory based on the parent delegation mechanism and the independent class loader, including: Create a project loader directory and create a subfolder, and download the project Jar package and the extension Jar package to the project loader directory; Create a custom class loader instance MicroUdcClassLoader, load the interface implementation class in the project Jar package and the extension Jar package according to the storage path based on the parent delegation mechanism, and use the class loader instance ShareClassLoader as the parent loader of the custom class loader instance MicroUdcClassLoader.
8. The low-code software development system according to claim 1, characterized in that: The system further comprises: The requirement mapping module is used to load a preset large language model to convert the Java project requirements described by the user based on natural language into the creation requirements in a standard format.
9. The low-code software development system according to claim 1, characterized in that: The system also includes: a model management optimization module, which is used to perform regular evaluation tests and update iterations on the large language model.
10. The low-code software development system according to claim 1, characterized in that: The system further comprises: The asynchronous task and distributed task management module is used to convert long-running Java project development tasks into asynchronous tasks and execute them asynchronously in the background, or divide the Java project development tasks into multiple subtasks and distribute them to multiple working nodes for execution.
Citation Information
Patent Citations
Automatic code generation method based on java language
CN110825369A
Code generation method and device
CN113791763A
Project code generation method and device for low-code platform, equipment and medium
CN116974579A
Code generation and compiling deployment method, platform and equipment based on AI large model
CN117008923A
Method, system and equipment for generating back-end Java project code with low code
CN117667060A
Cited By
Task execution method and system based on dynamic class loading
CN120085941A
A task execution method and system based on dynamic class loading
CN120085941B