[go: up one dir, main page]

CN119668576B - Low-code software development system - Google Patents

Low-code software development system Download PDF

Info

Publication number
CN119668576B
CN119668576B CN202510187249.6A CN202510187249A CN119668576B CN 119668576 B CN119668576 B CN 119668576B CN 202510187249 A CN202510187249 A CN 202510187249A CN 119668576 B CN119668576 B CN 119668576B
Authority
CN
China
Prior art keywords
project
code
jar package
java
jar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202510187249.6A
Other languages
Chinese (zh)
Other versions
CN119668576A (en
Inventor
陈春丽
明星宇
孙岩
白茂林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING MT-HIRISUN INFORMATION TECHNOLOGY DEVELOPMENT CO LTD
Beijing University of Posts and Telecommunications
Original Assignee
BEIJING MT-HIRISUN INFORMATION TECHNOLOGY DEVELOPMENT CO LTD
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING MT-HIRISUN INFORMATION TECHNOLOGY DEVELOPMENT CO LTD, Beijing University of Posts and Telecommunications filed Critical BEIJING MT-HIRISUN INFORMATION TECHNOLOGY DEVELOPMENT CO LTD
Priority to CN202510187249.6A priority Critical patent/CN119668576B/en
Publication of CN119668576A publication Critical patent/CN119668576A/en
Application granted granted Critical
Publication of CN119668576B publication Critical patent/CN119668576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a low-code software development system which is responsible for acquiring the creation requirement of a user on Java projects through a project management module, wherein the creation requirement comprises a source code mode and a Jar package mode. The code generation module generates codes and external dependency information according to requirements by using a large language model in a source code mode. And the Jar package management module manages and calls the shared Jar package, the project Jar package and the extended Jar package according to the requirements in a Jar package mode. The deployment management module completes the deployment of projects based on a parent delegation mechanism through an independent class loader, and the method calling module dynamically calls the loaded Jar package based on a Java reflection mechanism. The system remarkably improves development efficiency, reduces development cost and ensures expandability and stability of the system through an automatic code generation and flexible deployment mechanism, and is suitable for quickly constructing and deploying Java projects.

Description

一种低代码软件开发系统A low-code software development system

技术领域Technical Field

本发明涉及计算机技术领域,尤其涉及一种低代码软件开发系统。The present invention relates to the field of computer technology, and in particular to a low-code software development system.

背景技术Background Art

随着软件开发需求的日益增长,传统的软件开发模式已逐渐暴露出许多问题。传统开发过程通常依赖开发者手动编写大量的代码,这不仅耗时耗力,而且容易引入错误,降低开发效率。尤其在Java等主流编程语言的项目中,开发者常常需要进行繁琐的接口定义、方法编写、依赖管理等操作,这些重复性的工作占用了大量的开发资源,且难以保证代码的质量和一致性。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.

为了解决这些问题,低代码开发平台应运而生。低代码开发平台通过简化编码过程、提供可视化设计界面、自动生成代码等手段,帮助开发者提高开发效率,降低了技术门槛。然而,现有的低代码开发系统大多侧重于前端界面的快速构建,针对后端业务逻辑、接口管理和项目部署等方面的支持仍然有限。现有系统往往缺乏灵活的代码生成机制、有效的外部依赖管理以及高效的项目部署方案,导致开发者仍需要手动进行大量的代码修正与优化。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.

此外,一些低代码平台还存在任务调度、负载均衡、容错处理等方面的不足,尤其是在大规模并发任务处理时,性能和稳定性无法得到充分保障。因此,现有低代码平台在提升开发效率的同时,仍面临着无法完全满足复杂项目需求的挑战。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

鉴于此,本发明实施例提供了一种低代码软件开发系统,以消除或改善现有技术中存在的一个或更多缺陷,解决现有技术无法快速构建后端业务并进行项目部署的问题。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.

本发明的一个方面提供了一种低代码软件开发系统,所述系统包括:One aspect of the present invention provides a low-code software development system, the system comprising:

项目管理模块,用于获取用户关于Java项目的创建需求,所述创建需求包括创建形式和项目需求描述;所述创建形式包括源码模式和Jar包模式;所述源码模式下,所述项目需求描述包括项目功能描述、接口定义、接口调用的方法定义、所述方法的响应参数类型和所需的外部依赖;在Jar包模式下,所述项目需求描述以注解形式标注所述Java项目需要的接口名称及描述、接口调用的方法名称及描述、参数名称、参数类型及所述外部依赖;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;

Jar包管理模块,用于在Jar包模式下,按照示例项目获取由多个Java项目共享的共享Jar包、针对当前Java项目使用所述项目需求描述注解的项目Jar包和标记外部依赖的扩展Jar包,以配置为当前Java项目;在源码模式下,将当前Java项目对应的所述生成内容划分为由多个Java项目共享的所述共享Jar包、所述项目Jar包和所述扩展Jar包进行管理;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;

部署管理模块,用于通过具有独立命名空间的类加载器加载所述Java项目中的类,在所述源码模式和所述Jar包模式中,在资源目录下创建META-INF/services目录,创建以接口全路径为名的文件,所述文件的内容为接口实现类的全限定名,并部署所述生成内容,完成所述Java项目的部署;按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载所述共享Jar包、所述项目Jar包和所述扩展Jar包中的接口实现类,完成所述JAVA项目的部署;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;

方法调用模块,用于基于Java的反射机制动态加载所述Java项目中的Jar包进行调用。The method calling module is used to dynamically load the Jar package in the Java project for calling based on the Java reflection mechanism.

在一些实施例中,所述系统还包括:Java项目完整性校验模块,用于根据所述项目需求描述对部署的所述Java项目的所述项目功能描述、所述接口定义、所述方法定义、所述响应参数类型和所述外部依赖进行完整性审查,并生成审查结果,在所述完整性审查未通过时,生成提示信息。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.

在一些实施例中,所述系统还包括:代码生成验证模块,用于对所述代码生成模块产生的所述代码进行语法正确性、逻辑正确性和性能测试,建立代码生成日志记录所述代码生成过程并记录测试结果;以及将生成的代码纳入版本控制系统,记录每次生成的代码版本和对应的项目需求。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.

在一些实施例中,所述系统还包括:代码安全性检测模块,用于提供沙箱环境隔离测试所述代码的安全性,并建立代码安全性测试日志,用于保存安全性测试结果。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.

在一些实施例中,所述代码生成模块结合Ftl模板生成所述代码以及用于定义所述外部依赖的pom.xml文件。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.

在一些实施例中,所述部署管理模块按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载所述共享Jar包,包括: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:

创建共享加载器目录,下载所述共享Jar包至所述共享加载器目录下,将所述共享Jar包的存储路径放入路径URL数组中;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;

创建类加载器实例ShareClassLoader,将AppClassLoader作为ShareClassLoader的父加载器,基于双亲委派机制根据所述路径URL数组记录的所述存储路径对所述共享Jar包的接口实现类进行加载和初始化。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.

在一些实施例中,所述部署管理模块按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载所述项目Jar包和所述扩展Jar包,包括: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:

创建项目加载器目录并建立子文件夹,下载所述项目Jar包和所述扩展Jar包至所述项目加载器目录;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;

创建自定义类加载器实例MicroUdcClassLoader,基于双亲委派机制根据按照存储路径加载所述项目Jar包和所述扩展Jar包中的接口实现类,将所述类加载器实例ShareClassLoader作为所述自定义类加载器实例MicroUdcClassLoader的父加载器。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.

在一些实施例中,所述系统还包括:In some embodiments, the system further comprises:

需求映射模块,用于装载预设大语言模型以将用户基于自然语言描述的Java项目需求转换为标准格式的所述创建需求。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.

在一些实施例中,所述系统还包括:模型管理优化模块,用于对所述大语言模型进行定期评估测试和更新迭代。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.

在一些实施例中,所述系统还包括:异步任务和分布式任务管理模块,用于将长时间运行的Java项目开发任务转化为异步任务在后台异步执行,或将所述Java项目开发任务划分为多个子任务分发到多个工作节点上执行。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.

本发明的有益效果至少是:The beneficial effects of the present invention are at least:

本发明所述低代码软件开发系统中,项目管理模块负责获取用户关于Java项目的创建需求,包括源码模式和Jar包模式。代码生成模块在源码模式下利用大语言模型按照需求生成代码和外部依赖信息。Jar包管理模块在Jar包模式下按照需求管理调用共享Jar包、项目Jar包和扩展Jar包。部署管理模块通过独立的类加载器基于双亲委派机制完成项目的部署,方法调用模块基于Java反射机制动态调用已加载的Jar包。该系统通过自动化代码生成和灵活的部署机制,显著提高了开发效率,降低了开发成本,同时保证了系统的可扩展性和稳定性,适用于快速构建和部署Java项目。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.

本发明的附加优点、目的,以及特征将在下面的描述中将部分地加以阐述,且将对于本领域普通技术人员在研究下文后部分地变得明显,或者可以根据本发明的实践而获知。本发明的目的和其它优点可以通过在说明书以及附图中具体指出的结构实现到并获得。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.

本领域技术人员将会理解的是,能够用本发明实现的目的和优点不限于以上具体所述,并且根据以下详细说明将更清楚地理解本发明能够实现的上述和其他目的。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

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,并不构成对本发明的限定。在附图中: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:

图1为本发明一实施例所述低代码软件开发系统的结构示意图。FIG1 is a schematic diagram of the structure of a low-code software development system according to an embodiment of the present invention.

图2为本发明一实施例所述低代码软件开发系统的应用逻辑示意图。Figure 2 is an application logic diagram of the low-code software development system described in one embodiment of the present invention.

图3为本发明一实施例所述低代码软件开发系统在源码模式下引用大语言模型思维链生成代码的流程图。Figure 3 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.

图4为本发明一实施例所述低代码软件开发系统生成项目代码流程图。Figure 4 is a flow chart of project code generation by a low-code software development system according to an embodiment of the present invention.

图5为本发明一实施例所述低代码软件开发系统加载共享Jar包的流程图。Figure 5 is a flowchart of the low-code software development system loading a shared Jar package according to an embodiment of the present invention.

图6为本发明一实施例所述低代码软件开发系统加载项目Jar包和扩展Jar包的流程图。Figure 6 is a flowchart of loading project Jar packages and extension Jar packages in the low-code software development system described in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明的目的、技术方案和优点更加清楚明白,下面结合实施方式和附图,对本发明做进一步详细说明。在此,本发明的示意性实施方式及其说明用于解释本发明,但并不作为对本发明的限定。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.

在此,还需要说明的是,为了避免因不必要的细节而模糊了本发明,在附图中仅仅示出了与根据本发明的方案密切相关的结构和/或处理步骤,而省略了与本发明关系不大的其他细节。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.

应该强调,术语“包括/包含”在本文使用时指特征、要素、步骤或组件的存在,但并不排除一个或更多个其它特征、要素、步骤或组件的存在或附加。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.

在此,还需要说明的是,如果没有特殊说明,术语“连接”在本文不仅可以指直接连接,也可以表示存在中间物的间接连接。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.

低代码平台是一种软件开发工具,允许开发者通过图形界面和模型驱动的逻辑定制化地开发应用程序,而不是完全依赖于传统的编码方式。低代码平台通常提供了一系列预制的模块和组件,用户可以用过拖拉拽的方式快速构建包含用户界面、业务逻辑、工作流和数据流转的应用程序,从而全方位降低软件开发编码成本。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.

工作流引擎是低代码平台中的核心组件,负责管理和执行应用程序的工作流。它支持通过可视化的方式创建并配置工作流程,包括任务分配、数据处理等操作。同时还能跟踪和监控工作流的执行状态,提供运行日志和错误处理机制。工作流中一般设计有不同类别的工作流节点,如开始节点、计算节点、分支节点等等,这些节点的组合编排能够实现复杂的业务流程,使得业务流程的可视化成为可能。然而,随着业务逻辑的复杂程度增加,也带来一些局限,如编排复杂,当前众多低代码平台工作流在面对复杂业务逻辑时只能依靠复杂的工作流编排,更复杂的编排也意味着更长时间的测试,不断降低效率,反而违背了使用低代码平台的初衷。又如扩展性差,固定的工作流节点限制了低代码平台的扩展性。当复杂的业务流程需要一类新的节点时,只能通过重新开发新节点实现。目前的低代码平台需要更灵活的扩展能力来满足不断增长的业务需求。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.

本申请目的在于提供一种低代码平台,在工作流中的用户自定义代码节点(UserDesign Code),面对复杂的业务需求,用户可以通过UDC进行Java项目的开发。需要说明的是,Java项目是一个基于Java语言构建的软件工程,通常包含多个模块和组件,用于实现特定的功能或服务。在本发明中,也就是用户自定义代码节点需要完成的功能。例如某一节点需要完成的功能为发送政务微信,则创建对应Java项目。在Java项目中,可以提供一个或多个接口,接口是一种抽象类型,用于定义一组方法的规范,但不提供具体实现。将接口与实现分离,便于维护和扩展。方法是接口或类中定义的具体操作逻辑。它接收输入参数(请求参数),执行一系列操作,并返回输出结果(响应参数)。方法是实现接口规范的具体实现。接口定义了一组方法的规范,这些方法通常是没有具体实现的抽象方法。类可以通过实现接口来继承这些方法的声明,并提供具体实现。综上所述,一个项目用于实现某一个大的功能,该项目下可以包含多个接口,每个接口用于定义小的功能,每个接口中包含多个方法用于具体实现功能。即项目包含多个接口,接口包含多个方法的依赖关系。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.

依赖是指项目运行或构建过程中所依赖的外部库或模块。这些依赖通常是其他开发者或组织编写的代码,用于实现特定的功能,例如数据库连接、日志记录、网络通信等。通过引入这些依赖,开发者可以避免重复造轮子,专注于核心业务逻辑的开发。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.

在Java项目中,依赖是jar形式的文件引入,jar文件是一种特殊的文件格式,用于打包并存储代码和资源,我们将这种文件称之为Jar包。开发人员开发了一个工具或功能后可以将其打包成一个jar文件,然后分享给其他人。别人可以直接使用这个jar文件,而不需要重新编写代码。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.

在本发明中,项目中的方法具体实现可能会使用到外部依赖,将某个项目单独使用到的定义为扩展Jar包,如果多个项目均使用到该Jar包,将其定义为共享Jar包。本发明中项目打包后会将项目本身打包,即项目Jar包,虽然项目本身使用到了外部依赖,但是该Jar包并不包括外部依赖的实际代码资源,也就是扩展Jar包或共享Jar包,因此需要将这三者均部署至工作流系统运行的Java虚拟机中。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.

具体的,本发明提供了一种低代码软件开发系统,如图1和2所示,所述系统包括:项目管理模块、代码生成模块、Jar包管理模块、部署管理模块和方法调用模块。Specifically, the present invention provides a low-code software development system, as shown in Figures 1 and 2, 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.

项目管理模块用于获取用户关于Java项目的创建需求,创建需求包括创建形式和项目需求描述;创建形式包括源码模式和Jar包模式;源码模式下,项目需求描述包括项目功能描述、接口定义、接口调用的方法定义、方法的响应参数类型和所需的外部依赖;在Jar包模式下,项目需求描述以注解形式标注Java项目需要的接口名称及描述、接口调用的方法名称及描述、参数名称、参数类型及外部依赖;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.

大语言模型是指在大规模文本语料上训练、包含百亿级别甚至更多参数的语言模型。这些模型采用与小模型类似的Transformer架构和预训练目标,如语言建模,但主要区别在于模型的大小、训练数据和计算资源的增加。大语言模型的表现往往遵循扩展法则,即模型规模的增加会带来性能的提升。大语言模型在自然语言处理、文本生成和智能对话等领域有广泛应用。它们通过海量数据训练学习复杂的模式和特征,展现出强大的泛化能力和预测性能。大语言模型基于思维链(Chain-of-Thought,CoT)实施,思维链是一种Prompt技术,用于提升大模型在复杂推理任务上的表现,如数学问题、常识推理和符号推理等。CoT通过要求大模型在输出最终答案前显式输出中间的推理步骤这一方法将复杂问题分解为一个个子问题并逐步解决,这些中间步骤不仅帮助模型逐步逼近正确答案,还提高了模型决策的可解释性。大模型与思维链的结合具有以下优势:提高开发效率,大模型能够在足够的提示基础上直接生成代码框架,能够大幅度提升项目代码的开发效率。提升代码鲁棒性,大模型能够帮助开发人员弥补未考虑到的地方,提升项目代码的鲁棒性。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.

代码生成模块是该低代码软件开发系统中的核心组件之一,主要负责在源码模式下根据用户提供的项目需求描述自动生成项目的代码结构和内容。其工作主要包括如下步骤: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:

步骤S101:输入项目需求描述。Step S101: Input project requirement description.

在源码模式下,用户需要提供详细的项目需求描述,包括但不限于:项目功能描述,项目的主要功能和业务逻辑;接口定义,项目需要对外提供的接口(API);接口调用的方法定义,接口内部的具体方法实现。方法的响应参数类型,方法返回的数据结构。外部依赖,项目运行所需的第三方库或框架。这些需求描述是代码生成模块的输入,模块会根据这些信息生成相应的代码。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.

步骤S102:生成目标项目文件大纲。Step S102: Generate a target project file outline.

代码生成模块首先会利用一个预设的大语言模型(如GPT、deepseek等)来生成项目的文件大纲。文件大纲通常包括项目的基本文件和目录结构,例如:src/main/java,项目的Java源代码目录;src/main/resources,项目的资源文件目录(如配置文件、模板文件等);pom.xml(Maven项目),项目的依赖管理和构建配置文件。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.

步骤S103:根据大纲生成代码和外部依赖。Step S103: Generate code and external dependencies according to the outline.

在生成文件大纲之后,代码生成模块会按照大纲的结构生成具体的代码内容,包括:接口代码,根据接口定义生成接口类。方法代码,根据方法定义生成方法的实现。外部依赖信息,将用户指定的外部依赖(如依赖的库或框架)添加到项目的配置文件(如pom.xml)中。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).

