Dynamic reverse modeling method and device in zero-code scene and electronic equipment

By obtaining the schema information of the front-end form, the binding methods for the target database table and service interface are generated, solving the problem of automatically generating data models and service interfaces in the no-code platform and realizing an efficient and intelligent reverse modeling process.

CN120892041APending Publication Date: 2025-11-04BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510828243.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

In a no-code platform, how can we automatically generate data models and service interfaces in form-driven business scenarios to reduce development costs and speed?

Method used

By obtaining the form structure schema information of the front-end form, extracting the form metadata, generating the target modeling statement according to the target database type, executing the modeling statement in the target database, generating the service interface, and binding it to the front-end form.

Benefits of technology

It achieves automatic mapping from front-end forms to target database tables, reducing development difficulty, improving the intelligence and efficiency of reverse modeling, ensuring consistency between the front-end and back-end, and avoiding repetitive operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892041A_ABST
    Figure CN120892041A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic reverse modeling method and device in a zero-code scene, electronic equipment and a readable storage medium, and relates to the technical field of artificial intelligence such as zero-code platforms, large models and agents. The dynamic reverse modeling method in the zero code scene comprises the following steps: acquiring form structure schema information of a front-end form; extracting table unit data from the table schema information, and obtaining a target modeling statement according to the table unit data and a target database type; executing the target modeling statement in a target database to obtain a target database table corresponding to the front-end form; and generating a service interface according to the table information of the target database table, and binding the service interface with the front-end form. According to the invention, the development difficulty can be reduced, and the intelligence and efficiency of reverse modeling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to the technical field of artificial intelligence such as zero-code platform, large model and intelligent agent. A dynamic reverse modeling method, device, electronic equipment and readable storage medium in a zero-code scenario are provided. BACKGROUND

[0002] Under the background of wide application of current zero-code platform, enterprises and individual developers hope to complete the construction of business systems at a lower cost and a faster speed. Especially in form-driven business (such as data entry, approval flow, information collection, etc.), forms are usually highly abstracted as data models. Therefore, how to automatically generate data models and service interfaces according to forms in a zero-code scenario becomes a technical problem to be solved. SUMMARY

[0003] According to a first aspect of the present disclosure, a dynamic reverse modeling method in a zero-code scenario is provided, comprising: obtaining form structure schema information of a front-end form; extracting form element data from the form schema information, obtaining a target modeling statement according to the form element data and a target database type; executing the target modeling statement in a target database to obtain a target database table corresponding to the front-end form; generating a service interface according to table information of the target database table, and binding the service interface with the front-end form.

[0004] According to a second aspect of the present disclosure, a dynamic reverse modeling device in a zero-code scenario is provided, comprising: an obtaining unit configured to obtain form structure schema information of a front-end form; a processing unit configured to extract form element data from the form schema information, and obtain a target modeling statement according to the form element data and a target database type; an executing unit configured to execute the target modeling statement in a target database to obtain a target database table corresponding to the front-end form; and a binding unit configured to generate a service interface according to table information of the target database table, and bind the service interface with the front-end form.

[0005] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.

[0006] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method as described above.

[0007] According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.

[0008] It should be understood that the details described in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0009] The accompanying drawings are used to better understand the present scheme and do not constitute a limitation on the present disclosure. Among them:

[0010] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure;

[0011] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure;

[0012] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure;

[0013] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure;

[0014] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure;

[0015] Figure 6 is a schematic diagram according to the sixth embodiment of the present disclosure;

[0016] Figure 7 is a schematic diagram according to the seventh embodiment of the present disclosure;

[0017] Figure 8 is a schematic diagram according to the eighth embodiment of the present disclosure;

[0018] Figure 9 is a block diagram of an electronic device for implementing the dynamic reverse modeling method in a zero-code scenario according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help in understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to be clear and concise, descriptions of well-known functions and mechanisms are omitted in the following description.

[0020] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. AsFigure 1 As shown, the dynamic reverse modeling method under the zero-code scenario of the embodiment specifically includes the following steps:

