Database model graph construction method and device, computer equipment, medium and product

By introducing a database model diagram construction method into the database modeling tool, users can build database model diagrams through drag and drop and configuration operations, solving the limitations of existing tools in model display and interactivity, and achieving efficient and accurate database model management.

CN119690948APending Publication Date: 2025-03-25SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411910746.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing database modeling tools have limitations in the correlation display, dynamic updates and interactivity between models, especially the lack of flexible graphical interfaces, making it difficult to intuitively display complex database relationship networks and their dynamic changes.

Method used

Provide a database model diagram construction method. By obtaining the basic information of the data tables of each original data table in the target database, displaying the model construction page, including the data display area and the model drawing area, the user can drag and drop the data table and configure the association relationship to build a database model diagram.

Benefits of technology

It realizes high visualization and strong interactivity of database models, improves the efficiency and accuracy of database model management, and simplifies the creation and maintenance process of complex database model diagrams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690948A_ABST
    Figure CN119690948A_ABST
Patent Text Reader

Abstract

The invention relates to a database model graph construction method and device, computer equipment, a medium and a product. The method comprises the following steps: in response to a database model graph construction instruction for a target database, obtaining data table basic information of each original data table in the target database; displaying a model construction page according to the data table basic information of each original data table; wherein the model construction page comprises a data display area and a model drawing area, and the data display area comprises data description information of each original data table in the target database; in response to a dragging operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in a model drawing area; and in response to a data table configuration operation on each target data table in the model drawing area, constructing an association relationship between the target data tables and an association relationship between the metadata in each target data table. By adopting the method, the database model management efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a method, device, computer equipment, medium and product for constructing a database model diagram. Background Art

[0002] Database modeling is the process of discovering, analyzing, and determining data requirements. It expresses and communicates these data requirements in a precise form called a data model. It is an important part of data management. The modeling process requires organizations to discover and record how data is combined.

[0003] Currently, there are many database modeling tools on the market. Although these tools provide basic database model design functions, they are limited in terms of the display of relationships between models, dynamic updates, and interactivity. In particular, they often lack a flexible graphical interface and it is difficult to intuitively display complex database relationship networks and their dynamic changes. Summary of the invention

[0004] Based on this, it is necessary to provide a database model diagram construction method, device, computer equipment, medium and product to address the above-mentioned technical problems, which can achieve high visualization and strong interactivity of the database model and improve the efficiency and accuracy of database model management.

[0005] In a first aspect, the present application provides a method for constructing a database model graph, comprising:

[0006] In response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database;

[0007] Displaying a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0008] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0009] In response to the data table configuration operation on each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database.

[0010] In one of the embodiments, the data table basic information of each original data table includes the data table name and metadata information contained in the original data table;

[0011] The model building page is displayed based on the basic information of the data table of each original data table, including:

[0012] Obtaining an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area;

[0013] According to the basic information of each original data table, a metadata structure tree of the target database is constructed; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level;

[0014] The metadata structure tree is filled into the blank display area of ​​the initial construction page to obtain a model construction page, and the model construction page is displayed.

[0015] In one embodiment, in response to the data table configuration operation on each target data table in the model drawing area, building the association relationship between each target data table and the association relationship between metadata in each target data table includes:

[0016] In response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, determining first connection configuration information between the two metadata;

[0017] In response to a second connection line configuration operation on any two target data tables in the model drawing area, determining second connection line configuration information between the two target data tables;

[0018] According to each first connection configuration information, an association relationship between metadata in each target data table is established;

[0019] According to each second connection line configuration information, an association relationship between each target data table is constructed.

[0020] In one embodiment, in response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, determining first connection configuration information between the two metadata includes:

[0021] In response to a line connection operation on any two metadata in each target data table in the model drawing area, connecting the two metadata using a line segment;

[0022] In response to a first configuration operation on the line segment between the two metadata, determining a connection type of the line segment between the two metadata;

[0023] First connection configuration information between the two metadata is determined according to the connection type of the line segment between the two metadata.

[0024] In one embodiment, in response to the second connection configuration operation on any two target data tables in the model drawing area, determining the second connection configuration information between the two target data tables includes:

[0025] In response to a line connection operation on any two target data tables in the model drawing area, connecting the two metadata using a line segment;

[0026] In response to a second configuration operation on the line segment between the two target data tables, determining second configuration information between the two target data tables;

[0027] According to the connection type of the line segment between the two target data tables, second connection configuration information between the two metadata is determined.

[0028] In one embodiment, the method further comprises:

[0029] Obtaining metadata information of all metadata stored in the target database;

[0030] Determine the data usage of each metadata according to the metadata information of each metadata;

[0031] According to the metadata under different data purposes, original data tables corresponding to different data purposes are constructed; wherein each original data table includes metadata of the same data purpose.

[0032] In a second aspect, the present application also provides a database model diagram construction device, including:

[0033] An information acquisition module, configured to acquire basic data table information of each original data table in the target database in response to a database model diagram construction instruction for the target database;

[0034] A page display module, used to display a model construction page according to the basic information of each original data table; wherein the model construction page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0035] A model drawing module, configured to determine at least two target data tables in response to a drag operation on each original data table in the data display area, and place each target data table in the model drawing area;

[0036] The model building module is used to respond to the data table configuration operation of each target data table in the model drawing area, build the association relationship between each target data table and the association relationship between the metadata in each target data table, so as to realize the construction of the database model diagram of the target database.

[0037] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0038] In response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database;

[0039] Displaying a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0040] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0041] In response to the data table configuration operation on each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0043] In response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database;

[0044] Displaying a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0045] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0046] In response to the data table configuration operation on each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database.

[0047] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0048] In response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database;

[0049] Displaying a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0050] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0051] In response to the data table configuration operation on each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database.

[0052] The above-mentioned database model diagram construction method, device, computer equipment, medium and product obtain the basic information of the data table of each original data table in the target database, and display the model construction page for the target database to the user, and the model construction page includes a data display area and a model drawing area, and the data display area includes the data description information of each original data table in the target database, so as to ensure that the user can easily drag and drop each original data table in the data display area; further, in response to the drag operation of each original data table in the data display area, at least two target data tables are determined, and each target data table is placed in the model drawing area, and in response to the data table configuration operation of each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database. The above-mentioned scheme reduces the difficulty of database model management through the visual model construction page and rich interactive functions (i.e., drag and drop operation and configuration operation, etc.), simplifies the creation and maintenance process of complex database model diagrams through graphical operations, and improves the efficiency and accuracy of database model management. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 An application environment diagram of a method for constructing a database model diagram in an embodiment;

[0055] Figure 2 A schematic diagram of a process of constructing a database model diagram in one embodiment;

[0056] Figure 3 A schematic diagram showing a flow of building a model page in one embodiment;

[0057] Figure 4 A schematic diagram of a process for constructing association relationships between target data tables and association relationships between metadata in target data tables in one embodiment;

[0058] Figure 5 An example diagram of building an association relationship between target data tables in one embodiment;

[0059] Figure 6 A schematic diagram of a process for obtaining an original data table in one embodiment;

[0060] Figure 7 A schematic diagram of a process of constructing a database model diagram in another embodiment;

[0061] Figure 8 A structural block diagram of a database model diagram construction device in one embodiment;

[0062] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] The database model diagram construction method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 101 communicates with the server 102 through the network. The data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or it can be placed on the cloud or other network servers. And a model building application based on a graphics building engine is installed on the terminal 101, and the model building application can be presented in the form of a web page. In an embodiment of the present application, the graphics building engine can be AntV-X6. Optionally, in response to a database model diagram construction instruction for a target database, basic data table information of each original data table in the target database is obtained; according to the basic data table information of each original data table, a model construction page is displayed; wherein the model construction page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database; in response to a drag operation on each original data table in the data display area, at least two target data tables are determined, and each target data table is placed in the model drawing area; in response to a data table configuration operation on each target data table in the model drawing area, an association relationship between each target data table and an association relationship between metadata in each target data table are constructed to realize the construction of a database model diagram of the target database. Among them, the terminal 101 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The server 102 can be implemented by an independent server or a server cluster consisting of multiple servers.

[0065] In one embodiment, Figure 2 As shown, a method for constructing a database model diagram is provided, and the method is applied to Figure 1 The server 102 in the example is used as an example to illustrate, and specifically includes the following steps:

[0066] S201, in response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database.

[0067] Among them, the target database can be any database. The database model diagram is a visual diagram that can represent the relationship between the metadata in the target database. The database model diagram construction instruction is used to instruct the construction of the database model diagram of the target database. The metadata contained in an original data table has a certain common attribute. For example, the metadata contained in an original data table can have the same data source or the same data purpose, and no limitation is made here. The basic information of the data table represents the basic attribute information of the original data table and the basic attribute information of each metadata in the original data table; in an embodiment of the present application, the basic information of the data table includes but is not limited to the data table name of the original data table and the metadata information contained in the original data table.

[0068] Optionally, when building a database model diagram of the target database, the user needs to obtain basic data table information of each original data table in the target database and metadata information contained in each original data table in the target database based on the API (Application Programming Interface) provided by the model building application on the terminal.

[0069] S202, displaying a model building page according to the basic information of each original data table.

[0070] Among them, the model building page is used for users to draw database model diagrams. In the embodiment of the present application, the model building page includes a data display area and a model drawing area. The data display area includes data description information of each original data table in the target database.

[0071] Optionally, based on the application set in the background, key content required for the model building page is extracted from the basic information of the data tables of each original data table, and filled in to generate a model building page for the target database.

[0072] S203, in response to the dragging operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area.

[0073] Optionally, the user can drag each original data table in the data display area to the model drawing area. At this time, the server responds to the drag operation on each original data table in the data display area, takes the original data table dragged by the user as the target data table, and renders each target data table in the model drawing area for display so that the user can perform the next operation.

[0074] It should be noted that the user can display the description information of each metadata in the target data table in the model drawing area by clicking the target data table placed in the model drawing area.

[0075] S204, in response to the data table configuration operation on each target data table in the model drawing area, construct association relationships between each target data table and association relationships between metadata in each target data table to implement construction of a database model diagram of the target database.

[0076] Optionally, the user may click to configure each target data table displayed in the model drawing area based on each functional module provided in the model drawing area, or may click to configure metadata contained in each data table in the model drawing area.

[0077] For example, the target data tables with associated relationships can be connected and associated through the connection function module provided in the model drawing area to build the associated relationships between the target data tables; at the same time, the metadata with associated relationships can also be connected and associated to build the associated relationships between the metadata in the target data tables. This is done until all the target data tables or metadata in the model drawing area have associated relationships. At this point, the construction of the database model diagram of the target database is completed.

[0078] In the above database model diagram construction method, by obtaining the basic data table information of each original data table in the target database, the model construction page for the target database is displayed to the user, and the model construction page includes a data display area and a model drawing area, and the data display area includes the data description information of each original data table in the target database, so as to ensure that the user can easily drag and drop each original data table in the data display area; further, in response to the drag operation of each original data table in the data display area, at least two target data tables are determined, and each target data table is placed in the model drawing area, and in response to the data table configuration operation of each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database. The above scheme reduces the difficulty of database model management through the visual model construction page and rich interactive functions (i.e., drag and drop operation and configuration operation, etc.), simplifies the creation and maintenance process of complex database model diagrams through graphical operations, and improves the efficiency and accuracy of database model management.

[0079] Optionally, the basic data table information of each original data table includes the data table name and metadata information contained in the original data table; in this case, in one embodiment, Figure 3 As shown, a method for displaying a model building page is provided to refine S202 in the above embodiment, and specifically includes the following steps:

[0080] S301, obtaining an initial construction page.

[0081] The initial construction page includes a blank display area and a model drawing area.

[0082] Optionally, the initial construction page may be a page template with a fixed layout and size that is pre-stored in the background memory, so that the server can directly obtain the initial construction page.

[0083] S302: construct a metadata structure tree of the target database according to the basic information of each original data table.

[0084] The metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level.

[0085] Optionally, the data table name of each original data table and the metadata information contained in the original data table can be obtained based on the basic information of each original data table. Further, according to the number of original data tables, a corresponding number of first-level nodes are generated, and named with the name of each original data table. In addition, for the first-level node corresponding to each original data table, under the first-level node, according to the number of metadata contained in the original data table, a corresponding number of second-level nodes under the first-level node are generated, and named according to the metadata information of the metadata. Then, the metadata structure tree of the target database is obtained.

[0086] S303, fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain the model construction page, and display the model construction page.

[0087] Optionally, the generated metadata structure tree is rendered and filled into the blank display area of ​​the initial construction page, so that a model construction page for the target database can be obtained. Furthermore, the model construction page is displayed to the user on the terminal.

[0088] In this embodiment, by introducing the data table name and metadata information contained in the original data table, the constructed model building page is ensured to be targeted, and the comprehensiveness and accuracy of the data displayed in the data display area in the constructed model building page are ensured.

[0089] Optionally, in one embodiment, Figure 4 As shown, a method for constructing association relationships between target data tables and association relationships between metadata in target data tables is provided to refine S204 in the above embodiment, specifically including the following steps:

[0090] S401, in response to a first connection configuration operation on any two metadata in each target data table in a model drawing area, determining first connection configuration information between the two metadata.

[0091] The first connection configuration information represents the association relationship between the two metadata.

[0092] Optionally, in response to a connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; based on the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0093] S402, in response to a second connection line configuration operation on any two target data tables in the model drawing area, determining second connection line configuration information between the two target data tables.

[0094] Optionally, in response to a connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; based on the connection type of the line segment between the two target data tables, second connection configuration information between the two metadata is determined.

[0095] S403: Construct association relationships between metadata in each target data table according to each first connection configuration information.

[0096] Optionally, the segment type of the segment between any two metadata may be configured according to the first connection configuration information of the segment between the two metadata, so as to establish an association relationship between the two metadata.

[0097] S404: construct association relationships between target data tables according to the second connection configuration information.

[0098] Optionally, the segment type of the segment between any two target data tables may be configured according to the second connection configuration information of the segment between the two target data tables to establish an association relationship between the two target data tables.

[0099] For example, Figure 5 As shown, it is an example diagram of the association relationship between target data tables provided in the embodiment of the present application. Figure 5 The page displayed is the model building page. The left side of the model building page is the data display area, and the "table" in it is the original data table. For example, it can be named "Calendar Meeting Results Table", "Power Supply Quality Improvement Control Table", "Distribution Network Wire Channel Results Table" and "Distribution Network Wire Worker Results Table". The right side of the model building page is the model drawing area, which consists of Figure 5 From the content displayed in the figure, it can be seen that the "Power Supply Quality Improvement Control Table" and the "Distribution Network Wire Channel Result Table" are displayed in the model drawing area as target data tables, and the connection method between the two target data tables can be determined by clicking the line segment between the two target data tables and selecting the line segment type, that is, determining the association relationship between the two target data tables.

[0100] In this embodiment, by introducing the first connection configuration information and the second connection configuration information, the accuracy of the association relationship between the metadata in each constructed target data table and the accuracy of the association relationship between the constructed target data tables are guaranteed, thereby ensuring the accuracy of the database model diagram of the constructed target database.

[0101] Optionally, in one embodiment, Figure 6 As shown, a method for obtaining an original data table is provided, which specifically includes the following steps:

[0102] S601, obtaining metadata information of all metadata stored in a target database.

[0103] The metadata information represents the basic attributes of the metadata. For example, the metadata information includes but is not limited to the name of the metadata, the creation time, the purpose of the data, the source of the data, and other information.

[0104] Optionally, metadata information of all metadata stored in the target database may be directly obtained from the log files of the target database.

[0105] S602: Determine the data usage of each metadata according to the metadata information of each metadata.

[0106] Optionally, the data usage of each metadata may be extracted from the metadata information of each metadata.

[0107] S603, constructing original data tables corresponding to different data uses according to metadata under different data uses.

[0108] Each original data table includes metadata of the same data usage.

[0109] Optionally, based on the metadata of the same data purpose, an original data table corresponding to the data purpose can be constructed, and the original data table can be named according to the data purpose.

[0110] In this embodiment, by obtaining metadata information of all metadata stored in the target database and classifying each metadata based on its data purpose, the clarity and accuracy of the obtained original data table are ensured so that users can quickly locate the required metadata according to the data purpose.

[0111] It should be noted that in the database model diagram construction method provided in the embodiment of the present application, the database model diagram of the constructed target database also supports real-time update and custom extension functions to meet diverse database management needs.

[0112] Figure 7 FIG. 1 is a flow chart of a method for constructing a database model diagram in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a method for constructing a database model diagram. Figure 7 The specific implementation process is as follows:

[0113] S701, in response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database.

[0114] Optionally, in response to a database model diagram construction instruction for a target database, metadata information of all metadata stored in the target database is obtained; data usage of each metadata is determined based on the metadata information of each metadata; and original data tables corresponding to different data usages are constructed based on the metadata under different data usages; wherein each original data table includes metadata of the same data usage.

[0115] S702, obtaining an initial construction page.

[0116] The initial construction page includes a blank display area and a model drawing area.

[0117] S703: construct a metadata structure tree of the target database according to the basic information of each original data table.

[0118] The metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level.

[0119] S704, fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain the model construction page, and display the model construction page.

[0120] S705 , in response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, determining first connection configuration information between the two metadata.

[0121] Optionally, in response to a connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; based on the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0122] S706 , in response to the second connection line configuration operation on any two target data tables in the model drawing area, determining second connection line configuration information between the two target data tables.

[0123] Optionally, in response to a connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; based on the connection type of the line segment between the two target data tables, second connection configuration information between the two metadata is determined.

[0124] S707: Construct association relationships between metadata in each target data table according to each first connection configuration information.

[0125] S708: Construct association relationships between target data tables according to the second connection configuration information.

[0126] The specific process of the above S701-S708 can be found in the description of the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0127] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0128] Based on the same inventive concept, the embodiment of the present application also provides a database model graph construction device for implementing the above-mentioned database model graph construction method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more database model graph construction device embodiments provided below can refer to the limitations of the database model graph construction method above, and will not be repeated here.

[0129] In an exemplary embodiment, Figure 8 As shown, a database model diagram construction device 800 is provided, including: an information acquisition module 810, a page display module 820, a model drawing module 830 and a model construction module 840, wherein:

[0130] The information acquisition module 810 is used to obtain basic data table information of each original data table in the target database in response to a database model diagram construction instruction for the target database.

[0131] The page display module 820 is used to display the model construction page according to the basic information of each original data table; wherein the model construction page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database.

[0132] The model drawing module 830 is used to determine at least two target data tables in response to the drag operation on each original data table in the data display area, and place each target data table in the model drawing area.

[0133] The model building module 840 is used to respond to the data table configuration operation of each target data table in the model drawing area, build the association relationship between each target data table and the association relationship between the metadata in each target data table, so as to realize the construction of the database model diagram of the target database.

[0134] The above-mentioned database model diagram construction device displays a model construction page for the target database to the user by acquiring the basic information of the data tables of each original data table in the target database, and the model construction page includes a data display area and a model drawing area. The data display area includes the data description information of each original data table in the target database, ensuring that the user can easily drag and drop each original data table in the data display area; further, in response to the drag operation of each original data table in the data display area, at least two target data tables are determined, and each target data table is placed in the model drawing area, and in response to the data table configuration operation of each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database. The above-mentioned scheme reduces the difficulty of database model diagram management through visual model construction pages and rich interactive functions (i.e., drag and drop operations and configuration operations, etc.), simplifies the creation and maintenance process of complex database model diagrams through graphical operations, and improves the efficiency and accuracy of database model diagram management.

[0135] In one embodiment, the basic data table information of each original data table includes the data table name and metadata information contained in the original data table; the page display module 820 is specifically used to:

[0136] Obtain an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area; construct a metadata structure tree of the target database according to the basic information of each original data table; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level; fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain a model construction page, and display the model construction page.

[0137] In one embodiment, the model building module 840 includes:

[0138] The first configuration unit is used to determine first connection configuration information between two metadata in response to a first connection configuration operation on any two metadata in each target data table in the model drawing area.

[0139] The second configuration unit is used to determine the second connection configuration information between the two target data tables in response to the second connection configuration operation on any two target data tables in the model drawing area.

[0140] The first construction unit is used to construct the association relationship between the metadata in each target data table according to each first connection configuration information.

[0141] The second construction unit is used to construct the association relationship between the target data tables according to the second connection configuration information.

[0142] In one embodiment, the first configuration unit is specifically used to:

[0143] In response to a line connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; according to the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0144] In one embodiment, the second configuration unit is specifically used for:

[0145] In response to a line connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; according to the connection type of the line segment between the two target data tables, the second connection configuration information between the two metadata is determined.

[0146] In one embodiment, the information acquisition module 810 is further used to:

[0147] Obtain metadata information of all metadata stored in a target database; determine data usage of each metadata according to the metadata information of each metadata; construct original data tables corresponding to different data usages according to metadata under different data usages; wherein each original data table includes metadata of the same data usage.

[0148] Each module in the above-mentioned database model diagram construction device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0149] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for constructing a database model diagram is implemented.

[0150] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0152] In response to a database model diagram construction instruction for a target database, basic data table information of each original data table in the target database is obtained;

[0153] Display a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0154] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0155] In response to the data table configuration operation on each target data table in the model drawing area, association relationships between the target data tables and association relationships between metadata in the target data tables are constructed to achieve construction of a database model diagram of the target database.

[0156] In one embodiment, the basic data table information of each original data table includes the data table name and metadata information contained in the original data table; when the processor executes the computer program to display the model building page according to the basic data table information of each original data table, the following steps are also implemented:

[0157] Obtain an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area; construct a metadata structure tree of the target database according to the basic information of each original data table; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level; fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain a model construction page, and display the model construction page.

[0158] In one embodiment, when the processor executes the computer program in response to the data table configuration operation on each target data table in the model drawing area and constructs the association relationship between each target data table and the association relationship between the metadata in each target data table, the following steps are also implemented:

[0159] In response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, first connection configuration information between the two metadata is determined; in response to a second connection configuration operation on any two target data tables in the model drawing area, second connection configuration information between the two target data tables is determined; based on each first connection configuration information, an association relationship between the metadata in each target data table is constructed; based on each second connection configuration information, an association relationship between each target data table is constructed.

[0160] In one embodiment, the processor executes the computer program in response to the first connection configuration operation on any two metadata in each target data table in the model drawing area, and when determining the first connection configuration information between the two metadata, further implements the following steps:

[0161] In response to a line connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; according to the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0162] In one embodiment, the processor executes the computer program to respond to the second connection line configuration operation on any two target data tables in the model drawing area, and when determining the second connection line configuration information between the two target data tables, further implements the following steps:

[0163] In response to a line connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; according to the connection type of the line segment between the two target data tables, the second connection configuration information between the two metadata is determined.

[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0165] Obtain metadata information of all metadata stored in a target database; determine data usage of each metadata according to the metadata information of each metadata; construct original data tables corresponding to different data usages according to metadata under different data usages; wherein each original data table includes metadata of the same data usage.

[0166] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0167] In response to a database model diagram construction instruction for a target database, basic data table information of each original data table in the target database is obtained;

[0168] Display a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0169] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0170] In response to the data table configuration operation on each target data table in the model drawing area, association relationships between the target data tables and association relationships between metadata in the target data tables are constructed to achieve construction of a database model diagram of the target database.