步骤S104:基于用户核查的代码完善。Step S104: Code completion based on user verification.

生成的代码可能存在一些问题或错误,例如:错误代码,生成的代码可能不符合语法规范或业务逻辑。错误注释,生成的注释可能与代码的实际功能不符。因此,代码生成模块会提供一个用户核查的机制,允许用户修改错误代码,纠正生成的代码中的错误;完善注释,补充或修正代码中的注释,使其更准确地描述代码的功能和逻辑。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.

步骤S105:组合生成内容。Step S105: Combine and generate content.

在用户完成核查和修改后,代码生成模块会将生成的代码和外部依赖信息组合成完整的项目内容。最终的项目内容包括:完整的源代码,包括接口、方法实现等。配置文件,如pom.xml,包含项目的所有外部依赖。注释,准确描述代码功能的注释。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.

在一些实施例中,代码生成模块结合Ftl模板生成代码以及用于定义外部依赖的pom.xml文件。In some embodiments, the code generation module combines the Ftl template to generate code and a pom.xml file for defining external dependencies.

Jar包管理模块用于在Jar包模式下,按照示例项目获取由多个Java项目共享的共享Jar包、针对当前Java项目使用所述项目需求描述注解的项目Jar包和标记外部依赖的扩展Jar包,以配置为当前Java项目;在源码模式下,将当前Java项目对应的所述生成内容划分为由多个Java项目共享的所述共享Jar包、所述项目Jar包和所述扩展Jar包进行管理。Jar包模式下,用户无需在系统中定义项目等信息,只需要模仿示例项目编码。使用系统提供的注解并配置资源文件即可。Jar包会在部署时被解析以获取项目、接口及方法信息并保存至数据库中。对于基于源码模式生成的生成内容,同样按照共享Jar包、项目Jar包和扩展Jar包进行划分和管理,并进行部署。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.

