Data modeling method and system based on graph data structure

Through the data modeling method based on graph data structure, it solves the problem of difficulty in managing multi-source heterogeneous data with existing technology, realizes high-precision industrial data modeling, and provides flexible data management strategies and reliable physical model construction.

CN118377771BActive Publication Date: 2024-08-30CHENGDU ZHONGKE HEXUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410821920.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-08-30
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing data modeling methods are difficult to adapt to the management of multi-source heterogeneous data at the same time and cannot meet the data modeling needs of high-precision industrial fields. They are especially deficient in the refined management of complex business relationships.

Method used

Using a data modeling method based on graph data structure, by classifying model elements and identifying business relationships in the conceptual model, a logical model is established and mapped to the physical model, and a database selection strategy is formulated to achieve integration, centralization, and automation. Data management.

Benefits of technology

It realizes high-precision data processing applications in multi-source heterogeneous situations, meets the data modeling needs in the industrial field, and provides a reliable basis for physical model construction and flexible data management strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377771B
    Figure CN118377771B
Patent Text Reader

Abstract

The present invention provides a data modeling method and system based on a graph data structure, and the technical field of graph data processing. The method includes classifying model elements of a conceptual model to obtain a logical model of a graph data structure; identifying business relationships of the logical model to obtain object information; and determining a mapping rule for mapping the logical model to a physical model based on the object information, thereby obtaining model configuration information corresponding to the mapping of the logical model to the physical model; based on the model configuration information, constructing a corresponding physical model, and uploading the physical model to a platform for operation. The present invention formulates data of different data types and corresponding database selection strategies based on the data management characteristics of different databases, provides support for integrated, centralized, and automated data management, realizes data processing applications of physical models in multi-source heterogeneous situations, and meets the data modeling needs of industrial fields with high precision requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of graph data processing, and in particular to a data modeling method and system based on a graph data structure. Background Art

[0002] Data modeling is the process of describing the data structure and the relationship between data in a system, which helps to understand how data flows, is stored, and is processed in the system. At present, common data modeling methods include relational data modeling, entity-relationship modeling, object modeling based on object-oriented programming ideas, etc. These modeling methods are all aimed at specific data management systems or databases that store fixed data types, and cannot adapt to multi-source heterogeneous data modeling at the same time. At the same time, most data modeling methods do not define and manage relationships as an explicit object, which is not conducive to the refined management of complex business relationships and cannot meet the data modeling needs of the industrial field with high precision requirements. Summary of the invention

[0003] In view of the defects of the prior art, the present invention provides a data modeling method and system based on a graph data structure, which classifies the model elements of the conceptual model and obtains the model element attribute information of the conceptual model, thereby converting the conceptual model into a logical model of the graph data structure, and characterizing the relationship between the elements, entities and classes; it also identifies the business relationship of the logical model and obtains the business relationship attribute information of the logical model, thereby objectifying the business relationship of the logical model, establishing the conversion rules between the conceptual model and the logical model, and explicitly expressing the business relationship as an object separately; it also determines the mapping rules for mapping the logical model to the physical model based on the object information, thereby obtaining the model configuration information corresponding to the mapping of the logical model to the physical model, and providing a reliable basis for the subsequent physical model construction; and according to the data management characteristics of different databases, formulates data of different data types and corresponding database selection strategies, provides support for integrated, centralized and automated data management, realizes the data processing application of physical models in multi-source heterogeneous occasions, and meets the data modeling needs of industrial fields with high precision requirements.

[0004] The present invention provides a data modeling method based on a graph data structure, comprising the following steps:

[0005] Step S1, classifying model elements of a conceptual model to obtain model element attribute information of the conceptual model; based on the model element attribute information, converting the conceptual model into a logical model of a graph data structure;

[0006] Step S2, identifying business relationships in the logical model, objectifying the identified business relationships so that the business relationships in the logical model are consistent with entity expressions, and obtaining object information corresponding to all business relationships in the logical model;

[0007] Step S3, based on the object information, determining a mapping rule for mapping the logical model to the physical model; and then based on the mapping rule, obtaining model configuration information corresponding to the mapping conversion of the logical model to the physical model;

[0008] Step S4, based on the model configuration information, select corresponding data elements in different databases; then based on all the selected data elements, construct a corresponding physical model, and upload the physical model to the platform for operation.

[0009] In one embodiment disclosed in the present application, in the step S1, the conceptual model is classified into model elements to obtain the model element attribute information of the conceptual model; based on the model element attribute information, the conceptual model is converted into a logical model of a graph data structure, including:

[0010] Establishing a metamodel layer corresponding to the conceptual model, classifying the model elements within the metamodel layer, and obtaining type attribute information of all the model elements contained in the metamodel layer; determining the contents of all the model elements contained in the metamodel layer and the relationship structure between them based on the type attribute information;

[0011] Based on the contents of all model elements and the relationship structures between them, determine the graph data element type information corresponding to each of the model elements contained in the metamodel layer in the logical model of the graph data structure;

