Application module construction system and method for supporting heterogeneous data source based on customized template

By building an application module building system that supports customized templates for heterogeneous data sources, the compatibility issues of low-code platforms in heterogeneous data source environments have been resolved, enabling efficient and flexible application generation and stable operation.

CN121560302APending Publication Date: 2026-02-24BEIJING NARI DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511718729.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing low-code platforms suffer from poor SQL syntax compatibility, incorrect data type mapping, and inefficient execution plans when dealing with heterogeneous data sources, resulting in poor stability and performance of the generated applications in real production environments.

Method used

We build an application module building system based on customized templates, including a template library module, a data source adaptation module, a metadata management module, and a parameter configuration module. Through the built-in multiple database drivers and syntax conversion rules, we achieve standardized storage and management of metadata, and provide a visual interface for parameter configuration. Combined with the Velocity template engine, we automatically generate front-end and back-end application modules that are compatible with multiple databases.

Benefits of technology

It achieves deep compatibility with heterogeneous data sources, improves the flexibility and adaptation efficiency of application development, and can switch underlying data sources without modifying the code, ensuring seamless migration and stable operation of generated application modules in different database environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560302A_ABST
    Figure CN121560302A_ABST
Patent Text Reader

Abstract

The invention discloses an application module construction system and method supporting heterogeneous data sources based on a customized template, and the system comprises a template library module which carries out the classification management of standardized application templates according to the industry and function attributes, and supports the creation, modification and cloning of the templates. The data source adaptation module is internally provided with various database special drivers and SQL grammar conversion rules, compatible processing of metadata import and application generation is achieved, and the generation module can seamlessly switch bottom layer data sources; the metadata management module is responsible for importing and storing metadata of heterogeneous data sources in a unified and standardized manner; the parameter configuration module is used for configuring interface contents, control types and code generation parameters through a visual interface; the application generation module is used for automatically generating front-end and back-end applications compatible with multiple databases according to templates and parameters based on a Velocity template engine, and supporting online preview and packaging downloading; according to the method, rapid compatibility of the heterogeneous database and one-key generation of the runnable application module are realized through templating and deep data source adaptation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of low-code development technology, and in particular relates to an application module construction system and method based on customized templates to support heterogeneous data sources. Background Technology

[0002] Low-code development platforms, as a key technology for improving software development efficiency, are increasingly becoming core tools for enterprise digital transformation. Through visual design and model-driven approaches, they aim to lower the programming threshold and shorten application delivery cycles, finding widespread application in key sectors such as government, finance, and manufacturing. This aligns with the national strategy of information technology application innovation and promotes the independent control of technological systems.

[0003] Existing low-code platforms commonly employ template-based generation techniques to enable rapid development. A typical implementation involves the platform providing a general template library. Users configure UI elements and business logic parameters, and the platform's internal code generation engine (such as one based on Velocity) transforms these pre-defined templates into standard front-end and back-end code. At the data connectivity level, most platforms use a unified JDBC driver and standard SQL to interface with various databases, attempting to achieve basic data persistence functionality with a "one-size-fits-all" approach.

[0004] However, this generic implementation has significant drawbacks. The templates provided by the platform are often designed based on general database standards, and the generated code lacks specific adaptability when dealing with the unique syntax, data types, and optimizer mechanisms of different databases, especially domestic databases. This leads to common problems in generated applications when facing heterogeneous data source environments, such as poor SQL syntax compatibility, incorrect data type mapping, and low execution plan efficiency, seriously affecting the stability and performance of the final application in a real production environment. Summary of the Invention

[0005] Purpose of the invention: The purpose of this invention is to provide an application module construction system and method based on customized templates that supports heterogeneous data sources, overcoming the shortcomings of insufficient universality and data source adaptability of existing templates, and achieving deep compatibility and efficient application generation based on customized templates for heterogeneous data sources.

[0006] Technical solution: The application module construction system of the present invention includes:

[0007] The template library module is used to store standardized application templates. It categorizes and manages standardized application templates according to industry attributes and functional attributes, and provides template creation, modification, review and cloning functions.

[0008] The data source adaptation module has built-in dedicated drivers and syntax conversion rules for various relational databases to achieve compatibility processing between metadata import and application generation, and supports the generation of application modules to switch underlying data sources without modifying the code.

[0009] The metadata management module provides functions for importing data source metadata and managing metadata models, and standardizes the storage and management of metadata from heterogeneous databases.