在该低代码软件开发系统中,Jar包模式是一种高效且可复用的开发方式,允许用户通过注解形式标注项目需求描述,并将这些信息封装到Jar包中,从而实现代码的模块化和复用。Jar包管理模块的主要功能是在Jar包模式下,根据项目需求描述注解,生成和管理多个Java项目共享的共享Jar包、当前Java项目特有的项目Jar包,以及标记外部依赖的扩展Jar包。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.

共享Jar包是一种可复用的模块,其在多个Java项目之间共享,主要用于提供通用功能或库。项目Jar包是针对当前Java项目需求描述注解的Jar包,包含项目特定的功能和实现。扩展Jar包是一种可选的Jar包,用于添加对项目可能需要的外部库或功能支持的依赖。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.

部署管理模块用于通过具有独立命名空间的类加载器加载Java项目中的类,在源码模式和Jar包模式中,在资源目录下创建META-INF/services目录,创建以接口全路径为名的文件,文件的内容为接口实现类的全限定名,并部署生成内容,完成Java项目的部署;按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载共享Jar包、项目Jar包和扩展Jar包中的接口实现类,完成JAVA项目的部署。区别在于Jar包模式用户需要自己用注解标识接口、方法等信息,而源码模式已经提前保存在数据库中。两种模式的部署都是通过双亲委派机制和独立类加载器加载的。具体的,部署管理模块是低代码软件开发系统中用于将Java项目进行最终部署的核心模块,它通过类加载器在源码模式和Jar包模式下实现了Java项目中类的动态加载和部署。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.

