Database logic mode automatic generation method and device, storage medium and computer program product

Through the collaborative processing and automated evaluation mechanism of multiple agents, the problem of manual dependence in relational database design is solved, and efficient and accurate database logical pattern generation is achieved to meet the efficiency and quality requirements of modern applications.

CN120561101APending Publication Date: 2025-08-29HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510643886.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

The existing technology relies on manual experience in relational database design, the process is cumbersome, expensive and difficult to iterate, and cannot meet the efficiency requirements of modern applications for data management. The automation pattern design based on customized rules or traditional deep learning models is limited, which cannot solve the bottleneck of high-quality database pattern design.

Method used

The MultiAgent architecture based on the big model is adopted to split the database logical pattern design into multiple modules, which are processed jointly by multiple agents, and the cooperation between agents and controllable error detection and correction mechanisms are combined with an automated evaluation mechanism to ensure the quality of the mode.

Benefits of technology

It improves the efficiency of database schema generation, significantly reduces cumulative errors, ensures the quality of the pattern, can cover the business needs of various real scenarios, and meets the requirements of efficient database design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561101A_ABST
    Figure CN120561101A_ABST
Patent Text Reader

Abstract

The invention provides a database logic mode automatic generation method and device, a storage medium and a computer program product, and the method comprises the steps: providing a plurality of agents which comprise a product manager agent, a conceptual model design agent, a conceptual model review agent and a logic model design agent; running the product manager agent to interact with a user and generate a demand analysis report; operating the conceptual model design agent to identify components of the conceptual model according to the demand analysis report, the components including an entity set, a relationship set, a mapping cardinal number and attributes of the entity set and the relationship set; running the conceptual model review agent to provide feedback about the conceptual model; and operating the logic model design agent to convert the conceptual model into a normalized logic mode by identifying a functional dependency relationship in the entity set and the relationship set. According to the method, the database logic mode generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of database construction, and in particular to a method, device, storage medium and computer program product for automatically generating a database logical model. Background Art

[0002] With the rapid development of information technology, data plays an increasingly important role. Existing enterprises need to efficiently store, manage, and retrieve large amounts of complex data to support business decisions and operations, making relational databases the most mainstream data management method. Relational database design involves generating a database schema based on user requirements. This schema defines the table structure and relationships between tables. Translating requirements into an accurate schema involves multiple complex subtasks and requires database expertise. This presents unique challenges for automated relational database design. Traditional database schema design often relies on manual experience, resulting in a tedious, costly, and difficult-to-iterate process. This process cannot meet the efficient data management requirements of modern applications, leading to the emergence of automated database design technology. However, current automated schema design strategies based on customized rules or traditional deep learning models have limited effectiveness. Furthermore, since high-quality database schema design requires extensive experience and specialized domain knowledge, directly using large models is difficult to overcome performance bottlenecks.

[0003] Therefore, there is an urgent need to provide a method, device, storage medium and computer program product for automatically generating a database logical model to improve the efficiency and / or quality of database model design.

[0004] Application Contents

[0005] To achieve at least one of the above objectives, embodiments of the present application provide a method, device, storage medium, and computer program product for automatically generating a database logical model.

[0006] In a first aspect, an embodiment of the present application provides a method for automatically generating a database logical model, the method comprising:

[0007] Providing multiple agents, including a product manager agent, a concept model design agent, a concept model review agent, and a logic model design agent;

[0008] Running the product manager agent to interact with the user and generate a demand analysis report;

[0009] Running the conceptual model design agent to identify components of a conceptual model according to the demand analysis report, wherein the components include entity sets, relationship sets, mapping cardinalities, and attributes of entity sets and relationship sets;

[0010] running the concept model review agent to provide feedback on the concept model;

[0011] The logical model design agent is run to transform the conceptual model into a normalized logical schema by identifying functional dependencies among the entity sets and the relationship sets.

[0012] In one embodiment, the agent further comprises a quality control agent and a test agent, and the method further comprises:

[0013] Running the quality control agent to generate natural language test cases based on the requirements analysis report; and

[0014] The test agent is run to understand the test case generated by the quality control agent, evaluate whether the logic model meets the test standard, and generate a test report.

[0015] In one embodiment, the interaction between the multiple agents adopts a group chat communication mechanism, and they communicate with each other through a shared message pool.

[0016] In one embodiment, there is a nested group between the conceptual model design agent and the conceptual model review agent, and the interaction between the conceptual model design agent and the conceptual model review agent regarding the conceptual model design is carried out through the nested group, and the interaction within the nested group is transparent to other agents.

[0017] In one embodiment, the workflow between the multiple intelligent agents is to generate a candidate set of the next speaker of the current speaker, determine the next speaker from the candidate set, and in the case where there is no next speaker in the candidate set, the group administrator determines the next speaker based on the conversation history records.

[0018] In one embodiment, the next speaker in the candidate set is determined by the current conversation state.

[0019] In a second aspect, the present application further provides a database logic model automatic generation device, the database logic model automatic generation device comprising:

[0020] a memory configured to store computer-executable instructions;

[0021] A processor is configured to run the computer executable instructions stored in the memory to implement the above-mentioned method for automatically generating a database logical model.

[0022] In a third aspect, the present application further provides a storage medium storing computer-executable instructions, which, when executed by a processing unit, implement the above-mentioned method for automatically generating a database logical model.

[0023] In a fourth aspect, the present application further provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processing unit, the above-mentioned method for automatically generating a database logical model is implemented.

[0024] Compared to the prior art, the method, device, storage medium, and computer program product for automatically generating database logical models provided by the embodiments of this application split complex model designs into multiple modules and collaboratively process database model generation through multiple intelligent agents, thereby improving the efficiency of database model generation. In addition, through a controllable error detection and correction mechanism, cumulative errors are significantly reduced, ensuring model quality. Furthermore, by providing a set of automated evaluation mechanisms for database models, based on sample data from various real-world scenarios, it is possible to cover the business needs of various real-world scenarios and evaluate the quality of the generated models, thereby further ensuring model quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:

[0026] Figure 1 This is a schematic diagram of the design process of a relational database provided in one embodiment of the present application;

[0027] Figure 2 This is a flowchart of a method for automatically generating a database logical model provided by one embodiment of the present application;

[0028] Figure 3 This is a flowchart of a method for automatically generating a database logical model provided by another embodiment of the present application;

[0029] Figure 4 This is a partial flow chart of a method for automatically generating a database logical model provided in yet another embodiment of the present application.

[0030] Figure 5 This is a schematic diagram of the process of automatically generating a database logical model provided by one embodiment of the present application.

[0031] Figure 6This is an example error feedback diagram provided by an embodiment of the present application;

[0032] Figure 7 This is a schematic diagram of the hardware structure of a database logic model automatic generation device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] With the rapid development of information technology, data plays an increasingly important role. Existing enterprises need to efficiently store, manage, and retrieve large amounts of complex data to support business decisions and operations, making relational databases the most mainstream data management method. Relational database design involves generating a database schema based on user requirements. This schema defines the table structure and relationships between tables. Translating requirements into an accurate schema involves multiple complex subtasks and requires database expertise. This presents unique challenges for automated relational database design. Traditional database schema design often relies on manual experience, resulting in a tedious, costly, and difficult-to-iterate process. This process cannot meet the efficient data management requirements of modern applications, leading to the emergence of automated database design technology. However, current automated schema design strategies based on customized rules or traditional deep learning models have limited effectiveness. Furthermore, since high-quality database schema design requires extensive experience and specialized domain knowledge, directly using large models is difficult to overcome performance bottlenecks.

[0035] Based on this, the present application provides a method, device, storage medium and computer program product for automatically generating database logical models, which is based on a large-scale MultiAgent architecture, splits complex model design into multiple modules, and uses intelligent agents to collaboratively process database model generation; and further, utilizes a controllable error detection and correction mechanism to significantly reduce cumulative errors and ensure model quality; and further, utilizes an automated evaluation mechanism to perform a complete automated evaluation of the generated database model.

[0036] Some technical terms used in this application are explained below.

[0037] relational database

[0038] A relational database is built based on the relational model. The relational model is a two-dimensional table model, and therefore a relational database is a data organization consisting of two-dimensional tables and the relationships between them. In a relational database, each table has a unique name and can have multiple columns, each with a unique name. A row in a table represents a series of relationships between values. Common relational databases include Oracle, Microsoft SQL Server, MySQL, GaussDB, and SQLite.

[0039] Relational database design

[0040] Database design is a complex task in database applications. Relational database design mainly includes four stages, see Figure 1 As shown, the first stage (stage ①), user demand analysis: clarify user needs based on user demand description 101, determine the data and business rules that the system using the database needs to process, and produce a user demand analysis report 102; the second stage (stage ②), conceptual design stage: by determining the entity (Entity), entity attributes, entity identifiers, relationships between entities, relationship attributes and relationship constraint types, the demand analysis report is converted into a conceptual data model (i.e., relational data model) 103, usually represented by an entity-relationship diagram (ER diagram); the third stage (stage ③), logical design stage: further consider the logical representation of these relational data objects in the computer system, and convert the conceptual data model into a logical schema (Schema) 104 of the relational database, including schema name, attribute name, primary key and foreign key; the fourth stage (stage ④), physical design stage: design the physical data model 105, select a suitable storage structure and access method for the table structure to optimize the performance of the database.

[0041] AIAgent (AI Agent)

[0042] An AI agent is an intelligent system capable of perceiving its environment, making autonomous decisions, and executing actions. Its core goal is to complete a specific task or optimize a specific objective. An AI agent consists of three main modules: a perception module, which acquires environmental information through sensors, text, voice, and images; a decision module, which formulates strategies based on planning, machine learning, or reinforcement learning, currently relying primarily on large language models; and an execution module, which executes actions such as robot movement and API calls. Furthermore, AI agents have a memory function that can store historical data and use this memory to optimize future behavior.

[0043] MultiAgent system

[0044] A multi-agent system (MAS) is a system composed of multiple agents that can autonomously perceive their environment, make decisions, and take actions to achieve individual or group goals. The core of a MAS lies in the interaction, collaboration, and competition between agents, enabling them to complete complex tasks or solve complex problems.

[0045] See also Figure 2 FIG. 1 is a flow chart of a method for automatically generating a database logical model according to an embodiment of the present application.

[0046] In operation 201 , a plurality of agents are provided, including a product manager agent, a concept model design agent, a concept model review agent, and a logic model design agent.

[0047] Among them, the product manager agent corresponds to the role of product manager and is configured to interact with users and generate a demand analysis report; the conceptual model design agent corresponds to the role of conceptual model designer and is configured to identify the components of the conceptual model based on the demand analysis report, wherein the components include entity sets, relationship sets, mapping cardinalities, and attributes of entity sets and relationship sets; the conceptual model review agent corresponds to the role of conceptual model reviewer and is configured to provide feedback on the conceptual model to ensure accurate evaluation. In one embodiment, the conceptual model review agent uses a pseudo-code style to provide timely feedback on the conceptual model. Since the conceptual model is the core of the entire process, a detailed review is important; the logical model design agent corresponds to the role of logical model setter and is configured to convert the conceptual model into a normalized logical model by identifying the functional dependencies in the entity sets and relationship sets. In one embodiment, the logical model design agent can use an encapsulation tool to perform primary key identification and pattern decomposition based on Armstrong axioms and closure calculation rules. This process ensures consistency with the industry standardization standard of 3NF.

[0048] In operation 202 , the product agent is run to interact with the user and generate a demand analysis report.

[0049] In operation 203 , the conceptual model design agent is run to identify components of a conceptual model according to the demand analysis report. The components include entity sets, relationship sets, mapping cardinalities, and entity set attributes and relationship set attributes.

[0050] In operation 204, the concept model review agent is run to provide feedback on the concept model.

[0051] In operation 205 , the logical model design agent is run to transform the conceptual model into a normalized logical schema by identifying functional dependencies in the entity sets and the relationship sets.

[0052] See also Figure 3 FIG. 1 is a flow chart of a method for automatically generating a database logical model according to another embodiment of the present application.

[0053] In operation 301 , a plurality of agents are provided, including a product manager agent, a concept model design agent, a concept model review agent, a logic model design agent, a quality control agent, and a test agent.

[0054] The functions of the product manager agent, the concept model design agent, the concept model review agent, and the logic model design agent have been described in the previous embodiment and will not be repeated here. The quality control agent corresponds to the role of the quality control engineer and is configured to generate natural language test cases based on the requirements analysis report. In one embodiment, these test cases use actual data values ​​to simulate real operations such as insertion, deletion, update, and selection. The test agent corresponds to the role of the test engineer and is configured to understand the test cases generated by the quality control agent, evaluate whether the designed logical model meets the test standards, and generate a test report.

[0055] Operations 302 to 305 correspond one-to-one to operations 202 to 205 in the previous embodiment. The specific contents thereof may be referred to the previous embodiment and will not be described again here.

[0056] In operation 306 , the quality control agent is run to generate natural language test cases according to the requirement analysis report.

[0057] In operation 307 , the test agent is run to understand the test cases generated by the quality control agent, evaluate whether the designed logic model meets the test standards, and generate a test report.

[0058] In one embodiment, the interaction between multiple agents in the above two embodiments adopts a group chat communication mechanism, and communicates with each other through a shared message pool.

[0059] In one embodiment, a nested group exists between the conceptual model design agent and the conceptual model review agent in the two aforementioned embodiments. Interactions between the conceptual model design agent and the conceptual model review agent regarding the conceptual model design are conducted through the nested group, and interactions within the nested group are transparent to other agents. Transparency to other agents means that other agents are not aware of the content of interactions within the nested group, and the content of interactions within the nested group does not affect other agents.

[0060] In one embodiment, the group chat mechanism is optimized by a controllable error detection and correction strategy. Specifically, a candidate set of next speakers of the current speaker is generated, and the next speaker is determined from the candidate set.

[0061] In one embodiment, if there is no next speaker in the candidate set, the group administrator determines the next speaker based on the conversation history records.

[0062] In one embodiment, the next speaker is determined by the current conversation state.

[0063] See also Figure 4 FIG. 1 is a flow chart of a method for automatically generating a database logical model according to another embodiment of the present application.

[0064] In this embodiment, based on any one of the above two embodiments, operation 401 and operation 402 are further included.

[0065] In operation 401 , the gap between the predicted values ​​and the actual values ​​of the components of the logic model is evaluated.

[0066] In operation 402 , an evaluation result is generated according to the difference between the predicted value and the true value.

[0067] Specifically, the logical schema consists of four key components: the schema name, schema attributes, primary keys, and foreign keys. The difference between the predicted value and the true value of each component is calculated. If the predicted values ​​of all components are consistent with the true values, the logical schema is considered feasible.

[0068] More detailed descriptions are provided below to support the above-mentioned embodiments.

[0069] In this embodiment of the present application, the automated generation of database logical schemas is divided into several subtasks, each managed by a dedicated agent. In one embodiment, there are six agents in total. The agents work together to follow the system database design workflow to generate a comprehensive database schema. Each LLM-based agent operates according to a pre-made configuration file that includes a name, job description, goals, constraints, and expertise. All agents follow a React-style behavior. Figure 5 As shown, the introduction of the six agents and their related tasks are as follows.

