Back-end low-code development method based on annotation registration custom component and related system
By adopting a low-code backend development method based on annotation-based registration of custom components, lightweight and dynamic orchestration of component management is achieved, solving the problems of low efficiency and insufficient flexibility in traditional technologies, and improving development efficiency and runtime flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN TPRI POWER PLANT INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies struggle to balance development efficiency and runtime flexibility in component management. Traditional XML configuration files result in high maintenance costs, hard-coded methods have poor scalability, and annotation-driven mechanisms lack flexible adjustment capabilities, making it difficult to adapt to dynamic requirements in complex business scenarios.
We adopt a low-code backend development approach based on annotation-based registration of custom components. By parsing custom annotation data, we obtain the business logic, calculation logic, and basic data between components, and then connect them to the database for graphical processing and orchestration, thereby enabling lightweight component definition and dynamic composition.
It improves development efficiency, reduces configuration intrusion, enhances runtime flexibility, supports rapid iteration and flexible combination, simplifies the development process, and improves the overall performance of the system.
Smart Images

Figure CN121979520A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of backend low-code development, specifically involving a backend low-code development method and related system based on annotation-based registration of custom components. Background Technology
[0002] Traditional Java applications typically rely on XML configuration files or hard-coding for component registration. While XML configuration files can achieve some separation between components and business logic, as the system scales, XML files become massive and complex, leading to increasing maintenance costs. Hard-coding, on the other hand, embeds component dependencies directly into the source code, resulting in poor scalability and portability. Any modification can trigger extensive code adjustments and regression testing, placing a significant burden on system iteration. These methods not only reduce development efficiency but also fail to meet the demands of modern applications for rapid response and flexible adaptation.
[0003] To overcome the aforementioned shortcomings, annotation-driven dependency injection has emerged in recent years. This approach uses annotations in the code to automatically inject component dependencies, reducing cumbersome XML configuration and thus improving development convenience. However, while this method primarily addresses the simplification of dependency injection, it still falls short in terms of runtime orchestration of business components. Specifically, annotation-driven mechanisms typically solidify component dependencies at compile time, lacking the ability to flexibly adjust and combine them during runtime, making it difficult to adapt to dynamic requirements in complex business scenarios.
[0004] With the widespread adoption of enterprise applications and microservice architectures, the need for dynamic integration of third-party libraries and middleware is becoming increasingly frequent. In this context, relying on traditional XML configuration or annotation-driven solutions not only requires intrusive modifications to the core code but may also introduce additional environment configuration and version compatibility issues. Existing solutions often fall short when it's necessary to combine differentiated functional modules across different tenants or switch component implementations during runtime based on business strategies.
[0005] In summary, existing technologies for component management generally suffer from a trade-off between development efficiency and runtime flexibility: static configuration methods are simple to control but lack scalability, while dynamic expansion schemes are complex to implement and have high maintenance costs. Therefore, there is an urgent need for a lightweight, low-intrusion dynamic orchestration mechanism for business components to meet the technical requirements of rapid iteration and flexible combination. Summary of the Invention
[0006] The purpose of this invention is to overcome the problem that existing component registration methods cannot balance development efficiency and runtime flexibility, and to provide a low-code backend development method and related system based on annotation-based registration of custom components.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a low-code backend development method based on annotation-based registration of custom components, comprising the following steps: Obtain custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data; Based on the custom component data, obtain the business logic data between custom components; Based on the custom component data, obtain the computational logic data and basic data between custom components; Load business logic data, computational logic data, and basic data, and connect them to the database; The business logic data, computational logic data, and basic data accessed from the database are graphically processed, and the graphically processed business logic data, computational logic data, and basic data are arranged to complete low-code development.
[0008] A further improvement of this invention is that the custom component data includes BusinessBean data and DataBean data. The BusinessBean data is used to determine the business logic data between custom components, and the DataBean data is used to determine the computational logic data and basic data between custom components.
[0009] A further improvement of this invention is that the BusinessBean data is used for class / interface / enumeration / annotation types. The BusinessBean data includes identifiers, names of business components, grouping of business components, component descriptions, icons displayed by the component in the designer interface, lifecycle of the component, sorting of the component, and version number of the component.
[0010] A further improvement of this invention is that the DataBean data is used on class / interface / enumeration / annotation types, and the DataBean data includes identifiers, names of business components, grouping of business components, component descriptions, and component version numbers.
[0011] A further improvement of this invention is that, when obtaining business logic data between custom components based on custom component data, and when obtaining computational logic data and basic data between custom components based on custom component data, the custom component data is registered in the beanFactory using the factory pattern.
[0012] A further improvement of this invention is that, when obtaining business logic data between custom components based on custom component data, and when obtaining computational logic data and basic data between custom components based on custom component data, the data is read through a reflection mechanism.
[0013] Secondly, this invention provides a backend low-code development system based on annotation-registered custom components, including: The component data acquisition module is used to acquire custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data. The business logic data acquisition module is used to acquire business logic data between custom components based on the custom component data. The basic data acquisition module is used to obtain the calculation logic data and basic data between custom components based on the custom component data; The communication module is used to load business logic data, computational logic data, and basic data, and to connect the business logic data, computational logic data, and basic data to the database; The development module is used to graphically process the business logic data, computational logic data, and basic data accessed from the database, and to arrange the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
[0014] Thirdly, this invention provides a low-code backend development system based on annotation-based registration of custom components, including: The backend server is used to obtain custom annotation data provided by the platform, parse the custom annotation data to obtain custom component data, obtain business logic data between custom components based on the custom component data, and obtain calculation logic data and basic data between custom components based on the custom component data. The database server is used to load business logic data, computational logic data, and basic data, and to connect business logic data, computational logic data, and basic data to the database; The low-code designer is used to graphically process business logic data, computational logic data, and basic data accessed from the database, and to orchestrate the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
[0015] Fourthly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a backend low-code development method based on annotation-registered custom components.
[0016] Fifthly, the present invention provides a storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of a backend low-code development method based on annotation-based registration of custom components.
[0017] Compared with the prior art, the present invention has the following beneficial effects: This invention significantly improves upon existing component registration methods by introducing a mechanism for registering custom components using annotations, addressing the challenge of balancing development efficiency and runtime flexibility. This invention utilizes platform-provided custom annotation data to parse and generate custom component data, achieving a lightweight component definition method from the source and avoiding the complexity and maintenance burden of traditional hard-coding or XML configuration. Through annotation-driven methods, developers only need to annotate necessary information at the business logic level to complete component registration, reducing repetitive operations and configuration intrusion, thereby improving development efficiency. Based on component data parsing, this invention further extracts business logic data, computational logic data, and basic data, and through database access and unified management, dynamically loads and combines these logic and data resources at runtime. This approach ensures flexible orchestration capabilities for components in different scenarios, enabling the system to quickly adjust logical relationships according to business needs without large-scale modifications to the underlying code. This invention graphically processes various types of data accessed from the database and achieves dynamic combination of logic through visual orchestration, improving the intuitiveness and operability of the development process and enabling developers to efficiently construct and adjust complex logic in a low-code environment. In conclusion, this invention uses annotation parsing as the entry point, unified database management as support, and graphical arrangement as the exit point. It simplifies the development phase and ensures flexibility during the runtime phase, thereby effectively overcoming the contradiction between low efficiency and insufficient flexibility in the traditional model and improving the overall performance of the low-code platform in the construction and operation of complex business components. Attached Figure Description
[0018] Figure 1 This is a flowchart of the present invention; Figure 2 This is a system diagram of Example 1; Figure 3 This is a system diagram of Example 2; Figure 4 This is a diagram of the low-code designer interface in Example 3; Figure 5 This is a system diagram for Example 4. Detailed Implementation
[0019] To further understand the content of this invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.
[0020] See Figure 1 The low-code backend development method based on annotation-based registration of custom components includes the following steps: S1: Obtain custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data.
[0021] S2, based on the custom component data, obtains the business logic data between custom components.
[0022] S3 retrieves the computational logic data and basic data between custom components based on the custom component data.
[0023] S4 loads business logic data, computational logic data, and basic data, and connects these data to the database.
[0024] S5 graphically processes the business logic data, computational logic data, and basic data accessed from the database, and then arranges the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
[0025] Example 1: See Figure 2 A low-code backend development system based on annotation-based registration of custom components, including: The component data acquisition module is used to acquire custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data.
[0026] The business logic data acquisition module is used to acquire business logic data between custom components based on the custom component data.
[0027] The basic data acquisition module is used to obtain the calculation logic data and basic data between custom components based on the custom component data.
[0028] The communication module is used to load business logic data, computational logic data, and basic data, and to connect these data to the database.
[0029] The development module is used to graphically process the business logic data, computational logic data, and basic data accessed from the database, and to arrange the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
[0030] This embodiment, through modular design, tightly integrates annotation registration with low-code development, effectively improving the efficiency of component registration and usage, and enhancing runtime flexibility. The component data acquisition module parses custom annotation data provided by the platform, transforming the previously cumbersome component definitions, which relied on XML or hard coding, into a concise annotation-driven approach. This makes the component registration process more intuitive and automated, reducing maintenance costs. The business logic data acquisition module, after parsing component data, automatically extracts the business logic relationships between components, achieving structured abstraction at the logic level and avoiding omissions and inconsistencies that easily occur in manual configuration. The basic data acquisition module further aggregates the component's computational logic and underlying basic data, enabling the system to quickly call and combine data and logic at runtime, enhancing the uniformity and reusability of data and logic. The communication module, by connecting various logic and data to the database, achieves centralized storage and dynamic calling, allowing developers to flexibly adjust the interaction relationships between components during runtime without modifying the underlying code, ensuring the system's agile response to changes in business requirements. The development module graphically processes the data from the access database and uses visual orchestration to combine and optimize logic. This simplifies the developer's operation and provides an intuitive development experience, enabling the efficient construction of complex business logic in a low-code environment. Overall, the system effectively resolves the contradiction between low efficiency and insufficient flexibility in traditional component registration methods through the organic combination of annotation-driven development, centralized database management, and visual orchestration. This improves productivity during the development phase and ensures dynamic adaptation capabilities during runtime, significantly enhancing the application value of low-code platforms in backend development scenarios.
[0031] Example 2: See Figure 3 A low-code backend development system for registering custom components using annotations, including: The backend server is used to obtain custom annotation data provided by the platform, parse the custom annotation data to obtain custom component data, obtain business logic data between custom components based on the custom component data, and obtain calculation logic data and basic data between custom components based on the custom component data.
[0032] A database server is used to load business logic data, computational logic data, and basic data, and to connect these data to the database.
[0033] The low-code designer is used to graphically process business logic data, computational logic data, and basic data accessed from the database, and to orchestrate the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
[0034] This embodiment constructs a highly efficient and flexible backend low-code development environment through the collaborative operation of a backend server, a database server, and a low-code designer. In the backend server, the system can automatically parse custom annotation data provided by the platform and generate corresponding custom component data. Through this annotation-driven mechanism, developers can quickly register components without tedious hard coding or relying on complex configuration files, lowering the development threshold and improving development efficiency. Simultaneously, the backend server further extracts business logic data, computational logic data, and basic data between components, providing complete support for subsequent data processing and logic orchestration. The database server, based on this, implements centralized loading and storage of various logics and data, enabling component-related information to be dynamically called and updated during runtime, ensuring flexible combination of logic and data consistency. The low-code designer, through graphical processing of the logic and data in the database, presents complex business logic and computational logic in an intuitive visual form and supports developers in free orchestration within a graphical interface. This approach not only enhances the intuitiveness and interactivity of the development process but also makes the construction and adjustment of complex systems more efficient and flexible. Overall, the system effectively solves the contradiction between inefficiency and lack of flexibility in traditional component registration methods through annotation-driven automated parsing, unified management of the database server, and graphical orchestration of the low-code designer. It simplifies the development process and dynamically adapts the runtime process, significantly improving the practicality and scalability of the low-code platform in backend development scenarios.
[0035] Example 3: This embodiment includes a backend server, a database server, and a low-code designer.
[0036] The backend server is used to scan and parse the custom annotation data provided by the platform, register custom components to the beanFactory using the factory pattern, schedule component execution according to the dependency relationship defined by the annotation, and handle data flow between components.
[0037] Database servers are used to persist various platform-based basic data and configuration information that need to be saved during the development process.
[0038] Low-code designers use a visual approach to display basic and custom components, and allow for component orchestration through drag-and-drop functionality to enable feature development.
[0039] Custom annotation data includes BusinessBean data and DataBean data. BusinessBean data is used to configure custom business components to handle custom business logic. DataBean data is used to configure custom data components for quickly loading basic data containing computational logic.
[0040] The `BusinessBean` data primarily contains the following declarations for handling custom business logic. This annotation can be persisted at runtime and read via reflection. This annotation can be used on classes / interfaces / enumerations / annotation types, as well as other annotations. `Id` is the unique identifier of the business component, `name` is the name of the business component, `group` is the grouping of business components for easier management, `desc` is the component description, `icon` is the icon displayed in the designer interface, `lifecycle` is the component's lifecycle, `order` is the component's sorting order, and `version` is the component's version number; by default, only higher version components are recognized.
[0041] @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE}) public @interface BusinessBean { public String[] id() default ""; public String[] name(); public String[] group() default "common"; public String[] desc() default ""; public String[] icon() default ""; public LifeCycle[] lifecycle() default LifeCycle.process; public int[] order() default 100000; public int version() default 1; } DataBean data primarily contains the following declarations, mainly used for quickly loading basic data containing computational logic. This annotation can be retained at runtime and read via reflection. This annotation can be used on classes / interfaces / enumerations / annotation types, as well as other annotations. `Id` is the unique identifier of the business component, `name` is the name of the business component, `group` is the grouping of business components for easier management, `desc` is the component description, and `version` is the component version number; by default, only higher version components are recognized.
[0042] @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE}) public @interface DataBean { public String id(); public String name() default ""; public String group() default ""; public String desc() default ""; public int version() default 0; } The platform configuration information includes information related to platform startup, including but not limited to configuration file directories, bean scan configuration, and database connection information.
[0043] The component orchestration file contains orchestrated component interface files and orchestrated component graphical information for developers to process graphically.
[0044] Database servers include mainstream database services such as MySQL and OpenGauss. The backend server can receive and send data with the database server by calling different drivers and Dialect.
[0045] like Figure 4 As shown, Low-Code Designer 3 is divided into a left-side interface management interface, a main interface component orchestration interface, a right-side component interface, and a lower-level component configuration interface. The left-side interface management interface allows for grouping interfaces by folder, displaying the Chinese name and English code of each interface for easy viewing and unified management. The main interface component orchestration interface allows for the combination of existing custom components to implement business logic functions. The right-side component interface displays existing custom components grouped according to their definition. The component configuration interface allows configuration of interface name, interface code, component calling method, component version, component metadata configuration, component data source configuration, component data output binding name, component transaction isolation level, and whether to commit transactions, among other settings.
[0046] Example 4: Please see Figure 5As shown, the present invention also provides an electronic device 100 for a backend low-code development method based on annotation registration of custom components; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0047] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the annotation-based registration custom component backend low-code development method described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0048] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.
[0049] The memory 101 in the electronic device 100 stores multiple instructions to implement a backend low-code development method based on annotation-based registration of custom components, and the processor 102 can execute the multiple instructions to achieve the following: Obtain custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data; Based on the custom component data, obtain the business logic data between custom components; Based on the custom component data, obtain the computational logic data and basic data between custom components; Load business logic data, computational logic data, and basic data, and connect them to the database; The business logic data, computational logic data, and basic data accessed from the database are graphically processed, and the graphically processed business logic data, computational logic data, and basic data are arranged to complete low-code development.
[0050] Example 5: If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0051] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0053] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0054] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A low-code backend development method based on annotation-based registration of custom components, characterized in that, Includes the following steps: Obtain custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data; Based on the custom component data, obtain the business logic data between custom components; Based on the custom component data, obtain the computational logic data and basic data between custom components; Load business logic data, computational logic data, and basic data, and connect them to the database; The business logic data, computational logic data, and basic data accessed from the database are graphically processed, and the graphically processed business logic data, computational logic data, and basic data are arranged to complete low-code development.
2. The backend low-code development method based on annotation-based registration of custom components according to claim 1, characterized in that, Custom component data includes BusinessBean data and DataBean data. BusinessBean data is used to determine the business logic data between custom components, while DataBean data is used to determine the computational logic data and basic data between custom components.
3. The backend low-code development method based on annotation-based registration of custom components according to claim 2, characterized in that, BusinessBean data is used for class / interface / enumeration / annotation types. BusinessBean data includes identifier, business component name, business component grouping, component description, component icon displayed in the designer interface, component lifecycle, component sorting, and component version number.
4. The backend low-code development method based on annotation-based registration of custom components according to claim 2, characterized in that, DataBean data is used for class / interface / enumeration / annotation types. DataBean data includes identifier, business component name, business component grouping, component description and component version number.
5. The backend low-code development method based on annotation-based registration of custom components according to claim 1, characterized in that, When obtaining business logic data between custom components based on custom component data, and when obtaining computational logic data and basic data between custom components based on custom component data, the factory pattern is used to register the custom component data into the beanFactory.
6. The backend low-code development method based on annotation-based registration of custom components according to claim 1, characterized in that, When retrieving business logic data between custom components based on custom component data, and when retrieving computational logic data and basic data between custom components based on custom component data, reflection is used to read the data.
7. A backend low-code development system based on annotation-based registration of custom components, characterized in that, include: The component data acquisition module is used to acquire custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data. The business logic data acquisition module is used to acquire business logic data between custom components based on the custom component data. The basic data acquisition module is used to obtain the calculation logic data and basic data between custom components based on the custom component data; The communication module is used to load business logic data, computational logic data, and basic data, and to connect the business logic data, computational logic data, and basic data to the database; The development module is used to graphically process the business logic data, computational logic data, and basic data accessed from the database, and to arrange the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
8. A low-code backend development system based on annotation-based registration of custom components, characterized in that, include: The backend server is used to obtain custom annotation data provided by the platform, parse the custom annotation data, and obtain custom component data; Based on the custom component data, obtain the business logic data between custom components; Based on the custom component data, obtain the computational logic data and basic data between custom components; The database server is used to load business logic data, computational logic data, and basic data, and to connect business logic data, computational logic data, and basic data to the database; The low-code designer is used to graphically process business logic data, computational logic data, and basic data accessed from the database, and to orchestrate the graphically processed business logic data, computational logic data, and basic data to complete low-code development.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the backend low-code development method based on annotation registration of custom components as described in any one of claims 1 to 6.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the backend low-code development method based on annotation registration of custom components as described in any one of claims 1 to 6.