[0012] Based on the graph data element type information, all model elements contained in the meta-model layer are divided into point sets and edge sets in the graph data; then the point sets and the edge sets are imported into the graph computing engine to obtain a logical model of the graph data structure.

[0013] In one embodiment disclosed in the present application, in step S2, business relationships are identified in the logical model, and the identified business relationships are objectified so that the business relationships in the logical model are consistent with entity expressions, and object information corresponding to all business relationships in the logical model is obtained, including:

[0014] Identify all point elements under the logical model to obtain association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain logical relationship attribute information of all business relationships in the business relationship set, so that the business relationships in the logical model are consistent with the entity expression method;

[0015] Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, thereby obtaining object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

[0016] In one embodiment disclosed in the present application, in the step S3, based on the object information, a mapping rule for mapping the logical model to the physical model is determined; and based on the mapping rule, model configuration information corresponding to the mapping conversion of the logical model to the physical model is obtained, including:

[0017] Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; and based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model;

[0018] Based on the mapping rule, the model data configuration content information and application configuration information corresponding to the physical model mapped and converted by the logical model are obtained, and used as the model configuration information.

[0019] In one embodiment disclosed in the present application, in step S4, corresponding data elements are selected in different databases based on the model configuration information; then, a corresponding physical model is constructed based on all the selected data elements, and the physical model is uploaded to the platform for operation, including:

[0020] Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule;

[0021] After data schema conversion processing is performed on the matched relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain a corresponding physical model output result.

[0022] The present invention also provides a data modeling system based on a graph data structure, comprising:

[0023] A conceptual model element identification module is used to classify model elements of the conceptual model and obtain model element attribute information of the conceptual model;

[0024] A logical model conversion module, used for converting the conceptual model into a logical model of a graph data structure based on the model element attribute information;

[0025] A business relationship identification module, used to identify business relationships in the logical model and objectify the identified business relationships so that the business relationships in the logical model are consistent with entity expressions;

[0026] An object processing module, used to obtain object information corresponding to all business relationships within the logical model;

[0027] A mapping rule generating module, used to determine a mapping rule for mapping the logical model to the physical model based on the object information;

[0028] A model configuration information determination module, used to obtain the model configuration information corresponding to the physical model mapped from the logical model based on the mapping rule;

[0029] A database search module, used to select corresponding data elements in different databases based on the model configuration information;

[0030] The physical model construction and operation module is used to construct a corresponding physical model based on all selected data elements, and upload the physical model to the platform for operation.

[0031] In one embodiment disclosed in the present application, the concept model element identification module is used to classify model elements of the concept model to obtain model element attribute information of the concept model, including:

[0032] Establishing a metamodel layer corresponding to the conceptual model, classifying the model elements within the metamodel layer, and obtaining type attribute information of all the model elements contained in the metamodel layer; determining the contents of all the model elements contained in the metamodel layer and the relationship structure between them based on the type attribute information;

[0033] Based on the contents of all model elements and the relationship structures between them, determine the graph data element type information corresponding to each of the model elements contained in the metamodel layer in the logical model of the graph data structure;

[0034] The logical model conversion module is used to convert the conceptual model into a logical model of a graph data structure based on the model element attribute information, including:

[0035] Based on the graph data element type information, all model elements contained in the meta-model layer are divided into point sets and edge sets in the graph data; then the point sets and the edge sets are imported into the graph computing engine to obtain a logical model of the graph data structure.

[0036] In one embodiment disclosed in the present application, the business relationship identification module is used to identify business relationships in the logical model and objectify the identified business relationships so that the business relationships in the logical model are consistent with entity expressions, including:

[0037] Identify all point elements under the logical model to obtain association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain logical relationship attribute information of all business relationships in the business relationship set, so that the business relationships in the logical model are consistent with the entity expression method;

[0038] The object processing module is used to obtain object information corresponding to all business relationships within the logical model, including:

[0039] Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, thereby obtaining object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

[0040] In one embodiment disclosed in the present application, the mapping rule generation module is used to determine a mapping rule for mapping the logical model to the physical model based on the object information, including:

[0041] Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; and based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model;

[0042] The model configuration information determination module is used to obtain the model configuration information corresponding to the physical model mapped from the logical model based on the mapping rule, including:

[0043] Based on the mapping rule, the model data configuration content information and application configuration information corresponding to the physical model mapped and converted by the logical model are obtained, and used as the model configuration information.

[0044] In one embodiment disclosed in the present application, the database search module is used to select corresponding data elements in different databases based on the model configuration information, including:

[0045] Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule;

[0046] The physical model building and running module is used to build a corresponding physical model based on all selected data elements, and upload the physical model to the platform for running, including:

[0047] After data schema conversion processing is performed on the matched relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain a corresponding physical model output result.