[0070] The product manager agent 51 interacts directly with the user and generates a demand analysis report 502 based on user needs 501.

[0071] The conceptual model design agent 52 identifies the components of the conceptual model 503 according to the requirement analysis report 502, namely, the entity set, relationship set, mapping cardinality, and entity set attributes and relationship set attributes.

[0072] The concept model review agent 53 provides timely feedback on the concept model 503 using pseudo-code style prompts to ensure accurate evaluation. Since the concept model 503 is the core of the entire process, careful review is crucial.

[0073] The logical model design agent 54 converts the conceptual model 503 into a normalized logical schema 504 by identifying functional dependencies between entity sets and relationship sets. The logical model design agent 54 can use encapsulation tools to perform primary key identification and schema decomposition based on Armstrong axioms and closure calculation rules. This process ensures consistency with the industry standardization of 3NF.

[0074] The quality control agent 55 generates a natural language test case 505 based on the requirement analysis report 502. The test case 505 simulates real operations such as inserting, deleting, updating and selecting using actual data values.

[0075] The test agent 56 understands the test cases 505 generated by the quality control agent 55, and evaluates whether the designed logical model 504 meets the test standards, and finally generates a comprehensive test report 506.

[0076] In an embodiment of the present application, a group chat communication mechanism is used to achieve interaction between agents and thus promote the generation of automated database models. Agents (spokespersons) communicate with each other through a shared message pool, which is managed by a group administrator (which is essentially a large model). The group chat mechanism can achieve more efficient information interaction than point-to-point interaction. More importantly, in an embodiment of the present application, a nested group is established above the conceptual model design agent and the conceptual model review agent to promote closer communication between the conceptual model design agent and the conceptual model review agent. In this way, discussions related to conceptual model design are confined to the nested group and are transparent to other agents.

[0077] In the implementation mode of the present application, the group chat mechanism is further optimized through controllable error detection and correction strategies. As mentioned above, the generation of the automated database model proceeds according to the sequential workflow, but the sequential workflow tends to accumulate errors over time. Secondly, in a group chat, the order of speakers can easily get out of control, which may have a negative impact on the workflow. In fact, in many real-world scenarios, error detection may have a certain delay. Therefore, in this application, by establishing a mechanism to control the order of speakers in the workflow, each agent can help identify errors that may have occurred previously in the workflow in order to reduce accumulated errors. Specifically, for each role, a group of other roles are selected to form a candidate set for the next speaker. As Figure 5 As shown, Figure 5 Arrows are used to represent candidate relationships, where solid arrows connect the sequential parts of the workflow, while dashed arrows are used for error feedback. For example, when the logical model design agent 54 generates a logical pattern 504, if the logical model design agent 54 detects an error in the conceptual model 503 and the logical pattern 504 is not generated, the logical model design agent 54 outputs an error report 507. The conceptual model design agent 52 is then selected as the next speaker, and the error report 507 is output to the conceptual model design agent 52. The conceptual model design agent 52 redesigns the conceptual model 503, and the conceptual model review agent 53 evaluates the redesigned conceptual model 503. Furthermore, if the logical model design agent 54 does not detect any errors in the conceptual model 503, the generated logical pattern 504 serves as input for the test report generated by the test agent 56, and the test agent 56 is selected as the next speaker. Overall, after the logical model design agent speaks (i.e., generates a logical pattern), there are two candidate speakers: the conceptual model design agent 52 and the test agent 56.

[0078] Figure 6 An example of the error feedback process of the logical model design agent 54 is shown. After identifying the functional dependencies, if the logical model design agent 54 finds that there are entities or relationships without primary keys, the logical model design agent 54 sends an error message back to the conceptual model design agent 52, requesting the regeneration of the conceptual model 503. This process can be achieved by integrating candidate relationships into the agent's profile, so that the speaking agent can dynamically determine the next speaker from the candidate relationships accordingly. In addition, there may be a situation where no agent is selected as the next speaker. In this case, the group administrator 57 will determine the next speaker based on the conversation history. In summary, this error detection and correction strategy mechanism ensures that the conversation remains coherent and efficient, while allowing flexible and context-aware decisions to be made in multi-agent interactions.

[0079] In one embodiment of the present application, the logical model consists of four key components: Schema name, Schema attributes, primary key and foreign key. In order to analyze the performance of the automatic generation of the logical model of the database of this application, the present application also provides an automated evaluation mechanism, which measures the gap between the predicted value and the true value of these four components based on pre-acquired sample data or preset data. In one embodiment, the true value is provided by the sample data or pre-set. The evaluation indicators include F1 score and exact match accuracy (Acc.). Acc. is set to 1 only when the F1 score is equal to 1; otherwise, Acc. is set to 0.

[0080] Schema name

[0081] Since the generative model may generate different tags with similar meanings, three alignment methods are used in the embodiments of the present application to match the predicted Schema names with their corresponding true values.

[0082] (1) Synonym matching: Synonyms of the predicted value are extracted through WordNet, and the real value is verified whether the synonyms contain the real value.

[0083] (2) Similarity matching: The all-MiniLM-L6-v2 model is used to measure the semantic similarity between the predicted value and the true value.

[0084] (3) String matching: by calculating the longest common substring between the predicted value and the true value and checking whether its length exceeds a threshold.

[0085] Each logic pattern also includes multiple sub-logic patterns. Formula (1) describes the calculation process of the F1 value of the entire logic pattern.

[0086]

[0087] in Represents a set of mapping sub-logical patterns, represents a set of real sub-logical patterns, Represents a set of prediction sub-logical patterns, and “#” represents the number of “.

[0088] Schema properties

[0089] In the embodiments of this application, the three alignment methods described above are still applied to calculate the F1 score between the mapped true attribute set and the predicted attribute set. Acc. is set to 1 if and only if F1 is equal to 1. For attributes in the true sub-logical pattern that lack a corresponding mapping to the predicted sub-logical pattern, all indicators of these attributes are set to 0. In the case of multiple attribute sets, the average of the values ​​of the multiple attribute sets is used as the final result. The calculation method of the schema attribute F1 is detailed in formula (2).

[0090]

[0091] Among them, i represents The i-th element in (the element is a sub-logical pattern), represents the set of mapped attributes for element i, represents the real attribute set of element i, Represents the predicted attribute set of element i.

[0092] Primary and foreign keys: Unlike schema names and schema attributes, in this implementation, the predicted and actual values ​​of primary keys, and the predicted and actual values ​​of foreign keys, must match exactly. The corresponding Acc. is 1 only when the set of actual and predicted primary keys are identical. The corresponding Acc. is 1 only when the set of actual and predicted foreign keys are identical.

[0093] Evaluates whether the overall predicted schema of a database is identical to the actual schema. OverallAcc. is the strictest metric; a prediction is considered correct only when all components in each schema match correctly.

[0094] The present application also provides a device for automatically generating a database logic model. Figure 7As shown, this is a hardware structure diagram of a database logic model automatic generation device for running the database logic model automatic generation method of the present application. The device 70 includes a processor 701, a memory 703, a communication bus 705, at least one network interface 707 or a user interface 709, and the user interface 709 can be, for example, a display, a keyboard or a click device. The memory 703 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 703 stores execution instructions. When the processor 701 runs, the processor 701 communicates with the memory 703, and the processor 701 calls the instructions stored in the memory 703, i.e., the database logic model automatic generation program 100, to execute the above-mentioned database logic model automatic generation method. The device 70 also includes an operating system 711, which includes various programs for implementing various basic services and processing hardware-based tasks.