[0171] In one embodiment, the basic data table information of each original data table includes the data table name and metadata information contained in the original data table; when the processor executes the computer program to display the model building page according to the basic data table information of each original data table, the following steps are also implemented:

[0172] Obtain an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area; construct a metadata structure tree of the target database according to the basic information of each original data table; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level; fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain a model construction page, and display the model construction page.

[0173] In one embodiment, when the processor executes the computer program in response to the data table configuration operation on each target data table in the model drawing area and constructs the association relationship between each target data table and the association relationship between the metadata in each target data table, the following steps are also implemented:

[0174] In response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, first connection configuration information between the two metadata is determined; in response to a second connection configuration operation on any two target data tables in the model drawing area, second connection configuration information between the two target data tables is determined; based on each first connection configuration information, an association relationship between the metadata in each target data table is constructed; based on each second connection configuration information, an association relationship between each target data table is constructed.

[0175] In one embodiment, the processor executes the computer program in response to the first connection configuration operation on any two metadata in each target data table in the model drawing area, and when determining the first connection configuration information between the two metadata, further implements the following steps:

[0176] In response to a line connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; according to the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0177] In one embodiment, the processor executes the computer program to respond to the second connection line configuration operation on any two target data tables in the model drawing area, and when determining the second connection line configuration information between the two target data tables, further implements the following steps:

[0178] In response to a line connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; according to the connection type of the line segment between the two target data tables, the second connection configuration information between the two metadata is determined.

[0179] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0180] Obtain metadata information of all metadata stored in a target database; determine data usage of each metadata according to the metadata information of each metadata; construct original data tables corresponding to different data usages according to metadata under different data usages; wherein each original data table includes metadata of the same data usage.

[0181] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0182] In response to a database model diagram construction instruction for a target database, basic data table information of each original data table in the target database is obtained;

[0183] Display a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database;

[0184] In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area;

[0185] In response to the data table configuration operation on each target data table in the model drawing area, association relationships between the target data tables and association relationships between metadata in the target data tables are constructed to achieve construction of a database model diagram of the target database.

[0186] In one embodiment, the basic data table information of each original data table includes the data table name and metadata information contained in the original data table; when the processor executes the computer program to display the model building page according to the basic data table information of each original data table, the following steps are also implemented:

[0187] Obtain an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area; construct a metadata structure tree of the target database according to the basic information of each original data table; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level; fill the metadata structure tree into the blank display area of ​​the initial construction page to obtain a model construction page, and display the model construction page.

[0188] In one embodiment, when the processor executes the computer program in response to the data table configuration operation on each target data table in the model drawing area and constructs the association relationship between each target data table and the association relationship between the metadata in each target data table, the following steps are also implemented:

[0189] In response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, first connection configuration information between the two metadata is determined; in response to a second connection configuration operation on any two target data tables in the model drawing area, second connection configuration information between the two target data tables is determined; based on each first connection configuration information, an association relationship between the metadata in each target data table is constructed; based on each second connection configuration information, an association relationship between each target data table is constructed.

[0190] In one embodiment, the processor executes the computer program in response to the first connection configuration operation on any two metadata in each target data table in the model drawing area, and when determining the first connection configuration information between the two metadata, further implements the following steps:

[0191] In response to a line connection operation on any two metadata in each target data table in the model drawing area, the two metadata are connected using a line segment; in response to a first configuration operation on the line segment between the two metadata, the connection type of the line segment between the two metadata is determined; according to the connection type of the line segment between the two metadata, the first connection configuration information between the two metadata is determined.

[0192] In one embodiment, the processor executes the computer program to respond to the second connection line configuration operation on any two target data tables in the model drawing area, and when determining the second connection line configuration information between the two target data tables, further implements the following steps:

[0193] In response to a line connection operation on any two target data tables in the model drawing area, two metadata are connected using a line segment; in response to a second configuration operation on the line segment between the two target data tables, second configuration information between the two target data tables is determined; according to the connection type of the line segment between the two target data tables, the second connection configuration information between the two metadata is determined.

[0194] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0195] Obtain metadata information of all metadata stored in a target database; determine data usage of each metadata according to the metadata information of each metadata; construct original data tables corresponding to different data usages according to metadata under different data usages; wherein each original data table includes metadata of the same data usage.

[0196] It should be noted that the data involved in this application (including but not limited to data used for analysis, storage, display, etc.) are all information and data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0197] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0198] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0199] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for constructing a database model diagram, characterized in that: The method comprises: In response to a database model diagram construction instruction for a target database, obtaining basic data table information of each original data table in the target database; Displaying a model building page according to the basic information of each original data table; wherein the model building page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database; In response to a drag operation on each original data table in the data display area, determining at least two target data tables, and placing each target data table in the model drawing area; In response to the data table configuration operation on each target data table in the model drawing area, the association relationship between each target data table and the association relationship between the metadata in each target data table are constructed to realize the construction of the database model diagram of the target database.

2. The method according to claim 1, characterized in that The basic data table information of each original data table includes the data table name and metadata information contained in the original data table; The model building page is displayed based on the basic information of the data table of each original data table, including: Obtaining an initial construction page; wherein the initial construction page includes a blank display area and a model drawing area; According to the basic information of each original data table, a metadata structure tree of the target database is constructed; wherein the metadata structure tree uses each original data table as a first-level node and the metadata contained in each original data table as a second-level node, and the first level is higher than the second level; The metadata structure tree is filled into the blank display area of ​​the initial construction page to obtain a model construction page, and the model construction page is displayed.

3. The method according to claim 1, characterized in that In response to the data table configuration operation on each target data table in the model drawing area, building the association relationship between each target data table and the association relationship between metadata in each target data table includes: In response to a first connection configuration operation on any two metadata in each target data table in the model drawing area, determining first connection configuration information between the two metadata; In response to a second connection line configuration operation on any two target data tables in the model drawing area, determining second connection line configuration information between the two target data tables; According to each first connection configuration information, an association relationship between metadata in each target data table is established; According to each second connection line configuration information, an association relationship between each target data table is constructed.

4. The method according to claim 3, characterized in that In response to the first connection configuration operation on any two metadata in each target data table in the model drawing area, determining the first connection configuration information between the two metadata includes: In response to a line connection operation on any two metadata in each target data table in the model drawing area, connecting the two metadata using a line segment; In response to a first configuration operation on the line segment between the two metadata, determining a connection type of the line segment between the two metadata; First connection configuration information between the two metadata is determined according to the connection type of the line segment between the two metadata.

5. The method according to claim 3, characterized in that: The step of determining the second connection configuration information between any two target data tables in response to the second connection configuration operation on the two target data tables in the model drawing area includes: In response to a line connection operation on any two target data tables in the model drawing area, connecting the two metadata using a line segment; In response to a second configuration operation on the line segment between the two target data tables, determining second configuration information between the two target data tables; According to the connection type of the line segment between the two target data tables, second connection configuration information between the two metadata is determined.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining metadata information of all metadata stored in the target database; Determine the data usage of each metadata according to the metadata information of each metadata; According to the metadata under different data purposes, original data tables corresponding to different data purposes are constructed; wherein each original data table includes metadata of the same data purpose.

7. A database model diagram construction device, characterized in that: The device comprises: An information acquisition module, configured to acquire basic data table information of each original data table in the target database in response to a database model diagram construction instruction for the target database; A page display module, used to display a model construction page according to the basic information of each original data table; wherein the model construction page includes a data display area and a model drawing area, and the data display area includes data description information of each original data table in the target database; A model drawing module, configured to determine at least two target data tables in response to a drag operation on each original data table in the data display area, and place each target data table in the model drawing area; The model building module is used to respond to the data table configuration operation of each target data table in the model drawing area, build the association relationship between each target data table and the association relationship between the metadata in each target data table, so as to realize the construction of the database model diagram of the target database.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.