[0010] The parameter configuration module provides a visual interface for setting template type, display content, control type, master-slave relationship parameters, as well as code layer parameters including generation path, basic comments, and front-end and back-end package paths;

[0011] The application generation module is used to automatically generate front-end and back-end application modules compatible with multiple databases based on the selected template and configuration parameters using the Velocity template engine, and supports online preview and packaged download.

[0012] This invention effectively overcomes the limitations of existing templates in terms of versatility and insufficient data source adaptation capabilities by constructing a system that integrates template library, data source adaptation, metadata management, parameter configuration, and application generation functions. It achieves deep compatibility and efficient application generation based on customized templates for various heterogeneous data sources. The system can manage templates according to industry and functional attributes, and supports data source switching without modifying the code by leveraging built-in multi-database drivers and syntax conversion rules. Through metadata standardization and visual parameter configuration, combined with a template engine, it automatically generates front-end and back-end application modules compatible with multiple databases, thereby significantly improving the flexibility, adaptation efficiency, and generation quality of application development.

[0013] Preferably, the template library module includes web interface templates, backend code templates, and script templates, and supports template definitions for simple structures, master-slave relationships, and tree structures through template parameter configuration.

[0014] By refining the template library into web interface, backend code, and script templates, and supporting templated definitions of various data relationships such as simple structures, master-slave relationships, and tree structures, the coverage of templates and the ability to depict business scenarios are significantly enhanced. This enables the system to flexibly generate complete front-end and back-end code from simple data tables to complex relational business based on configuration parameters. This improves the efficiency of application module generation while ensuring its deep adaptation and accurate expression of complex business data structures.

[0015] Preferably, the data source adaptation module includes:

[0016] The driver management unit is used to maintain JDBC drivers for various databases;

[0017] The syntax conversion unit is used to automatically identify the type of the connected data source and convert standard SQL statements into the dialect of the target database.

[0018] The metadata processing unit provides a standardized interface for metadata processing and enables the extraction, transformation, and loading of metadata from different databases.

[0019] By integrating driver management, syntax conversion, and metadata processing units, a multi-layered, automated data source compatibility system is built, which can seamlessly connect to various heterogeneous databases. The system can not only automatically identify the data source type and convert standard SQL into a specific dialect to ensure the correctness of the query, but also extract and integrate heterogeneous metadata in a unified manner through standardized interfaces. This achieves complete decoupling of the underlying data source at the application generation and runtime level, ensuring seamless migration and stable operation of application modules in different database environments.

[0020] Preferably, the metadata management module is used to import metadata information from the connected data source and to uniformly standardize and manage the metadata of heterogeneous databases.

[0021] By uniformly extracting, transforming, and standardizing the storage of heterogeneous metadata from different data sources, the problem of inconsistent metadata structures caused by differences in database types has been successfully eliminated. A unified and standardized central metadata model has been built, which provides a stable and consistent data foundation for the customization of upper-layer application templates, parameter configuration, and code generation. This greatly enhances the system's adaptability to diverse data source environments and its integration management efficiency.

[0022] Preferably, the parameter configuration module configures the display content, control type, master-slave relationship parameters, code generation path, basic comments, and front-end and back-end package paths of the application module through a visual interface.

[0023] By providing an intuitive visual interface, users can flexibly define key parameters such as the display content, interactive controls, data structure relationships, and underlying code paths of application modules. This transforms complex technical configurations into simple interface operations, thereby significantly reducing the technical threshold for application building and the workload of manual coding. At the same time, it ensures that the generated application modules can accurately meet the user's personalized needs in terms of interface presentation, business logic, and code structure.

[0024] Preferably, the application generation module supports single-module generation, batch generation of multiple modules, and associated generation including master-slave relationships. The generated application modules support online preview and packaged download functions.

[0025] By supporting multiple modes such as single-module, multi-module batch, and associated generation with master-slave relationships, and integrating online preview and package download functions, the flexibility and output efficiency of application module generation are significantly improved. This allows developers to flexibly choose generation strategies according to actual project needs, quickly build complete applications from simple functions to complex business structures, and ensure that the generated results meet expectations through real-time preview, ultimately achieving rapid delivery and deployment of high-quality application modules.

[0026] The application module construction method of the present invention includes the following steps:

[0027] Configure the data source parameters, select a relational database, and complete the connection settings;

[0028] The system automatically detects and matches data source adaptation components to ensure dialect compatibility with the target database and extracts metadata models according to the specific database dialect.

[0029] Select application templates from the template library that match your business scenario by industry or functional attributes, or customize the templates using the template editor;