在源码模式和Jar包模式下,具体操作包括:使用具有独立命名空间的类加载器来加载项目的类。执行资源目录操作,在项目的资源目录下创建一个名为META-INF/services的目录。创建接口全路径文件,在这个META-INF/services目录下,创建一个以接口全路径为名称的文件。例如,如果接口的全路径是com.example.MyInterface,则创建的文件名为com.example.MyInterface。填写接口实现类全限定名,文件的内容是接口实现类的全限定名。例如,如果接口com.example.MyInterface的实现类是com.example.impl.MyInterfaceImpl,则文件内容为com.example.impl.MyInterfaceImpl。部署生成内容,完成上述操作后,将合成后的项目内容进行部署,从而完成Java项目的部署过程。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.

使用具有独立命名空间的类加载器,并且基于双亲委派机制进行类加载。按照预设路径,在资源目录下加载三个类型的Jar包,分别是:共享Jar包、项目Jar包和扩展Jar包。共享Jar包是多个Java项目共享的通用功能或库的Jar包。例如,提供日志记录、工具函数等通用功能的Jar包。项目Jar包是当前Java项目特有的、使用项目需求描述注解生成的Jar包。例如,包含特定业务逻辑、接口实现等的Jar包。扩展Jar包是用于添加外部依赖的Jar包,标记了项目所需的外部依赖。例如,与第三方库或框架相关的扩展功能的Jar包。加载接口实现类,类加载器加载上述共享Jar包、项目Jar包和扩展Jar包中的接口实现类,从而完成Java项目的部署过程。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.

方法调用模块,用于基于Java的反射机制动态加载Java项目中的Jar包进行调用。Java的反射机制允许程序在运行时检查和操作类、对象、方法、字段等的特征和行为。通过反射,可以在运行时获取类的信息,并调用其方法或构造函数。这种动态性使得在不知道具体类名的情况下,也能与类进行交互。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.

在一些实施例中,所述系统还包括:Java项目完整性校验模块,用于根据项目需求描述对部署的Java项目的项目功能描述、接口定义、方法定义、响应参数类型和外部依赖进行完整性审查,并生成审查结果,在完整性审查未通过时,生成提示信息。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.

具体的,首先,解析项目需求描述,提取其中的关键信息,如项目功能描述、接口定义、方法定义、响应参数类型和外部依赖等;然后,通过反射机制或代码解析工具,对已部署的Java项目进行扫描,获取项目的实际功能、接口、方法、参数类型和依赖信息;接着,将提取的需求信息与实际项目信息进行逐一对比,检查是否存在缺失或不匹配的情况;如果发现完整性问题,则生成审查结果,并提供详细的提示信息,指出具体的问题所在(如缺少某个接口、方法参数类型不匹配、缺少外部依赖等),以便开发人员进行修复。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.

在一些实施例中,所述系统还包括:代码生成验证模块,用于对所述代码生成模块产生的所述代码进行语法正确性、逻辑正确性和性能测试,建立代码生成日志记录所述代码生成过程并记录测试结果;以及将生成的代码纳入版本控制系统,记录每次生成的代码版本和对应的项目需求。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.

具体的,代码生成验证模块的实现可以通过以下步骤进行:1)语法正确性验证,通过调用Java编译器API,将生成的代码文件作为输入,检查是否存在语法错误。例如,可以使用javax.tools.JavaCompiler工具类来编译代码,捕获编译过程中的异常和错误信息,记录并报告语法问题。2)逻辑正确性验证,设计一系列单元测试用例,使用单元测试框架如JUnit来验证代码的逻辑。根据项目需求描述定义测试场景,包括正常输入和边界条件,执行测试并记录测试结果,确保代码的功能符合预期。3)性能测试,针对代码中的关键方法和组件,使用性能分析工具如JProfiler或统计代码运行时间和资源消耗,设置性能指标(如响应时间、吞吐量),运行性能测试,并记录测试结果,验证代码是否满足性能要求。4)日志记录,在代码生成过程中,利用日志框架如Log4j或SLF4J,记录代码生成的中间状态、方法调用、错误信息以及测试结果。将日志信息写入文件或数据库,便于后续的审计和问题追踪。5)版本控制集成,在代码生成后,通过版本控制工具的API(如Git的JGit库),将生成的代码添加到版本控制系统中。每次生成的代码作为一个新的提交,记录版本信息和对应的项目需求描述,便于版本管理和回溯。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.