[0048] Compared with the prior art, the data modeling method and system based on the graph data structure classifies the model elements of the conceptual model and obtains the model element attribute information of the conceptual model, thereby converting the conceptual model into a logical model of the graph data structure and characterizing the relationship between the entities and classes of the elements; it also identifies the business relationship of the logical model and obtains the business relationship attribute information of the logical model, thereby objectifying the business relationship of the logical model, establishing the conversion rules between the conceptual model and the logical model, and explicitly expressing the business relationship as an object separately; it also determines the mapping rules for mapping the logical model to the physical model based on the object information, thereby obtaining the model configuration information corresponding to the mapping of the logical model to the physical model, providing a reliable basis for the subsequent physical model construction; and according to the data management characteristics of different databases, formulates data of different data types and corresponding database selection strategies, provides support for integrated, centralized and automated data management, realizes the data processing application of physical models in multi-source heterogeneous occasions, and meets the data modeling needs of industrial fields with high precision requirements.

[0049] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0050] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1 A schematic flow chart of the data modeling method based on the graph data structure provided by the present invention.

[0053] Figure 2 A schematic diagram of the framework of the data modeling system based on the graph data structure provided by the present invention.

[0054] Figure 3 A schematic diagram of the hierarchical structure of the data model based on the graph data structure provided by the present invention.

[0055] Figure 4 A schematic diagram of point and edge classification of the conceptual model based on the graph data structure provided by the present invention.

[0056] Figure 5 A schematic diagram of a specific example of a data model based on a graph data structure provided by the present invention. DETAILED DESCRIPTION

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

[0058] See also Figure 1 , is a flow chart of a data modeling method based on a graph data structure provided by an embodiment of the present invention. The data modeling method based on a graph data structure includes:

[0059] Step S1, classifying model elements of a conceptual model to obtain model element attribute information of the conceptual model; based on the model element attribute information, converting the conceptual model into a logical model of a graph data structure;

[0060] Step S2, identifying business relationships in the logical model, objectifying the identified business relationships so that the business relationships in the logical model are consistent with the entity expression, and obtaining object information corresponding to all business relationships in the logical model;

[0061] Step S3, based on the object information, determining a mapping rule for mapping the logical model to the physical model; and then based on the mapping rule, obtaining model configuration information corresponding to the mapping conversion of the logical model to the physical model;

[0062] Step S4, based on the model configuration information, select corresponding data elements in different databases; then based on all the selected data elements, construct a corresponding physical model, and upload the physical model to the platform for operation.

[0063] The beneficial effects of the above technical solution are as follows: the data modeling method based on the graph data structure classifies the model elements of the conceptual model and obtains the model element attribute information of the conceptual model, thereby converting the conceptual model into a logical model of the graph data structure, and characterizing the relationship between the elements, entities and classes; it also identifies the business relationship of the logical model and obtains the business relationship attribute information of the logical model, thereby objectifying the business relationship of the logical model, establishing the conversion rules between the conceptual model and the logical model, and explicitly expressing the business relationship as an object separately; it also determines the mapping rules for mapping the logical model to the physical model based on the object information, thereby obtaining the model configuration information corresponding to the mapping of the logical model to the physical model, and providing a reliable basis for the subsequent physical model construction; and according to the data management characteristics of different databases, formulates data of different data types and corresponding database selection strategies, provides support for integrated, centralized and automated data management, realizes the data processing application of physical models in multi-source heterogeneous occasions, and meets the data modeling needs of industrial fields with high precision requirements.

[0064] Preferably, in step S1, the conceptual model is classified into model elements to obtain model element attribute information of the conceptual model; based on the model element attribute information, the conceptual model is converted into a logical model of a graph data structure, including:

[0065] Establish a metamodel layer corresponding to the conceptual model, classify the model elements in the metamodel layer, and obtain type attribute information of all model elements contained in the metamodel layer; based on the type attribute information, determine the content of all model elements contained in the metamodel layer and the relationship structure between them;

[0066] Based on the content of all model elements and the relationship structure between them, determine the graph data element type information corresponding to each of the model elements contained in the meta-model layer in the logical model of the graph data structure;

[0067] Based on the graph data element type information, all model elements contained in the meta-model layer are divided into a point set and an edge set in the graph data; then the point set and the edge set are imported into the graph computing engine to obtain a logical model of the graph data structure.

[0068] The beneficial effects of the above technical solution are as follows: the conceptual model includes a metamodel layer (i.e., corresponding to the M2 layer in the MOF model), the metamodel layer contains all the model elements of the conceptual model, the metamodel layer is subjected to model element identification processing, and the type attribute information of all the model elements contained in the metamodel layer is obtained, so that the types and attributes of all the model elements in the metamodel layer can be fully characterized, so that the respective contents of all the model elements contained in the metamodel layer and the relationship structure between each other can be accurately calibrated, and the comprehensive characterization of the heterogeneous data in the metamodel layer can be achieved. In addition, based on the graph data element type information, all the model elements contained in the metamodel layer are distinguished into point sets and edge sets in the graph data, and based on the point elements and edge elements corresponding to the graph data, all the model elements are distinguished into point sets and edge sets in the graph data, so that the model elements in the conceptual model can correspond to the logical model of the graph data structure in form, and then the point set and the edge set are imported into the graph computing engine to obtain the logical model of the graph data structure, so that the logical model of the graph data structure consistent with the conceptual model can be quickly and accurately obtained, and the reliability and accuracy of the logical model can be ensured.

[0069] Preferably, in step S2, the business relationship is identified in the logical model, and the identified business relationship is objectified so that the business relationship is consistent with the entity expression in the logical model, and object information corresponding to all business relationships in the logical model is obtained, including:

[0070] Identify all point elements under the logical model to obtain the association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain the logical relationship attribute information of all business relationships in the business relationship set, so that the business relationship in the logical model is consistent with the entity expression method;

[0071] Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed to obtain object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

[0072] The beneficial effects of the above technical solution are as follows: all point elements under the logical model are independent data objects, and different point elements are associated and corresponded through corresponding edge elements. All point elements under the logical model are identified, and the association relationship information between different point elements is obtained, so as to extract all business relationships contained in the logical model. In this way, the corresponding business relationship under the logical model can be identified and extracted as a substantial object, and then all business relationships are re-abstracted and reclassified with respect to relationship types and relationship attributes, so as to convert all business relationships into a business relationship set with a tree-like hierarchical structure, realize the integration of all business relationship associations in discrete states into a tree-like hierarchical structure, and improve the logic between all business relationships. Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, so as to obtain the object information corresponding to all business relationships within the logical model, so as to make a qualitative measurement of the business relationship.

[0073] Preferably, in step S3, based on the object information, a mapping rule for mapping the logical model to the physical model is determined; and based on the mapping rule, model configuration information corresponding to the mapping conversion of the logical model to the physical model is obtained, including:

[0074] Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model;

[0075] Based on the mapping rule, the model data configuration content information and application program configuration information corresponding to the physical model mapped to the logical model are obtained, and this is used as the model configuration information.

[0076] The beneficial effects of the above technical solution are: based on the object information, the different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined, so that the possible combinations between all points and all edges under the metamodel layer can be comprehensively identified, thereby determining the mapping rules for mapping the logical model to the physical model, and defining a reliable and accurate rule benchmark for mapping the logical model to the physical model. In addition, based on the mapping rules, the model data configuration content information and application configuration information corresponding to the mapping of the logical model to the physical model are obtained, thereby providing comprehensive data and program configuration guidance for the subsequent construction of the physical model.

[0077] Preferably, in step S4, based on the model configuration information, corresponding data elements are selected in different databases; then based on all the selected data elements, a corresponding physical model is constructed, and the physical model is uploaded to the platform for operation, including:

[0078] Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule;

[0079] After data schema conversion processing is performed on the matching relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain the corresponding physical model output result.

[0080] The beneficial effects of the above technical solution are as follows: based on the model configuration information, the corresponding relational database and non-relational database are selected from all relational databases and all non-relational databases, so that all appropriate data and applications can be extracted for the construction of the physical model, so as to obtain the relational data elements and non-relational data elements that match the mapping rules, and provide a sufficient and comprehensive data and application foundation for the construction of the physical model. After the matching relational data elements and non-relational data elements are processed for data mode conversion, the corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain the corresponding physical model output result, so that the platform can realize flexible and reliable processing of multi-source heterogeneous data.

[0081] See also Figure 2 , is a schematic diagram of a framework of a data modeling system based on a graph data structure provided by an embodiment of the present invention. The data modeling system based on a graph data structure includes:

[0082] A conceptual model element identification module is used to classify model elements of the conceptual model and obtain attribute information of the model elements of the conceptual model;

[0083] A logical model conversion module, used to convert the conceptual model into a logical model of a graph data structure based on the attribute information of the model elements;

[0084] A business relationship identification module is used to identify business relationships in the logical model and objectify the identified business relationships so that the business relationships in the logical model are consistent with entity expressions;

[0085] The object processing module is used to obtain the object information corresponding to all business relationships within the logical model;

[0086] A mapping rule generating module, used for determining a mapping rule for mapping the logical model to the physical model based on the object information;

[0087] A model configuration information determination module is used to obtain model configuration information corresponding to the physical model mapped from the logical model based on the mapping rule;

[0088] A database search module is used to select corresponding data elements in different databases based on the model configuration information;

[0089] The physical model construction and operation module is used to construct a corresponding physical model based on all selected data elements, and upload the physical model to the platform for operation.

[0090] The beneficial effects of the above technical solution are as follows: the data modeling system based on the graph data structure classifies the model elements of the conceptual model and obtains the model element attribute information of the conceptual model, thereby converting the conceptual model into a logical model of the graph data structure and characterizing the relationship between the elements, entities and classes; it also identifies the business relationship of the logical model and obtains the business relationship attribute information of the logical model, thereby objectifying the business relationship of the logical model, establishing the conversion rules between the conceptual model and the logical model, and explicitly expressing the business relationship as an object separately; it also determines the mapping rules for mapping the logical model to the physical model based on the object information, thereby obtaining the model configuration information corresponding to the mapping of the logical model to the physical model, and providing a reliable basis for the subsequent physical model construction; and according to the data management characteristics of different databases, formulates data of different data types and corresponding database selection strategies, provides support for integrated, centralized and automated data management, realizes the data processing application of physical models in multi-source heterogeneous occasions, and meets the data modeling needs of industrial fields with high precision requirements.

[0091] Preferably, the conceptual model element identification module is used to classify model elements of the conceptual model to obtain model element attribute information of the conceptual model, including:

[0092] Establish a metamodel layer corresponding to the conceptual model, classify the model elements in the metamodel layer, and obtain type attribute information of all model elements contained in the metamodel layer; based on the type attribute information, determine the content of all model elements contained in the metamodel layer and the relationship structure between them;

[0093] Based on the content of all model elements and the relationship structure between them, determine the graph data element type information corresponding to each of the model elements contained in the meta-model layer in the logical model of the graph data structure;

[0094] The logical model conversion module is used to convert the conceptual model into a logical model of a graph data structure based on the model element attribute information, including:

[0095] Based on the graph data element type information, all model elements contained in the meta-model layer are divided into a point set and an edge set in the graph data; then the point set and the edge set are imported into the graph computing engine to obtain a logical model of the graph data structure.

[0096] The beneficial effects of the above technical solution are as follows: the conceptual model includes a metamodel layer (i.e., corresponding to the M2 layer in the MOF model), the metamodel layer contains all the model elements of the conceptual model, the metamodel layer is subjected to model element identification processing, and the type attribute information of all the model elements contained in the metamodel layer is obtained, so that the types and attributes of all the model elements in the metamodel layer can be fully characterized, so that the respective contents of all the model elements contained in the metamodel layer and the relationship structure between each other can be accurately calibrated, and the comprehensive characterization of the heterogeneous data in the metamodel layer can be achieved. In addition, based on the graph data element type information, all the model elements contained in the metamodel layer are distinguished into point sets and edge sets in the graph data, and based on the point elements and edge elements corresponding to the graph data, all the model elements are distinguished into point sets and edge sets in the graph data, so that the model elements in the conceptual model can correspond to the logical model of the graph data structure in form, and then the point set and the edge set are imported into the graph computing engine to obtain the logical model of the graph data structure, so that the logical model of the graph data structure consistent with the conceptual model can be quickly and accurately obtained, and the reliability and accuracy of the logical model can be ensured.

[0097] Preferably, the business relationship identification module is used to identify the business relationship of the logical model and objectify the identified business relationship so that the business relationship is consistent with the entity expression in the logical model, including:

[0098] Identify all point elements under the logical model to obtain the association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain the logical relationship attribute information of all business relationships in the business relationship set, so that the business relationship in the logical model is consistent with the entity expression method;

[0099] The object processing module is used to obtain the object information corresponding to all business relationships within the logical model, including:

[0100] Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed to obtain object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

[0101] The beneficial effects of the above technical solution are as follows: all point elements under the logical model are independent data objects, and different point elements are associated and corresponded through corresponding edge elements. All point elements under the logical model are identified, and the association relationship information between different point elements is obtained, so as to extract all business relationships contained in the logical model. In this way, the corresponding business relationship under the logical model can be identified and extracted as a substantial object, and then all business relationships are re-abstracted and reclassified with respect to relationship types and relationship attributes, so as to convert all business relationships into a business relationship set with a tree-like hierarchical structure, realize the integration of all business relationship associations in discrete states into a tree-like hierarchical structure, and improve the logic between all business relationships. Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, so as to obtain the object information corresponding to all business relationships within the logical model, so as to make a qualitative measurement of the business relationship.

[0102] Preferably, the mapping rule generating module is used to determine a mapping rule for mapping the logical model to the physical model based on the object information, including:

[0103] Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model;

[0104] The model configuration information determination module is used to obtain the model configuration information corresponding to the physical model mapped from the logical model based on the mapping rule, including:

[0105] Based on the mapping rule, the model data configuration content information and application program configuration information corresponding to the physical model mapped to the logical model are obtained, and this is used as the model configuration information.

[0106] The beneficial effects of the above technical solution are: based on the object information, the different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined, so that the possible combinations between all points and all edges under the metamodel layer can be comprehensively identified, thereby determining the mapping rules for mapping the logical model to the physical model, and defining a reliable and accurate rule benchmark for mapping the logical model to the physical model. In addition, based on the mapping rules, the model data configuration content information and application configuration information corresponding to the mapping of the logical model to the physical model are obtained, thereby providing comprehensive data and program configuration guidance for the subsequent construction of the physical model.

[0107] Preferably, the database search module is used to select corresponding data elements in different databases based on the model configuration information, including:

[0108] Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule;

[0109] The physical model building and running module is used to build a corresponding physical model based on all selected data elements, and upload the physical model to the platform for running, including:

[0110] After data schema conversion processing is performed on the matching relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain the corresponding physical model output result.

[0111] The beneficial effects of the above technical solution are as follows: based on the model configuration information, the corresponding relational database and non-relational database are selected from all relational databases and all non-relational databases, so that all appropriate data and applications can be extracted for the construction of the physical model, so as to obtain the relational data elements and non-relational data elements that match the mapping rules, and provide a sufficient and comprehensive data and application foundation for the construction of the physical model. After the matching relational data elements and non-relational data elements are processed for data mode conversion, the corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain the corresponding physical model output result, so that the platform can realize flexible and reliable processing of multi-source heterogeneous data.

[0112] See also Figure 3, which is a schematic diagram of the hierarchical structure of a data model based on a graph data structure provided by an embodiment of the present invention. The data model conforms to the four-layer structure of MOF (MetaObject Facility) defined by the OMG (Object Management Group). In actual operation, a metamodel layer corresponding to the conceptual model is established, that is, the M2 layer in the above MOF. The elements of the conceptual model are classified and defined from the two perspectives of "points" and "edges" to obtain the metamodel layer and all the information inside the metamodel; based on the metamodel layer, the classification of "points" and "edges" of the metamodel layer is assigned to the conceptual model elements (such as entities, relationships, attributes, etc.). The implementation process is to add the description items of the metamodel layer classification to the model elements. For example, the entity named "valve" in the conceptual model is assigned the point type of "class" in the metamodel layer, the attribute named "design pressure" is assigned the point type of "attribute" in the metamodel layer, and the attribute indicating that "valve" has "design pressure" is assigned the edge type of "possessing attribute" in the metamodel layer. This step of the present invention is applicable to representing multiple data models. Through the above mapping process, the subject-predicate-object structure in the data model is converted into a structure composed of different types of points and edges. The conceptual model elements are assigned different point or edge types in the logical model, and different points and edge types are matched to achieve different functions of the model. Based on the graph data element type information, all model elements contained in the metamodel layer are divided into point sets and edge sets in the graph data; then the point set and the edge set are imported into the graph computing engine to obtain the logical model of the graph data structure.

[0113] In addition, it is also necessary to clarify what the specific relationship that describes the association relationship between entities defined by the conceptual model is, and to treat the relationship as a separate object. It is clear what type of relationship the relationship (relationship) referred to by A association (relation) B belongs to, for example, "entity A and entity B are associated," where the relationship is "power supply and distribution relationship". The present invention believes that "power supply and distribution relationship" is a type of relationship that exists independently of entities A and B. It can inherit from the parent relationship class "power consumption relationship" or have specialized child relationship classes "weak power supply relationship" and "strong power supply relationship". At this time, as a relationship class of a special entity, it satisfies the complete process of step S1 above, so that the processing method of the relationship class entity is consistent with other entities. Obtaining the classification and grading of the relationship class entity is the branch structure of the graph structure data model constructed by this method, and is a part of the entire model. Therefore, just as other entities have their own attributes, relationship class entities also have their own attributes. These attributes generally need to include the limitation of the two ends of the relationship, namely the starting end and the ending end, the definition and description of the relationship itself, the directionality of the relationship, etc., depending on the actual business needs for a certain type of relationship, and at the same time, this method can ensure its scalability.

[0114] See also Figure 4 , which is a schematic diagram of the conceptual model point and edge classification based on the graph data structure provided by the present invention. Among them, the point set contains instances of all point types, that is, detailed information of all classes and attributes; the edge set contains the relationship between all points in the point set, that is, what attributes a class has, the generalization relationship between classes, etc. The data structure of the elements in the set can be uniformly expressed by JSON or Excel files, and is not limited to a specific data format.

[0115] See also Figure 5 , is a schematic diagram of a specific example of a data model based on a graph data structure provided by the present invention. Figure 5 The specific form of the data model of the corresponding embodiment can be seen, and a detailed description is not given here. Figure 5 The parameters M0, M1, M2, M3 in Figure 3 The parameters M0, M1, M2, and M3 in the figure have the same meaning, that is, M0, M1, M2, and M3 are the model object, model, metamodel, and meta-metamodel in the four-layer structure of MOF respectively.

[0116] In addition, for the data modeling system based on the graph data structure of the present invention:

[0117] Metamodel management module: used to manage the classification of model elements, that is, the definition and management of point classification and edge classification of MOF level M2 metamodel. Logical model conversion module: configures the information that the conceptual model elements belong to a specific point or edge classification, and converts the conceptual model input into a graph model data structure composed of a point set and an edge set, which is generally solidified in the form of a file or as a backup;

[0118] Logical model building module: With the graph computing engine as the core carrier, it reads the point set and edge set to form a graph model for easy access and calculation;

[0119] Physical model mapping rule management module: manages the mapping rules from the logical model of the graph data structure to different data representation modes of the physical model. Generally, there are 6 data representation modes: relational mode, multidimensional mode, object-oriented mode, fact mode, time series mode and NoSQL mode. By selecting different physical layer data representation modes, the information stored in the logical model of the graph data structure is converted into information representing different data representation modes and output as files or agreed special formats;

[0120] Physical model data adapter module: The adapter is developed to adapt the output information of the physical model mapping rule management module into a specific database product executable program or file according to the database product selected in different data representation modes, and execute it in the database product;

[0121] Database system: Database system is used to build physical models and manage data.

[0122] Furthermore, the metamodel management module is used to manage the classification of model elements and obtain detailed information on the point classification and edge classification of the MOF M2-level metamodel, including: establishing a metamodel layer corresponding to the conceptual model elements, that is, distinguishing the entities, attributes, relationships, classes, etc. of different conceptual models by defining different point and edge classifications; managing the viewing, addition, change, deactivation (or deletion) of defined specific point and edge classifications and related permission settings, etc.

[0123] The logical model conversion module is used to refine the conceptual model and convert the model data into a set of points and edges in a graph data structure, including: refining the conceptual model, automatically adding the classification information of points and edges to the modeling data according to the rules provided by the metamodel management module, and adding the technical and operational information of the relevant data for model access control, version management, data operation and maintenance, etc.; organizing the modeling data into a format consisting of several point sets and several edge sets according to the classification of points and edges, and saving them as files or as backup.

[0124] The logical model building module is used to build a graph data model, including: importing the data (or data files) of the point set and edge set into the graph computing engine to form a graph model. Common graph computing engines include Neo4j, networkX, etc.; using the interfaces, methods, and tools provided by the graph computing engine, the graph model can be read and accessed, and can support visualization functions for specific scenarios.

[0125] The physical model mapping rule management module is used to manage the mapping rules from the logical model of the graph data structure to the different data representation modes of the physical model, including: formulating and managing the mapping rules between the point types and edge types contained in the logical model of the graph data structure and the six data representation models commonly used in the physical model: "relational model", "multidimensional model", "object-oriented model", "fact model", "time series model" and "NoSQL model", to ensure that the entities, attributes, relationships and other elements in the logical model can be represented by the configured data representation mode; according to the mapping configuration between the logical model elements and the data representation mode, the logical model element information is converted into the physical model data representation mode element data, for example, the entity points, attribute points and the edges with attributes of the entity are converted into the database table and table field information in the relational model; the element data of the physical model data representation mode is output, saved or backed up in a file or other agreed data format.

[0126] The physical model data adapter module is used to manage and control database products respectively according to the data representation mode and establish a physical model in the selected database product, including: managing the selection of database products to decouple the data modeling system from the database system and support the selection of multiple database products; according to the selected database product, converting the physical model element information output by the physical model mapping rule management module into an executable script for the selected database product, such as SQL database and table creation statements; controlling the selected database product to execute the script to establish a physical model.

[0127] A database system is a number of database products used to store and manage different types of data. It is the carrier of the physical model and is used to manage data.

[0128] It can be seen from the contents of the above embodiments that the data modeling method and system based on the graph data structure classifies the model elements of the conceptual model and obtains the model element attribute information of the conceptual model, thereby converting the conceptual model into a logical model of the graph data structure, and characterizing the relationship between the elements, entities and classes; it also identifies the business relationship of the logical model and obtains the business relationship attribute information of the logical model, thereby objectifying the business relationship of the logical model, establishing the conversion rules between the conceptual model and the logical model, and explicitly expressing the business relationship as an object separately; it also determines the mapping rules for mapping the logical model to the physical model based on the object information, thereby obtaining the model configuration information corresponding to the mapping of the logical model to the physical model, and providing a reliable basis for the subsequent physical model construction; and according to the data management characteristics of different databases, formulates data of different data types and corresponding database selection strategies, provides support for integrated, centralized and automated data management, realizes the data processing application of physical models in multi-source heterogeneous occasions, and meets the data modeling needs of industrial fields with high precision requirements.

[0129] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A data modeling method based on a graph data structure, which is used for data processing in multi-source heterogeneous situations, characterized in that: It includes the following steps: Step S1, classifying model elements of a conceptual model to obtain model element attribute information of the conceptual model; based on the model element attribute information, converting the conceptual model into a logical model of a graph data structure, which includes: Establishing a metamodel layer corresponding to the conceptual model, classifying the model elements within the metamodel layer, and obtaining type attribute information of all the model elements contained in the metamodel layer; determining the contents of all the model elements contained in the metamodel layer and the relationship structure between them based on the type attribute information; Based on the contents of all model elements and the relationship structures between them, determine the graph data element type information corresponding to each of the model elements contained in the metamodel layer in the logical model of the graph data structure; Based on the graph data element type information, all model elements contained in the metamodel layer are divided into a point set and an edge set in the graph data; and then the point set and the edge set are imported into a graph computing engine to obtain a logical model of the graph data structure; Step S2, identifying business relationships in the logical model, objectifying the identified business relationships so that the business relationships in the logical model are consistent with entity expressions, and obtaining object information corresponding to all business relationships in the logical model; Step S3, based on the object information, determining a mapping rule for mapping the logical model to the physical model; and then based on the mapping rule, obtaining model configuration information corresponding to the mapping conversion of the logical model to the physical model, which includes: Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; and based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model; Based on the mapping rule, the model data configuration content information and application configuration information corresponding to the physical model mapped to the logical model are obtained, and this is used as the model configuration information; Step S4, based on the model configuration information, select corresponding data elements in different databases; then based on all the selected data elements, construct a corresponding physical model, and upload the physical model to the platform for operation.