[0030] Import the metadata model by connecting to the data source;

[0031] Configure business rules, interface style parameters, and code-level parameters through a visual interface;

[0032] It generates application modules compatible with heterogeneous data sources based on the Velocity template engine, and supports packaging and exporting complete application module packages containing all template content.

[0033] This invention effectively overcomes the shortcomings of traditional template systems, such as poor versatility and insufficient data source adaptability, by constructing an integrated and visualized application module generation process. The system can automatically identify and adapt to various heterogeneous databases, achieving standardized and unified management of metadata. Through a customizable template library and a flexible parameter configuration mechanism, it supports the precise generation of application modules according to different business scenarios. Finally, based on the template engine, it automatically outputs front-end and back-end code that is fully compatible with the target data source, achieving deep compatibility with heterogeneous data sources and rapid generation of high-quality application modules, significantly improving development efficiency and system adaptability.

[0034] Preferably, after configuring the data source parameters, the system automatically detects and matches the data source adaptation components to ensure dialect compatibility with the target database and extracts the metadata model according to the dialect of the specific database.

[0035] By automatically detecting and matching the corresponding data source adaptation components after configuring the data source, deep compatibility with the target database at the syntax level is achieved. It can also accurately extract the metadata model based on its specific dialect, thereby eliminating the connection and metadata parsing barriers caused by database differences at the underlying technology level. This lays a reliable data foundation for the accurate generation of application templates and seamless cross-database migration.

[0036] Preferably, the generated application module supports multiple heterogeneous data sources and can switch the underlying data source at will.

[0037] By generating application modules that are decoupled from specific databases, the system can natively support multiple heterogeneous data sources and allows for flexible and arbitrary switching of underlying data sources as needed without modifying the application code. This greatly improves the environmental adaptability, deployment flexibility, and maintainability of the generated application throughout its lifecycle, effectively solving the problems of system migration difficulties and limited scalability caused by data source binding.

[0038] Preferably, the method further includes performing code preview verification before generating the application module, and triggering the generation process after confirming that the preview is correct, and exporting a complete application module package containing all template content.

[0039] By introducing a code preview and verification process before the final generation of application modules, users can confirm in advance whether the structure and logic of the generated code meet expectations. This allows for the timely discovery and avoidance of potential problems before release. This mechanism significantly improves the accuracy and reliability of the generated results, ensuring that the final exported complete application module package has higher quality and business fit, and effectively reduces the cost of later modification and debugging.

[0040] Beneficial effects: Compared with existing technologies, this invention has the following significant advantages: 1. Through customized templates and built-in multiple database drivers and syntax conversion rules, it achieves deep compatibility with heterogeneous data sources and can quickly and automatically generate front-end and back-end application modules that can be run directly; 2. Through a visual parameter configuration interface and a standardized template library, it significantly reduces the technical threshold, enabling non-technical personnel to quickly build application modules that meet business needs after simple training; 3. The generated application modules do not depend on a specific single database and can seamlessly connect and switch between multiple heterogeneous data sources, ensuring the portability and long-term maintainability of the system. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the application module structure of the present invention;

[0042] Figure 2 This is a schematic diagram of the operation of the application module of the present invention;

[0043] Figure 3 This is a schematic diagram of the template structure of the present invention;

[0044] Figure 4 A timing diagram is generated for the application modules of this invention. Detailed Implementation

[0045] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0046] This invention provides an application module building system based on customized templates that supports heterogeneous data sources. It enables standardized management and reuse of application templates, while supporting compatibility and adaptation with heterogeneous data sources. This allows the generated application modules to switch underlying data sources without modifying the code, greatly improving the efficiency and flexibility of application module building.

[0047] like Figure 1 As shown, the application module construction system based on customized templates to support heterogeneous data sources in this embodiment of the invention includes the following modules:

[0048] The template library module stores standardized application templates, categorizing and managing them according to industry and functional attributes. It provides template creation, modification, approval, and cloning functions. Specifically, it includes web interface templates, backend code templates, and script templates. Template parameters can be configured to support simple, master-slave, and tree-like structures. For example, for customer management scenarios in the financial industry, a standardized template containing a form interface, backend logic for customer information queries, and data manipulation scripts can be stored. This template can support a master-slave structure, where a master customer information table is associated with multiple slave tables (such as a customer transaction table).

[0049] The data source adaptation module incorporates dedicated drivers and syntax conversion rules for various relational databases. This ensures compatibility between metadata import and application generation, and allows generated application modules to switch underlying data sources without code modification. Specifically, it comprises: a driver management unit, which maintains JDBC drivers for various databases, such as dedicated JDBC drivers for Renmin University's Kingbase and Nanjing University's General Database, ensuring the system can establish connections with these databases; a syntax conversion unit, which automatically identifies the data source type and converts standard SQL statements into the target database's dialect syntax. For example, when the system connects to the Renmin University's Kingbase database, the syntax conversion unit converts specific syntax in standard SQL into a dialect supported by Kingbase, ensuring the SQL statement's executability; and a metadata processing unit, which provides a standardized interface for metadata processing and implements metadata extraction, conversion, and loading from different databases. It can extract metadata information such as table structure and field types from databases like Renmin University's Kingbase and Nanjing University's General Database, perform standardized conversion, and then store it.

[0050] The metadata management module provides functions for importing data source metadata and managing metadata models, and standardizes the storage and management of metadata from heterogeneous databases. For example, after importing metadata from Renmin University's Kingbase database and Nanjing University's general database, this module will store the metadata in a unified standard format, so that subsequent application modules can be processed based on the standardized metadata.

[0051] The parameter configuration module provides a visual interface for setting template type, display content, control type, master-detail relationship parameters, as well as code-level parameters including generation path, basic comments, and front-end and back-end package paths. Through this visual interface, users can intuitively select the desired template type (such as a customer management template for the financial industry), configure the display fields on the interface, select control types (such as drop-down boxes and input boxes), set the relationship between master and detail tables, and specify the path where the generated code is stored, add basic comment information, and specify the paths of the front-end and back-end packages.

[0052] The application generation module, based on the Velocity template engine, automatically generates front-end and back-end application modules compatible with multiple databases according to the selected template and configuration parameters. It supports online preview and packaged download. Its generation capabilities support single-module generation, batch generation of multiple modules, and generation of related modules including master-slave relationships. For example, it can generate a single customer information management module, or batch generate multiple related modules such as customer management and transaction management, and can also generate modules containing the relationship between a master customer table and a slave transaction table. The generated application modules support online preview; users can view the interface and functional logic before generation, and after confirming that everything is correct, they can package and download the complete application module package containing all template content.

[0053] In the application module runtime architecture of this system, a layered design is adopted to achieve the ability to run application modules compatible with heterogeneous data sources. For example... Figure 2 As shown, from top to bottom, they are the front-end UI (generation) layer, the back-end service (generation) layer, the data source adaptation layer, and the data source layer.

[0054] Front-end UI (Generation) Layer: Composed of front-end interface components generated by the application generation module, responsible for user interaction and interface display. Its interface elements and interaction logic are generated based on the web interface templates of the template library module and the configuration of the parameter configuration module, providing a good visual operation experience.

[0055] Backend service (generation) layer: This is the backend business logic processing component generated by the application generation module. It is responsible for functions such as business rule calculation and data interaction. Its code logic is generated based on the backend code template. It can interact with the frontend UI layer and operate on the underlying data through the data source adaptation layer.

[0056] Data source adaptation layer: Integrates the core capabilities of the data source adaptation module, and has built-in dedicated drivers and syntax conversion rules for various relational databases (such as the functions of driver management unit, syntax conversion unit, and metadata processing unit) to achieve data source compatibility and adaptation for upper-layer backend services. It automatically identifies and converts the dialect syntax of different databases, ensuring that the generated application modules can interact with different types of underlying databases without modifying the code.

[0057] Data source layer: This is the actual data storage layer, supporting various relational databases such as Kingbase and Nanda General. It serves as the data persistence carrier for application modules and communicates with the upper-level backend service layer through the data source adaptation layer.

[0058] This invention also provides a method for building application modules that support heterogeneous data sources based on customized templates, including:

[0059] 1. Data model design: Based on business requirements, complete data modeling, design the logical structure of the business database, and create corresponding relational tables in the target relational database (such as Kingbase, Nanda General, etc.), clarifying field types, primary key constraints and inter-table relationships;

[0060] 2. Requirements analysis: Identify specific business scenarios (such as form submission, process approval, etc.) and technology stack selection (such as front-end Vue, back-end Spring Boot), and clarify code functional boundaries (such as data validation, access control) and architectural framework;

[0061] 3. Template Maintenance: In the template management module, select basic templates similar to the business scenario and clone or create new module types. Modify the template content (including front-end component layout and back-end logic fragments) and design template parameters based on actual project needs (such as unique function calls). The template structure is as follows: Figure 3 As shown, each template type contains several code templates and the template type parameter used by the current template type;

[0062] 4. Data source connection configuration: Select the corresponding data source according to the business database type (supports domestic databases such as KingbaseES from Renmin University and GBase from Nanjing University), and configure the connection parameters in the system (including database address, port, username and password, and driver type) to ensure a smooth network link. The system will automatically match the data source adaptation components based on the configuration;

[0063] 5. Metadata model import: Select the target table from the existing relational tables (supports batch import of single or multiple tables), extract the table structure information (such as field names, data types, lengths, and default values) through the system metadata processing module, automatically convert it into a unified system metadata model and store it.

[0064] 6. Generate parameter configuration: Select the maintained template and configure the generation parameters (such as code naming rules, package path, database interaction mode) and business configuration (such as display type, form validation rules, and associated data dictionary) through the visual interface.

[0065] 7. Code preview and verification: The system generates a preview based on the template and configuration parameters, and supports online preview to ensure that the content meets business expectations;

[0066] 8. Application Module Export: After confirming the preview is correct, the generation process is triggered. The system automatically generates a complete application module package (including all content defined in the template), which can be exported as a ZIP archive. The application code generation sequence is as follows: Figure 4 As shown.

Claims

1. An application module construction system based on customized templates to support heterogeneous data sources, characterized in that, Includes the following steps: The template library module is used to store standardized application templates. It categorizes and manages standardized application templates according to industry attributes and functional attributes, and provides template creation, modification, review and cloning functions. The data source adaptation module has built-in dedicated drivers and syntax conversion rules for various relational databases to achieve compatibility processing between metadata import and application generation, and supports the generation of application modules to switch underlying data sources without modifying the code. The metadata management module provides functions for importing data source metadata and managing metadata models, and standardizes the storage and management of metadata from heterogeneous databases. The parameter configuration module provides a visual interface for setting template type, display content, control type, master-slave relationship parameters, as well as code layer parameters including generation path, basic comments, and front-end and back-end package paths; The application generation module is used to automatically generate front-end and back-end application modules compatible with multiple databases based on the selected template and configuration parameters using the Velocity template engine, and supports online preview and packaged download.

2. The system according to claim 1, characterized in that, The template library module includes web interface templates, backend code templates, and script templates, and supports template definitions with simple structure, master-slave structure, and tree structure through template parameter configuration.

3. The system according to claim 1, characterized in that, The data source adaptation module includes: The driver management unit is used to maintain JDBC drivers for various databases; The syntax conversion unit is used to automatically identify the type of the connected data source and convert standard SQL statements into the dialect of the target database. The metadata processing unit provides a standardized interface for metadata processing and enables the extraction, transformation, and loading of metadata from different databases.

4. The system according to claim 1, characterized in that, When importing metadata, the metadata management module supports batch selection and import of single or multiple tables from the data source, and automatically converts the extracted table structure information into a unified metadata model for storage within the system.

5. The system according to claim 1, characterized in that, When configuring master-slave relationship parameters, the parameter configuration module supports defining the relationship between tables and data binding rules through a visual interface, and allows configuring independent data validation rules and associated data dictionaries for different fields.

6. The system according to claim 1, characterized in that, When generating an application module, the application generation module can automatically assemble and generate front-end and back-end code with basic functions such as data verification and access control based on the predefined front-end component layout and back-end logic fragments in the template.

7. A method for constructing application modules based on customized templates to support heterogeneous data sources, characterized in that, Includes the following steps: Configure the data source parameters, select a relational database, and complete the connection settings; The system automatically detects and matches data source adaptation components to ensure dialect compatibility with the target database and extracts metadata models according to the specific database dialect. Select application templates from the template library that match your business scenario by industry or functional attributes, or customize the templates using the template editor; Import the metadata model by connecting to the data source; Configure business rules, interface style parameters, and code-level parameters through a visual interface; It generates application modules compatible with heterogeneous data sources based on the Velocity template engine, and supports packaging and exporting complete application module packages containing all template content.

8. The method according to claim 7, characterized in that, After configuring the data source parameters, the system automatically detects and matches the data source adaptation components to ensure dialect compatibility with the target database and extracts the metadata model according to the specific database dialect.

9. The method according to claim 7, characterized in that, The generated application modules support multiple heterogeneous data sources and can switch the underlying data source at will.

10. The method according to claim 7, characterized in that, The method also includes performing code preview verification before generating the application module, and triggering the generation process after confirming that the preview is correct, and exporting a complete application module package containing all template content.