在一些实施例中,所述系统还包括:代码安全性检测模块,用于提供沙箱环境隔离测试所述代码的安全性,并建立代码安全性测试日志,用于保存安全性测试结果。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.

代码安全性检测模块的实现可以通过以下步骤进行:1)沙箱环境隔离测试:创建一个受控的沙箱环境,将待测试的代码部署到该环境中。沙箱环境可以限制代码的执行权限,防止恶意代码对系统造成危害。例如,可以使用Java的SecurityManager类来限制代码的文件访问、网络访问等权限。2)静态代码分析,使用静态代码分析工具(如SonarQube、FindBugs、Checkmarx和SpotBugs)对代码进行扫描,检测潜在的安全漏洞和质量问题。这些工具可以检测出常见的安全问题,如SQL注入、跨站脚本(XSS)、命令注入等。3)动态代码分析:在沙箱环境中运行代码,监控其运行时行为,检测是否存在异常行为或安全漏洞。例如,可以监控代码的文件操作、网络通信、内存使用等行为,以发现潜在的安全问题。4)建立测试日志:在测试过程中,记录所有测试结果和相关日志信息。日志应包括测试时间、测试结果、发现的安全问题、问题的严重程度等信息。可以使用日志框架(如Log4j或SLF4J)来记录日志,并将日志保存到文件或数据库中,以便后续分析和追踪。5)生成测试报告:根据测试结果生成详细的测试报告,报告应包括测试概述、发现的安全问题、问题的详细描述、建议的修复措施等。测试报告可以以HTML、PDF或其他格式输出,方便开发人员和安全团队查看和分析。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.

在一些实施例中,所述部署管理模块按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载所述共享Jar包,包括步骤S201~S202: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:

步骤S201:创建共享加载器目录,下载所述共享Jar包至共享加载器目录下,将共享Jar包的存储路径放入路径URL数组中。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.

步骤S202:创建类加载器实例ShareClassLoader,将AppClassLoader作为ShareClassLoader的父加载器,基于双亲委派机制根据路径URL数组记录的存储路径对共享Jar包的接口实现类进行加载和初始化。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.

在一些实施例中,所述部署管理模块按照预设路径在资源目录下基于双亲委派机制和独立类加载器加载项目Jar包和扩展Jar包,包括步骤S301~S302: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:

步骤S301:创建项目加载器目录并建立子文件夹,下载项目Jar包和扩展Jar包至项目加载器目录。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.

步骤S302:创建自定义类加载器实例MicroUdcClassLoader,基于双亲委派机制根据按照存储路径加载项目Jar包和扩展Jar包中的接口实现类,将类加载器实例ShareClassLoader作为自定义类加载器实例MicroUdcClassLoader的父加载器。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.

在一些实施例中,所述系统还包括:需求映射模块用于装载预设大语言模型以将用户基于自然语言描述的Java项目需求转换为标准格式的创建需求。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.

具体的,选择一个经过训练且适用于代码生成功能的大语言模型,如GPT-3、GPT-4或其他类似模型。这些模型具有理解自然语言和生成标准格式文本的能力。接收用户基于自然语言描述的Java项目需求,这些需求可能包括项目功能描述、接口定义、方法定义、响应参数类型和外部依赖等信息。利用大语言模型的强大语义解析能力,准确理解用户输入中的每个部分。例如,识别“我想开发一个电商平台,用户可以在这里购买商品并查看订单”这个需求,模型需要将其解析为项目功能描述、接口定义等。基于解析结果,将自然语言描述转换为符合系统要求的标准格式。这可能包括创建需求的标准化模板,如生成JSON格式的需求文档,其中包含项目功能描述、接口定义、方法定义等字段。如果用户输入的需求模糊或不明确,模型应能够给出提示或询问用户进一步澄清,以确保生成的创建需求准确无误。对生成的标准格式创建需求进行验证,确保其格式正确且逻辑清晰。例如,检查接口定义是否符合Java的语法规范,方法定义是否完整且参数类型一致等。如果发现有误或不准确的地方,允许用户查看和修正转换结果,以确保最终的创建需求完全符合用户意图。建立详细的日志记录,记录从用户输入到标准格式创建需求的整个映射过程,包括用户输入、模型解析过程、转换结果以及任何用户修正操作。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.

在一些实施例中,所述系统还包括:界面生成和可视化设计模块,供用户通过拖拽配置的方式构建项目的展示界面,并自动生成对应的前端代码。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.

在一些实施例中,所述系统还包括:异步任务和分布式任务管理模块,用于将长时间运行的Java项目开发任务转化为异步任务在后台异步执行,或将Java项目开发任务划分为多个子任务分发到多个工作节点上执行。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.

下面结合一具体实施例对本发明进行说明:The present invention is described below in conjunction with a specific embodiment:

本实施例提供一种低代码平台中工作流中用户自定义代码节点(User DesignCode)的实现方法。下面对发明内容进行介绍。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.

首先介绍UDC的使用流程,如图2所示。面对复杂的业务需求,用户可以通过UDC提供的两种模式开发一个针对该业务需求的项目。项目功能开发测试完成后将其打包,其中项目之间共享依赖作为共享Jar包,项目本身作为项目Jar包、使用依赖作为扩展Jar包,均上传至文件系统。通过Jar包完成项目部署后,在低代码平台工作流中使用UDC节点并配置对应项目及接口方法信息即可完成业务需求。First, the usage process of UDC is introduced, as shown in Figure 2. 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.

下面对于UDC进行功能架构上的说明,图1展示了UDC功能模块划分。The following is an explanation of the functional architecture of UDC. Figure 1 shows the functional module division of UDC.

UDC主要由5大模块构成,分别是项目管理模块、代码生成模块、Jar包管理模块、部署管理模块以及方法调用模块。其中项目管理模块包含对项目、接口、方法及参数的管理。Jar包管理模块管理包含对共享Jar包、项目Jar包及项目扩展Jar包的管理。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.

本实施例提出的项目概念也就是一个Java项目。一个项目可以对应多个接口,一个接口可以提供多个方法。每个方法都可以在工作流UDC节点中被配置及使用。同时,一个方法可以配置请求参数和响应参数。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.

同时,为提高UDC的扩展性,本实施例提出两种项目模式:源码模式和Jar包模式。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.

A.源码模式:A. Source code mode:

如果项目类型为源码模式,用户需要在系统中定义对应项目、接口、方法信息,系统会根据这些信息生成一个完整的Java项目,将该项目下载到本地后即可在本地开发环境中对项目功能进行完善。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.

从上述内容可以看出UDC所定义的项目代码都要求有一定的基本的代码框架,大语言模型十分适合在此框架基础上通过思维链的方式生成项目代码。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.

因此,本发明基于大语言模型(如GPT4),可以根据用户需求,自动生成项目代码。在用户输入对于项目的详细描述后,可以选择加入对于接口和方法的详细描述,也可以由大模型直接自动生成。生成基本项目代码后,用户可以通过修改注释的方式再次通过大模型对代码进行修改和完善,提升项目的开发效率。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.

本发明设计思维链以生成项目代码,如图3所示,包括以下步骤:The present invention designs a thinking chain to generate project code, as shown in FIG3 , including the following steps:

1.大模型根据项目详细描述生成项目文件大纲。1. The big model generates a project document outline based on the detailed project description.

2.大模型根据项目详细描述与步骤1中生成的请求参数、响应参数与方法名称生成方法的详细功能描述与请求参数和响应参数的详细信息。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.

3.大模型根据步骤2生成的方法详细信息生成方法的具体代码及使用到的依赖信息。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.

4.用户修改代码中的注释,大模型根据注释的修改对代码进行修改。4. The user modifies the comments in the code, and the large model modifies the code based on the modified comments.

项目类型为源码模式时,UDC会根据用户输入的项目、接口、方法以及参数信息构建一个完整的Java项目,具体流程如图4所示。When the project type is 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 shown in Figure 4.

首先需要获取项目相关信息并检查信息完整性,如出现项目下并无接口、接口下没有方法等情况生成项目没有意义。然后在用户目录下根据项目名称创建项目代码目录,并依次创建Java项目中的代码目录和资源目录。最终根据参数、接口等信息,利用ftl模板创建每个具体代码文件以及pom.xml文件。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.

同时需要在资源目录下创建META-INF/services目录,并在其中创建以接口全路径为名的文件,文件内容为接口实现类的全限定名。项目中必须包括该配置文件才能在后续的部署环节中正确加载。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.

B.Jar包模式:B.Jar package mode:

如果项目类型为Jar包模式,就无需在系统中定义项目等信息,只需要模仿示例项目编码。使用系统提供的注解并配置资源文件即可。Jar包会在部署时被解析以获取项目、接口及方法信息并保存至数据库中。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.

Jar包模式中,需要在资源目录下的global-config.json文件下配置项目相关信息,上传后系统自动读取项目信息并存储。本发明提出以下注解以获取接口、方法等信息: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)用于标识参数名称及参数类型。1. @UdcField(name, type) is used to identify the parameter name and parameter type.

2. @UdcInterface(value, name)用于标识接口名称及描述。2. @UdcInterface(value, name) is used to identify the interface name and description.

3. @UdcMethod(value, name)用于标识方法名称及描述。3. @UdcMethod(value, name) is used to identify the method name and description.

同时,本发明为两种模式都提供了@Dinjection注解用于依赖注入,接口实现类如果声明了系统Jar包中的类,该注解能够标识该成员变量并实现其在部署阶段的加载。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.

根据UDC的部署机制,项目的部署采取先加载共享Jar包后加载项目Jar包和扩展包的步骤。具体如下所示: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:

首先要初始化部署环境。对于源码模式和Jar包模式,部署的具体流程相似。但Jar包模式会从上述提到的@UdcField、@UdcInterface、@UdcMethod注解中获取参数、接口和方法的信息,从资源目录的global-config.json文件中获得项目信息。而源码模式直接利用项目管理模块获得所有项目的接口、方法等信息。这些信息都会存储到合适的数据结构中供后续使用。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.

初始化部署环境后,按照图5所示流程加载共享Jar包。首先需要在用户目录下创建/udc/shared-loader文件夹,将所有共享Jar包下载到该路径下。并将所有共享Jar包存储路径列表放入URL类型数组。创建一个新的URLClassLoader实例ShareClassLoader,将AppClassLoader作为ShareClassLoader的父加载器,并用共享Jar包路径URL数组初始化。至此共享Jar包加载完成。After initializing the deployment environment, load the shared Jar package according to the process shown in Figure 5. 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.

共享Jar包加载完成后部署项目Jar包及扩展Jar包,具体流程如图6所示:After the shared Jar package is loaded, the project Jar package and the extended Jar package are deployed. The specific process is shown in Figure 6:

在用户目录下,首先创建一个名为/udc/udc-loader的文件夹,然后根据项目名称和版本信息进一步创建子文件夹并下载项目Jar包和扩展Jar包。为每个项目创建MicroUdcClassLoader自定义类加载器实例。这个加载器将项目Jar包和扩展Jar包的路径作为其加载路径,并将之前创建的ShareClassLoader作为其父类加载器。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.

随后,遍历项目下所有接口的全限定名列表,对每个接口进行加载。使用类加载器的loadClass方法进行加载。一旦接口类被成功加载,就使用java.util.ServiceLoader提供的load方法来加载接口的实现类。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.

接口实现类加载成功后获取接口实现类的成员变量,如果成员变量被@DInjection注解标识,则从Spring应用上下文中获取相应的依赖,并将Bean实例注入到接口实现类的字段中。最后,获取接口实现类中的方法请求参数、返回参数信息并保存。至此,项目Jar包和扩展Jar包的加载过程宣告完成。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.

C.部署机制:C. Deployment Mechanism:

在Java中,类的版本控制和隔离主要是通过类加载器(ClassLoader)来实现的。每个类加载器都有自己的命名空间,这意味着由不同类加载器加载的类,即使完全相同,也会被视为不同的类。这种机制是基于Java的双亲委派模型(Parent Delegation Model),以下是Java实现类版本控制和隔离的两个关键点: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、双亲委派机制1. Parent delegation mechanism

在双亲委派机制中,当一个类加载器收到类加载请求时,它不会立即自己尝试加载这个类,而是先委托给其父类加载器去尝试加载。每一层的类加载器都是如此,因此所有类加载的请求都会传给顶层的启动类加载器(Bootstrap ClassLoader)。只有父加载器反馈自己无法完成加载时,子类加载器才会尝试自己加载。这样可以确保Java核心库的类不会被重新加载,同时也提供了一种机制,使得子类加载器可以覆盖父类加载器中的类。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.

2、独立的类加载器2. Independent class loader

通过为不同的版本或不同的插件提供独立的类加载器,可以确保这些·类在JVM中是隔离的。每个类加载器都有自己的类路径,因此它们加载的类不会与其他类加载器加载的类冲突。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.

因此,本发明为实现类的版本控制以及不同项目之间的隔离,设计了以下解决方案:Therefore, the present invention designs the following solutions to achieve version control of classes and isolation between different projects:

首先为保证共享包中的类不被类加载器重复加载,采用双亲委派机制,由AppClassLoader作为共享包类加载器ShareClassLoader的父加载器,由ShareClassLoader加载所有项目的共享Jar包,而项目的类加载器MicroUdcClassLoader将ShareClassLoader作为父加载器。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.

同时保证为保证不同项目和不同版本的类加载不会发生冲突,每个项目都会有自己独立的加载器以进行隔离。每个MicroUdcClassLoader负责加载自己的项目Jar包和项目扩展Jar包。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.

D.UDC方法调用实施方式:D.UDC method call implementation method:

在项目成功部署后用户可以对项目的所有方法进行测试,在工作流中也可以选择不同的项目中的不同接口和方法进行调用。而这种动态加载Jar包进行调用的方式,主要基于Java的反射机制。反射相关API提供一系列的类和接口操作Class对象,主要如下: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:表示类的对象,提供了方法来获取类的字段、方法和构造函数等。1. java.lang.Class: Represents the object of a class and provides methods to obtain the fields, methods, and constructors of the class.

2、java.lang.reflct.Field:表示类的属性,提供了访问和修改字段的能力。2. java.lang.reflct.Field: Represents the attributes of a class and provides the ability to access and modify fields.

3、java.lang.reflct.Method:表示类的方法,提供了调用方法的能力。3. java.lang.reflct.Method: represents the method of a class and provides the ability to call the method.

4、java.lang.reflect.Constructor:表示类的构造函数,提供了创建对象的能力。4. java.lang.reflect.Constructor: represents the constructor of a class and provides the ability to create objects.

基于上述反射机制,能够完成UDC中方法的调用。根据工作流节点提供的项目、接口以及方法信息获取部署时得到的java.lang.reflect.Method类。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.

再根据调用时的参数信息,利用java.lang.java.lang.reflect.Constructor以及java.lang.reflect.Field构造请求参数。针对不同的请求参数如JSON类型的需要调用不同的库函数进行构造。构造完成后将该类加入到方法参数列表中。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.

最后调用java.lang.reflect.Method提供的invoke方法就能获得方法的执行结果。Finally, call the invoke method provided by java.lang.reflect.Method to get the execution result of the method.

与上述方法相应地,本发明还提供了一种装置/系统,该装置/系统包括计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机指令,所述处理器用于执行所述存储器中存储的计算机指令,当所述计算机指令被处理器执行时该装置/系统实现如前所述方法的步骤。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.

本发明实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时以实现前述边缘计算服务器部署方法的步骤。该计算机可读存储介质可以是有形存储介质,诸如随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、软盘、硬盘、可移动存储盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质。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.

综上所述,本发明所述低代码软件开发系统中,项目管理模块负责获取用户关于Java项目的创建需求,包括源码模式和Jar包模式。代码生成模块在源码模式下利用大语言模型按照需求生成代码和外部依赖信息。Jar包管理模块在Jar包模式下按照需求管理调用共享Jar包、项目Jar包和扩展Jar包。部署管理模块通过独立的类加载器基于双亲委派机制完成项目的部署,方法调用模块基于Java反射机制动态调用已加载的Jar包。该系统通过自动化代码生成和灵活的部署机制,显著提高了开发效率,降低了开发成本,同时保证了系统的可扩展性和稳定性,适用于快速构建和部署Java项目。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.

本领域普通技术人员应该可以明白,结合本文中所公开的实施方式描述的各示例性的组成部分、系统和方法,能够以硬件、软件或者二者的结合来实现。具体究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本发明的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。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.

需要明确的是,本发明并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本发明的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本发明的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。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.

本发明中,针对一个实施方式描述和/或例示的特征,可以在一个或更多个其它实施方式中以相同方式或以类似方式使用,和/或与其他实施方式的特征相结合或代替其他实施方式的特征。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.

以上所述仅为本发明的优选实施例,并不用于限制本发明,对于本领域的技术人员来说,本发明实施例可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。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 (8)

