Data Acquisition Methods and Systems Based on Low-Code Development Platforms
Patent Information
- Application Number
- CN202211100416.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-09
AI Technical Summary
[0005](1)功能之间耦合性高,导致程序运行性能差;
[0027](1)本公开提供了一种基于低代码开发平台的数据获取方法及系统,基于本公开所述方案开发人员能够借助所述数据模型与页面、工作流以及画布等平台组件通过托拉拽以及配置项的形式将所述数据模型与页面等可视化组件转换为中间文件形式的数据结构,平台再以程序与freemarker模板等多种技术结合将这个数据结构渲染成程序员能理解的面向对象语言,最终可以通过IDE等工具或者部署到服务器上运行:从而达到从数据库获取数据、将数据保存到数据库的一系列操作。
Smart Images

Figure CN115718593B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of computer system programming technology, and in particular relates to a data acquisition method and system based on a low-code development platform. Background Technology
[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.
[0003] In existing technologies, low-code development platforms (taking Mendix as an example) acquire data by creating a data model and binding it to page components, or by creating a micro-flow, binding the data model, and then associating it with page components to complete data acquisition and submission. However, this does not allow connection to external data sources. If users want to connect to their own database, they need to download the relevant JDBC driver / driver files separately, extract them, and place them in the userlib directory of the Mendix project. Then, users need to maintain a table in their own database and repeatedly create the corresponding data model in the Mendix project, maintaining the corresponding path information by defining database connection constants. Mendix's "data model" does not have the concept of Operation methods; instead, it uses micro-flows to complete a series of logical operations, requiring users to understand relevant programming knowledge.
[0004] Meanwhile, due to the wide variety of databases currently available on the market, such as relational databases like MySQL and Oracle, as well as other systems like non-relational databases and SAP systems, data acquisition and expansion for each database is equally cumbersome, mainly in the following ways:
[0005] (1) High coupling between functions leads to poor program performance;
[0006] (2) The project architecture is highly coupled, which requires high personnel quality and is difficult to maintain, resulting in high time costs;
[0007] (3) The structure is complex but the underlying framework technology is not supported enough, resulting in poor scalability. There are strong connections between data models. One model may be associated with multiple other models at the same time. At this time, the performance of the program will be greatly reduced.
[0008] Due to the current customer needs of low-code development platforms, these platforms have not yet encountered users of non-relational databases or other systems, and the number of databases or systems they connect to is limited. As more needs arise, the platform's drawbacks gradually become apparent, resulting in a large architecture with poor maintainability and scalability. Summary of the Invention
[0009] To address the aforementioned issues, this disclosure provides a data acquisition method and system based on a low-code development platform. The solution, based on the concept of a data model and the utilization of data connectors, enables developers to use the data model and platform components such as pages, workflows, and canvases to convert the data model and visual components into intermediate file-like data structures through drag-and-drop and configuration options. The low-code development platform then uses a combination of programs and FreeMarker templates to render this data structure into an object-oriented language that programmers can understand. Finally, it can be run through IDEs or deployed to a server, thereby achieving a series of operations including retrieving data from a database and saving data to a database.
[0010] According to a first aspect of the embodiments of this disclosure, a data acquisition method based on a low-code development platform is provided, comprising:
[0011] A data connector is built into the low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases;
[0012] When developing a page using the low-code development platform, page components bind to a data model, configure event actions to call methods on the data model, and acquire data through a data connector bound to the data model; wherein, the data model is an abstraction at the data structure level, including data structure, data operations, and data constraints.
[0013] Furthermore, through the data model and the page, workflow, and canvas components in the low-code development platform, the data model and the aforementioned visualization components are converted into an intermediate file-style data structure through drag-and-drop and configuration items. The low-code development platform renders the data structure into an object-oriented language that programmers can understand, and finally deploys it to the server through the IDE tool to run, thereby achieving a series of operations such as retrieving data from the database and saving data to the database.
[0014] Furthermore, the data model is pre-divided into single-table models, view models, master-sub-models, and custom view models according to different database types and functions, thereby decoupling the project architecture and functions during the development process.
[0015] Furthermore, the single-table model corresponds to the actual physical table in the database; the view model corresponds to the view in the database; and the master-sub-model is used to associate several single-table models or view models to achieve multi-table joins.
[0016] Furthermore, the data connector provides corresponding rules for different databases, and the low-code development platform can achieve portable access to different databases according to the corresponding rules without downloading additional third-party plugins.
[0017] Furthermore, the database connector specifically has the following functions:
[0018] Establish a connection to the database;
[0019] Supports user-defined table query SQL and field query SQL with selective filtering of database tables;
[0020] The database principles that the data model built on this database connection should follow are agreed upon.
[0021] According to a second aspect of the present disclosure, a data acquisition system based on a low-code development platform is provided, comprising:
[0022] An initialization unit is used to embed a data connector in a low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases;
[0023] The data acquisition unit is used when page development is performed through the low-code development platform. The page components bind to the data model, configure event actions to call methods on the data model, and acquire data through the data connector bound to the data model. The data model is an abstraction at the data structure level, including data structure, data operations, and data constraints.
[0024] According to a third aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the memory, wherein the processor executes the program to implement the data acquisition method based on a low-code development platform.
[0025] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the data acquisition method based on a low-code development platform.
[0026] Compared with the prior art, the beneficial effects of this disclosure are:
[0027] (1) This disclosure provides a data acquisition method and system based on a low-code development platform. Based on the solution described in this disclosure, developers can use the data model and page, workflow and canvas and other platform components to convert the data model and page and other visual components into a data structure in the form of intermediate files through drag and drop and configuration items. The platform then uses a combination of programs and Freemarker templates and other technologies to render this data structure into an object-oriented language that programmers can understand. Finally, it can be run through IDE and other tools or deployed to a server: thereby achieving a series of operations such as obtaining data from the database and saving data to the database.
[0028] (2) This disclosure proposes a data model concept, which decouples the project architecture and functions during the development process by classifying the data model according to the database type and function.
[0029] (3) Based on the project development of the scheme described in this disclosure, the requirements for the quality level of technical personnel are reduced. For example, it used to require 2-3 years of development experience, but now it only requires 1 year. The time and difficulty of later maintenance are reduced accordingly. In the past, when problems occurred, it was necessary to be familiar with the architecture of the entire project to solve them. Now it is more targeted and only a certain functional point needs to be investigated.
[0030] Advantages of this disclosure in additional aspects will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0031] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.
[0032] Figure 1 This is a schematic diagram illustrating the addition, deletion, modification, and query of the employee leave form as described in the embodiments of this disclosure;
[0033] Figure 2 This is a schematic diagram of the data model partitioning described in the embodiments of this disclosure;
[0034] Figure 3 This is a schematic diagram illustrating the association between the data model and the data connector described in the embodiments of this disclosure;
[0035] Figure 4 This is a schematic diagram of the data connector architecture described in the embodiments of this disclosure;
[0036] Figure 5 This is a schematic diagram illustrating the workflow of the data connector described in the embodiments of this disclosure;
[0037] Figure 6This is a schematic diagram illustrating the relationship between the low-code development platform, data model, and database described in the embodiments of this disclosure. Detailed Implementation
[0038] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0039] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.
[0040] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0041] Where there is no conflict, the embodiments and features described herein can be combined with each other.
[0042] Terminology Explanation:
[0043] Low-code development platform (LCDP): A development platform that allows applications to be quickly generated by writing a small amount of code through a visual editing method.
[0044] Data model: A visual representation of a series of functions such as adding, deleting, modifying, and querying data. It corresponds to a physical table or view in the database, that is, a model of a database table or view.
[0045] Data connectors: used to establish connections between the platform and various different data sources.
[0046] Example 1:
[0047] The purpose of this embodiment is to provide a data acquisition method based on a low-code development platform.
[0048] A data acquisition method based on a low-code development platform includes:
[0049] A data connector is built into the low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases;
[0050] When developing a page using the low-code development platform, page components bind to a data model, configure event actions to call methods on the data model, and acquire data through a data connector bound to the data model; wherein, the data model is an abstraction at the data structure level, including data structure, data operations, and data constraints.
[0051] Furthermore, through the data model and the page, workflow, and canvas components in the low-code development platform, the data model and the aforementioned visualization components are converted into an intermediate file-style data structure through drag-and-drop and configuration items. The low-code development platform renders the data structure into an object-oriented language that programmers can understand, and finally deploys it to the server through the IDE tool to run, thereby achieving a series of operations such as retrieving data from the database and saving data to the database.
[0052] Furthermore, the data model is pre-divided into single-table models, view models, master-sub-models, and custom view models according to different database types and functions, thereby decoupling the project architecture and functions during the development process.
[0053] Furthermore, the single-table model corresponds to the actual physical table in the database; the view model corresponds to the view in the database; and the master-sub-model is used to associate several single-table models or view models to achieve multi-table joins.
[0054] Furthermore, the data connector provides corresponding rules for different databases, and the low-code development platform can achieve portable access to different databases according to the corresponding rules without downloading additional third-party plugins.
[0055] Furthermore, the database connector specifically has the following functions:
[0056] Establish a connection to the database;
[0057] Supports user-defined table query SQL and field query SQL with selective filtering of database tables;
[0058] The database principles that the data model built on this database connection should follow are agreed upon.
[0059] Furthermore, for ease of understanding, the solution described in this disclosure will be explained in detail below from the perspective of specific implementation, in conjunction with the accompanying drawings:
[0060] In existing technologies, traditional developers abstract the data structure level into a "data model," which can be understood as an "entity" in object-oriented programming languages. Developers can retrieve data from the database by writing code and using object-oriented programming concepts.
[0061] However, in low-code development platforms, the solution described in this embodiment abstracts the data structure into a visual model. This model differs from a traditional "model" in that users can clearly perceive its functionality, and it is endowed with all the meaning and functions of a traditional data model: data structure, data operations, and data constraints. Specifically, the "data model" described in this embodiment is illustrated through the following example: Taking a simple application scenario as an example: CRUD operations on employee leave forms (such as...) Figure 1 (As shown).
[0062] Furthermore, when our requirements change to: the company needs to purchase a batch of office supplies, we need two database tables, a purchase information table and a purchase details table. In this case, the platform needs to provide another data model: a master-slave model. When we need to complete company department approval processes, we need to provide a process model function. So, how do we expand the model to include multiple functions, and how do we establish the connection between the data model and the database, and generate more functional logic such as CRUD operations for the platform's built-in "code engine" or "parsing engine"?
[0063] First, we need to categorize the data models according to database type and function, specifically as follows: Figure 2 As shown, in this embodiment, the data model is divided into a single-table model, a master-child table model, a view model, and a custom view model, instead of coupling all functions together. For example, the "single-table model" corresponds to a real physical table in the database, and the "view model" corresponds to a view in the database. The "master-child model" is associated with the single-table model or the view model to realize multi-table joins, etc.
[0064] Furthermore, the data model comprises the following three parts:
[0065] (1) Fields: Attributes that describe the properties of the data model, such as the name, gender, and age of students in the student table;
[0066] (2) Operations: Methods, the ability of a data model to perform operations such as adding, deleting, modifying, querying and other more complex methods;
[0067] (3) Data Structure: Data structure is used to define the input parameters and return value structure of a method.
[0068] Furthermore, such as Figure 3 As shown, the DataModel is associated with each DataConnector. The Component Instance binds to the data model and configures event actions to call various methods on the data model to complete data retrieval.
[0069] The data connector refers to the platform's built-in database connection, used to connect the platform with a wide range of databases. Each connector includes the following functions:
[0070] (1) Establish a connection to the database;
[0071] (2) Supports user-defined table query SQL and field query SQL for selective filtering of database tables;
[0072] (3) The principles of which database should be followed when building the data model on this data connection.
[0073] Therefore, a database connector is a specification that provides a set of rules for each database, allowing platform users to access each database portablely according to the corresponding rules. Users do not need to download any other third-party plugins; instead, the platform has built-in multiple database connection dependencies, achieving an out-of-the-box effect.
[0074] Furthermore, such as Figure 4 As shown, the data connector provides a DataSourceHandler processor and multiple Filters, supporting user-defined extensions and maintenance; among which:
[0075] (1) DataSourceHandler: provides an interface to distribute data to different filters according to different strategies;
[0076] (2) Filter: Provides filtering for different database tables by the data connector.
[0077] Specifically, the data acquisition method based on a low-code development platform described in this embodiment involves the following: The platform has a built-in complete connector implementation process. If it is necessary to support personalized extensions to meet user needs, and without access to the front-end or back-end core code, the extension generator can be accessed by introducing its dependency packages into the platform's empty environment. The general steps are as follows:
[0078] 1) Create your own dependency packages;
[0079] 2) Provide personalized support to users (the specific process is consistent with the data connector release process);
[0080] 3) Introduce your own dependencies into the starter of the low-code development platform, and fix them in the sub-packages hussar-formdesign-starter (monolithic) and hussar-formdesign-cloud-starter (microservice).
[0081] Users need to implement the generator functionality in their own dependency packages following the steps below:
[0082] (1) Publishing Entry
[0083] 1) Read the JSON file containing model information based on the model ID and obtain the JSON object;
[0084] 2) Obtain data source information and call the model deployment processor for each database according to its database type.
[0085] 3) Prepare the publishing context (PublishCtx), passing in the basic parameters:
[0086] a) Page information (the page information includes the model ID),
[0087] b) Deployment strategy (indicating whether our model will use the generated backend code engine or not restart the engine after deployment).
[0088] c) The context also contains a publish result object used to encapsulate the code or status information after successful publish.
[0089] (2) Release of data connectors
[0090] like Figure 5 The diagram illustrates the data connector deployment process, which includes the following steps:
[0091] 1) The initialization of the model processing context (backCtx), preparation of the publishing strategy, page information data source type, and model type require a generic type that inherits from the model entity (DataModelBase) and the transport object (DataModelDTO);
[0092] 2) Abstract an interface (FunctionModel) based on the model;
[0093] 3) Obtain different functional element objects (the implementation of FunctionModel) based on the model type and database type;
[0094] 4) Convert the model JSON object into a specific functional model entity;
[0095] 5) Encapsulation of Model Transfer Entities (DTOs): This process handles basic information such as imports, packages, and Java classes. This DTO is also a collection of all related code snippets that follow.
[0096] 6) Abstract the functionality of the model into an interface (BackVisitor);
[0097] 7) Obtain the specific method visitor instance (the implementation of BackVisitor) based on the database type and method type;
[0098] 8) Using the add method provided by BackCtx, add the generated results or code snippets to the DTO corresponding to each model;
[0099] 9) Call the renderCore method to render the result.
[0100] (3) Front-end technology implementation and extension
[0101] Specifically:
[0102] 1) When creating a new data model or importing a model, you can choose which type of data model to create;
[0103] 2) The configuration content displayed in the editor varies depending on the selected data model type for different components, which facilitates code generation, i.e., a dynamic editor;
[0104] 3) Different components are bound to different data model types, thus supporting different binding configurations for different actions.
[0105] 4) The model factory is related to model classification. Each type of data model has a model method factory (OperationFactory) and is registered in main.js. How can users extend the editor and introduce a new data model to components when there is only one build environment on the front end?
[0106] a) Create a new model component library in your project and define the index.js file for the component library (define the current model's category and editor, model factory, new import pop-up, etc.);
[0107] b) Define the editor, model factory, and new import pop-up for each component in the component library, and define its own index.js for each function (traverse to get the file of the current function);
[0108] c) Finally, register in the build environment: register the new pop-up using the new model registration function (DataModelLoader), register the imported pop-up using the import model registration function (SyncDataModelLoader), and register the dynamic editor using the ComponentDataEditorLoader function.
[0109] like Figure 6 The diagram illustrates the relationship between the low-code development platform, data model, and database.
[0110] Example 2:
[0111] The purpose of this embodiment is to provide a data acquisition system based on a low-code development platform.
[0112] A data acquisition system based on a low-code development platform, comprising:
[0113] An initialization unit is used to embed a data connector in a low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases;
[0114] The data acquisition unit is used when page development is performed through the low-code development platform. The page components bind to the data model, configure event actions to call methods on the data model, and acquire data through the data connector bound to the data model. The data model is an abstraction at the data structure level, including data structure, data operations, and data constraints.
[0115] Furthermore, the system described in this embodiment corresponds to the method described in Embodiment 1, and its technical details have been described in detail in Embodiment 1, so they will not be repeated here.
[0116] In further embodiments, the following is also provided:
[0117] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0118] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0119] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0120] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.
[0121] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0122] Those skilled in the art will recognize that the units, i.e., algorithm steps, of the various examples described in connection with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0123] The data acquisition method and system based on a low-code development platform provided in the above embodiments can be implemented and has broad application prospects.
[0124] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A data acquisition method based on a low-code development platform, characterized in that, include: A data connector is built into the low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases; The data connector provides corresponding rules for different databases, and the low-code development platform can achieve portable access to different databases according to the corresponding rules without downloading additional third-party plugins. When developing a page using the low-code development platform, page components bind to a data model, configure event actions to call methods on the data model, and acquire data through a data connector bound to the data model; wherein, the data model is an abstraction at the data structure level, including data structure, data operations, and data constraints; Depending on the database type and function, the data model is divided into single-table model, view model, master-sub model and custom view model, so as to decouple the project architecture and function during the development process. The single-table model corresponds to the actual physical table in the database; the view model corresponds to the view in the database; the master-sub-model is used to associate several single-table models or view models to achieve multi-table joins. Through the data model and the page, workflow and canvas components in the low-code development platform, the data model and the above components are converted into a data structure in the form of intermediate files through drag-and-drop and configuration items. The low-code development platform renders the data structure into an object-oriented language that programmers can understand, and finally deploys it to the server through the IDE tool to run, thereby achieving a series of operations such as retrieving data from the database and saving data to the database. The data connector has the following specific functions: Establish a connection to the database; Supports user-defined table query SQL and field query SQL with selective filtering of database tables; The database principles that the data model built on this database connection should follow are agreed upon.
2. A data acquisition system based on a low-code development platform, characterized in that, include: An initialization unit is used to embed a data connector in a low-code development platform, wherein the data connector is used to connect the low-code development platform with various databases; The data connector provides corresponding rules for different databases, and the low-code development platform can achieve portable access to different databases according to the corresponding rules without downloading additional third-party plugins. The data acquisition unit is used when page development is performed through the low-code development platform. The page components bind to the data model, configure event actions to call methods on the data model, and acquire data through the data connector bound to the data model. The data model is an abstraction at the data structure level, including data structure, data operations, and data constraints. Depending on the database type and function, the data model is divided into single-table model, view model, master-sub model and custom view model, so as to decouple the project architecture and function during the development process. The single-table model corresponds to the actual physical table in the database; the view model corresponds to the view in the database; the master-sub-model is used to associate several single-table models or view models to achieve multi-table joins. Through the data model and the page, workflow and canvas components in the low-code development platform, the data model and the above components are converted into a data structure in the form of intermediate files through drag-and-drop and configuration items. The low-code development platform renders the data structure into an object-oriented language that programmers can understand, and finally deploys it to the server through the IDE tool to run, thereby achieving a series of operations such as retrieving data from the database and saving data to the database. The data connector has the following specific functions: Establish a connection to the database; Supports user-defined table query SQL and field query SQL with selective filtering of database tables; The database principles that the data model built on this database connection should follow are agreed upon.
3. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running thereon, characterized in that, When the processor executes the program, it implements the data acquisition method based on a low-code development platform as described in claim 1.
4. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data acquisition method based on a low-code development platform as described in claim 1.
Citation Information
Patent Citations
Software online development platform and software online development method
CN111984176A