Method, device and equipment for generating database, medium and program product
By combining machine learning models and a database engine into the user's interactive page, a database is generated and displayed, solving the problem that users cannot intuitively view and execute complex code to generate databases. This achieves efficient and visual database generation and modification, improving the user experience.
Patent Information
- Application Number
- CN202510943736.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-28
AI Technical Summary
In existing technologies, users cannot intuitively view the visual effects of the database, and complex code needs to be executed on the user's device to generate the database, resulting in low efficiency and high technical barriers.
By receiving user input through the user device's interactive page, combining machine learning models and a database engine, a database is generated and displayed, allowing users to visually modify the database tables on the interface, thus reducing the configuration requirements for user devices.
It improves the efficiency of database generation and user experience, reduces the requirements for user devices, and enables one-click generation and real-time preview of customized databases.
Smart Images

Figure CN120848867A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of computers, and more specifically to methods, apparatus, devices, computer-readable storage media, and computer program products for generating databases. Background Technology
[0002] Currently, machine learning models (such as large language models) are developing rapidly, continuously breaking boundaries in the process of technological iteration. Machine learning technology, with language models as a typical example, relies on large-scale datasets for training and deep neural network architectures to form strong language understanding and generation capabilities. It can not only accurately comprehend complex human natural language instructions, but also efficiently produce diverse results according to needs. From writing logically rigorous code to creating presentation files with both text and graphics, and writing clearly structured documents, machine learning models are building a multi-dimensional cognitive system spanning language, vision, and logic.
[0003] These technologies have profoundly impacted human lifestyles and work patterns. For example, in daily office settings, employees can use models to quickly complete complex document writing and data processing tasks, freeing up time for other tasks. In scientific research, models can assist in literature reviews and data simulations, accelerating research progress. Machine learning models can improve productivity and drive various industries towards intelligent and efficient development. Summary of the Invention
[0004] According to exemplary embodiments of this disclosure, a method, apparatus, device, computer storage medium, and computer program product for generating a database are provided.
[0005] In a first aspect of this disclosure, a method for generating a database is provided, the method comprising receiving user input for generating the database. The method further comprises obtaining code for a target database, the code of which is generated by a target model based on the user input. The method further comprises displaying data tables of the target database on an interface, the target database being generated by a database engine executing code. The method further comprises, in response to receiving adjustments to the data tables, displaying updated data tables on the interface according to the adjustments.
[0006] In a second aspect of this disclosure, an apparatus for generating a database is provided. The apparatus includes a receiving module configured to receive user input for generating the database. The apparatus also includes a code acquisition module configured to acquire code for a target database, the code of which is generated by a target model based on the user input. The apparatus further includes a display module configured to display data tables of the target database on an interface, the target database being generated by a database engine executing code. The apparatus also includes an adjustment module configured to, in response to receiving adjustments for the data tables, display updated data tables on the interface based on the adjustments.
[0007] In a third aspect of this disclosure, an electronic device is provided, comprising: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method described in the first aspect of this disclosure when executed by the at least one processing unit.
[0008] In a fourth aspect of this disclosure, a computer-readable storage medium is provided having machine-executable instructions stored thereon, which, when executed by a device, cause the device to perform the method described in the first aspect of this disclosure.
[0009] In a fifth aspect of this disclosure, a computer program product is provided, including computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method described in the first aspect of this disclosure.
[0010] The summary section is provided to introduce a series of concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or essential features of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0012] Figure 2 A flowchart of a method for generating a database according to an embodiment of the present disclosure is shown;
[0013] Figure 3A A schematic diagram of a database generation pattern according to an embodiment of the present disclosure is shown;
[0014] Figure 3B A schematic diagram of a mode according to an embodiment of the present disclosure is shown;
[0015] Figure 4 A schematic diagram of an editable data table according to an embodiment of the present disclosure is shown;
[0016] Figure 5A A schematic diagram of filtered data recording according to an embodiment of the present disclosure is shown;
[0017] Figures 5B-5E An interface diagram of intelligent filtering according to an embodiment of the present disclosure is shown;
[0018] Figure 6A schematic diagram illustrating the classification of user intents according to embodiments of the present disclosure is shown;
[0019] Figure 7A A schematic diagram of data entry according to an embodiment of the present disclosure is shown;
[0020] Figure 7B A diagram illustrating the effect of inputting data according to an embodiment of the present disclosure is shown;
[0021] Figure 8 A schematic block diagram of an example apparatus according to some embodiments of the present disclosure is shown;
[0022] Figure 9 A block diagram of an example device that can be used to implement embodiments of the present disclosure is shown.
[0023] In all the accompanying figures, the same or similar reference numerals denote the same or similar elements. Detailed Implementation
[0024] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information. It is understood that before using the technical solutions disclosed in the embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0025] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message. As an optional but non-limiting implementation, the prompt message can be sent to the user in the form of a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0026] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0028] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects unless explicitly stated. Other explicit and implicit definitions may also be included below.
[0029] In related technologies, users can use applications on their devices (such as browsers) to call machine learning models to generate database code. However, users can only see the content of the code and cannot see the visual effect of the database. For users with lower technical skills, it is impossible to know whether the database meets their expectations. This results in a poor user experience and low database generation efficiency. Furthermore, users need to copy the code and execute it on their devices to generate the database, which poses a high technical threshold for users and places high demands on user devices.
[0030] To address this issue, this disclosure proposes a method for generating databases. This method receives user input on an interactive page of a user device and combines a machine learning model with a database engine to generate and display a database that matches the user input. Users can generate and preview customized databases with a single click without switching to other pages, accessing the user device's database engine, or configuring the database engine on the user device. Furthermore, users can visually modify the database tables using the interface. This significantly improves database generation efficiency and user experience while reducing the requirements for user devices.
[0031] The embodiments of this disclosure will now be described in further detail with reference to the accompanying drawings, wherein... Figure 1A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. Example environment 100 includes an application 110 on a user device and a server 120. Server 120 may be deployed with target models (e.g., language models), which are trained models capable of generating corresponding content based on user requests. In some embodiments, the user device and server 120 communicate via a network 130. Network 130 may include a wired network, a wireless network, or a combination thereof, for providing communication between the user device and server 120. In some embodiments, the user device may be connected to server 120 via a data cable; the present disclosure does not limit the connection method between the user device and server 120. In this embodiment, the methods of embodiments of the present disclosure are executed by application 110.
[0032] like Figure 1 As shown, in application 110, a user can communicate with a language model deployed on server 120. In some embodiments, the user can provide user input 112, "Write a database for management tasks," in application 110. Upon receiving user input 112, application 110 transmits it to server 120. Upon receiving the request, server 120 initiates a workflow using its internally deployed target model. Based on its powerful algorithms and training results, it performs deep semantic analysis and logical processing on the user input, thereby generating code 122 for the target database 132. This code 122 records the complete architecture and complex logic of the database, covering key elements such as database table structure design, field definitions, and relationships. In some embodiments, application 110 obtains the code 122 of the target database 132, which is generated by the target model of server 120 based on user input. For example, application 110 can display code 122 in the user's interactive interface for the user to copy at any time. In some embodiments, the user can use code 122 to compile and build the target database 132.
[0033] In some embodiments, application 110 displays data tables 126 of target database 132, which is generated by database engine 124 executing code. Server 120 also retains this code 122 and executes it via database engine 124 at server 120, thereby generating target database 132 on server 120. Target database 132 includes one or more data tables, the specific number of which needs to be determined based on the actual situation. In some embodiments, server 120 can use a table rendering application to visualize data tables 126 of target database 132 to obtain code for displaying data tables 126. In some embodiments, this process transforms complex data structures into easily understandable visual code, which is then transmitted to the user device. Based on the received visual code, the user device renders data tables 126 in application 110 using a rendering framework. In this process, the user does not need to execute complex code 122 on their own device; they can directly view data tables 126 of target database 132 simply through the interface of application 110. If users have any suggestions for modifying the generated target database, they can continue to provide these suggestions through the dialog interface in application 110 and view the visual effects of the modified target database. This can improve the user experience and the efficiency of generating the target database.
[0034] In some embodiments, application 110 generates a detailed and intuitive response 114 to user input 112. This response 114 includes a data table management panel on the left and a display panel on the right. In some embodiments, the data table management panel lists one or more data tables included in the target database 132, such as task data table 128, allowing users to quickly locate and manage different data tables. In some embodiments, the display panel includes a control area 116 and a content area. In some embodiments, the control area 116 integrates rich interactive components for data tables, including a filter setting component to help users quickly filter data that meets specific conditions, a query component to support users in performing complex queries to obtain the required data, and a sorting component to sort and display data according to user-defined rules. In some embodiments, the content area displays the content of the currently displayed data table (e.g., task data table 128). For example, data table 128 may include four fields: "ID", "Name", "Completion Status", and "Description". Figure 1 In the table, data table 126 shows two data records: one with ID 01, name "Household Chores", "Completed" is "No", and description is "Sweeping the Floor"; and the other with ID 02, name "Dinner Party", "Completed" is "No", and description is "With Classmate A".
[0035] In addition, users can adopt other forms of interaction design besides response 114. For example, users can enter instructions through the input box at the bottom instead of using the interactive components provided in control area 116. In some embodiments, this instruction is a filtering instruction, which is sent to server 120 for intent parsing and generates filtered data records based on the filtering instruction and the content of data table 126. The filtered data records are processed using a table rendering application to obtain content codes and sent to the user device. Application 110 can receive the content codes and render them to generate a new response that can indicate the filtered data records. In some embodiments, the new response can take the form of response 114, displaying the filtered data records in the content area of the right-hand display bar. Additionally, the filtering instructions can be displayed in control area 116 of the right-hand display bar. In some embodiments, users can adjust the data records in data table 126 in the interface. For example, a user can double-click the "Household Chores" cell, which displays an input box. The user can enter edit content and modify the value of the cell. After the user confirms, the updated data table is displayed. Users can use the model to generate a visual database and adjust the database through a visual interface, which can improve processing efficiency and enhance user experience.
[0036] In this embodiment, the database generation process is optimized through a collaborative architecture between the user device application and the server. After the user inputs their requirements in the application, the application transmits the request to the server. The server generates database code based on a pre-trained language model and executes the code using a built-in database engine to generate the target database. The server further uses a table rendering application to visualize the data tables and transmits the rendering code to the user device, allowing the application to directly display the data table content. Throughout the process, the user does not need to deploy a database engine or execute code locally; they can complete database requirement input, real-time preview, and modification feedback through the application's interactive interface. Application 110 exemplarily adopts a left-right split-column response layout. The left-side data table management column supports switching between multiple tables, while the right-side display column integrates interactive components such as filtering, querying, and sorting, enabling users to intuitively operate and view a visual database containing field structures and data records. This solution reduces the configuration requirements of user devices through the computing power of cloud-based models and engines, improves database generation efficiency and user experience with a one-click generation and real-time preview mechanism, and lowers the technical barrier to entry through a visual interactive interface.
[0037] Network 130 has a theoretical bandwidth, which refers to the maximum transmission speed supported by network 130. It represents the maximum amount of data network 130 can transmit under ideal conditions, typically measured in bits per second (bps). For example, if the theoretical bandwidth of network 130 is 100Mbps, it means that under ideal conditions it can transmit 100 megabits of data per second. However, in reality, due to other factors that may exist in the network (e.g., signal interference, bandwidth sharing, transmission delay, etc.), the actual transmission speed may not reach 100Mbps.
[0038] As understood by those skilled in the art, an instance of server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Servers can be connected directly or indirectly via wired or wireless communication, and this application does not impose any limitations on this.
[0039] The user device can be any type of mobile computing device, including mobile computers (e.g., personal digital assistants, laptops, notebooks, tablets, netbooks, etc.), mobile phones (e.g., cellular phones, smartphones, etc.), wearable computing devices (e.g., smartwatches, head-mounted devices, including smart glasses, etc.) or other types of mobile devices. In some embodiments, the user device can also be a fixed computing device, such as a desktop computer, game console, smart TV, etc. It should be understood that, if the user device has sufficient computing power, the user device can perform the above operations in place of the server 120, or the user device and the server 120 can jointly perform the above operations.
[0040] It should be understood that the architecture and functionality in example environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Embodiments of this disclosure can also be applied to other environments with different structures and / or functionalities.
[0041] The processes according to embodiments of this disclosure will be described in detail below with reference to other accompanying drawings. For ease of understanding, the specific data mentioned in the following description are exemplary and not intended to limit the scope of this disclosure. It will be understood that the embodiments described below may also include additional actions not shown and / or actions shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0042] Figure 2A flowchart of a method 200 for generating a database according to certain embodiments of the present disclosure is shown. In this embodiment, the method may be executed by an application 110 on a user device. In block 202, user input for generating the database is received. User input is an instruction or requirement submitted by the user to the application, specifying the type and function of the database to be generated. It may take the form of a text description, voice command, etc. The target model is a machine learning model, such as a language model, deployed on a server and trained on a large amount of data. It can understand the semantics of the user input and generate target database code that meets the user's needs based on specific algorithms and training rules. For example, a user opens application 110 on a user device (such as a personal computer) and enters "Create a database for managing tasks, including task name, task description, task deadline, and task manager fields" through a text box in the interactive interface provided by application 110. In some embodiments, after receiving the text information, the input processing module inside application 110 performs preliminary format verification and encoding conversion to ensure that the information can be transmitted accurately.
[0043] In box 204, the code for the target database is obtained. This code is generated by the target model based on user input. The target database code, generated by the target model, is used to construct the target database and encompasses core elements such as table structure definitions, field type settings, data constraints, and inter-table relationships. The code format can be, for example, SQL statements or scripting languages related to NoSQL databases. For instance, application 110 sends the processed user input to the server via a network communication module. Upon receiving the request, the server starts the target model deployed on it (e.g., a language model trained based on a transformer architecture). In some embodiments, the target model first performs natural language processing operations on the user input, such as word segmentation, part-of-speech tagging, and semantic parsing, to understand the user's specific database requirements. In some embodiments, the target model generates the target database code based on predefined code generation templates and algorithm rules, combined with its learned database construction knowledge. The generated code, after syntax checking and optimization, is returned to application 110.
[0044] In box 206, the target database's data tables are displayed on the interface. The target database is generated by the database engine executing code. The database engine is a software component responsible for executing the target database code, creating, managing, and maintaining the database. It translates code into the actual database storage structure and data operations, supporting data storage, querying, updating, and deleting operations, ensuring efficient database operation and data integrity. A data table is the basic structural unit in a database used to store data, organized in rows and columns. Each row represents a data record, and each column represents a data field used to store specific types of data, such as text, numbers, and dates.
[0045] For example, after receiving the code, the server-side database engine parses it according to SQL syntax rules and creates a data table named "tasks" on the server's storage device. In some embodiments, the database engine allocates corresponding storage formats and space based on the field definitions in the code. For example, it allocates storage space for the "ID" field as an integer type and sets auto-increment and primary key constraints. For example, it allocates storage space for the "task_name" field as a variable-length string type and sets non-null constraints, etc. In some embodiments, after creation, the database engine transmits the structure and initial state information of the data table to the server-side table rendering application to obtain the content code. This content code is returned to application 110. After receiving the content code, application 110 displays the data table in an intuitive tabular form on the interface. The user can clearly see the data table structure containing column headers for "ID", "task_name", "task_description", "task_due_date", and "task_owner". At this time, there are no actual data records in the data table. The user can add specific task data to the data table later through the application. The code for this interface can be preset in the user's device. After the user's device receives the relevant data of the data table, it visualizes the data table by recognizing keywords. In other embodiments, the code for the interface can be generated from the model and compiled and rendered on the user device.
[0046] In box 208, in response to receiving adjustments to the data table, the updated data table is displayed on the interface based on the adjustments. The adjustments include modifying the content of the data table, such as adjusting the value of a specific item in a data record, adjusting the name of the data table, etc. In some embodiments, this can be accomplished using interactive components on the interface, such as input boxes or selectors. In this operation, based on the interface generated in the above operations, the user can visually adjust the data table. In some embodiments, the adjustments can be cached locally for real-time display of the updated data table, and then sent to the server for synchronization with the target database to keep the target database up-to-date.
[0047] According to the method of embodiments of this disclosure, user input is received on the interactive page of the user device, and a machine learning model and a database engine are combined to generate and display a database that matches the user input. The user does not need to switch to other pages, call the database engine of the user device, or configure the database engine of the user device. The user can generate and preview a customized database with one click, and can also use the interface to visually modify the data tables of the database. This greatly improves the database generation efficiency and user experience, and reduces the requirements for the user device.
[0048] While current language models can generate database code, the generated code is often of low quality due to limited model performance and a coarse processing flow. This disclosure also provides embodiments for generating high-quality database code. In some embodiments, a schema of the target database is obtained, wherein the schema is generated by the target model based on user input. The schema includes table structures and table relationships. The table structure includes table names, field names, and field value types for the data tables in the target database. The schema of the target database is an abstract description of the target database structure, defining how the data in the database is organized and stored. It is like a blueprint for the database, detailing the various components of the database and their interrelationships, including two main parts: table structure and table relationships. The table structure specifies the core elements of the data tables, while the table relationships clarify the association rules between different data tables, ensuring data consistency and integrity.
[0049] Table structure refers to the specific design specifications of a data table, containing three key elements: table name, field names, and field value types. The table name uniquely identifies the data table; field names identify each column in the table, corresponding to a specific type of data; and field value types define the data types that can be stored in that field, such as integers, strings, and dates, ensuring the standardization and validity of data storage. Table relationships describe the types of relationships between different data tables; for example, relationships can be one-to-one, one-to-many, or many-to-many. By establishing table relationships, data association queries and integration can be achieved, improving data utilization and management efficiency.
[0050] For example, if a user wants to create a task management database, the target model performs intent analysis on the user input, identifying the table structure and table relationships involved in the user's requirements. Then, the target model generates the schema of the target database based on this information. As an example, the table structure in the schema can include a task table and a user table. For example, the task table might be named "tasks," with fields including "task_ID" (integer, serving as a unique identifier for the task), "task_name" (string), "task_description" (text), "task_status" (string, such as "not started," "in progress," "completed"), "due_date" (date), and "assignee_ID" (integer, used to associate with the user ID in the user table). Similarly, the user table might be named "users," with fields including "user_ID" (integer, serving as a unique identifier for the user), "user_name" (string), and "user_email" (string). In some embodiments, the task table and the user table are determined to have a many-to-one relationship, that is, multiple tasks can be handled by the same user, and a user can be responsible for multiple tasks.
[0051] In some embodiments, the code of the target database is obtained, wherein the code of the target database is generated by the target model based on a schema. After generating the schema, the target model can further generate the code of the target database based on the schema. For example, the user table and task table are created separately using the CREATE TABLE statement, defining the fields and constraints of each table. Another example is using the FOREIGN KEY keyword to establish a foreign key relationship between the task table and the user table, implementing the table relationship settings and ensuring data integrity and consistency.
[0052] Figure 3A A schematic diagram of a database generation pattern according to embodiments of the present disclosure is shown. The following operations can be implemented by the server calling a language model. At 302, the user intent is determined based on the user input. In some embodiments, the language model can use a word segmentation algorithm to split the user input text according to word boundaries, and use part-of-speech tagging technology to label each word with its corresponding part-of-speech category. In some embodiments, the language model can further utilize named entity recognition technology to extract key entity words in the text. In some embodiments, the language model can combine a pre-trained semantic understanding model and contextual analysis to infer the core intent expressed by the user input, transforming natural language expressions into structured intent information that can be understood by computers.
[0053] At position 304, database entities are identified based on user intent, and the relationships between these entities are analyzed. A database entity is a thing or concept within the database that has independent meaning and clearly defined attributes; it is the basic unit for storing and managing data. Each database entity represents a type of object or concept in the real world, possessing its own unique set of attributes used to describe its various characteristics and states. For example, "task" and "user" in the above embodiment are database entities. Relationships between database entities are connections between different database entities, such as one-to-one, one-to-many, and many-to-many relationships, used to define association rules between database tables to ensure data consistency and integrity. Taking the user's expectation to create an employee attendance management database as an example, the language model further analyzes and determines the database entities as "employee" and "attendance record" based on the identified user intent. For example, the "employee" entity has attributes such as "employee name," and the "attendance record" entity has attributes such as "attendance date" and "attendance status." For example, the target model can identify a one-to-many relationship between "employees" and "attendance records," meaning that one employee corresponds to multiple attendance records, while one attendance record corresponds to only one employee.
[0054] At point 306, based on the user intent, the identified database entities, and the relationships between them, the database fields and their value types are inferred. For example, for the "Employee" entity, the fields "Employee ID" (integer value type, used as a unique identifier) and "Employee Name" (string value type) are inferred. For the "Attendance Record" entity, the fields "Attendance ID" (integer value type, used as a unique identifier), "Attendance Date" (date value type), "Attendance Status" (string value type, such as "Normal," "Late," "Early Departure," etc.), and "Employee ID" (integer value type, used to associate with the "Employee" entity) are inferred.
[0055] At point 308, the schema document for the database is generated. The schema document is a document indicating the schema of the target database, comprehensively covering the database's table structure (including table names, field names, field types, field constraints, and other detailed information) and table relationships (the association methods between entities and foreign key constraints, etc.). In some embodiments, JSON is used to generate the schema document for the target database. In some embodiments, SQL is used to generate the schema document for the target database. At point 310, the database code is generated based on the schema document. The server can call the target model and generate complete database code based on the schema document.
[0056] Figure 3BA schematic diagram of a pattern according to an embodiment of the present disclosure is shown. In this embodiment, after the user provides user input, application 110 uses a rendering framework to dynamically render database code and card component 320, which reflects the pattern of the target database as an intermediate result in generating the target database. Figure 3B As shown, one card component 320 can correspond to one data table, such as a task data table. The database schema can be reflected in one or more card components according to actual needs. On card component 320, the table name 322 of the task data table is "Task," and the description 324 of the task data table is "To-do Task Data Table." Below card component 320, there are also the field names of the task data table, the field value type of each field, and the description of each field.
[0057] In some embodiments, the card component 320 receives edited content from user interaction with the card component, where the edited content indicates a modification to the mode. In some embodiments, to implement the interactive editing function based on the card component 320, the application 110 uses an event listener mechanism to capture user operations. When the user double-clicks the corresponding component in the card component 320, an input box is provided. The user can enter edited content in this input box. For example, changing the field "Name" to "Task Name", and changing the description of the field "Completed?" to "Has the task been completed?". In some embodiments, the edited card component 320 is presented according to the edited content. For example, after the user enters edited content, clicking any area outside the component, the application can determine that the user has confirmed the modification and present the edited card component 320 according to the edited content. In some embodiments, after the input box gains focus, the user can enter edited content. The input box uses debouncing or throttling technology to avoid frequent triggering of data update operations and improve performance. In some embodiments, regarding data transmission, after the user enters edited content, the application 110 does not immediately send a request to the server, but first caches the edited data locally. When a user clicks on any area outside the component, application 110 captures the action, determines that the user has confirmed the modification, and sends the edited content to the server. After receiving the data, the server verifies and parses it, updates the locally stored database schema data, and returns the updated schema data to application 110. After receiving the new data, application 110 re-renders the card component 320, presenting the edited card component 320 to ensure consistency between the interface display and the actual data.
[0058] In some embodiments, if the edited card component 320 is confirmed, a modified target database is obtained, wherein the modified target database is obtained by the target model modifying the target database according to the updated pattern in the card component. For example, the card component 320 may provide an "Apply" button 326, and once the user clicks the "Apply" button 326, the entire content of the card component 320 is provided to the target model as the updated pattern.
[0059] In this embodiment, by combining rendering frameworks, event listening mechanisms, and other technologies, application 110 achieves a visual presentation and convenient interaction of the database schema. Card component 320 displays the database structure with an intuitive interface, allowing users to quickly understand the schema information. Dynamically created input boxes and debouncing / throttling technologies optimize the user's editing experience. Local caching and asynchronous data transmission reduce the number of network requests and improve response speed. This embodiment lowers the barrier for users to understand and modify the database schema, significantly improving the user experience and efficiency of database generation.
[0060] Besides component cards, other interaction methods can be used. In some embodiments, a second user input is received, indicating a command to modify the schema. For example, the second user input can be received through an input box in the interactive interface. In some embodiments, an updated schema is obtained, where the updated schema is generated by the target database based on the second user input and the schema. A language model can be used to parse the user intent of the second user input and generate a new schema based on the user intent and the original schema, which better matches the requirements of the second user input. For example, if the second user input includes a command to add a target field, then the language model is used to add a target field to the original schema, so that the updated data table includes multiple fields and the target field. In some embodiments, the code of the updated target database is obtained, where the code of the updated target database is generated by the target model based on the code and the updated schema. In some embodiments, the updated target database is displayed, where the updated target database is generated by the database engine executing the code of the updated target database. These operations can be similar to the operations that generated the original target database.
[0061] In some embodiments, the interface is a preview interface, which may be a front-end interface implemented in a browser. In the preview interface, multiple fields and data records of the data table are rendered into a target table, where data from the data records is displayed in cells, and the cells in the target table are rendered as interactive components. The preview interface can be a standalone interface embedded in the current application. In some embodiments, the content code of the target table can be generated by a table rendering application on the server, and the content code is rendered by the rendering framework of the user's device to obtain an interactive target table. In this embodiment, the user can interact with the target table cell by cell, which can improve the user experience. Figure 4 A schematic diagram of editing a data table according to an embodiment of this disclosure is shown. At 402, a data record set is obtained. This data record set is the entered data records of each data table in the target database. At 404, the data record set is rendered as a table, with each cell rendered as an interactive component. Each data table is rendered as an independent table, which consists of multiple cells. Data in the data table is recorded within the cells. In some embodiments, each cell is encapsulated as an independent interactive component, listening for user actions through an event binding mechanism. The table layout adopts a responsive design, supporting adaptive display on different devices. In some embodiments, to improve performance, virtual scrolling technology is used to handle large data scenarios, rendering only cells in the visible area. At 406, it is determined whether the field value of each cell is of a specific type. For example, the type of the field value corresponding to the cell can be detected. For example, it may be a string type, integer type, boolean type, or date type. Since non-text types can be rendered using more interactive components, non-text type cells can be specially processed.
[0062] If the data type is not specific (e.g., it's text), at 408, use a text editor to render the cell. If it is (e.g., it's a non-text type), at 410, match the cell with an editor corresponding to the specific type. For example, if the first field in a table has a Boolean value, render the data for that field in the record as a Boolean switch in the cell, providing a visual state toggle. Similarly, if the second field has a date value, render the data for that field as a date picker in the cell.
[0063] At position 412, user interactions with cells are received. The application captures these interactions through a front-end event listener mechanism. In some embodiments, for adjustments and updates to the data table, if a first interaction is detected with a target cell in the target table and the target cell's field value type is text, the target cell is rendered as a text input box. For example, when a user clicks or double-clicks a cell, a selection event is triggered. The application obtains the coordinate information (row index, column index) and metadata (field type, constraints) of the clicked cell and provides a text input box based on the cell type. In some embodiments, edited content is received based on the text input box. For example, a user can change a field value from "10" to "1".
[0064] In some embodiments, the updated value of the target cell is displayed based on the edited content. To this end, at 414, the changes are submitted to the server based on the user's edits. The application compares the edited content with the original value; if a change has occurred, an object containing the changed content is constructed and sent to the server. At 416, the database is updated based on the changed content, resulting in an updated data table. The server parses the changed content into corresponding database code, and the database engine executes the changes to the target database. In this embodiment, by rendering the data table as a table and providing different interactive components based on the field value type of the cell, interaction efficiency and user experience are improved.
[0065] In addition to directly editing the data table, you can also perform database operations such as filtering data records. Figure 5A A schematic diagram of filtering data records according to an embodiment of this disclosure is shown. At 502, a query component receives second user input (e.g., a natural language description), where the second user input indicates a query command for a data table. For example, the user's natural language description could be "find all incomplete tasks". At 504, the application sends the user's natural language description to a server, where a language model in the server determines the user's intent based on the schema of the target database. For example, it determines which field value the user wants to filter or query based on. For example, the server uses the language model to identify key elements such as entities (e.g., "tasks"), the field "completed / not completed", and operations (e.g., "find"). The server then uses the language model to determine that the field value corresponding to the "completed / not completed" field should be "no". This schema-aware intent recognition mechanism can significantly improve the accuracy of understanding intent.
[0066] At 506, filter conditions are generated based on user intent. For example, the filter conditions could indicate data records where the "Completed?" field value is "No". In some embodiments, this interface can be a preview interface, including a control area and a content area. At 508, the filter conditions are displayed in the control area, where the filter conditions are generated by the target model based on a second user input, allowing the user to edit the generated filter conditions. At 510, adjustments to the filter conditions are received from the user. For example, the user can modify information such as fields and field values in the filter conditions.
[0067] At point 512, if the user confirms, the filter condition is applied to the data table. The language model can generate a corresponding database statement based on the determined filter condition, which, when executed by the database engine, performs the desired filtering operation. At point 514, the first data record, obtained by the database engine filtering data records in the data table according to the filter condition, is displayed in the content area. After executing the filtering query, the database engine returns the filtered data records to the application. The application then displays the filtered data records on the user's device.
[0068] Figures 5B-5E An interface diagram of intelligent filtering according to an embodiment of the present disclosure is shown. (As...) Figure 5B As shown, the data table is displayed in the preview interface 520. The preview interface includes a control area 522 and a content area 526. The control area 522 includes a query component 534. A smart filter component 524 is also provided in the control area 522. Clicking on this smart filter component 524 triggers the component's interaction logic, generating... Figure 5C The pop-up window 532 is shown. Pop-up window 532 consists of two parts: an input box 528 and a confirmation button 530. The user can enter a natural language description in the input box 528. When the confirmation button 530 is clicked, it can trigger the intelligent filtering process.
[0069] like Figure 5D As shown, the user can enter "View tasks created today" and click the confirmation button 530. The confirmation button 530 can display "Generifying..." and send the user input to the server. The server then calls the language model and, based on... Figure 5A The process shown is used to generate filter conditions.
[0070] Assuming the user triggered the smart filter on March 6th, such as Figure 5EAs shown, the generated filter condition can be that the value of the "Creation Time" field is greater than "03-06-00" (i.e., midnight on March 6th), and the value of the "Creation Time" field is less than "03-07-00" (i.e., midnight on March 7th). In some embodiments, the filter condition is modified based on an interactive component. For example, a user can click on the component representing the filter condition to modify the filter condition from "Creation Time" being greater than "03-06-00" to "Creation Time" being greater than "03-05-00" (i.e., midnight on March 5th). In some embodiments, the modified filter condition is presented based on the interactive component, that is, the value of the "Creation Time" field is displayed as greater than "03-05-00".
[0071] After a user clicks the query button 534, they can send the filtering conditions to the server. The server then uses a language model to generate a database query statement, which is executed by the database engine to filter the task data packet. In some embodiments, a second data record is displayed in the content area 526, where the second data record is obtained by the database engine filtering data records from a data table according to the modified filtering conditions. Figure 5E As you can see, data records with an "ID" field value of 02 were filtered out, and the remaining data records with an "ID" field value of 01 met the filtering criteria.
[0072] In this embodiment, intelligent filtering functionality is provided through intelligent filtering components and pop-ups. This process does not require users to have professional technical skills, significantly reducing the operational threshold. Furthermore, it enhances the user experience through visual editing, real-time feedback, and dynamic verification. At the same time, it utilizes pattern awareness to improve the accuracy of intent understanding, optimize query performance, and achieve efficient, convenient, and secure data filtering operations.
[0073] Figure 6 A schematic diagram illustrating the classification of user intents according to embodiments of the present disclosure is shown. At 602, user input is received. In some embodiments, the application can receive user input through various interactive methods, including manual input in a text input box, text conversion after speech recognition, and drag-and-drop, check-and-select operations in a graphical interface. In some embodiments, when the user inputs text, the application can preprocess the input content in real time, using regular expressions to remove special characters and unify character encoding formats. In some embodiments, for speech input, the application calls a speech recognition API to convert speech into text and performs typo correction and semantic completion.
[0074] At step 604, the language model is invoked to analyze the user intent. In some embodiments, the application encapsulates preprocessed user input into a request in a specific format and sends it to the server via, for example, HTTP / HTTPS protocols. Upon receiving the request, the server invokes the deployed language model. For example, for the input "create a database to store employee information," the language model uses semantic analysis to identify that the user wants to perform a database creation operation. At step 606, the language model classifies the user intent based on predefined intent classification rules and a trained classifier. The language model can classify user intents into three categories: user intents to generate a database, user intents to optimize a database, and user intents to filter a database.
[0075] If the user intent is to generate a database, the database schema is designed at step 610. At step 612, database code is generated based on the database schema. In some embodiments, the language model can infer database entities and relationships between them. In some embodiments, the language model can infer fields and field types. Based on the above, the database schema can be generated. At step 614, the database engine executes the database code to generate the database. The table rendering application encodes the database tables to obtain content code. In some embodiments, the table rendering application converts the structure and data of the tables into HTML, CSS, and JavaScript code, which describes the display style and interaction logic of the tables. In some embodiments, after receiving the content code, the user device uses a rendering framework to render the content code, displaying the tables in an intuitive tabular format on the user interface, allowing the user to view the structure and data of the tables.
[0076] If the user intent is to optimize the database, the process proceeds to step 608 to determine the schema optimization prompt. In some embodiments, the server generates prompts based on the original database schema and the user intent. The server first analyzes the original database schema, extracting information such as table structure and field relationships. Then, combined with the user intent (e.g., "optimize the query performance of the employee table"), it generates prompts containing specific optimization directions and information about the original schema, such as "The existing employee table structure is [specific fields and field value types]. Please provide optimization suggestions and a new table structure design based on this structure to improve query performance." In some embodiments, the server inputs the prompts into the language model, which designs a new schema at step 610 based on the prompts and its own database optimization knowledge. Subsequent processes generate database code based on the new schema and are not repeated here.
[0077] If the user intent is to filter the database, the process proceeds to step 620, where filter conditions are generated based on the user intent and schema. In some embodiments, the language model extracts information such as the filter field, operator, and field value from the user intent. For example, for a user input "find employees whose age is greater than 30," the language model identifies the filter field as "age," the operator as "greater than," and the field value as "30." Then, combined with the data type (e.g., integer) of the "age" field in the database schema, a filter condition conforming to the syntax rules is generated: age > 30. At step 622, the filter conditions are constructed, that is, the generated filter conditions are converted into database statements (or code). At step 624, the database engine executes the constructed filter conditions to obtain the filtering results. At step 626, the filtering results are sent to the user device for visualization. In some embodiments, after receiving the results, the user device can use a front-end table component or rendering framework to render the data, displaying the filtered data records in an intuitive way for easy viewing and analysis by the user.
[0078] In this embodiment, user input is processed in multiple dimensions using a language model to achieve accurate classification of user intents and automated execution of corresponding operations. Upon receiving user input, the server invokes the language model to categorize user intents into three types: generating, optimizing, or filtering the database. This process does not require users to possess specialized database knowledge. Through natural language interaction and automated processing, it lowers the technical threshold for operation, improves database operation efficiency and user experience, and utilizes pattern awareness and classification mechanisms to ensure the accuracy and efficiency of operations under different intents.
[0079] Figure 7A A schematic diagram of data entry according to an embodiment of this disclosure is shown. For example... Figure 7A As shown, the user device can provide not only a preview interface displaying the data tables of the database, but also a data entry interface. In some embodiments, a data entry code is obtained, wherein the data entry code is generated by the target model based on user input and the target database. The data entry code is used to provide a visual interface for users to enter data. In some embodiments, a data entry interface is generated based on the data entry code, wherein the data entry interface is associated with the target database. The user can display the generated data entry interface 706 by clicking the "Entry Interface" button 702. As an example, the data entry interface 706 includes two text input boxes: text input box 708 is used to enter the task name, and text input box 710 is used to enter the task description. As an example, the data entry interface 706 also includes an entry button 712, because the data entry interface is associated with the target database, and the user can enter the input data as a data record into the target database by clicking the entry button 712.
[0080] Figure 7BA diagram illustrating the effect of inputting data according to an embodiment of this disclosure is shown. Figure 7B The user can switch to the data table interface 720 by clicking button 704. This data table interface 720 displays the contents of the target database's data tables, including, for example, data records with an "ID" of 1, a "Name" of "Household Chores", a "Completed" status of "No", and a "Description" of "Sweeping". In this embodiment, not only is a visual display of the database provided, but also a visual display of the data entry interface, which can improve user experience and efficiency.
[0081] Figure 8 A schematic block diagram of an apparatus 800 for generating a database according to some embodiments of the present disclosure is shown. The apparatus 800 can be implemented by software, hardware, or a combination of both. Figure 8 As shown, the device 800 includes a receiving module 810, a code acquisition module 820, a display module 830, and an adjustment module 840.
[0082] In some embodiments, the receiving module 810 can be configured to receive user input for generating the database. The code acquisition module 820 can be configured to acquire the code of the target database, which is generated by the target model based on the user input. The display module 830 can be configured to display the data tables of the target database on the interface, which is generated by the database engine executing code. The adjustment module 840 can be configured to, in response to receiving an adjustment for the data tables, display the updated data tables on the interface according to the adjustment.
[0083] In some embodiments, the code acquisition module 820 includes a first pattern acquisition module configured to acquire the pattern of the target database, wherein the pattern is generated by the target model based on user input, and the pattern includes table structure and table relationships, wherein the table structure includes the table name of the data table for the target database, the names of multiple fields, and the type of the field values of multiple fields; and a second code acquisition module configured to acquire the code of the target database, wherein the code of the target database is generated by the target model based on the pattern.
[0084] The code acquisition module 820 mode is presented in the card component. The device 800 also includes a second receiving module configured to receive edited content from the user's interaction with the card component, wherein the edited content indicates a modification to the mode; a card component presentation module configured to present the edited card component according to the edited content; and a second acquisition module configured to acquire a modified target database in response to confirmation of the edited card component, wherein the modified target database is obtained by modifying the target database by the target model according to the updated mode in the card component.
[0085] In some embodiments, the schema is determined by the target model based on database entities, relationships between database entities, and multiple fields, wherein the multiple fields are determined by the target model based on database entities and relationships between database entities, and the relationships between database entities are determined by the target model based on user input.
[0086] In some embodiments, the device 800 further includes a third receiving module configured to receive second user input, wherein the second user input indicates a modification command for a pattern; a second pattern acquisition module configured to acquire an updated pattern, wherein the updated pattern is generated by a target database based on the second user input and the pattern; a second code acquisition module configured to acquire updated target database code, wherein the updated target database code is generated by a target model based on the code and the updated pattern; and a second display module configured to display the updated target database, wherein the updated target database is generated by a database engine executing the updated target database code.
[0087] In some embodiments, the second user input includes a command to add a target field, and the updated data table includes multiple fields and the target field.
[0088] In some embodiments, the interface is a preview interface, and the display module 830 includes a table rendering module configured to render multiple fields and data records of the data table into a target table in the preview interface, wherein the data of the data records is displayed in cells, and the cells in the target table are rendered as interactive components.
[0089] In some embodiments, the adjustment module 840 includes a text box rendering module configured to render the target cell as a text input box in response to detecting a first interactive operation on the target cell of the target table and the field value type of the target cell being text; a fourth receiving module configured to receive edited content based on the text input box; and a first modification module configured to display the updated value of the target cell according to the edited content.
[0090] In some embodiments, the apparatus 800 further includes a Boolean switch rendering module configured to render data in a data record for the first field as a Boolean switch in a cell in response to the field value type of a first field among a plurality of fields of a data table being of Boolean type; and a date picker rendering module configured to render data in a data record for the second field as a date picker in response to the field value type of a second field among a plurality of fields being of date type.
[0091] In some embodiments, the interface is a preview interface, which includes a control area and a content area. The control area includes a query component, and the device 800 further includes a fifth receiving module configured to receive second user input based on the query component, wherein the second user input indicates a query command for a data table; a third display module configured to display filter conditions in the control area, wherein the filter conditions are generated by the target model based on the second user input; and a fourth display module configured to display a first data record in the content area, wherein the first data record is obtained by the database engine filtering data records of the data table according to the filter conditions.
[0092] In some embodiments, the filter conditions are rendered as interactive components in the control area, and the device 800 further includes a sixth receiving module configured to receive a modification operation on the filter conditions based on the interactive components; a second presentation module configured to present the modified filter conditions based on the interactive components; and a fifth display module configured to display a second data record in the content area, wherein the second data record is obtained by a database engine filtering data records of a data table according to the modified filter conditions.
[0093] In some embodiments, the device 800 further includes a third acquisition module configured to acquire a data entry code, wherein the data entry code is generated by the target model based on user input and a target database; and an interface generation module configured to generate a data entry interface based on the data entry code, wherein the data entry interface is associated with the target database.
[0094] The division of modules or units in the embodiments of this disclosure is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the disclosed embodiments may be integrated into one unit, exist as separate physical entities, or two or more units may be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional unit.
[0095] Figure 9 A block diagram of an example device 900 that can be used to implement embodiments of the present disclosure is shown. It should be understood that... Figure 9 The device 900 shown is merely an example and should not be construed as limiting the functionality and scope of the implementation described herein. For example, device 900 may correspond to the implementation described herein. Figure 1 The user equipment described above can be used to perform the above-described... Figures 1 to 5A as well as Figures 6-7A The process. For example, device 900 may correspond to the electronic device of the third aspect of the invention.
[0096] like Figure 9As shown, device 900 is in the form of a general-purpose computing device. Components of device 900 may include, but are not limited to, one or more processors or processing units 910, memory 920, storage devices 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. Processing unit 910 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 920. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of device 900.
[0097] Device 900 typically includes multiple computer storage media. Such media can be any available media accessible to device 900, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 920 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof). Storage device 930 can be removable or non-removable media and may include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data (e.g., training data for training) and accessible within device 900.
[0098] Device 900 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 9 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 920 may include computer program product 925 having one or more program modules configured to perform various methods or actions of various implementations of this disclosure.
[0099] The communication unit 940 enables communication with other computing devices via a communication medium. Additionally, the components of device 900 can function as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, device 900 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0100] Input device 950 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 960 can be one or more output devices, such as a monitor, speaker, printer, etc. Device 900 can also communicate with one or more external devices (not shown) via communication unit 940 as needed. External devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with device 900, or with any device that enables device 900 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0101] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is provided that stores a computer program thereon, which, when executed by a processor, implements the methods described above.
[0102] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0103] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0104] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0106] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for generating a database, comprising: Receive user input for generating the database; Obtain the code of the target database, which is generated by the target model based on the user input; The interface displays the data tables of the target database, which is generated by the database engine executing the code. as well as In response to receiving an adjustment for the data table, the updated data table is displayed on the interface according to the adjustment.
2. The method according to claim 1, wherein the code for obtaining the target database includes: Obtain the schema of the target database, wherein the schema is generated by the target model based on the user input, and the schema includes table structure and table relationships, wherein the table structure includes table names for data tables in the target database, names of multiple fields, and the type of field values for the multiple fields; as well as Obtain the code of the target database, wherein the code of the target database is generated by the target model according to the pattern.
3. The method of claim 2, wherein the pattern is presented in the card component, the method further comprising: Receive edited content from the user's interaction with the card component, wherein the edited content indicates a modification to the mode; The edited card component is presented based on the edited content; as well as In response to confirmation of the edited card component, the modified target database is obtained, wherein the modified target database is obtained by the target model modifying the target database according to the updated pattern in the card component.
4. The method according to claim 2, wherein the pattern is determined by the target model based on database entities, the relationships between the database entities, and the plurality of fields, the plurality of fields being determined by the target model based on the database entities and the relationships between the database entities, and the relationships between the database entities being determined by the target model based on the user input.
5. The method according to claim 2, further comprising: Receive second user input, wherein the second user input indicates a command to modify the mode; Obtain the updated pattern, wherein the updated pattern is generated by the target database based on the second user input and the pattern; Obtain the updated code of the target database, wherein the updated code of the target database is generated by the target model based on the code and the updated pattern; as well as The updated target database is displayed, wherein the updated target database is generated by the database engine executing the code of the updated target database.
6. The method of claim 5, wherein the second user input includes a command to add a target field, and the updated data table includes the plurality of fields and the target field.
7. The method according to claim 1, wherein the interface is a preview interface, and displaying the data tables of the target database includes: In the preview interface, multiple fields and data records of the data table are rendered into a target table, where the data of the data records is displayed in cells, and the cells in the target table are rendered as interactive components.
8. The method of claim 7, wherein displaying an updated data table on the interface according to the adjustment in response to receiving an adjustment for the data table comprises: In response to detecting a first interactive operation on a target cell of the target table and the field value type of the target cell being text, the target cell is rendered as a text input box; Receive edited content based on the text input box; as well as The updated value of the target cell is displayed based on the edited content.
9. The method according to claim 7, further comprising: In response to the fact that the field value type of the first field among the multiple fields of the data table is Boolean, the data in the data record for the first field is rendered as a Boolean switch in the cell; as well as In response to the fact that the field value type of the second field among the plurality of fields is date type, the data in the data record for the second field is rendered as a date picker in the cell.
10. The method according to claim 1, wherein the interface is a preview interface, the preview interface includes a control area and a content area, the control area includes a query component, and the method further includes: The query component receives a second user input, wherein the second user input indicates a query command for the data table; The control area displays filter conditions, which are generated by the target model based on the second user input. as well as The first data record is displayed in the content area, wherein the first data record is obtained by the database engine filtering the data records of the data table according to the filtering conditions.
11. The method of claim 10, wherein the filtering conditions are rendered as interactive components in the control area, and the method further comprises: Based on the interactive component, the modification operation for the filtering conditions is received; The modified filtering conditions are presented based on the interactive component; as well as A second data record is displayed in the content area, wherein the second data record is obtained by the database engine filtering the data records of the data table according to the modified filtering conditions.
12. The method according to claim 1, further comprising: Obtain a data entry code, wherein the data entry code is generated by the target model based on the user input and the target database; as well as A data entry interface is generated based on the data entry code, wherein the data entry interface is associated with the target database.
13. An apparatus for generating a database, comprising: The receiving module is configured to receive user input used to generate the database; The code acquisition module is configured to acquire code from a target database, the code of which is generated by the target model based on the user input; The display module is configured to display the data tables of the target database on the interface, the target database being generated by the database engine executing the code; as well as An adjustment module is configured to, in response to receiving an adjustment for the data table, display the updated data table on the interface according to the adjustment.
14. An electronic device comprising: At least one processing unit; At least one memory is coupled to at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 12.