[0095] The device 70 provided in the embodiment of the present application, the processor 701 can execute the operations included in the above-mentioned database logical model automatic generation method to improve the effect of database model design. Its implementation principle and technical effect are similar to the database logical model automatic generation method introduced in the above-mentioned embodiment, and the details will not be repeated here.

[0096] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, which may be, for example, memory 703. The computer-executable instructions enable a processing unit (such as processor 701) to execute the database logical model automatic generation method described in the above embodiment. The implementation principle and technical effect are similar to the database logical model automatic generation method introduced in the above embodiment, and will not be repeated here.

[0097] An embodiment of the present application also provides a computer program product, which includes computer-executable program instructions, and the computer-executable program instructions can enable a processing unit (such as processor 701) to execute the database logical model automatic generation method described in the above embodiment. Its implementation principle and technical effect are similar to the database logical model automatic generation method introduced in the above embodiment, and will not be repeated here.

[0098] In summary, the method, device, storage medium, and computer program product for automatically generating database logical models provided by the embodiments of the present application split complex model designs into multiple modules and collaboratively process database model generation through multiple intelligent agents, thereby improving the efficiency of database model generation. In addition, a controllable error detection and correction mechanism is used to significantly reduce cumulative errors and ensure model quality. Furthermore, by providing a set of automated evaluation mechanisms for database models, based on sample data from various real-world scenarios, it is possible to cover the business needs of each real-world scenario and evaluate the quality of the generated model, thereby further ensuring model quality.

[0099] The above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for automatically generating a database logical model, characterized in that: The method comprises: Providing multiple agents, including a product manager agent, a concept model design agent, a concept model review agent, and a logic model design agent; Running the product manager agent to interact with the user and generate a demand analysis report; Running the conceptual model design agent to identify components of a conceptual model according to the demand analysis report, wherein the components include entity sets, relationship sets, mapping cardinalities, and attributes of entity sets and relationship sets; running the concept model review agent to provide feedback on the concept model; and The logical model design agent is run to transform the conceptual model into a normalized logical schema by identifying functional dependencies among the entity sets and the relationship sets.

2. The method according to claim 1, characterized in that The intelligent agent also includes a quality control intelligent agent and a test intelligent agent, and the method further includes: Running the quality control agent to generate natural language test cases based on the requirements analysis report; and The test agent is run to understand the test case generated by the quality control agent, evaluate whether the logic model meets the test standard, and generate a test report.

3. The method according to claim 2, characterized in that The interaction between the multiple agents adopts a group chat communication mechanism and communicates with each other through a shared message pool.

4. The method according to claim 3, characterized in that There is a nested group between the conceptual model design agent and the conceptual model review agent. The interaction between the conceptual model design agent and the conceptual model review agent regarding the conceptual model design is carried out through the nested group, and the interaction within the nested group is transparent to other agents.

5. The method according to claim 3, characterized in that The workflow between the multiple intelligent agents is to generate a candidate set of the next speaker of the current speaker, determine the next speaker from the candidate set, and in the case where there is no next speaker in the candidate set, the group administrator determines the next speaker based on the conversation history.

6. The method according to claim 5, characterized in that The next speaker in the candidate set is determined by the current conversation state.

7. The method according to claim 2, characterized in that Also includes: evaluating the discrepancy between the predicted and true values ​​of multiple components of the logic model; and An evaluation result is generated according to the difference between the predicted value and the true value.

8. A database logic model automatic generation device, characterized in that: The database logic model automatic generation device includes: a memory configured to store computer-executable instructions; and A processor, wherein the processor is configured to run the computer executable instructions stored in the memory to implement the method for automatically generating a database logical model according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processing unit, the method for automatically generating a database logical model according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method comprises computer program instructions, which, when executed by a processing unit, implements the method for automatically generating a database logical model according to any one of claims 1 to 7.