[0021] S101, obtaining form structure schema information of a front-end form;

[0022] S102, extracting form element data from the form schema information, and obtaining a target modeling statement according to the form element data and a target database type;

[0023] S103, executing the target modeling statement in the target database to obtain a target database table corresponding to the front-end form;

[0024] S104, generating a service interface according to table information of the target database table, and binding the service interface with the front-end form.

[0025] The dynamic reverse modeling method under the zero-code scenario of the embodiment can trigger a dynamic reverse modeling process after extracting form element data from form schema information of a front-end form, so as to obtain a target database table corresponding to the front-end form in a target database, and generate a service interface according to the obtained target database table, thereby achieving the purpose of automatically generating a target database table and a service interface of the back-end according to the front-end form, reducing the development difficulty, improving the intelligence of reverse modeling, and ensuring the consistency of the front-end form and the back-end database table, avoiding repeated operations of "front-end form configuration" and "back-end data modeling", and improving the efficiency of reverse modeling.

[0026] The dynamic reverse modeling method under the zero-code scenario in the embodiment can be implemented in a zero-code platform; wherein the zero-code platform is a development tool that can quickly build an application program without writing code, allowing non-technical personnel (such as business personnel and product managers) to independently complete application development, thereby greatly reducing the technical threshold and development cost.

[0027] In the embodiment, "reverse modeling" refers to a process of generating a database table (i.e., a data model corresponding to a form) and a service interface in the back-end according to a form configured in the front-end; wherein the form is an interface component for collecting, submitting or processing data input by a user.

[0028] Specifically, when the form schema information of the front-end form is acquired in S101, the implementation manner that can be adopted by the embodiment is as follows: determining form components included in the front-end form, the form components included in the front-end form can be obtained by real-time clicking or real-time dragging of the input end in the front-end page; acquiring the form schema information according to the determined form components; wherein the format of the form schema information acquired by the embodiment in S101 is JSON format.

[0029] That is to say, the embodiment acquires the form schema information according to the form components selected by the input end clicking or dragging, which can simplify the acquisition step of the form schema information and improve the acquisition efficiency of the form schema information.

[0030] The form schema information acquired by the embodiment in S101 includes form style information (for example, arrangement mode of form components in the form, style of the form components, etc.), form element data (for example, field name, data type, verification rule, whether to fill in, default value, component type, etc.), etc.

[0031] In the embodiment, the input end can complete the configuration of the front-end form by clicking or dragging the provided form components (for example, time component, telephone component, text component, etc.) in the zero-code designer provided by the zero-code platform; after the configuration of the front-end form is completed, the zero-code designer can generate the form schema information in JSON format in real time according to the front-end form configured by the input end.

[0032] After the form schema information is acquired in S101, the embodiment performs S102 to extract form element data from the form schema information, and obtains the target modeling statement according to the form element data and the target database type.

[0033] That is to say, after the front-end passes the acquired form schema information to the back-end, the back-end can trigger the “dynamic reverse modeling” process according to the received schema information.

[0034] When S102 is performed, the embodiment first extracts field name, data type, whether to fill in, component type, and other form element data from the form schema information, and then generates the target modeling statement according to the extracted form element data and the target database type; wherein the generated target modeling statement is an SQL (Structured Query Language) statement, for example, a DDL (Data Definition Language) statement.

[0035] Specifically, in the implementation of obtaining the target modeling statement according to the table unit data and the target database type in S102, the target database can be determined, and the database type corresponding to the determined target database can be obtained as the target database type; and the target modeling statement can be obtained according to the table unit data and the target database type.

[0036] In the implementation of determining the target database in S102, the identification information can be obtained first, and the database corresponding to the identification information (i.e., the pre-existing database) can be determined as the target database; wherein the identification information corresponding to different databases is unique.

[0037] In the implementation of determining the target database in S102, if there is no pre-set target database, the target database can be created in real time according to the deployment scenario, and the database type corresponding to the created target database can be obtained as the target database type; wherein different deployment scenarios correspond to different types of databases, such as Mysql database, Oracle database, Dream database, Redis database, etc.

[0038] That is, the target modeling statement obtained by the embodiment in the dynamic reverse modeling corresponds to the actual target database, so that the embodiment obtains the target modeling statement in combination with the obtained target database type, which can reduce the limitation on the used database, obtain the target modeling statement corresponding to any type of database, and improve the accuracy of the obtained target modeling statement and the flexibility of obtaining the target modeling statement.

[0039] In the implementation of obtaining the target modeling statement according to the table unit data and the target database type in S102, the table form structure information can be obtained according to the table unit data first, and then the obtained table form structure information can be mapped to the SQL statement corresponding to the target database type, so as to obtain the target modeling statement.

[0040] The target modeling statement obtained by the embodiment in S102 can be a SQL statement for creating a new database table in the target database (i.e., a data model corresponding to the front-end form), or a SQL statement for updating an existing database table in the target database, or a SQL statement for adding a correlation relationship to the database table.

[0041] It can be understood that, if the obtained target modeling statement is used to update the form, the embodiment can further obtain structure difference information according to the form element data of the front-end form and the form element data of the historical front-end form when S102 is performed, and then generate the target modeling statement according to the structure difference information and the target database type, so as to improve the accuracy of the obtained target modeling statement.

[0042] After the target modeling statement is obtained in S102, the embodiment performs S103 to execute the target modeling statement in the target database to obtain a target database table corresponding to the front-end form.

[0043] In the embodiment, if the target modeling statement is used to newly build the form, the target modeling statement includes an SQL statement (for example, CREATE TABLE) for building a table, and an SQL statement (for example, PRIMARYKEY, UNIQUE, NOT NULL, etc.) for establishing an index or a constraint.

[0044] If the target modeling statement is used to update the form, the target modeling statement includes an SQL statement for adding, deleting, or modifying a field in the database table, thereby supporting complex change logic such as field renaming and type changing.

[0045] If the target modeling statement is used to add an association relationship to the database table, the target modeling statement includes an SQL statement for generating an association relationship (for example, a field containing a word table, a one-to-many or many-to-many relationship) table, and an SQL statement for establishing a foreign key reference, a cascading update, or a deletion.

[0046] When S103 is performed, the obtained target modeling statement is executed in the target database, so that a target database table corresponding to the front-end form is obtained. The target database table can be a newly built database table in the target database, or a database table after an existing database table in the target database is updated, or a database table after an association relationship is added to the newly built database table or the updated database table.

[0047] After the target database table corresponding to the front-end form is obtained in S103, the embodiment performs S104 to generate a service interface according to table information of the target database table, and binds the service interface with the front-end form.

[0048] In the embodiment, the table information of the target database table includes table name information and field structure information.

[0049] The embodiment performs S104 to generate a service interface according to the table information of the target database table, specifically a CRUD interface in the RESTful (Representational State Transfer) style; the CRUD interface is a basic interface set for operating a database, and its name is derived from the English initial abbreviations of four core operations: Create (create), Read (read), Update (update), and Delete (delete); these interfaces constitute the basic add, delete, modify, and query functions of data in the database.

[0050] Specifically, after the service interface is generated in S104, the implementation manner that can be adopted when the service interface is bound to the front-end form is: writing the interface definition of the generated service interface into the form unit data; backfilling the form unit data with the written interface definition into the form schema information of the front-end form to complete the binding of the service interface and the front-end form.

[0051] That is, after the target database table is obtained in the target database, the embodiment generates a corresponding service interface according to the obtained target database table, and then binds the generated service interface to the front-end form to realize the query, addition, deletion, and other operations of the front-end form through the service interface bound to the front-end form.

[0052] The embodiment can automatically generate a database table and its corresponding service interface, avoiding modeling errors or interface missing problems caused by manual operation, thereby improving the overall performance.

[0053] After the service interface is bound to the front-end form in S104, the embodiment completes the "dynamic reverse modeling" process, that is, the purpose of generating a database table and a corresponding service interface in the back-end according to the front-end form configured in the front-end. The "dynamic reverse modeling" process only needs to be completed according to the front-end form configured in the front-end, and can effectively improve the accuracy and efficiency of reverse modeling.

[0054] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure. As shown in Figure 3 When performing S102 "obtaining a target modeling statement according to the form unit data and a target database type", the implementation manner that can be adopted by the embodiment is:

[0055] S201, generating a domain-specific language (DSL) statement according to the form unit data;

[0056] S202, obtaining the target modeling statement according to the DSL statement and the target database type.

[0057] That is, the embodiment first converts the table unit data into a corresponding DSL statement, and then obtains a target modeling statement according to the DSL statement obtained by conversion and the target database type. The embodiment can abstract the reverse modeling process to shield the influence of database differences by converting the table unit data into a DSL statement, thereby improving the accuracy of the obtained target modeling statement.

[0058] In the embodiment, DSL (Domain-Specific Language) is a computer language used in a specific application field, for example, the modeling field in the embodiment, which can provide more accurate abstraction and more efficient expression to describe the tasks and logic of the field.

[0059] The DSL statement generated by the embodiment in S201 includes entity names (i.e., database table names), field sets (e.g., database table field names, types, constraints, notes, etc.), table unit information (e.g., whether to include a primary key, whether to be unique, default value, etc.), and table relationship information (e.g., parent-child table, one-to-many, many-to-many, foreign key, etc.).

[0060] In the embodiment, the table unit data can be input into a pre-obtained converter when S201 is performed, and the DSL statement corresponding to the table unit data can be obtained according to the output result of the converter.

[0061] In the embodiment, the DSL statement and the target database type can be input into a large model when S202 is performed to obtain the target modeling statement according to the DSL statement and the target database type, and the target modeling statement can be obtained according to the output result of the large model. By using the large model, the embodiment can improve the accuracy and efficiency of obtaining the target modeling statement.

[0062] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure. As shown in Figure 3 As shown in the embodiment, after performing S104, the embodiment can further include the following content:

[0063] S301, generating a list page corresponding to the front-end form according to the form schema information of the front-end form and the service interface;

[0064] S302, in combination with the target database table, responding to the target operation of the input end on the front-end form in the list page.

[0065] That is, after the service interface is bound to the front-end form, the embodiment can generate a corresponding list page according to the form schema information of the front-end form and the bound service interface, and then combine the target database table in the target database to respond to the target operation of the front-end form in the list page by the input terminal, so as to realize the integrated closed-loop process of form design, data modeling, interface generation, page presentation and data interaction.

[0066] In the list page generated by the embodiment in S301, in addition to the form structure information corresponding to the front-end form, the function buttons corresponding to the service interface are also included, such as view button, edit button, add button, delete button, etc.

[0067] When the embodiment in S302 is executed, the target operation of the front-end form by the input terminal can be determined according to the function button triggered by the input terminal, for example, the target operation is to view the data in the corresponding database table when the input terminal triggers the view button, and the target operation is to edit the data in the corresponding database table when the input terminal triggers the edit button.

[0068] When the embodiment in S302 is executed, the target operation is responded to by combining the target database table, which can include writing the data submitted by the input terminal into the target database table in the back-end, or viewing the data in the target database table in the back-end, or adding a corresponding database table in the target database or editing an existing database table, etc.

[0069] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure. As Figure 4 As described in the foregoing, the embodiment shows a flowchart of dynamic reverse modeling (new form): S401, obtaining a front-end form; S402, obtaining form schema information according to the front-end form; S403, determining whether the target database exists, if it exists, executing S404, if it does not exist, creating the target database first and then executing S404; S404, obtaining the target modeling statement according to the form schema information and the database type of the target database; S405, executing the target modeling statement in the target database to create a data model, the data model created by the embodiment includes a data table and its corresponding comment table; S406, saving the front-end form and the front-end form view; S407, saving the page and the page view, the page in the embodiment is the list page generated according to the front-end form.

[0070] In other words, this embodiment can automatically build a data model in the target database based on the form schema information obtained from the front-end form, and can further generate corresponding pages based on the built data model, thereby facilitating the input end to operate on the corresponding front-end form, thus making up for the shortcomings of insufficient back-end modeling capabilities in the no-code platform and forming a complete "front-end form-driven back-end" generation capability.

[0071] Figure 5 This is a schematic diagram according to the fifth embodiment of this disclosure. (See diagram below.) Figure 5 As described above, this embodiment illustrates another flowchart of dynamic reverse modeling (updating a form): S501, obtain the form schema information of the current front-end form; S502, obtain the form schema information of the historical front-end form; S503, obtain the form structure update information based on the comparison result of the two form schema information; S504, perform dynamic reverse modeling based on the obtained form structure update information; S505, update the list page of the front-end form based on the modeling result.

[0072] Figure 6 This is a schematic diagram according to the sixth embodiment of the present disclosure. Figure 6 The diagram illustrates how to configure a front-end form based on form components. In this embodiment, the input device can configure the front-end form on the right by clicking or dragging the form components on the left. Figure 4 The front-end form includes five form components: "Asset Number", "Asset Name", "Specifications", "Unit Price", "Quantity" and "Remarks".

[0073] In other words, this embodiment allows users to configure the front-end form by dragging or selecting, and then build data models and service interfaces based on the configured front-end form. This significantly reduces the barrier to entry for non-developers and greatly enhances the usability and attractiveness of the low-code platform.

[0074] Figure 7 This is a schematic diagram according to the seventh embodiment of the present disclosure. Figure 7 The diagram shows a list page corresponding to the front-end form generated on the front end. In this embodiment, the input terminal can click on the "View", "Edit" or "Delete" buttons on the list page to view, edit or delete data in the target database table.

[0075] Figure 8 This is a schematic diagram according to the eighth embodiment of this disclosure. (See diagram below.) Figure 8 As shown, the dynamic reverse modeling device 800 in the no-code scenario of this embodiment includes:

[0076] The obtaining unit 801 is configured to obtain form schema information of a front-end form.

[0077] The processing unit 802 is configured to extract form element data from the form schema information, and obtain target modeling statements according to the form element data and a target database type.

[0078] The execution unit 803 is configured to execute the target modeling statements in the target database, and obtain a target database table corresponding to the front-end form.

[0079] The binding unit 804 is configured to generate a service interface according to table information of the target database table, and bind the service interface with the front-end form.

[0080] Specifically, when obtaining the form schema information of the front-end form, the obtaining unit 801 can adopt an implementation manner as follows: determining form components included in the front-end form, the form components included in the front-end form can be obtained by real-time clicking or real-time dragging of an input end in a front-end page; obtaining the form schema information according to the determined form components; and the form schema information obtained by the embodiment S101 is in a JSON format.

[0081] The form schema information obtained by the obtaining unit 801 includes form style information (for example, arrangement manners of form components in the form, styles of the form components, etc.), form element data (for example, field names, data types, verification rules, whether to be filled in, default values, component types, etc.), etc.

[0082] In this embodiment, the input end can complete configuration of the front-end form by clicking or dragging a provided form component (for example, a time component, a phone component, a text component, etc.) in a zero-code designer provided by a zero-code platform; after the configuration of the front-end form is completed, the zero-code designer can generate the form schema information in the JSON format in real time according to the front-end form configured by the input end.

[0083] After the form schema information is obtained by the obtaining unit 801, the processing unit 802 extracts form element data from the form schema information, and obtains target modeling statements according to the form element data and a target database type.

[0084] The processing unit 802 first extracts the field name, data type, whether mandatory, component type and other form element data from the form schema information, and then generates a target modeling statement according to the extracted form element data and the target database type; wherein the generated target modeling statement is an SQL (Structured Query Language) statement, for example, a DDL (Data Definition Language) statement.

[0085] Specifically, when the processing unit 802 obtains the target modeling statement according to the form element data and the target database type, the implementation manner can be: determining the target database, which can be pre-existing; obtaining the database type corresponding to the determined target database as the target database type; and obtaining the target modeling statement according to the form element data and the target database type.

[0086] When determining the target database, the processing unit 802 can first obtain the identification information, which can correspond to the input end or the user of the input end, and then take the database corresponding to the identification information (i.e., the pre-existing database) as the target database; wherein the identification information corresponding to different databases is unique.

[0087] When determining the target database, if there is no pre-set target database, the processing unit 802 can also create the target database in real time according to the deployment scenario, and obtain the database type corresponding to the created target database as the target database type; wherein different deployment scenarios correspond to different types of databases, such as Mysql database, Oracle database, Dream database, Redis database, etc.

[0088] That is, the target modeling statement obtained by the processing unit 802 during dynamic reverse modeling corresponds to the target database actually used, so that the embodiment obtains the target modeling statement in combination with the obtained target database type, which can reduce the limitation on the used database, obtain the target modeling statement corresponding to any type of database, and improve the accuracy of the obtained target modeling statement and the flexibility of obtaining the target modeling statement.

[0089] When the processing unit 802 obtains the target modeling statement according to the form element data and the target database type, it can first obtain the form structure information according to the form element data, and then map the obtained form structure information to the SQL statement corresponding to the target database type, thereby obtaining the target modeling statement.

[0090] The target modeling statement obtained by the processing unit 802 can be an SQL statement for creating a new database table in the target database (i.e., a data model corresponding to the front-end form), an SQL statement for updating an existing database table in the target database, or an SQL statement for adding a relationship to a database table.

[0091] It can be understood that, if the obtained target modeling statement is used to update the form, the processing unit 802 can further obtain structural difference information according to the form element data of the front-end form and the form element data of the historical front-end form, and then generate the target modeling statement according to the structural difference information and the target database type, so as to improve the accuracy of the obtained target modeling statement.

[0092] The processing unit 802 can also use the following implementation manner to obtain the target modeling statement according to the form element data and the target database type: generating a domain-specific language (DSL) statement according to the form element data; and obtaining the target modeling statement according to the DSL statement and the target database type.

[0093] That is, the processing unit 802 first converts the form element data into a corresponding DSL statement, and then obtains the target modeling statement according to the converted DSL statement and the target database type. The processing unit 802 can abstract the reverse modeling process by converting the form element data into a DSL statement, so as to shield the influence of database differences, and improve the accuracy of the obtained target modeling statement.

[0094] In this embodiment, the DSL (Domain-Specific Language) is a computer language used in a specific application field, for example, the modeling field in this embodiment, which can provide more accurate abstraction and more efficient expression to describe the tasks and logic of the field.

[0095] The DSL statement generated by the processing unit 802 includes an entity name (i.e., a database table name), a field set (e.g., a database table field name, a type, a constraint, a note, etc.), form element information (e.g., whether to include a primary key, whether to be unique, a default value, etc.), and table relationship information (e.g., parent-child tables, one-to-many, many-to-many, foreign keys, etc.).

[0096] The processing unit 802 can input the form element data into a pre-obtained converter, and obtain a DSL statement corresponding to the form element data according to an output result of the converter.

[0097] The processing unit 802 inputs the DSL statement and the target database type into the large model to obtain the target modeling statement according to an output result of the large model when obtaining the target modeling statement according to the DSL statement and the target database type.

[0098] The execution unit 803 executes the target modeling statement in the target database to obtain the target database table corresponding to the front-end form after the processing unit 802 obtains the target modeling statement.

[0099] In the embodiment, if the target modeling statement is used for creating a form, the target modeling statement includes a SQL statement (for example, CREATE TABLE) used for creating a table and a SQL statement (for example, PRIMARY KEY, UNIQUE, NOT NULL, etc.) used for establishing an index or a constraint.

[0100] If the target modeling statement is used for updating a form, the target modeling statement includes a SQL statement used for adding, deleting, or modifying a field in a database table, thereby supporting complex change logic such as field renaming and type changing.

[0101] If the target modeling statement is used for adding a correlation relationship to a database table, the target modeling statement includes a SQL statement used for generating a correlation relationship (for example, a field containing a word table, a one-to-many or many-to-many relationship) table and a SQL statement used for establishing a foreign key reference, a cascading update, or a deletion.

[0102] The execution unit 803 executes the obtained target modeling statement in the target database to obtain the target database table corresponding to the front-end form. The target database table can be a newly created database table in the target database, a database table after updating an existing database table in the target database, or a database table after adding a correlation relationship to the newly created database table or the updated database table.

[0103] The binding unit 804 generates a service interface according to table information of the target database table and binds the service interface to the front-end form after the execution unit 803 obtains the target database table corresponding to the front-end form.

[0104] In the embodiment, the table information of the target database table includes table name information and field structure information.

[0105] The binding unit 804 generates a service interface according to the table information of the target database table, specifically a RESTful (Representational State Transfer) style CRUD interface. The CRUD interface is a basic interface set for operating a database, and its name is derived from the initials of the four core operations: Create, Read, Update, and Delete. These interfaces constitute the basic add, delete, modify, and query functions of data in the database.

[0106] Specifically, when the binding unit 804 binds the service interface with the front-end form after generating the service interface, the implementation can be as follows: writing the interface definition of the generated service interface into the form unit data; and backfilling the form unit data with the written interface definition into the form schema information of the front-end form to complete the binding of the service interface and the front-end form.

[0107] That is, after obtaining the target database table in the target database, the binding unit 804 generates a corresponding service interface according to the obtained target database table, and then binds the generated service interface with the front-end form to enable the front-end to query, add, delete, and perform other operations on the front-end form through the service interface bound with the front-end form.

[0108] The embodiment can automatically generate a database table and its corresponding service interface, avoiding modeling errors or interface missing problems caused by manual operations, thereby improving the overall performance.

[0109] After the binding unit 804 binds the service interface with the front-end form, the "dynamic reverse modeling" process is completed, that is, the purpose of generating a database table and a corresponding service interface on the back-end according to the front-end form configured on the front-end. The "dynamic reverse modeling" process only needs to be completed according to the front-end form configured on the front-end, which can effectively improve the accuracy and efficiency of reverse modeling.

[0110] After the binding unit 804 binds the service interface with the front-end form, it can also include the following content: generating a list page corresponding to the front-end form according to the form schema information of the front-end form and the service interface; and in combination with the target database table, responding to the target operation of the front-end form in the list page by the input end.

[0111] That is, the binding unit 804 can generate a corresponding list page according to the form schema information of the front-end form and the bound service interface after completing the binding of the service interface and the front-end form, and then combine the target database table in the target database to respond to the target operation of the input end on the front-end form in the list page, so as to realize the integrated closed-loop process of form design, data modeling, interface generation, page presentation and data interaction.

[0112] In the list page generated by the binding unit 804, in addition to the form structure information corresponding to the front-end form, there are also function buttons corresponding to the service interface, such as view button, edit button, add button, delete button, etc.

[0113] The binding unit 804 can determine the target operation of the input end on the front-end form according to the function button triggered by the input end, for example, the input end triggers the view button, and the target operation is to view the data in the corresponding database table, for example, the input end triggers the edit button, and the target operation is to edit the data in the corresponding database table.

[0114] The binding unit 804 responds to the target operation in combination with the target database table, which can include writing the data submitted by the input end into the target database table in the back end, can also be viewing the data in the target database table in the back end, and can also include adding a corresponding database table in the target database or editing an existing database table.

[0115] In the technical solution of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0116] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0117] As shown in Figure 9 , it is a block diagram of an electronic device according to the dynamic reverse modeling method in the zero-code scenario of the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0118] As shown in Figure 9As shown, the device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0119] A plurality of components in the device 900 are connected to the I / O interface 905, including an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; the storage unit 908 such as a magnetic disk, an optical disk, and the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0120] The computing unit 901 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 901 performs various methods and processes described above, such as the dynamic reverse modeling method in the zero-code scenario. For example, in some embodiments, the dynamic reverse modeling method in the zero-code scenario can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 908.

[0121] In some embodiments, part or all of the computer program can be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the dynamic reverse modeling method in the zero-code scenario described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the dynamic reverse modeling method in the zero-code scenario by any other appropriate means, such as by means of firmware.

[0122] Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0123] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable computing device or system to produce a machine, so that the program code, when executed by the processor or controller, implements the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0124] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0125] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0126] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0127] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The server can also be a server of a distributed system, or a server combined with a blockchain.

[0128] It should be understood that various forms of flow shown above can be used with orders of steps reordered, added to, or deleted from. For example, each step described in the present disclosure can be executed in parallel, in sequence, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.

[0129] The above detailed description does not limit the scope of the disclosure. Various modifications, combinations, sub-combinations and alternatives can be made to the detailed description. Any modification, equivalent replacement and improvement etc. made within the spirit and principle of the disclosure shall be included in the scope of the disclosure.

Claims

1. A dynamic reverse modeling method for zero-code scenarios, comprising: Obtain the form structure schema information of the front-end form; Extract form metadata from the form schema information, and obtain the target modeling statement based on the form metadata and the target database type; Execute the target modeling statement in the target database to obtain the target database table corresponding to the front-end form; A service interface is generated based on the table information of the target database table, and the service interface is bound to the front-end form.

2. The method according to claim 1, wherein, The process of obtaining the form structure schema information of the front-end form includes: Determine the form components included in the front-end form; Based on the form component, obtain the form schema information.

3. The method according to claim 1, wherein, The step of obtaining the target modeling statement based on the form metadata and the target database type includes: Identify the target database; Obtain the database type corresponding to the target database, and use it as the target database type; The target modeling statement is obtained based on the form metadata and the target database type.

4. The method according to claim 3, wherein, The determination of the target database includes: The target database is created in real time according to the deployment scenario; Obtain the database type corresponding to the created target database, and use it as the target database type.

5. The method according to claim 3, wherein, The determination of the target database includes: Obtain identification information; The database corresponding to the identification information is used as the target database.

6. The method according to claim 1, wherein, The step of obtaining the target modeling statement based on the form metadata and the target database type includes: Based on the form metadata, generate domain-specific language (DSL) statements; The target modeling statement is obtained based on the DSL statement and the target database type.

7. The method according to claim 6, wherein, The step of obtaining the target modeling statement based on the DSL statement and the target database type includes: Input the DSL statement and the target database type into the large model; Based on the output of the large model, the target modeling statement is obtained.

8. The method according to claim 1, wherein, The step of obtaining the target modeling statement based on the form metadata and the target database type includes: Based on the form metadata of the front-end form and the form metadata of the historical front-end forms, obtain structural difference information; Based on the structural difference information and the target database type, the target modeling statement is obtained.

9. The method according to claim 1, wherein, Binding the service interface to the front-end form includes: Write the interface definition of the service interface into the form metadata; The form metadata defined in the interface is written back into the form schema information to complete the binding between the service interface and the front-end form.

10. The method according to claim 1, further comprising: After binding the service interface to the front-end form, a list page corresponding to the front-end form is generated based on the form schema information of the front-end form and the service interface. Based on the target database table, respond to the target operation performed by the input terminal on the front-end form in the list page.

11. The method according to claim 1, wherein, Obtaining the front-end form includes: Get the form component selected in real time by the input terminal on the front-end page; Configure the form using the obtained form component, and obtain the front-end form based on the configuration result.

12. A dynamic reverse modeling device for no-code scenarios, comprising: The retrieval unit is used to retrieve the form structure schema information of the front-end form; The processing unit is used to extract form metadata from the form schema information and obtain the target modeling statement based on the form metadata and the target database type; An execution unit is used to execute the target modeling statement in the target database to obtain a target database table corresponding to the front-end form; The binding unit is used to generate a service interface based on the table information of the target database table, and bind the service interface to the front-end form.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-11.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.