1. A low code software development system, the system comprising:
The project management module is used for acquiring the creation requirement of a user on Java projects, wherein the creation requirement comprises a creation form and a project requirement description; the creation form comprises a source code mode and a Jar package mode, wherein in the source code mode, the project requirement description comprises a project function description, an interface definition, an interface calling method definition, a response parameter type of the method and required external dependence;
The code generation module is used for generating a target project file outline according to an example project file outline and generating codes and external dependency information for the needed interfaces and the method according to the structure of the target project file outline by using a preset large language model with the project requirement description as input in the source code mode;
The Jar package management module is used for acquiring a shared Jar package shared by a plurality of Java items, an item Jar package for describing notes by using the item requirements for the current Java item and an extension Jar package for marking external dependencies according to example items in a Jar package mode so as to be configured as the current Java item;
The deployment management module is used for loading classes in the Java project through a class loader with an independent naming space, creating a META-INF/service catalog under a resource catalog in the source code mode and the Jar package mode, creating a file with an interface full path as a name, wherein the content of the file is the full-limit name of an interface implementation class, deploying the generated content, and completing the deployment of the Java project;
The method calling module is used for dynamically loading Jar packages in the Java items to call based on a Java reflection mechanism;
The system further comprises a Java project integrity checking module, a Java project analysis module and a Java project analysis module, wherein the Java project integrity checking module is used for carrying out integrity checking on the project function description, the interface definition, the method definition, the response parameter type and the external dependence of the deployed Java project according to the project requirement description, generating a checking result, and generating prompt information when the integrity checking is not passed;
The system further comprises a code generation verification module, a version control system and a code generation system, wherein the code generation verification module is used for carrying out grammar correctness, logic correctness and performance tests on the codes generated by the code generation module, establishing a code generation log to record the code generation process and record test results, and taking the generated codes into the version control system to record the version of each generated code and the corresponding project requirements.
2. The low-code software development system of claim 1 further comprising a code security detection module for providing sandboxed environment isolation to test the security of the code and for building a code security test log for storing security test results.
3. The low code software development system of claim 1 wherein said code generation module generates said code in conjunction with an Ftl template and a pon.xml file for defining said external dependencies.
4. The low-code software development system of claim 1, wherein the deployment management module loads the shared Jar package under a resource catalog according to a preset path based on a parent delegation mechanism and an independent class loader, comprising:
creating a shared loader directory, downloading the shared Jar packet to the shared loader directory, and placing a storage path of the shared Jar packet into a path URL array;
creating a class loader instance ShareClassLoader, taking AppClassLoader as a parent loader of ShareClassLoader, and loading and initializing the interface implementation class of the shared Jar packet according to the storage path recorded by the path URL array based on a parent delegation mechanism.
5. The low-code software development system of claim 4, wherein the deployment management module loads the project Jar package and the extension Jar package based on a parent delegation mechanism and an independent class loader under a resource catalog according to a preset path, comprising:
creating a project loader catalog and creating a subfolder, and downloading the project Jar package and the expansion Jar package to the project loader catalog;
Creating a custom class loader instance MicroUdcClassLoader, and taking the class loader instance ShareClassLoader as a parent loader of the custom class loader instance MicroUdcClassLoader based on a parent delegation mechanism according to an interface implementation class in the project Jar package and the extension Jar package loaded according to a storage path.
6. The low code software development system of claim 1, wherein the system further comprises:
And the demand mapping module is used for loading a preset large language model to convert Java project demands based on natural language description by a user into the creation demands in a standard format.
7. The low-code software development system of claim 1 further comprising a model management optimization module for performing periodic evaluation tests and update iterations on the large language model.
8. The low code software development system of claim 1, wherein the system further comprises:
And the asynchronous task and distributed task management module is used for converting a Java project development task running for a long time into an asynchronous task to be executed asynchronously in the background, or dividing the Java project development task into a plurality of subtasks to be distributed to a plurality of working nodes for execution.
CN202510187249.6A 2025-02-20 2025-02-20 Low-code software development system Active CN119668576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510187249.6A CN119668576B (en) 2025-02-20 2025-02-20 Low-code software development system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510187249.6A CN119668576B (en) 2025-02-20 2025-02-20 Low-code software development system

Publications (2)

Publication Number Publication Date
CN119668576A CN119668576A (en) 2025-03-21
CN119668576B true CN119668576B (en) 2025-07-04

Family

ID=94992312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510187249.6A Active CN119668576B (en) 2025-02-20 2025-02-20 Low-code software development system

Country Status (1)

Country Link
CN (1) CN119668576B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120085941B (en) * 2025-04-30 2025-08-19 北京宇信科技集团股份有限公司 Task execution method and system based on dynamic class loading

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791763A (en) * 2021-01-22 2021-12-14 北京沃东天骏信息技术有限公司 A code generation method and device
CN116974579A (en) * 2023-08-24 2023-10-31 杭州时趣信息技术有限公司 Project code generation method, device, equipment and medium of low code platform

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825369A (en) * 2019-11-07 2020-02-21 四川长虹电器股份有限公司 Method for automatically generating codes based on java language
US20230393832A1 (en) * 2022-06-06 2023-12-07 Incentive Marketing Group, Inc. Automated translation of computer languages to extract and deploy computer systems and software
CN117008923B (en) * 2023-09-28 2023-12-29 北京智源人工智能研究院 Code generation, compilation and deployment methods, platforms and equipment based on AI large models
CN117667060A (en) * 2023-12-19 2024-03-08 杭州云为科技有限公司 Method, system and equipment for generating back-end Java item code by low code
CN118796360B (en) * 2024-09-13 2025-01-21 山东浪潮科学研究院有限公司 A low-code development platform and method supporting automated independent deployment
CN119045805A (en) * 2024-10-23 2024-11-29 浙江大华技术股份有限公司 Method, device and storage medium for constructing low-code application

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791763A (en) * 2021-01-22 2021-12-14 北京沃东天骏信息技术有限公司 A code generation method and device
CN116974579A (en) * 2023-08-24 2023-10-31 杭州时趣信息技术有限公司 Project code generation method, device, equipment and medium of low code platform

Also Published As

Publication number Publication date
CN119668576A (en) 2025-03-21

Similar Documents

Publication Publication Date Title
Gargantini et al. A metamodel-based language and a simulation engine for abstract state machines.
Voelter et al. mbeddr: Instantiating a language workbench in the embedded software domain
US9772830B2 (en) System and method for modeling cloud rules for migration to the cloud
US20070011669A1 (en) Software migration
García-Domínguez et al. EUnit: a unit testing framework for model management tasks
US10514898B2 (en) Method and system to develop, deploy, test, and manage platform-independent software
CN119668576B (en) Low-code software development system
Monteiro et al. Bounded model checking of C++ programs based on the Qt cross‐platform framework
Cooper et al. Model-based development of engine control systems: Experiences and lessons learnt
Bettini et al. An executable metamodel refactoring catalog
CN115794254A (en) Cloud Computing-Based Component R&D Management Platform and Method
CN118378719B (en) A method for building a machine learning workflow
Haltermann et al. Information exchange between over-and underapproximating software analyses
Balogh et al. Workflow-driven tool integration using model transformations
Gargantini et al. A metamodel-based simulator for ASMs
Flores A Two-Level Model-Driven Engineering Approach for Reengineering CI/CD Pipelines
MaIm et al. Static flow analysis of the Action Language for Foundational UML
Pomante et al. A model-driven approach for the development of an ide for spacecraft on-board software
Kohlmeyer et al. LAMMPS: A Case Study For Applying Modern Software Engineering to an Established Research Software Package
Morin et al. Model-based, platform-independent logging for heterogeneous targets
Jung Generator-composition for aspect-oriented domain-specific languages
Rodrigues et al. Certifying delta-oriented programs
Arts et al. Model-based testing of data types with side effects
Johnson xUnit Principles and Practices: Definitive Reference for Developers and Engineers
Dingel et al. Project Templating and Onboarding With Cookiecutter: Foundations, Uses, and Guidelines

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant