Visual modeling method and device based on low-code platform and electronic equipment

Through the visual modeling method of the low-code platform, the database modeling process is simplified, efficiency and quality are improved, multiple visual modeling methods and automated script generation are supported, and the problem of low efficiency of traditional relational database modeling is solved.

CN120687430APending Publication Date: 2025-09-23BEIJING ANDAVILLE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510663844.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Traditional relational database modeling methods are inefficient and require multiple steps and tools to be completed collaboratively, resulting in a complex and inefficient modeling process.

Method used

It adopts a visual modeling method based on a low-code platform, creates data source connections and application bindings on the application management platform, provides a variety of visual modeling methods, including dragging and dropping front-end components and setting database table information, and automatically generates SQL modeling scripts through the form storage engine, metadata parsing engine and SQL assembler to achieve automated modeling.

Benefits of technology

It simplifies the modeling process, improves the efficiency and quality of database modeling, supports data source management and automated database construction, and provides a flexible and efficient database modeling solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687430A_ABST
    Figure CN120687430A_ABST
Patent Text Reader

Abstract

The invention discloses a visual modeling method and device based on a low-code platform and electronic equipment, and relates to the field of data processing. In the method, a plurality of data source connections and a plurality of applications are created on an application management platform, and each data source is bound with a corresponding application, so that a database connected with each data source is used by the bound application; on the basis of each data source, multiple visual modeling modes are provided for a user to select on an application design platform; determining a target modeling mode confirmed by the user; on the application design platform, based on the target modeling mode, SQL modeling scripts corresponding to the databases connected with the data sources are generated through a form storage engine, a metadata analysis engine and an SQL assembler; and operating the SQL modeling script corresponding to each database to complete the modeling process of each database. By implementing the technical scheme provided by the invention, the database modeling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and specifically to a visual modeling method, device and electronic equipment based on a low-code platform. Background Art

[0002] With the rapid development of information technology, enterprises are facing increasingly complex data management needs. In this context, relational databases, as the core technology of data management, have a direct impact on the operational efficiency and flexibility of enterprises through their modeling methods and efficiency.

[0003] Currently, traditional relational database modeling methods include multiple steps, including requirements analysis, conceptual model design, logical model design, physical model design, verification and optimization, implementation, and maintenance. This traditional modeling process involves multiple technical steps and requires the collaborative use of multiple tools, resulting in inefficiency.

[0004] Therefore, there is an urgent need for visual modeling methods, devices and electronic equipment based on low-code platforms. Summary of the Invention

[0005] This application provides a visual modeling method, device and electronic equipment based on a low-code platform, which improves the efficiency of database modeling.

[0006] In the first aspect of the present application, a visual modeling method based on a low-code platform is provided, which includes: creating multiple data source connections and multiple applications on an application management platform, and binding each of the data sources to the corresponding application so that the database connected to each of the data sources can be used by the bound application; based on each of the database data sources, providing multiple visual modeling methods for users to choose from on the application design platform, wherein the first method is to model by dragging and dropping front-end components in the form design, and the second method is to set the table name and field information of the database table in the data center for modeling, and the first method and the second method are any two of the multiple visual modeling methods; determining the target modeling method confirmed by the user, and the target modeling method is any one of the multiple visual modeling methods; on the application design platform, based on the target modeling method, generating SQL modeling scripts corresponding to the databases connected to each of the data sources through the form storage engine, metadata parsing engine, and SQL assembler; running the SQL modeling scripts corresponding to each of the databases to complete the modeling process of each of the databases.

[0007] By adopting the above technical solution, the method realizes the flexible association and isolation of data sources and applications by creating multiple data source connections and applications on the application management platform and binding the data sources to the applications. Based on each data source, a variety of visual modeling methods are provided on the application design platform, including modeling by dragging and dropping front-end components and modeling by setting table structures in the data center, which meets the modeling needs in different scenarios. Users can choose to confirm the target modeling method. According to the target modeling method, the SQL modeling script of the database is automatically generated through the form storage engine, metadata parsing engine and SQL assembler, which simplifies the modeling process. Finally, by running the SQL modeling script, the automatic modeling of the database is realized, which improves the modeling efficiency and quality. The entire method realizes the full process support of data source management, visual modeling and automated database construction, and provides a flexible and efficient database modeling solution.

[0008] Optionally, the creating of multiple data source connections and multiple applications on the application management platform, and binding each of the data sources to the corresponding application, specifically includes: receiving connection configuration information of multiple data sources input by the user on the application management platform, the connection configuration information including database type, connection driver, connection name, host address, port, user name and password; for each of the data sources, establishing a connection with each of the data sources through JDBC, and generating a data source connection instance; storing the configuration information of the data source connection instance in the system master database of the application management platform; receiving a create application request initiated by the user on the application management platform, and creating an application instance corresponding to the create application request on the application management platform, each of the application instances corresponds to an application identifier, and each of the application identifiers is different; based on each of the application instances and the corresponding application identifiers, binding each of the data sources to the corresponding application.

[0009] By adopting the above technical solution, the data source connection configuration information input by the user is received, a connection to the data source is established using JDBC, a data source connection instance is generated, and the configuration information of the connection instance is stored in the system master database of the application management platform, thereby achieving centralized management and persistent storage of data source connections. At the same time, by receiving user requests to create applications, application instances are created on the application management platform, and a unique application identifier is assigned to each application instance, ensuring the independence and identifiability of the application. Finally, based on the application instance and application identifier, the data source is bound to the application, establishing an association between the data source and the application. This approach enables configurable management of data source connections, independent creation and identification of applications, and flexible binding of data sources and applications, thereby improving scalability and flexibility.

[0010] Optionally, binding each data source with a corresponding application based on each application instance specifically includes: receiving a data source binding request initiated by a user, wherein the data source binding request includes an application identifier and a data source identifier to be bound; searching the system master database of the application management platform to obtain an application instance corresponding to the application identifier and a data source connection instance corresponding to the data source identifier; determining whether the data source connection instance has been bound to other application instances; if so, returning a response result of binding failure; if not, binding the application instance with the data source connection instance, recording the binding relationship in the system master database, and returning a response result of binding success.

[0011] By adopting the above technical solution, a user-initiated data source binding request is received, the application identifier and data source identifier contained in the request are obtained, and the corresponding application instance and data source connection instance are retrieved from the application management platform's system master database. This enables dynamic processing and precise search of data source binding. By determining whether the data source connection instance has already been bound to another application instance, duplicate data source binding and conflicts can be effectively avoided, ensuring the correctness and consistency of data source and application binding. Based on the judgment result, a response indicating success or failure of the binding is returned, and the binding relationship is recorded in the system master database, achieving transactional processing and persistent storage of binding operations.

[0012] Optionally, the application design platform generates SQL modeling scripts corresponding to the databases connected to each data source through a form storage engine, a metadata parsing engine, and an SQL assembler based on the target modeling method, specifically including: providing a visual form design interface through the application design platform, the form design interface comprising multiple areas, the areas including a component area and a design area, wherein the component area provides multiple types of front-end components for users to choose from, and the design area is used for users to drag and place the components and configure component properties; receiving the user to select one or more front-end components in the component area, and dragging them to the design area to form a layout of the form page; obtaining the attribute parameters configured by the user for each front-end component, the attribute parameters including the front-end component type, data type, field name, field length, whether it is required, and the default value; generating a metadata description of the front-end component through a form parsing engine according to the layout of the form page and the attribute parameters of each front-end component; calling an SQL assembly service to generate a corresponding SQL modeling script according to the metadata description, the SQL modeling script including the field definition corresponding to each front-end component.

[0013] By adopting the above technical solution, an application design platform is used to provide a visual form design interface, which includes a component area and a design area. Users can select various types of front-end components in the component area and place the components in the design area by dragging and dropping to form the layout of the form page. By obtaining the attribute parameters configured by the user for each front-end component, including component type, data type, field name, field length, whether it is required, and default value, the characteristics and constraints of the component can be described in detail. According to the layout of the form page and the attribute parameters of the component, the metadata description of the component is generated by the form parsing engine, realizing the conversion from visual design to abstract metadata. Finally, the SQL assembly service is called to generate the corresponding SQL modeling script based on the metadata description, including the field definition corresponding to each component, realizing the automatic generation from metadata to specific SQL scripts.

[0014] Optionally, on the application design platform, based on the target modeling method, SQL modeling scripts corresponding to the databases connected to each data source are generated through the form storage engine, the metadata parsing engine, and the SQL assembler, specifically including: providing a graphical interface for data modeling through the application design platform, the graphical interface including a database table design area and a field design area; in the database table design area, receiving basic information of the database table input by the user, the basic information including the table name and table description; in the field design area, receiving fields added or deleted by the user, and field attribute information set for each field; generating a metadata description file of the database table based on the basic information of the database table and the field attribute information, the metadata description file including the structure definition of the database table; calling the SQL assembly service, and generating a corresponding SQL modeling script based on the metadata description file, the SQL modeling script including the table name, field name and field attributes.

[0015] By adopting the above technical solution, an application design platform is used to provide a graphical interface for data modeling, including a database table design area and a field design area. Users can enter basic information of the database table, such as the table name and table description, in the table design area, add and delete fields in the field design area, and set the attribute information of the field. By collecting the basic information of the database table and the field attribute information designed by the user, a metadata description file of the database table is generated, which includes the structural definition of the database table. Finally, the SQL assembly service is called to generate the corresponding SQL modeling script based on the metadata description file, which includes the table name, field name and field attributes, and realizes the automatic conversion from graphical design to SQL modeling script. This method provides a visual data modeling method. Users design the database table structure through a graphical interface, and automatically generate metadata descriptions and SQL modeling scripts, which reduces the complexity of database design and improves the efficiency and accuracy of database modeling.

[0016] Optionally, the SQL modeling script corresponding to each of the databases is run to complete the modeling process of each of the databases, specifically including: establishing a database connection bound to the user application through JDBC; executing the SQL modeling script on the database connection, creating a physical table corresponding to the form page in the database, and completing the modeling process of each of the databases.

[0017] By adopting the above technical solution, the method provides a graphical interface for data modeling through an application design platform, including a database table design area and a field design area. Users can enter the basic information of the database table in the table design area, add and delete fields in the field design area, and set the attribute information of the field. By collecting the basic information of the database table and the field attribute information designed by the user, a metadata description file of the database table is generated, which includes the structural definition of the database table. Finally, the SQL assembly service is called to generate the corresponding SQL modeling script according to the metadata description file, which includes the table name, field name and field attributes, and realizes the automatic conversion from graphical design to SQL modeling script. This method provides a visual data modeling method. Users design the database table structure through a graphical interface, and automatically generate metadata descriptions and SQL modeling scripts, which reduces the complexity of database design and improves the efficiency and accuracy of database modeling.

[0018] Optionally, the SQL modeling script is executed on the database connection, a physical table corresponding to the form page is created in the database, and after the modeling process of each of the databases is completed, the method further includes: determining the target application instance currently accessed by the user based on the application identifier for the user's interactive operation in the application design platform; querying the system master database of the application management platform to obtain the data source connection information bound to the target application instance; if the connection object of the current database is inconsistent with the physical database pointed to by the data source connection information, releasing the connection object of the current database, creating a new connection object through the JDBC interface based on the data source connection information, and setting the newly created connection object as the connection object of the current database; if the connection object of the current database session is consistent with the physical database pointed to by the data source connection information, skipping the step of creating a new connection object and continuing to use the connection object of the current database.

[0019] By adopting the above technical solution, after completing database modeling, the target application instance currently being accessed is determined based on the application identifier used by the user in the application design platform. The system master database of the application management platform is then queried to obtain the data source connection information bound to the target application instance. The database connection is dynamically switched by determining whether the current database connection object is consistent with the physical database pointed to by the data source connection information. If they are inconsistent, the current connection object is released, a new connection object is created based on the data source connection information, and this connection object is set as the current database connection object. If they are consistent, the step of creating a new connection object is skipped and the current connection object is continued. This dynamic database connection switching method achieves data isolation and dynamic access in multiple application scenarios, ensuring that users always access the correct database associated with the current application. Furthermore, by reusing existing connection objects, unnecessary connection creation and release operations are avoided, improving performance and efficiency. This intelligent database connection management mechanism provides a flexible and efficient multi-application data access solution.

[0020] In the second aspect of the present application, a visual modeling device based on a low-code platform is provided, which includes a data source and application creation module, a modeling method display module, a modeling method determination module, a modeling script generation module and a modeling script implementation module, wherein: the data source and application creation module is used to create multiple data source connections and multiple applications on the application management platform, and bind each of the data sources to the corresponding application, so that the database connected to each of the data sources can be used by the bound application; the modeling method display module is used to provide a variety of visual modeling methods for users to choose from on the application design platform based on each of the data sources, wherein the first method is to model by dragging and dropping the front-end components in the form design, and the second method is to The table name and field information of the database table are set for modeling, and the first method and the second method are any two visual modeling methods among the multiple visual modeling methods; the modeling method determination module is used to determine the target modeling method confirmed by the user, and the target modeling method is any one visual modeling method among the multiple visual modeling methods; the modeling script generation module is used to generate SQL modeling scripts corresponding to the databases connected to each of the data sources on the application design platform based on the target modeling method through the form storage engine, metadata parsing engine, and SQL assembler; the modeling script implementation module is used to run the SQL modeling scripts corresponding to each of the databases to complete the modeling process of each of the databases.

[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs any of the methods described above.

[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions. When the instructions are executed, any one of the methods described above is executed.

[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Allow users to create and bind multiple data sources and applications on the application management platform. On the application design platform, users can choose from a variety of visual modeling methods, including dragging and dropping front-end components or setting detailed database table field information. This intuitive and easy-to-understand visual modeling approach allows users to quickly understand and operate, greatly improving modeling efficiency.

[0024] 2. In traditional database modeling, any subsequent modifications may require complex database redesign and front-end and back-end code adjustments. However, in this technical solution, the form storage engine and metadata parsing engine can dynamically adjust the database structure based on design changes, eliminating the need to manually rewrite extensive code. This ability to dynamically generate SQL modeling scripts makes maintenance and updates simpler and more straightforward.

[0025] 3. This approach supports managing multiple data sources on a unified platform and allows users to flexibly bind these data sources to different applications as needed. This approach not only simplifies data source management but also allows users to adjust database parameters or add new data sources directly through a graphical interface without having to manually modify configuration files. This approach enhances system configuration flexibility and adaptability to business changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart of the visual modeling method based on the low-code platform disclosed in the embodiment of this application; Figure 2 This is an example schematic diagram of the visual modeling method based on the low-code platform disclosed in the embodiment of the present application; Figure 3 This is another example schematic diagram of the visual modeling method based on the low-code platform disclosed in the embodiment of the present application; Figure 4It is a module schematic diagram of a visual modeling device based on a low-code platform disclosed in an embodiment of the present application; Figure 5 This is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.

[0027] Explanation of the accompanying drawings: 401, data source and application creation module; 402, modeling method display module; 403, modeling method determination module; 404, modeling script generation module; 405, modeling script implementation module; 500, electronic device; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0029] In the description of the embodiments of this application, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a concrete manner.

[0030] In the description of the embodiments of the present application, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0031] This application provides a visual modeling method based on a low-code platform, refer to Figure 1 , Figure 1 This is a flow chart of a visual modeling method based on a low-code platform provided in an embodiment of the present application. The method is applied to a server, which is a server that executes a visual modeling program based on a low-code platform. The low-code platform is integrated into the server through this method. The low-code platform includes an application management platform and an application design platform. The method includes steps S101 to S105, which are as follows: Step S101: creating multiple data source connections and multiple applications on an application management platform, and binding each of the data sources to a corresponding application, so that each of the database data sources can be used by the bound application.

[0032] In step S101, multiple data source connections and multiple applications are created on the application management platform, and each of the data sources is bound to a corresponding application, specifically including: receiving connection configuration information of multiple data sources input by a user on the application management platform, the connection configuration information including database type, connection driver, connection name, host address, port, user name and password; for each of the data sources, establishing a connection with each of the data sources through JDBC to generate a data source connection instance; storing the configuration information of the data source connection instance in the system master database of the application management platform; receiving an application creation request initiated by the user on the application management platform, and creating an application instance corresponding to the application creation request on the application management platform, each of the application instances corresponding to an application identifier, and each of the application identifiers is different; based on each of the application instances and the corresponding application identifiers, binding each of the data sources to the corresponding application.

[0033] Specifically, if Figure 2 As shown, Figure 2 The following diagram illustrates an example of the data source creation process provided in an embodiment of the present application. The server first receives connection configuration information for multiple data sources entered by the user on the application management platform. This connection configuration information includes necessary information such as the database type, connection driver, connection name, host address, port, username, and password, used to establish a connection to the data source. For example, a user can enter connection information for a MySQL database on the application management platform's interface, including the MySQL JDBC driver class name, connection URL, database username, and password.

[0034] After receiving the data source connection configuration information, the server establishes a connection to each data source using JDBC (Java Database Connectivity). JDBC is a Java API for connecting to and performing database operations. The server uses the classes and interfaces provided by JDBC to establish a connection to the data source based on the connection configuration information. After the connection is established, the server generates a corresponding data source connection instance. Each instance represents a specific data source connection.

[0035] To facilitate management and subsequent use, the server stores the configuration information of each data source connection instance in the application management platform's system master database. The system master database is a dedicated database within the application management platform for storing system configuration, metadata, and other information, independent of the business database. The server persistently stores the connection instance's database type, connection driver, connection name, host address, port, username, and password in the system master database for subsequent query and use.

[0036] While establishing a data source connection, the server also receives an application creation request from the user on the application management platform. Users can submit an application creation request through the interface or API provided by the application management platform. The request includes information such as the application name, description, and permission settings. After receiving the application creation request, the server creates an application instance corresponding to the request in the application management platform. Each application instance has a unique application identifier to distinguish different applications. For example, the server can generate a GUID (Globally Unique Identifier) ​​for each application as an application identifier.

[0037] Finally, the server binds each data source to the corresponding application based on each application instance and the corresponding application identifier. The server allows users to select the data source required for each application through the interface or API provided by the application management platform. Figure 3 As shown, Figure 3 This is an example interface diagram of a data source connection binding application provided in an embodiment of the present application. Users can select from created data source connection instances and bind the selected data source to the application. The server stores the binding relationship in the system master database, recording the identification information of the data source connection instance bound to each application instance.

[0038] Through the above steps, the server creates multiple data source connections and multiple applications in the application management platform and binds each data source to the corresponding application. This binding relationship allows each application to access and use its bound data source, achieving both association and isolation between data sources and applications. Later, during application design and operation, the server can query the bound data source connection information based on the application's identity and use this connection information to interact with the data source to complete data storage, query, and processing.

[0039] In a possible implementation, based on each of the application instances, each of the data sources is bound to a corresponding application, specifically including: receiving a data source binding request initiated by a user, wherein the data source binding request includes an application identifier and a data source identifier to be bound; searching the system master database of the application management platform to obtain an application instance corresponding to the application identifier and a data source connection instance corresponding to the data source identifier; determining whether the data source connection instance has been bound to other application instances; if so, returning a response result indicating a binding failure; if not, binding the application instance to the data source connection instance, recording the binding relationship in the system master database, and returning a response result indicating a binding success.

[0040] Specifically, the server receives a data source binding request initiated by the user. This request is typically initiated through the interface or API provided by the application management platform. The request includes the application identifier and data source identifier to be bound. The application identifier uniquely identifies an application instance, while the data source identifier uniquely identifies a data source connection instance. For example, a user can select an application from the drop-down box on the application configuration page of the application management platform and click the Bind Data Source button to initiate the binding request.

[0041] After receiving a data source binding request, the server searches the application management platform's system master database to retrieve the application instance corresponding to the application ID specified in the request and the data source connection instance corresponding to the data source ID. The server searches the application and data source tables in the system master database, using the application ID and data source ID as keywords to find the corresponding application instance and data source connection instance.

[0042] After retrieving the application instance and data source connection instance, the server checks whether the data source connection instance is already bound to another application instance. This prevents multiple application instances from being bound to the same data source connection instance, which could lead to data confusion and conflicts. The server queries the binding relationship table in the system's master database to check whether the data source connection instance has already been bound to another application instance.

[0043] If the server finds that the data source connection instance is already bound to another application instance, the current binding request cannot be fulfilled, because a data source connection instance can only be bound to one application instance. In this case, the server returns a binding failure response to the user, notifying the user that the data source connection instance is already in use and the binding operation cannot be completed. The user can select another available data source connection instance to bind, or first unbind the other application instance from the data source connection instance.

[0044] If the server finds that the data source connection instance is not bound to another application instance, the current binding request can be satisfied. The server then performs the actual binding operation, binding the application instance specified in the request to the data source connection instance. Specifically, the server inserts a new record into the binding relationship table in the system's master database, recording the application instance's and data source connection instance's identifiers, establishing a binding relationship between them. The application instance can then use the bound data source connection instance to access and operate the corresponding database.

[0045] After the binding operation is complete, the server returns a successful binding response to the user, notifying the user that the data source binding request has been successfully processed and that a binding relationship has been established between the application instance and the data source connection instance. The user can view the application instance configuration information in the application management platform to confirm whether the data source connection instance is bound correctly.

[0046] Step S102: Based on each of the database data sources, a variety of visual modeling methods are provided on the application design platform for users to choose from, wherein the first method is to model by dragging and dropping front-end components in the form design, and the second method is to set the table name and field information of the database table in the data center for modeling. The first method and the second method are any two of the multiple visual modeling methods.

[0047] In step S102, the server provides two main visual modeling methods: the first method is to drag and drop front-end components in the form design to perform modeling; the second method is to set the table name and field information of the database table in the data center to perform modeling. These two methods represent any two of the multiple visual modeling methods provided by the server.

[0048] For the first visual modeling method (first method), the server provides a series of predefined front-end components in the form design interface of the application design platform, such as input boxes, drop-down boxes, radio buttons, multiple-choice boxes, date pickers, etc. Users can drag these components from the component panel to the form design area with simple drag and drop operations, and perform visual layout and configuration. Each component has corresponding properties and events, and users can set the component's appearance, data source, validation rules, etc. through the property panel. In the process of dragging and dropping components, the server will generate the corresponding code in real time and preview the form's style and interactive effects in real time in the form design area. Users can adjust the position, size and style of the components at any time, and the server will automatically update the corresponding code. When the user completes the form design, the server will save the generated code to the database and associate it with the corresponding data model.

[0049] This visual modeling approach allows users to design form interfaces in a WYSIWYG manner, eliminating the need to write complex code and significantly reducing the difficulty and entry level of modeling. Users can focus on form layout and interaction design without having to worry about the underlying technical implementation details.

[0050] For the second visual modeling method (Method 2), the server provides a visual database table designer within the data center interface of the application design platform. This graphical interface allows users to define table names, field names, field types, primary keys, foreign keys, and other information. The server offers common data types, such as integers, floating-point numbers, strings, and dates and times. Users can select the appropriate data type based on their needs.

[0051] When designing a database table, users can add fields by dragging and dropping, and set field properties such as whether they are primary keys, whether they allow nulls, and default values. The server will generate the corresponding database table structure in real time and preview the table field information in the interface. Users can also visually define relationships between tables, such as one-to-one, one-to-many, and many-to-many, and the server will automatically generate corresponding foreign key constraints.

[0052] Once the user completes the database table design, the server will save the table structure information to the database and generate the corresponding database creation script. This allows users to complete the design and construction of database tables in a visual way without having to write SQL statements, greatly simplifying the data modeling process.

[0053] Step S103: determining a target modeling method confirmed by the user, wherein the target modeling method is any one of the multiple visual modeling methods.

[0054] In step S103, the server displays a variety of visual modeling methods available to the user on the application design platform interface. These modeling methods can be presented as a list, icon, or menu, accompanied by brief descriptions and examples to help users understand the characteristics and applicable scenarios of each modeling method. For example, the server may display two options on the interface: "Form Design" and "Data Center," corresponding to the first and second methods mentioned in step S102, respectively.

[0055] Users browse and compare different visual modeling methods, assess how they match their needs and preferences, and make a preliminary choice. For example, if a user is primarily concerned with front-end interface design and interaction, they might be inclined to choose the form design modeling method in the first method; if a user is more concerned with defining and managing database table structures, they might choose the data center modeling method in the second method.

[0056] Once the user makes a selection, the server will pop up a confirmation dialog or prompt, asking the user to reconfirm the chosen modeling method. This step is to prevent user errors or incorrect selections and also provides the user with an opportunity to change their mind and make corrections. The server can display a detailed description and preview of the selected modeling method in the confirmation dialog to help the user further understand the characteristics and applicable scenarios of the selected method.

[0057] If the user clicks "Confirm" or "Yes" in the confirmation dialog box, the user has finally confirmed the current modeling method, and the server marks it as the target modeling method. Subsequent modeling operations will be performed based on this selected modeling method. The server will save the target modeling method information to the session or cache for use in subsequent steps.

[0058] If the user clicks "Cancel" or "No" in the confirmation dialog box, it means that the user has canceled the current selection and wishes to select a new modeling method. The server closes the confirmation dialog box and redirects the user to the visual modeling method selection interface, allowing the user to browse and select again. The user can continue to evaluate and compare different modeling methods until they find the one that best suits their needs.

[0059] Through the above interaction and confirmation process, the server finally determines the target modeling method selected by the user. This target modeling method is any of a variety of visual modeling methods, representing the modeling method that is most suitable and satisfactory to the user in the current scenario.

[0060] After determining the target modeling method, the server will provide the corresponding modeling interface and tools to guide the user through subsequent visual modeling operations. For example, if the user selects the "Form Design" modeling method, the server will open the form designer interface and provide functions such as dragging and dropping components and configuring properties, allowing users to easily design and define the form interface interaction.

[0061] Step S104: On the application design platform, based on the target modeling method, SQL modeling scripts corresponding to the databases connected to each of the data sources are generated through a form storage engine, a metadata parsing engine, and an SQL assembler.

[0062] In step S104, on the application design platform, based on the target modeling method, SQL modeling scripts corresponding to the databases connected to each data source are generated through the form storage engine, the metadata parsing engine, and the SQL assembler, specifically including: providing a visual form design interface through the application design platform, the form design interface including multiple areas, the areas including a component area and a design area, wherein the component area provides multiple types of front-end components for users to choose, and the design area is used for users to drag and place the components and configure component properties; receiving the user to select one or more components in the component area, and dragging them to the design area to form a layout of the form page; obtaining the attribute parameters configured by the user for each component, the attribute parameters including component type, data type, field name, field length, whether it is required, and default value; generating a metadata description of the component through the form parsing engine according to the layout of the form page and the attribute parameters of each component; calling the SQL assembly service to generate a corresponding SQL modeling script according to the metadata description, the SQL modeling script including the field definition corresponding to each component.

[0063] Specifically, in the first mode, the server provides a visual form design interface in the application design platform. The interface includes multiple areas, which are mainly divided into two parts: a component area and a design area.

[0064] In the component area, the server provides a variety of front-end components for users to choose from, including common UI controls such as input boxes, drop-down boxes, radio buttons, multiple check boxes, and date pickers. Each component has predefined properties and behaviors, allowing users to select the appropriate component based on their needs.

[0065] In the design area, users can drag components from the component area into the design area and arrange and lay them out to form the basic structure of the form page. Users can freely adjust the position, size, and alignment of components. The server will update the preview of the design area in real time, allowing users to intuitively see the layout and style of the form.

[0066] When users drag and drop components into the design area, the server displays a property configuration panel for each component, allowing users to set various properties. These properties include component type, data type, field name, field length, required field status, and default value. Users can configure appropriate property values ​​for each component based on actual business needs. After users select, drag, and configure components, the server retrieves the overall layout of the form page and the property parameters of each component. The server passes this information to the form parsing engine for processing. The form parsing engine analyzes the form structure and component configuration and generates a corresponding metadata description. The metadata description is an abstract, implementation-independent representation of the data model, describing the type, properties, and relationships of each component in the form. After generating the metadata description, the server calls the SQL assembly service and passes the metadata description to the SQL assembler. The SQL assembler automatically generates the corresponding SQL modeling script based on the metadata description. The SQL assembler predefines the mapping between various component types and database field types, as well as SQL syntax templates for different databases. The SQL assembler iterates over each component in the metadata description and generates the corresponding field definition statements based on the component type and properties. For a date picker component, the SQL assembler generates a field definition statement like "birthday DATE". The SQL assembler combines the field definition statements corresponding to all components to form a complete SQL modeling script.

[0067] Finally, the server saves the generated SQL modeling script to the database connected to the corresponding data source. Each data source connection has a corresponding SQL modeling script that describes the database table structure under that data source. These SQL modeling scripts can be used in subsequent database creation, modification, and deletion operations to ensure that the database physical model is consistent with the visual modeling results.

[0068] In another possible implementation, on the application design platform, based on the target modeling method, SQL modeling scripts corresponding to the databases connected to each data source are generated through a form storage engine, a metadata parsing engine, and an SQL assembler, specifically including: providing a graphical interface for data modeling through the application design platform, the graphical interface including a database table design area and a field design area; receiving basic information of the database table input by the user in the database table design area, the basic information including the table name and table description; receiving fields added or deleted by the user, and field attribute information set for each field in the field design area; generating a metadata description file of the database table based on the basic information of the database table and the field attribute information, the metadata description file including the structure definition of the database table; calling an SQL assembly service to generate a corresponding SQL modeling script based on the metadata description file, the SQL modeling script including the table name, field name, and field attributes.

[0069] Specifically, in another embodiment of the visual modeling method based on the low-code platform provided in this application, that is, the second embodiment. In the application design platform, based on the target modeling method determined by the user, the SQL modeling script corresponding to the database connected to each data source is generated through the form storage engine, metadata parsing engine and SQL assembler. Unlike the previous embodiment, a graphical interface for data modeling is used here, allowing users to directly design the database table structure in a visual way, rather than generating database tables by dragging and dropping components.

[0070] Specifically, the server provides a graphical interface specifically for data modeling in the application design platform. The interface mainly includes two parts: the database table design area and the field design area.

[0071] In the database table design area, the server provides a form or dialog box for users to enter basic database table information, including the table name and description. The table name uniquely identifies the database table and is used to create and reference it within the database. The table description is a brief description of the database table, describing its purpose and contents. For example, a user might create a table named "User" with a description of "Stores basic user information."

[0072] In the field design area, the server provides a spreadsheet-like interface, with each row corresponding to a field and each column corresponding to a different field attribute. Users can add a new row by clicking the "Add Field" button or delete a selected row by clicking the "Delete Field" button. For each field, users must set its attributes, including the field name, data type, length, whether nulls are allowed, and a default value. For example, in the "User" table, users can add fields such as "id," "username," and "email," and set the appropriate data type and attributes for each field.

[0073] After users complete their designs in the database table and field design areas, the server retrieves basic table information and attribute information for each field. The server then passes this information to the metadata parsing engine for processing. Based on the user's design, the metadata parsing engine generates a metadata description file for the database table. This file is a standardized, database-independent table structure definition that includes information such as the table name, field names, field types, and constraints.

[0074] After generating the metadata description file, the server invokes the SQL Assembly service and passes the metadata description file to the SQL Assembler. The SQL Assembler automatically generates the corresponding SQL modeling script based on the metadata description file. The SQL Assembler predefines SQL syntax templates for different databases, as well as mappings between various data types and constraints.

[0075] The SQL assembler parses each field in the metadata description file and generates a corresponding SQL statement fragment based on the field's attribute information. For example, for a field named "username" with a VARCHAR type, a length of 50, and no nulls allowed, the SQL assembler generates a SQL statement fragment similar to "username VARCHAR(50) NOT NULL". The SQL assembler combines the SQL statement fragments corresponding to all fields, adds the table name, and other necessary syntax elements to form a complete SQL modeling script.

[0076] Finally, the server saves the generated SQL modeling script to the database connected to the corresponding data source. Each data source connection has a corresponding SQL modeling script that describes the database table structure under that data source. These SQL modeling scripts can be used in subsequent database creation, modification, and deletion operations to ensure that the database physical model remains consistent with the user's design.

[0077] Step S105: running the SQL modeling script corresponding to each of the databases to complete the modeling process of each of the databases.

[0078] In step S105, the SQL modeling script corresponding to each of the databases is run to complete the modeling process of each of the databases, specifically including: establishing a database connection bound to the user application through JDBC; executing the SQL modeling script on the database connection, creating a physical table corresponding to the form page in the database, and completing the modeling process of each of the databases.

[0079] Specifically, the server first establishes a database connection bound to the user's application. In the previous steps, the user created a data source connection in the application management platform and bound it to a specific application. The server queries the application management platform's system master database to obtain the data source connection information bound to the current application, including the database type, connection address, port number, database name, username, and password.

[0080] After obtaining the data source connection information, the server uses JDBC technology to establish a connection to the database. JDBC is a standard database access interface provided by the Java language, allowing Java programs to interact with various relational databases. The server creates a JDBC connection object based on the data source connection information and uses this object to establish a physical connection to the database.

[0081] After establishing a database connection, the server reads the previously generated SQL modeling scripts and executes them on the established database connection. The SQL modeling scripts contain the SQL statements that create the database table structure. These statements define information such as table names, field names, field types, and constraints based on the form page or data model designed by the user in the visual interface.

[0082] The server sends the SQL statements in the SQL modeling script to the database server, which parses and executes them, creating the corresponding physical tables in the database. For example, if the SQL modeling script contains a "CREATETABLE User (...)" statement, the database server creates a table named "User" in the currently connected database, with the same fields and properties as those defined in the SQL statement.

[0083] During the execution of the SQL modeling script, the server monitors and processes the script's results. If the script executes successfully, the server logs the results, indicating that the corresponding database table has been created. If errors or exceptions occur during script execution, the server captures these errors and takes appropriate action, such as logging the error, rolling back the transaction, and notifying the user.

[0084] When all SQL modeling scripts are executed, the server closes the connection to the database and releases related resources. At this point, physical tables corresponding to the user-designed form pages or data models have been created in the database, and the structure and field attributes of these tables are consistent with the user's design.

[0085] After database modeling is complete, the server updates the application management platform's master system database, associating the modeled database table information with the application. This allows users to easily access and use these database tables during subsequent application development and data operations, such as adding, deleting, modifying, and querying data.

[0086] In a possible implementation, the SQL modeling script is executed on the database connection to create a physical table corresponding to the form page in the database. After the modeling process of each of the databases is completed, the method further includes: determining the target application instance currently accessed by the user based on the application identifier of the user's interactive operation in the application design platform; querying the system master database of the application management platform to obtain the data source connection information bound to the target application instance; if the connection object of the current database is inconsistent with the physical database pointed to by the data source connection information, releasing the connection object of the current database, creating a new connection object through the JDBC interface based on the data source connection information, and setting the newly created connection object as the connection object of the current database; if the connection object of the current database session is consistent with the physical database pointed to by the data source connection information, skipping the step of creating a new connection object and continuing to use the connection object of the current database.

[0087] Specifically, the server continuously monitors user interactions within the application design platform. Whenever a user performs an action, the server captures the corresponding application identifier. An application identifier is a string or number that uniquely identifies an application instance and is associated with specific application functionality and data source connections. By obtaining the application identifier associated with the user's action, the server can determine the target application instance the user is currently accessing.

[0088] After determining the target application instance, the server queries the application management platform's system master database to obtain the data source connection information associated with the target application instance. This data source connection information includes the database type, connection address, port number, database name, username, and password, describing how to connect to the physical database associated with the application instance.

[0089] Next, the server determines whether the current database connection object matches the physical database specified in the data source connection information. The current database connection object refers to the active connection established with a physical database that the server is currently using. The server determines whether they point to the same physical database by comparing the database connection parameters of the current connection object with those in the data source connection information.

[0090] If the current database's connection object is inconsistent with the physical database specified by the data source connection information, this indicates that the user has switched application instances and needs to access the database associated with the new application instance. In this case, the server first releases the current database's connection object, closes the connection to the old database, and frees up associated resources. The server then creates a new connection object using the JDBC interface based on the data source connection information and sets it as the current database's connection object. This new connection object establishes a connection to the physical database specified by the data source connection information, allowing subsequent data operations to be performed on this database.

[0091] If the current database connection object matches the physical database pointed to by the data source connection information, the user hasn't switched application instances and is still accessing the same database. In this case, the server skips the creation step without creating a new connection object and continues to use the current database connection object for subsequent data operations. This avoids unnecessary connection creation and release operations, improving system performance and efficiency.

[0092] Through the above steps, the server implements the ability to dynamically switch database connections based on user interactions. When a user switches application instances in the application design platform, the server automatically obtains the data source connection information bound to the new application instance and creates a new database connection object as needed, ensuring that the user always accesses the correct physical database. This dynamic switching mechanism has the following advantages: Data isolation: Different application instances are bound to different physical databases, and the data between them is isolated from each other. Data operations performed by users in one application instance will not affect the data of other application instances, ensuring data security and independence.

[0093] Flexible switching: users can switch freely between different application instances, dynamically obtain the data source connection information bound to the current application instance, and automatically establish a connection with the corresponding physical database, allowing users to seamlessly switch between different applications and databases, improving flexibility and availability.

[0094] Resource optimization: By determining whether the current database connection object is consistent with the target database, the server can avoid unnecessary connection creation and release operations, reducing resource waste and improving performance and efficiency.

[0095] Transparency: The dynamic switching of database connections is transparent to users. Users do not need to worry about the underlying database connection details and only need to focus on the application functions and business logic, which simplifies the user's operation and development process.

[0096] Scalability and dynamic switching mechanisms enable the system to support flexible combinations of multiple application instances and databases, meeting different business scenarios and data management requirements, and has good scalability and adaptability.

[0097] Reference Figure 4 , the present application also provides a visual modeling device based on a low-code platform, which is a server, and the server includes a data source and application creation module 401, a modeling method display module 402, a modeling method determination module 403, a modeling script generation module 404 and a modeling script implementation module 405, wherein: the data source and application creation module 401 is used to create multiple data source connections and multiple applications on the application management platform, and bind each of the data sources to the corresponding application, so that the database connected to each of the data sources can be used by the bound application; the modeling method display module 402 is used to provide a variety of visual modeling methods for users to choose from on the application design platform based on each of the data sources, wherein the first method is to model by dragging and dropping the front-end components in the form design, and the second The method is to set the table name and field information of the database table in the data center for modeling, and the first method and the second method are any two visual modeling methods among the multiple visual modeling methods; the modeling method determination module 403 is used to determine the target modeling method confirmed by the user, and the target modeling method is any one visual modeling method among the multiple visual modeling methods; the modeling script generation module 404 is used to generate SQL modeling scripts corresponding to the databases connected to each of the data sources on the application design platform based on the target modeling method through the form storage engine, metadata parsing engine, and SQL assembler; the modeling script implementation module 405 is used to run the SQL modeling scripts corresponding to each of the databases to complete the modeling process of each of the databases.

[0098] In one possible implementation, the data source and application creation module 401 creates multiple data source connections and multiple applications on the application management platform, and binds each of the data sources to the corresponding application, specifically including: the data source and application creation module 401 receives connection configuration information of multiple data sources input by the user on the application management platform, the connection configuration information including database type, connection driver, connection name, host address, port, user name and password; the data source and application creation module 401 establishes a connection with each of the data sources through JDBC to generate a data source connection instance; the data source and application creation module 401 stores the configuration information of the data source connection instance in the system master database of the application management platform; the data source and application creation module 401 receives an application creation request initiated by the user on the application management platform, and creates an application instance corresponding to the application creation request on the application management platform, each application instance corresponds to an application identifier, and each application identifier is different; the data source and application creation module 401 binds each of the data sources to the corresponding application based on each of the application instances and the corresponding application identifier.

[0099] In a possible implementation, the data source and application creation module 401 binds each of the data sources to the corresponding application based on each of the application instances, specifically including: the data source and application creation module 401 receives a data source binding request initiated by a user, wherein the data source binding request includes an application identifier to be bound and a data source identifier; the data source and application creation module 401 searches the system master database of the application management platform to obtain an application instance corresponding to the application identifier and a data source connection instance corresponding to the data source identifier; the data source and application creation module 401 determines whether the data source connection instance has been bound to other application instances; if so, the data source and application creation module 401 returns a response result of binding failure; if not, the data source and application creation module 401 binds the application instance to the data source connection instance, records the binding relationship in the system master database, and returns a response result of binding success.

[0100] In a possible implementation, the modeling script generation module 404 generates SQL modeling scripts corresponding to the databases connected to each data source on the application design platform based on the target modeling method through a form storage engine, a metadata parsing engine, and an SQL assembler, specifically including: the modeling script generation module 404 provides a visual form design interface through the application design platform, and the form design interface includes multiple areas, including a component area and a design area, wherein the component area provides multiple types of front-end components for users to choose from, and the design area is used for users to drag and place the components and configure component properties; the modeling script generation module 404 receives the user The user selects one or more components in the component area and drags them to the design area to form the layout of the form page; the modeling script generation module 404 obtains the attribute parameters configured by the user for each component, and the attribute parameters include component type, data type, field name, field length, whether it is required and default value; the modeling script generation module 404 generates a metadata description of the component through the form parsing engine according to the layout of the form page and the attribute parameters of each component; the modeling script generation module 404 calls the SQL assembly service and generates a corresponding SQL modeling script according to the metadata description, and the SQL modeling script includes the field definition corresponding to each component.

[0101] In one possible implementation, the modeling script generation module 404 generates SQL modeling scripts corresponding to the databases connected to each of the data sources on the application design platform based on the target modeling method through a form storage engine, a metadata parsing engine, and an SQL assembler, specifically including: the modeling script generation module 404 provides a graphical interface for data modeling through the application design platform, and the graphical interface includes a database table design area and a field design area; the modeling script generation module 404 receives basic information of the database table input by the user in the database table design area, and the basic information includes a table name and a table description; the modeling script generation module 404 receives fields added or deleted by the user, and field attribute information set for each field in the field design area; the modeling script generation module 404 generates a metadata description file of the database table based on the basic information of the database table and the field attribute information, and the metadata description file includes a structure definition of the database table; the modeling script generation module 404 calls the SQL assembly service and generates a corresponding SQL modeling script based on the metadata description file, and the SQL modeling script includes a table name, a field name, and field attributes.

[0102] In one possible implementation, the modeling script implementation module 405 runs the SQL modeling script corresponding to each of the databases to complete the modeling process of each of the databases, specifically including: the modeling script implementation module 405 establishes a database connection bound to the user application through JDBC; the modeling script implementation module 405 executes the SQL modeling script on the database connection, creates a physical table corresponding to the form page in the database, and completes the modeling process of each of the databases.

[0103] In a possible implementation, the modeling script implementation module 405 executes the SQL modeling script on the database connection, creates a physical table corresponding to the form page in the database, and completes the modeling process of each of the databases. The method further includes: the modeling script implementation module 405 determines the target application instance currently accessed by the user based on the application identifier of the user's interactive operation in the application design platform; the modeling script implementation module 405 queries the system master database of the application management platform to obtain the data source connection information bound to the target application instance; if the connection object of the current database is inconsistent with the physical database pointed to by the data source connection information, the modeling script implementation module 405 releases the connection object of the current database, creates a new connection object through the JDBC interface according to the data source connection information, and sets the newly created connection object as the connection object of the current database; if the connection object of the current database session is consistent with the physical database pointed to by the data source connection information, the modeling script implementation module 405 skips the step of creating a new connection object and continues to use the connection object of the current database.

[0104] It should be noted that the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0105] This application also provides an electronic device. Figure 5 , Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.

[0106] The communication bus 502 is used to implement the connection and communication between these components.

[0107] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0108] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0109] The processor 501 may include one or more processing cores. Using various interfaces and circuits, the processor 501 connects to various components within the server. It executes instructions, programs, code sets, or instruction sets stored in the memory 505, as well as accesses data stored in the memory 505, to perform various server functions and process data. Optionally, the processor 501 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 501 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may also be implemented as a separate chip, rather than integrated into the processor 501.

[0110] Among them, the memory 505 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. Reference Figure 3, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program based on a visual modeling method of a low-code platform.

[0111] exist Figure 5 In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application program of the visual modeling method based on the low-code platform stored in the memory 505. When executed by one or more processors 501, the electronic device 500 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited to the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.

[0112] The present application further provides a computer-readable storage medium storing instructions, which, when executed by one or more processors 501 , enable the electronic device 500 to perform one or more of the methods described in the above embodiments.

[0113] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0114] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0115] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0116] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0117] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application. The aforementioned memory includes various media that can store program code, such as USB flash drives, mobile hard drives, magnetic disks, or optical disks.

[0118] The foregoing is merely an exemplary embodiment of the present disclosure and is not intended to limit the scope of the present disclosure. In other words, any equivalent variations and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the disclosure and the practical implications thereof.

[0119] This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not described herein. The description and examples are to be considered as exemplary only, and the scope and spirit of the present disclosure are to be defined by the claims.

Claims

1. A visual modeling method based on a low-code platform, characterized by: The method comprises: Creating multiple data source connections and multiple applications on the application management platform, and binding each of the data sources to a corresponding application so that the database connected to each of the data sources can be used by the bound application; Based on each of the data sources, the application design platform provides multiple visual modeling methods for users to choose from, wherein the first method is to model by dragging and dropping front-end components in the form design, and the second method is to model by setting the table name and field information of the database table in the data center. The first method and the second method are any two of the multiple visual modeling methods; Determining a target modeling method confirmed by the user, wherein the target modeling method is any one of the multiple visual modeling methods; On the application design platform, based on the target modeling method, a form storage engine, a metadata parsing engine, and an SQL assembler are used to generate SQL modeling scripts corresponding to the databases connected to each of the data sources; Run the SQL modeling script corresponding to each of the databases to complete the modeling process of each of the databases.

2. The method according to claim 1, characterized in that The step of creating multiple data source connections and multiple applications on the application management platform and binding each of the data sources to the corresponding application specifically includes: Receive connection configuration information of multiple data sources input by the user on the application management platform, the connection configuration information including database type, connection driver, connection name, host address, port, user name and password; For each of the data sources, establish a connection with each of the data sources through JDBC and generate a data source connection instance; Storing the configuration information of the data source connection instance in the system master database of the application management platform; receiving an application creation request initiated by a user on the application management platform, and creating an application instance corresponding to the application creation request on the application management platform, wherein each application instance corresponds to an application identifier, and each application identifier is different; Based on each of the application instances and the corresponding application identifiers, each of the data sources is bound to the corresponding application.

3. The method according to claim 2, characterized in that Binding each of the data sources to the corresponding application based on each of the application instances specifically includes: Receive a data source binding request initiated by a user, wherein the data source binding request includes an application identifier to be bound and a data source identifier; Searching the system master database of the application management platform to obtain the application instance corresponding to the application identifier and the data source connection instance corresponding to the data source identifier; Determine whether the data source connection instance has been bound to another application instance; If yes, it returns a binding failure response result; If not, the application instance is bound to the data source connection instance, the binding relationship is recorded in the system master database, and a response result indicating successful binding is returned.

4. The method according to claim 1, wherein The application design platform generates SQL modeling scripts corresponding to the databases connected to each data source through a form storage engine, a metadata parsing engine, and an SQL assembler based on the target modeling method, specifically including: A visual form design interface is provided through the application design platform. The form design interface includes multiple areas, including a component area and a design area. The component area provides multiple types of front-end components for users to select, and the design area is used for users to drag and place the front-end components and configure component properties. receiving a request from the user to select one or more front-end components in the component area and drag the components to the design area to form a layout of a form page; Obtain the attribute parameters configured by the user for each of the front-end components, including the front-end component type, data type, field name, field length, whether it is required, and default value; Generate metadata descriptions of the front-end components through a form parsing engine based on the layout of the form page and the attribute parameters of each front-end component; The SQL assembly service is called to generate a corresponding SQL modeling script according to the metadata description, wherein the SQL modeling script includes a field definition corresponding to each of the front-end components.

5. The method according to claim 1, wherein On the application design platform, based on the target modeling method, the SQL modeling script corresponding to the database connected to each data source is generated through the form storage engine, metadata parsing engine, and SQL assembler, specifically including: Providing a graphical interface for data modeling through the application design platform, wherein the graphical interface includes a database table design area and a field design area; In the database table design area, receiving basic information of the database table input by the user, the basic information including the table name and table description; In the field design area, receiving fields added or deleted by the user, and field attribute information set for each field; Generate a metadata description file of the database table according to the basic information of the database table and the field attribute information, wherein the metadata description file includes a structure definition of the database table; The SQL assembly service is called to generate a corresponding SQL modeling script according to the metadata description file, wherein the SQL modeling script includes a table name, a field name, and field attributes.

6. The method according to claim 1, wherein Running the SQL modeling scripts corresponding to the respective databases to complete the modeling process of the respective databases specifically includes: Establish a database connection bound to the user application through JDBC; On the database connection, the SQL modeling script is executed to create a physical table corresponding to the form page in the database, completing the modeling process of each database.

7. The method according to claim 6, characterized in that After executing the SQL modeling script on the database connection to create a physical table corresponding to the form page in the database and completing the modeling process of each database, the method further includes: Determining a target application instance currently accessed by the user based on an application identifier of an interactive operation performed by the user on the application design platform; Querying the system master database of the application management platform to obtain data source connection information bound to the target application instance; If the connection object of the current database is inconsistent with the physical database pointed to by the data source connection information, release the connection object of the current database, create a new connection object through the JDBC interface according to the data source connection information, and set the newly created connection object as the connection object of the current database; If the connection object of the current database session is consistent with the physical database pointed to by the data source connection information, the step of creating a new connection object is skipped and the connection object of the current database is continued to be used.

8. A visual modeling device based on a low-code platform, characterized in that: The device comprises a data source and application creation module (401), a modeling method display module (402), a modeling method determination module (403), a modeling script generation module (404) and a modeling script implementation module (405), wherein: The data source and application creation module (401) is used to create multiple data source connections and multiple applications on the application management platform, and bind each of the data sources to the corresponding application so that the database connected to each of the data sources can be used by the bound application; The modeling method display module (402) is used to provide multiple visual modeling methods for users to choose from on the application design platform based on each of the data sources, wherein the first method is to perform modeling by dragging and dropping front-end components in the form design, and the second method is to perform modeling by setting the table name and field information of the database table in the data center, and the first method and the second method are any two of the multiple visual modeling methods; The modeling method determination module (403) is used to determine the target modeling method confirmed by the user, and the target modeling method is any one of the multiple visual modeling methods; The modeling script generation module (404) is used to generate SQL modeling scripts corresponding to the databases connected to each of the data sources based on the target modeling method through a form storage engine, a metadata parsing engine, and an SQL assembler on the application design platform; The modeling script implementation module (405) is used to run the SQL modeling script corresponding to each of the databases to complete the modeling process of each of the databases.

9. An electronic device, characterized in that: The electronic device (500) comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.