2. The data modeling method based on graph data structure according to claim 1, characterized in that: In the step S2, the business relationship is identified in the logical model, and the identified business relationship is objectified so that the business relationship is consistent with the entity expression in the logical model, and object information corresponding to all business relationships in the logical model is obtained, including: Identify all point elements under the logical model to obtain association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain logical relationship attribute information of all business relationships in the business relationship set, so that the business relationships in the logical model are consistent with the entity expression method; Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, thereby obtaining object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

3. The data modeling method based on graph data structure according to claim 2, characterized in that: In the step S4, corresponding data elements are selected in different databases based on the model configuration information; Based on all the selected data elements, a corresponding physical model is constructed and uploaded to the platform for operation, including: Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule; After data schema conversion processing is performed on the matched relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain a corresponding physical model output result.

4. A data modeling system based on a graph data structure, which is used for data processing in multi-source heterogeneous situations, characterized in that: include: The conceptual model element identification module is used to classify the model elements of the conceptual model and obtain the model element attribute information of the conceptual model, which includes: Establishing a metamodel layer corresponding to the conceptual model, classifying the model elements within the metamodel layer, and obtaining type attribute information of all the model elements contained in the metamodel layer; determining the contents of all the model elements contained in the metamodel layer and the relationship structure between them based on the type attribute information; Based on the contents of all model elements and the relationship structures between them, determine the graph data element type information corresponding to each of the model elements contained in the metamodel layer in the logical model of the graph data structure; A logical model conversion module, used to convert the conceptual model into a logical model of a graph data structure based on the model element attribute information, comprising: Based on the graph data element type information, all model elements contained in the metamodel layer are divided into a point set and an edge set in the graph data; and then the point set and the edge set are imported into a graph computing engine to obtain a logical model of the graph data structure; A business relationship identification module, used to identify business relationships in the logical model and objectify the identified business relationships so that the business relationships in the logical model are consistent with entity expressions; An object processing module, used to obtain object information corresponding to all business relationships within the logical model; A mapping rule generating module is used to determine a mapping rule for mapping the logical model to the physical model based on the object information, and includes: Based on the object information, different combinations of all points contained in the point set and all edges contained in the edge set under the metamodel layer are determined; and based on all the combinations, a mapping rule for mapping the logical model to the physical model is determined; wherein the mapping rule includes a mapping rule between all points and all edges under the logical model and all entities under the physical model; A model configuration information determination module is used to obtain the model configuration information corresponding to the physical model mapped from the logical model based on the mapping rule, and includes: Based on the mapping rule, the model data configuration content information and application configuration information corresponding to the physical model mapped to the logical model are obtained, and this is used as the model configuration information; A database search module, used to select corresponding data elements in different databases based on the model configuration information; The physical model construction and operation module is used to construct a corresponding physical model based on all selected data elements, and upload the physical model to the platform for operation.

5. The data modeling system based on graph data structure according to claim 4, characterized in that: The business relationship identification module is used to identify business relationships in the logical model and objectify the identified business relationships so that the business relationships in the logical model are consistent with entity expressions, including: Identify all point elements under the logical model to obtain association relationship information between different point elements; extract all business relationships contained in the logical model based on the association relationship information; re-abstract and re-classify all business relationships in terms of relationship types and relationship attributes, thereby converting all business relationships into a business relationship set with a tree-like hierarchical structure, and obtain logical relationship attribute information of all business relationships in the business relationship set, so that the business relationships in the logical model are consistent with the entity expression method; The object processing module is used to obtain object information corresponding to all business relationships within the logical model, including: Based on the logical relationship attribute information, all business relationships within the business relationship set are explicitly expressed, thereby obtaining object information corresponding to all business relationships within the logical model; wherein the object information includes all elements involved in the business relationship and their relationship types and relationship attributes.

6. The data modeling system based on graph data structure according to claim 5, characterized in that: The database search module is used to select corresponding data elements in different databases based on the model configuration information, including: Based on the model configuration information, a corresponding relational database and a non-relational database are selected, and data searches are performed on the relational database and the non-relational database respectively to obtain relational data elements and non-relational data elements matching the mapping rule; The physical model building and running module is used to build a corresponding physical model based on all selected data elements, and upload the physical model to the platform for running, including: After data schema conversion processing is performed on the matched relational data elements and non-relational data elements, a corresponding physical model is constructed and uploaded to the platform for operation, so as to obtain a corresponding physical model output result.

Citation Information

Patent Citations

  • Software system modeling method based on FACE (Future Airborne Capability Environment) architecture

    CN108804818A

  • Architecture design and architecture conversion method based on complex real-time embedded system

    CN115712420A