CN113886389A - Model document generation method, apparatus, device and storage medium - Google Patents
Model document generation method, apparatus, device and storage medium Download PDFInfo
- Publication number
- CN113886389A CN113886389A CN202111155734.3A CN202111155734A CN113886389A CN 113886389 A CN113886389 A CN 113886389A CN 202111155734 A CN202111155734 A CN 202111155734A CN 113886389 A CN113886389 A CN 113886389A
- Authority
- CN
- China
- Prior art keywords
- model
- database
- metadata
- objects
- document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000003860 storage Methods 0.000 title claims abstract description 17
- 238000004590 computer program Methods 0.000 claims description 28
- 238000010586 diagram Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 abstract description 2
- 238000005259 measurement Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 7
- 238000010276 construction Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000004220 aggregation Methods 0.000 description 4
- 230000002776 aggregation Effects 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000013499 data model Methods 0.000 description 1
- 238000013079 data visualisation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/254—Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present application relates to the field of object storage for data processing, and in particular, to a method and an apparatus for generating a model document, a computer device, and a storage medium. After a model document generation request is obtained, searching corresponding database model data according to the model document generation request; analyzing the database model data to obtain data table metadata, model metadata and index metadata; reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata; constructing a database project object; and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data. According to the method and the device, various objects in the database are reconstructed based on the metadata of the database, and then the reconstruction of the project objects of the database is completed based on the various objects, so that the model document is generated, and the output efficiency of the model document is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a model document.
Background
With the development of computer technology, database technology is continuously updated. Many databases now provide data analysis capabilities, such as Kylin. ApachekyrinTMIs an open-source and distributed analytical data warehouse provided on a Hadoop/SparkThe SQL query interface and multidimensional analysis capability to support very large scale data. It can look up huge tables in sub-seconds. Kylin provides integration capabilities with a variety of data visualization tools, such as Tableau, PowerBI, etc., that allow users to analyze Hadoop data using the BI (Business Intelligence) tool.
When using these databases, such as Kylin, as a data warehouse, hundreds or thousands of data cube models need to be built to serve data queries of front-end applications. In the databases, each model is composed of concepts such as aggregation groups, dimensions, measurement, computable columns and the like, a front-end application developer needs to correspondingly develop a model document of the database, however, the workload of manually writing the model document is very large, and the database model is often changed and optimized according to requirements and cannot be timely synchronized to the developer. The model document is generated with poor efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a model document generating method, apparatus, device and storage medium for efficiently generating a model document.
A database model document generation method, the method comprising:
acquiring a model document generation request, and searching corresponding database model data according to the model document generation request;
analyzing the database model data to obtain data table metadata, model metadata and index metadata;
reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata;
constructing a database item object according to the list object, the model object and the index object;
and compiling the document of the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data.
In one embodiment, the reconstructing the list object in the database through the data table metadata includes:
analyzing a json character string in the data table metadata to obtain list metadata in the json character string;
and instantiating the list object in the generation database according to the list metadata.
In one embodiment, the reconstructing of the model object in the database through the model metadata includes:
analyzing a json character string in the model metadata, and acquiring dimension metadata, measurement metadata and calculable column metadata in the json character string;
and instantiating the dimension metadata, the measurement metadata and the calculable column metadata respectively to generate a model object in a database, and associating the model object with the list object according to a preset identity.
In one embodiment, the reconstructing the index object in the database through the index metadata includes:
and reconstructing an index object in a database through index metadata, and associating the index object with the model object according to a preset identity.
In one embodiment, the constructing the database item object according to the list object, the model object, and the index object includes:
constructing a database data cube object according to the list object, the model object and the index object;
and constructing a database project object according to all database data cube objects corresponding to the database model data.
In one embodiment, the preset document writing grammar includes a Markdown grammar, the document writing of the database item object by using the preset document writing grammar, and the generating of the model document corresponding to the database model data includes:
compiling a document template for the database project object according to the Markdown grammar;
and calling metadata information corresponding to the database project object, and generating a model document corresponding to the database model data according to the document template.
In one embodiment, after the invoking of the metadata information corresponding to the database project object and the generating of the model document corresponding to the database model data according to the document template, the method further includes:
and constructing an object relation graph corresponding to the database model data according to the hierarchical relation corresponding to each object in the database project objects.
An apparatus for generating a database model document, the apparatus comprising:
the data acquisition module is used for acquiring a model document generation request and searching corresponding database model data according to the model document generation request;
the model analysis module is used for analyzing the database model data to obtain data table metadata, model metadata and index metadata;
the object reconstruction module is used for reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata and reconstructing index objects in the database through the index metadata;
the project object construction module is used for constructing database project objects according to the list objects, the model objects and the index objects;
and the model document generation module is used for compiling the document of the database project object by adopting a preset document compiling grammar and generating a model document corresponding to the database model data.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a model document generation request, and searching corresponding database model data according to the model document generation request;
analyzing the database model data to obtain data table metadata, model metadata and index metadata;
reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata;
constructing a database item object according to the list object, the model object and the index object;
and compiling the document of the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data.
A computer storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
acquiring a model document generation request, and searching corresponding database model data according to the model document generation request;
analyzing the database model data to obtain data table metadata, model metadata and index metadata;
reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata;
constructing a database item object according to the list object, the model object and the index object;
and compiling the document of the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data.
The method comprises the steps of searching corresponding database model data according to a model document generation request after the model document generation request is obtained; analyzing the database model data to obtain data table metadata, model metadata and index metadata; reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata; constructing a database item object according to the list object, the model object and the index object; and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data. According to the method and the device, various objects in the database are reconstructed based on the metadata of the database, and then the reconstruction of the project objects of the database is completed based on the various objects, so that the model document is automatically generated, and the output efficiency of the model document is greatly improved.
Drawings
FIG. 1 is a diagram of an application scenario of a model document generation method in one embodiment;
FIG. 2 is a flowchart illustrating a method for generating a model document in one embodiment;
FIG. 3 is a schematic sub-flow chart of step 205 of FIG. 2 in one embodiment;
FIG. 4 is a schematic sub-flow chart of step 205 of FIG. 2 according to another embodiment;
FIG. 5 is a diagram of object relationships corresponding to Kylin model data in one embodiment;
FIG. 6 is a block diagram showing the configuration of a model document generating apparatus in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result. The artificial intelligence technology in the application is mainly used for compiling the model document.
The application specifically provides a model document generation method, which can be applied to the application environment shown in fig. 1. Wherein, the terminal 102 can communicate with the model document generation server 104 through the network, and the terminal 102 can send a model document generation request to the model document generation server 104. The model document generation server 104 receives the model document generation request, and searches corresponding database model data according to the model document generation request; analyzing the database model data to obtain data table metadata, model metadata and index metadata; reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata; constructing a database item object according to the list object, the model object and the index object; and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the model document generation server 104 may be an independent server, or may be a cloud server that provides basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, web service, cloud communication, middleware service, domain name service, security service, Content Distribution Network (CDN), and a big data and artificial intelligence platform.
In one embodiment, as shown in fig. 2, a model document generation method is provided, which is illustrated by applying the method to the model document generation server 104 in fig. 1, and taking the database as Kylin as an example, and includes the following steps:
step 201, obtaining a model document generation request, and searching corresponding database model data according to the model document generation request.
The model document is used for describing the Kylin cube models, the model document specifically includes data in each Kylin cube model in Kylin, and the model document specifically includes: the Kylin model uses data such as a data source table, a Kylin dimension table, a Kylin metric table, a Kylin computable list, a Kylin aggregation group, a Kylin detail index and the like. The model document generation request is used for requesting the document generation server to automatically analyze the Kylin cube model, so that the model document corresponding to the Kylin cube model is efficiently and accurately generated. The database model data refers to the description objects of the model documents, and is related to the data model constructed based on Kylin.
Specifically, in the present application, a user may request, through a model document generation request, to generate a corresponding model document for a certain specified Kylin item. The document creation server 104 takes the Kylin item as a processing object. At the beginning, the document generation server 104 may export all the Kylin model data files in the currently specified Kylin project to the local according to the project from the Kylin model management interface according to the model document generation request, wherein a project usually contains data of a plurality of Kylin cube models.
Step 203, analyzing the database model data, and acquiring the data table metadata, the model metadata and the index metadata.
Metadata (Metadata), also called intermediate data and relay data, is data describing data, mainly information describing data property (property), and is used to support functions such as indicating storage location, history data, resource search, file record, and the like. Metadata is an electronic catalog, and in order to achieve the purpose of creating a catalog, the contents or features of data must be described and collected, so as to achieve the purpose of assisting data retrieval. While Kylin organizes all its metadata in a hierarchical file system, the metadata includes cube descriptions (cubes), cube instances (instances), projects (projects), inverted index descriptions (inverted descriptions) and instances (instances), jobs (jobs), tables (tables), and dictionaries (dictionary). Kylin does not use a conventional file system to store its metadata, but rather uses HBase for storage.
In particular, the obtained Kylin model data may specifically exist in the form of data compression packets. The document generation server can obtain model files of all the Kylin cube models by analyzing the Kylin model data, then traverses all the model files, analyzes the obtained Kylin model data into three metadata, namely data table metadata, model metadata and index metadata, and then reconstructs the Kylin project object through the three metadata.
Step 205, the list objects in the database are reconstructed by the data table metadata, the model objects in the database are reconstructed by the model metadata, and the index objects in the database are reconstructed by the index metadata.
Analyzing the Kylin model data, and acquiring data table metadata, model metadata and index metadata which are specifically used for reconstructing different types of objects in Kylin. The data Table metadata is used to reconstruct list objects in Kylin, including Table objects and Column objects. The model metadata is used to reconstruct the model objects in Kylin, including the Demension object, the Measure object, and the ComputeColumn object. The index metadata is then used to reconstruct the index objects in Kylin, including the AggGroupIndex object and the DetailIndex object. By reconstructing different objects in the Kylin cube model, a Kylin cube object of a higher level can be constructed based on the objects.
Step 207, construct database item objects according to the list objects, model objects, and index objects.
And 209, performing document writing on the database project object by adopting a preset document writing grammar, and generating a model document corresponding to the database model data.
The default document authoring grammar may specifically be a Markdown grammar, which is a lightweight markup language that allows people to author documents using a plain text format that is easy to read and write, and then convert to valid XHTML (or HTML) documents. Because of the lightweight, easy-to-read and easy-to-write characteristics of Markdown, and the support for pictures, charts and mathematical expressions, Markdown is widely used by many websites to write help documents or to publish messages in forums.
Specifically, by reconstructing different objects in the Kylin cube model, a Kylin cube object and a Kylin project object at a higher level can be constructed based on the objects. Thereby completing the preparation for reconstruction of the model document. And then, document writing can be carried out on the Kylin project object by adopting a preset document writing grammar to generate a model document corresponding to the Kylin model data. Specifically, a template of a document style can be written for the project object according to a preset document writing grammar, then the reconstructed metadata information of the project object is called, a model document of each Kylin cube model in the Kylin project object is generated by taking Kylin cubes as a unit, and the model documents of all Kylin cube models are combined into a model document corresponding to Kylin model data.
The method comprises the steps of searching corresponding database model data according to a model document generation request after the model document generation request is obtained; analyzing the database model data to obtain data table metadata, model metadata and index metadata; reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata; constructing a database item object according to the list object, the model object and the index object; and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data. According to the method and the device, various objects in the database are reconstructed based on the metadata of the database, and then the reconstruction of the project objects of the database is completed based on the various objects, so that the model document is automatically generated, and the output efficiency of the model document is greatly improved.
In one embodiment, as shown in FIG. 3, step 205 comprises:
step 302, analyzing a json character string in the metadata of the data table to obtain list metadata in the json character string.
Step 304, instantiating the list object in the production database according to the list metadata.
The list object specifically includes a Table object and a Column object. Specifically, in the process of reconstructing the list object, a json character string corresponding to the data Table metadata may be analyzed, list metadata in the json character string is obtained, and specifically, the list metadata includes metadata of types such as a Table name, a field type, a field comment and the like, and a Table object and a Column object are instantiated and generated according to the list metadata, where the instantiation generation specifically is to set a corresponding Table name for the Table object, set the field name, the field type, the field comment and the like as attributes of the Column object, and set the attributes of the Column object as attributes of the Column object. In this embodiment, the list object in Kylin is generated by instantiating the list metadata, so that the validity of the list object reconstruction process can be effectively ensured.
In one embodiment, as shown in FIG. 4, step 205 comprises:
step 401, analyzing the json character string in the model metadata, obtaining dimension metadata and measurement metadata in the json character string, and calculating column metadata.
Step 403, instantiating the dimension metadata, the measurement metadata and the computable column metadata to generate a model object in the database, and associating the model object with the list object according to the preset identity.
The list objects specifically comprise a maintenance object, a Measure object and a ComputeColumn object, the server can firstly analyze json character strings in model metadata, acquire dimension metadata, measurement metadata and computable Column metadata in the json character strings, respectively instantiate the metadata into the maintenance object, the Measure object and the ComputeColumn object, and associate the Column objects in the list objects through preset identity identifiers. In this embodiment, the model object in Kylin is generated by instantiating the model metadata, so that the validity of the model object reconstruction process can be effectively ensured.
In one embodiment, step 205 comprises: and reconstructing an index object in the Kylin through the index metadata, and associating the index object with the model object according to the preset identity.
The index objects specifically include AggGroupIndex objects and DetailIndex objects. Specifically, the document generation server 104 instantiates the corresponding metadata into an AggGroupIndex object and a DetailIndex object respectively by analyzing a json character string in the index metadata, and then refers to a dimension object, a Measure object, and a ComputeColumn object in the model object in the index object by using a preset identity. In this embodiment, the index object in the Kylin is generated by instantiating the index data, so that the validity of the index object reconstruction process can be effectively ensured.
In one embodiment, step 207 comprises: constructing a database data cube object according to the list object, the model object and the index object; and constructing a database project object according to all database data cube objects corresponding to the database model data.
Specifically, after the list object, the model object, and the index object, i.e., the default object, the Measure object, the ComputeColumn object, the aggggroupindex object, and the DetailIndex object, are generated by reconstruction, a Kylin cube object may be instantiated according to the objects, and the default attribute, the Measure attribute, the ComputeColumn attribute, the aggggroupindex attribute, and the DetailIndex attribute of the Kylin cube object are respectively set according to the list object, the model object, and the index object. These attributes correspond one-to-one to the above objects, respectively. The method is circulated for many times, all the Kylin cube objects in the project can be constructed, and then the Kylin project object can be constructed based on all the Kylin cube objects. In the implementation, the Kylin cube object is constructed firstly, and then the whole Kylin project object is created based on the Kylin cube object, so that the effectiveness of creating the project object can be ensured.
In one embodiment, the preset document writing grammar includes a Markdown grammar, document writing is performed on the Kylin project object by using the preset document writing grammar, and generating a model document corresponding to Kylin model data includes: compiling a document template for the Kylin project object according to the Markdown grammar; and calling metadata information corresponding to the Kylin project object, and generating a model document corresponding to the Kylin model data according to the document template.
Markdown, among other things, is a lightweight markup language that allows people to compose documents using a plain text format that is easy to read and write, and then convert to valid XHTML (or HTML) documents. Because of the lightweight, easy-to-read and easy-to-write characteristics of Markdown, and the support for pictures, charts and mathematical expressions, Markdown is widely used by many websites to write help documents or to publish messages in forums. According to the scheme, a template of a document style is compiled for each Kylin project object through a Markdown grammar, and then metadata information corresponding to the Kylin project object is called to generate a model document corresponding to the Kylin model. In this embodiment, the model document corresponding to the Kylin model data can be generated more efficiently by the Markdown grammar.
In one embodiment, after invoking metadata information corresponding to a database project object and generating a model document corresponding to database model data according to a document template, the method further includes: and constructing an object relation graph corresponding to database model data according to the hierarchical relation corresponding to each object in the database item objects.
Specifically, after the model document corresponding to the Kylin model data is generated, in order to more intuitively show the structural relationship of the Kylin project object, an object relationship diagram corresponding to the Kylin model data can be constructed according to the hierarchical relationship corresponding to each object in the Kylin project object. The schema of the object relationship graph may specifically refer to fig. 5, where the top layer is a Kylin item object, next, each Kylin cube object constituting the item object, and then, next, an object such as an index and the like at a lower level. Specifically, when constructing the object relationship diagram, first determining that the top level in the pair relationship diagram is a Kylin item object, where one Kylin item object includes several Kylin cube objects. Thus, after determining the Kylin item object, the next level Kylin cube object of the item object may be listed. For each Kylin cube object, the corresponding model construction data comprises dimension metadata, measurement metadata and calculable column metadata, and the data are associated with the Kylin cube object based on the aggregation group index. The aggregation group index and the detail index which can be regarded as the directory serve as the next level object of the Kylin cube object, and the dimension metadata, the measurement metadata and the computable column metadata serve as the next level object of the index, so that the construction of the object relation graph can be completed. In this embodiment, the structural hierarchical relationship of the objects in the Kylin model can be effectively shown by constructing the object relationship diagram.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a model document generating apparatus including:
the data obtaining module 601 is configured to obtain a model document generation request, and search for corresponding database model data according to the model document generation request.
The model parsing module 603 is configured to parse the database model data to obtain the data table metadata, the model metadata, and the index metadata.
An object reconstruction module 605 for reconstructing the list objects in the database through the data table metadata, the model objects in the database through the model metadata, and the index objects in the database through the index metadata.
And a project object construction module 607 for constructing database project objects according to the list object, the model object and the index object.
And the model document generating module 609 is configured to perform document writing on the database project object by using a preset document writing syntax, and generate a model document corresponding to the database model data.
In one embodiment, the object reconstruction module 605 is specifically configured to: analyzing a json character string in the metadata of the data table to obtain list metadata in the json character string; the list objects in the production database are instantiated according to the list metadata.
In one embodiment, the object reconstruction module 605 is specifically configured to: analyzing a json character string in the model metadata, and acquiring dimension metadata, measurement metadata and calculable column metadata in the json character string; and respectively instantiating the dimension metadata, the measurement metadata and the computable column metadata to generate a model object in the database, and associating the model object with the list object according to the preset identity.
In one embodiment, the object reconstruction module 605 is specifically configured to: and reconstructing an index object in the database through the index metadata, and associating the index object with the model object according to the preset identity.
In one embodiment, the project object construction module 607 is specifically configured to: constructing a database data cube object according to the list object, the model object and the index object; and constructing a database project object according to all database data cube objects corresponding to the database model data.
In one embodiment, the model document generation module 609 is specifically configured to: compiling a document template for the database project object according to the Markdown grammar; and calling metadata information corresponding to the database project object, and generating a model document corresponding to the database model data according to the document template.
In one embodiment, the system further comprises a relationship graph building module, configured to: and constructing an object relation graph corresponding to database model data according to the hierarchical relation corresponding to each object in the database item objects.
For specific embodiments of the model document generation apparatus, reference may be made to the above embodiments of the model document generation method, which are not described herein again. The modules in the model document generation device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing model document generation data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a model document generation method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program:
acquiring a model document generation request, and searching corresponding database model data according to the model document generation request;
analyzing the database model data to obtain data table metadata, model metadata and index metadata;
reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata;
constructing a database item object according to the list object, the model object and the index object;
and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: analyzing a json character string in the metadata of the data table to obtain list metadata in the json character string; the list objects in the production database are instantiated according to the list metadata.
In one embodiment, the processor, when executing the computer program, further performs the steps of: analyzing a json character string in the model metadata, and acquiring dimension metadata, measurement metadata and calculable column metadata in the json character string; and respectively instantiating the dimension metadata, the measurement metadata and the computable column metadata to generate a model object in the database, and associating the model object with the list object according to the preset identity.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and reconstructing an index object in the database through the index metadata, and associating the index object with the model object according to the preset identity.
In one embodiment, the processor, when executing the computer program, further performs the steps of: constructing a database data cube object according to the list object, the model object and the index object; and constructing a database project object according to all database data cube objects corresponding to the database model data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: compiling a document template for the database project object according to the Markdown grammar; and calling metadata information corresponding to the database project object, and generating a model document corresponding to the database model data according to the document template.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and constructing an object relation graph corresponding to database model data according to the hierarchical relation corresponding to each object in the database item objects.
In one embodiment, a computer storage medium is provided, having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
acquiring a model document generation request, and searching corresponding database model data according to the model document generation request;
analyzing the database model data to obtain data table metadata, model metadata and index metadata;
reconstructing list objects in the database through the data table metadata, reconstructing model objects in the database through the model metadata, and reconstructing index objects in the database through the index metadata;
constructing a database item object according to the list object, the model object and the index object;
and compiling the database project object by adopting a preset document compiling grammar to generate a model document corresponding to the database model data.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing a json character string in the metadata of the data table to obtain list metadata in the json character string; the list objects in the production database are instantiated according to the list metadata.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing a json character string in the model metadata, and acquiring dimension metadata, measurement metadata and calculable column metadata in the json character string; and respectively instantiating the dimension metadata, the measurement metadata and the computable column metadata to generate a model object in the database, and associating the model object with the list object according to the preset identity.
In one embodiment, the computer program when executed by the processor further performs the steps of: and reconstructing an index object in the database through the index metadata, and associating the index object with the model object according to the preset identity.
In one embodiment, the computer program when executed by the processor further performs the steps of: constructing a database data cube object according to the list object, the model object and the index object; and constructing a database project object according to all database data cube objects corresponding to the database model data.
In one embodiment, the computer program when executed by the processor further performs the steps of: compiling a document template for the database project object according to the Markdown grammar; and calling metadata information corresponding to the database project object, and generating a model document corresponding to the database model data according to the document template.
In one embodiment, the computer program when executed by the processor further performs the steps of: and constructing an object relation graph corresponding to database model data according to the hierarchical relation corresponding to each object in the database item objects.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111155734.3A CN113886389A (en) | 2021-09-29 | 2021-09-29 | Model document generation method, apparatus, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111155734.3A CN113886389A (en) | 2021-09-29 | 2021-09-29 | Model document generation method, apparatus, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113886389A true CN113886389A (en) | 2022-01-04 |
Family
ID=79004421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111155734.3A Pending CN113886389A (en) | 2021-09-29 | 2021-09-29 | Model document generation method, apparatus, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113886389A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109614085A (en) * | 2018-10-23 | 2019-04-12 | 深圳微迅信息科技有限公司 | Function realizing method, device, computer equipment and storage medium |
CN113227998A (en) * | 2018-12-28 | 2021-08-06 | 甲骨文国际公司 | Technology for comprehensively supporting autonomous JSON document object (AJD) cloud service |
-
2021
- 2021-09-29 CN CN202111155734.3A patent/CN113886389A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109614085A (en) * | 2018-10-23 | 2019-04-12 | 深圳微迅信息科技有限公司 | Function realizing method, device, computer equipment and storage medium |
CN113227998A (en) * | 2018-12-28 | 2021-08-06 | 甲骨文国际公司 | Technology for comprehensively supporting autonomous JSON document object (AJD) cloud service |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2024230117A1 (en) | Question answering method and apparatus, and electronic device, computer-readable storage medium and computer program product | |
CN111414350B (en) | Service generation method and device | |
CN108027818A (en) | Inquiry based on figure | |
Hasani et al. | Lambda architecture for real time big data analytic | |
Narkhede et al. | HMR log analyzer: Analyze web application logs over Hadoop MapReduce | |
US10402486B2 (en) | Document conversion, annotation, and data capturing system | |
US10397326B2 (en) | IRC-Infoid data standardization for use in a plurality of mobile applications | |
US20180150530A1 (en) | Method, Apparatus, Computing Device and Storage Medium for Analyzing and Processing Data | |
CN109213775B (en) | Search method, search device, computer equipment and storage medium | |
US11232105B2 (en) | Unified metrics computation platform | |
CN116226159A (en) | Metadata blood-edge relationship analysis method, system, equipment and storage medium | |
James et al. | Hybrid database system for big data storage and management | |
Pelekh et al. | Design of a system for dynamic integration of weakly structured data based on mash-up technology | |
Meenachi et al. | Web ontology language editors for semantic web-a survey | |
CN105930354A (en) | Storage model conversion method and device | |
Antonov et al. | Development and implementation of the Algo500 scalable digital platform architecture | |
Chen et al. | An optimized data integration model based on reverse cleaning for heterogeneous multi-media data | |
CN113886389A (en) | Model document generation method, apparatus, device and storage medium | |
CN111638926A (en) | Method for realizing artificial intelligence in Django framework | |
CN113051403A (en) | Database fault handling knowledge graph construction method and device and computer equipment | |
Paneva-Marinova et al. | Intelligent Data Curation in Virtual Museum for Ancient History and Civilization | |
CN114356945A (en) | Data processing method, data processing device, computer equipment and storage medium | |
Tarasiev et al. | Developing Prototype of CASE-Tool to Create Automation Systems Based on Web Applications Using Code Generation | |
Galpin et al. | Curating Covid-19 Data in Links | |
Stephan et al. | A scientific data provenance harvester for distributed applications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |