A Synchronization and Matching Method for Power Grid Data Warehouse Model and Multidimensional Model

Through reverse mapping technology, the power grid data warehouse model and multi-dimensional model are automatically synchronized, solving the synchronization problem of traditional models under the modification of big data organization and user view, and achieving efficient and automatic data model matching.

CN115658819BActive Publication Date: 2025-07-08GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211253699.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-07-08
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

When facing the needs of big data organization, the traditional multi-dimensional data model is difficult to meet the requirements of centralization, high scalability, high availability and cross-domain data integration of massive data, and the model synchronization changes caused by user view modification are complex and difficult to efficiently and automatically synchronize.

Method used

The reverse mapping method is adopted to build the power grid data warehouse model based on the DV modeling method. Through mapping technology, the multi-dimensional model and the DV data warehouse model are automatically synchronized, including the mapping of the center point table, link table and auxiliary table, to realize the reverse automatic synchronization from user view modification to the model.

Benefits of technology

It realizes efficient and automatic cross-regional data model synchronization, simplifies the complexity of traditional manual synchronization, and improves the efficiency and quality of data warehouse operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658819B_ABST
    Figure CN115658819B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for synchronous matching of a power grid data warehouse model and a multi-dimensional model. The specific steps of the method include: constructing a power grid data warehouse model, which mainly consists of two parts: a DV data warehouse model and a multi-dimensional model; the DV data warehouse model includes a central point table, a link table, an affiliated table, and a normalized user view; the multi-dimensional model consists of a semi-dimensional model, a fact table, and a multi-dimensional user view of dimension tables; when the multi-dimensional user view changes due to user analysis requirements, by using a reverse manipulation method for the model and mapping, the semi-dimensional model and the DV data warehouse model are automatically synchronized, and mapping tables are established between the user view and the model, and between the models, so as to realize the automatic synchronization of the power grid DV data warehouse model and the multi-dimensional model. The present invention can realize an efficient and high-quality reverse automatic synchronization mode evolution method at the data mode level, so as to achieve the purpose of improving the data quality of the power grid data warehouse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid data warehouses, and particularly relates to a method for synchronously matching a power grid data warehouse model and a multi-dimensional model. Background Art

[0002] In the construction of a power grid data warehouse, how to efficiently organize data has always been a technical problem faced by power grid enterprises. The traditional solution for a power grid data warehouse is to adopt a multi-dimensional data model. However, with the enhancement of data collection means and the expansion of the business market, it is required that the organization of massive power grid data has a platform with centralization, high scalability, and high availability, supporting whole-network type and cross-domain data integration, as well as dynamic on-demand supply and real-time resource allocation. The traditional method of implementing a data warehouse with a multi-dimensional data model and its associations can no longer meet the requirements for organizing massive data in the big data era. Therefore, power grid enterprises have started to actively explore the introduction of the DV (Data Vault) modeling method, that is, using a fusion method of normal form modeling and analytical modeling to build a new type of data warehouse to meet the special requirements of power grid enterprises for big data organization.

[0003] When constructing the data organization of the power grid data warehouse layer, it is necessary to first load the data from multiple source business systems into the DV data warehouse layer (raw data layer) designed according to the DV method, and then import the data in the raw data layer into the data mart designed according to the multi-dimensional (MD, Multi-Dimensions) model to support the comprehensive analysis of power grid operations. From the perspective of data model evolution, this is a process of converting the power grid DV data warehouse model to a multi-dimensional model.

[0004] In the construction of the existing power grid data warehouse, a power grid big data warehouse is built based on the CIM model, and a multi-dimensional model is used to build the data warehouse, but the DV modeling method is not used, nor does it involve technical issues such as the modification of the MD model due to the modification of the user view, and the conversion and synchronization between the DV data warehouse model and the MD model;

[0005] In the construction of the existing power grid data warehouse, it is also disclosed that a Data Vault data warehouse model is automatically generated according to the table logical relationship, but its business logical relationship is very complex, and it is difficult for the table logical relationship to fully cover all schema generations, and it does not involve technical issues such as the modification of the MD model due to the modification of the user view, and the conversion and synchronization between the DV data warehouse and the MD model;

[0006] In summary, the DV modeling method is a new data warehouse solution that can meet the above-mentioned big data organizational structure and operation efficiency requirements of power grid enterprises. At the same time, the use of a multidimensional model can meet the data analysis needs of users. However, when users modify the multidimensional user view for analysis or other purposes during the use of the model or data, such modifications will inevitably lead to synchronous changes in the underlying multidimensional model and mapping. Therefore, for a power grid data warehouse involving hundreds of thousands of data tables, how to efficiently and automatically synchronize the multidimensional model with the DV data warehouse model is a difficult problem faced in data warehouse operation and maintenance. Summary of the Invention

[0007] To overcome the defects and deficiencies of the prior art, the present invention provides a synchronization and matching method for a power grid data warehouse model and a multidimensional model. Based on a data warehouse architecture suitable for power grid data organization requirements jointly composed of a power grid DV data warehouse model and a multidimensional model, when the multidimensional user view V MD is modified to the view EV MD , mapping is used as a technical means to respectively compare the original conversion of the multidimensional model and the user view to solve the reverse automatic synchronization and evolution of the semi-dimensional model ES SMD , as well as the mapping process of the corresponding model and user view.

[0008] To achieve the above object, the present invention adopts the following technical solutions:

[0009] The present invention provides a synchronization and matching method for a power grid data warehouse model and a multidimensional model, including the following steps:

[0010] Based on the DV modeling method, construct the DV data warehouse model S of the power grid DV , and use the central point table, link table, and affiliated table to store power grid business entities, relationships, and their attribute data respectively;

[0011] The DV data warehouse model S DV is mapped and converted into the semi-dimensional model S of the multidimensional data model part SMD , and the semi-dimensional model S SMD is remapped to the multidimensional user view V MD , modify the multidimensional user view V MD , and evolve it into the user view EV MD ;

[0012] When it is determined that the modification method is to add tables or attributes in the multidimensional user view V MD , execute the following steps:

[0013] Match and map the user view EV MD with the multidimensional user view V MD to form a mapping table map6; establish the user view EV MDMapping table map7 to the semi - dimensional model S SMD ; Copy the semi - dimensional model S SMD and the mapping in mapping table map7 to form the initial model ES SMD and the initial mapping table map5;

[0014] Establish the user view EV MD The tables or attributes not present in the multi - dimensional user view V MD to form the view EV MD — , with the table attributes in the view EV MD as rows and the table attributes in the view EV MD — as columns to form the mapping table map8; Export new model elements according to the new tables or attributes in the view EV MD — to generate the model ES SMD — , establish the view EV MD — to the mapping table map9 of the model ES SMD — ; Combine the mapping table map8 and the mapping table map9 into the mapping table map10; Match and map the model ES SMD — with the model ES SMD to form the mapping table map11; Incorporate the model ES SMD — into the model ES SMD , and incorporate the mapping table map10 into the mapping table map5;

[0015] Copy the DV data warehouse model S DV , establish the temporary model T SMD , establish the mapping table map12 according to the correspondence of the central point table, the link table and the affiliated table; Match and map the temporary model T SMD with the model ES SMD to form the mapping table map13; Generate the mapping table map4 from the DV data warehouse model S DV to the model ES SMD : Combine the mapping table map12 and the mapping table map13 into the mapping table map4; Obtain the modified user view EV MD corresponding to the model ES SMD , as well as the mapping table map4 and the mapping table map5.

[0016] The present invention provides a method for synchronous matching of a power grid data warehouse model and a multi - dimensional model, including the following steps: Construct the DV data warehouse model S of the power grid based on the DV modeling method DV, the center point table, link table, and accessory table are used to store power grid business entities, relationships, and their attribute data respectively;

[0017] DV data warehouse model S DV Map and convert to the semi - dimension model S of the multi - dimensional data model part SMD , construct a mapping table map2 from the power grid data warehouse model S DV to the semi - dimension model S SMD , and the semi - dimension model S SMD is remapped to the multi - dimensional user view V MD , modify the multi - dimensional user view V MD , and evolve it into the user view EV MD ;

[0018] When it is determined that the modification method is to delete a table or attribute in the multi - dimensional user view V MD , perform the following steps:

[0019] Match - map the user view EV MD with the multi - dimensional user view V MD to form a mapping table map6;

[0020] Establish a mapping table map7 from the user view EV MD to the semi - dimension model S SMD ; Copy the mappings in the semi - dimension model S SMD and the mapping table map7 to form the initial model ES SMD and the initial mapping table map5, and delete the useless mappings in the initial mapping table map5;

[0021] Copy the mappings in the mapping table map2 to form the initial mapping table map4, and delete the useless mappings in the initial mapping table map4 to obtain the model ES MD corresponding to the modified user view EV SMD , as well as the mapping table map4 and the mapping table map5.

[0022] As a preferred technical solution, match - map the user view EV MD with the multi - dimensional user view V MD to form a mapping table map6, specifically including: the rows of the mapping table map6 are the attributes of entities or relationships in the user view EV MD , and the columns are the attributes of entities or relationships in the multi - dimensional user view V MD .

[0023] As a preferred technical solution, establish a mapping table map7 from the user view EV MD to the semi - dimension model S SMD , and the specific steps include: the semi - dimension model S SMDMapped to the multi-dimensional user view V MD , a mapping table map3 is formed; the mapping table map6 and the mapping table map3 are synthesized into a mapping table map7.

[0024] As a preferred technical solution, according to the view EV MD — New model elements are exported from the new tables or attributes in it to generate the model ES SMD — , and a mapping table map9 from the view EV MD — to ES SMD — is established. The specific steps include:

[0025] For the entity tables in the view EV MD — , in the model ES SMD — the entity tables are generated into a central point table and an affiliated table, the primary key of the entity table is used as the business key, and the date attribute in the relationship table is used as the timestamp of the central point table and its affiliates;

[0026] For the relationship tables in the view EV MD — , in the model ES SMD — the entity tables are generated into a link table and an affiliated table, the primary key of the relationship table is used as the primary key of the link table and its affiliated table, and the date attribute in the relationship table is used as the timestamp of the central point table and its affiliates.

[0027] As a preferred technical solution, the model ES SMD — is matched and mapped with the model ES SMD to form a mapping table map11, which is specifically represented as: the rows of the mapping table map11 are the tables and their new attributes of the model ES SMD — , and the columns are the tables and their attributes in the model ES SMD .

[0028] As a preferred technical solution, the model ES SMD — is merged into the model ES SMD , and the mapping table map10 is merged into the mapping table map5, specifically including: based on the mapping table map11, two models ES SMD in ES SMD — and ES SMD are added with the attributes in the common central point table, link table and their affiliated tables, and new ES SMD —For the table and its attributes, add all the mappings of mapping table map10 to mapping table map5.

[0029] As a preferred technical solution, copy the DV data warehouse model S DV , and establish a temporary model T SMD , and establish a mapping table map12 according to the correspondence between the central points, links, and affiliated tables, specifically including: copy all the central point tables, link tables, and affiliated tables in the power grid data warehouse model S DV , and establish the corresponding tables for the temporary model T SMD .

[0030] If it is determined that a central point or link table has multiple affiliated tables, retain the specified main affiliated table, merge the remaining affiliated tables into the main affiliated table according to the time stamp, and delete all record source attributes;

[0031] If it is determined that a link table stores a many-to-one functional dependency relationship, add its business key as a foreign key to the primary key area, establish a dependency relationship with the corresponding central point table, merge the foreign keys as the new primary key, and delete the original primary key;

[0032] Establish a mapping table map12 according to the correspondence between the central point table, link table, and affiliated table, and add the common dimension date table of the multi-dimensional model to the temporary model T SMD .

[0033] As a preferred technical solution, match and map the temporary model T SMD with the model ES SMD to form a mapping table map13, specifically expressed as: the rows of the mapping table map13 are the attributes of the tables in the temporary model T SMD , and the columns are the attributes of the tables in the model ES SMD .

[0034] As a preferred technical solution, synthesize map12 and map13 into map4, specifically including: for each corresponding point <row T , col ES > in the mapping table map13, if there is also a corresponding point <row S , col T > in the mapping table map12, where col T = row T , then form a transitive mapping corresponding point <row S , col ES >, and store it in the mapping table map4.

[0035] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0036] (1) In the traditional power grid data warehouse environment, the schema evolution process evolves from the data warehouse to the data mart, and finally generates a multi-dimensional data model or user view. Due to the complexity of reverse evolution, usually only manual methods can be used to achieve schema evolution. This invention starts from the end user modifying the multi-dimensional user view, and synchronizes the data warehouse model and the data mart (multi-dimensional model) in reverse. Therefore, by using the reverse mapping method to uniformly manipulate the model and mapping for operations, an innovative manipulation method for reverse model evolution is realized, laying a foundation for realizing an efficient and high-quality cross-regional data model automatic synchronization algorithm.

[0037] (2) Between the traditional data warehouse model and the multi-dimensional model, usually manual synchronization methods are used, which are complex, cumbersome, and error-prone. This invention starts from modifying the user view, and uses the characteristics of the power grid business model and the innovative manipulation method of reverse model evolution to realize the whole process of reverse automatic synchronization of the data warehouse model and the multi-dimensional model, achieving the goal of efficient and high-quality cross-regional data model automatic synchronization and matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the overall framework of the synchronization and matching method of the power grid data warehouse model and the multi-dimensional model of the present invention;

[0039] Figure 2 It is a specific example diagram of the power grid data warehouse model S DV of the present invention;

[0040] Figure 3 It is a specific example diagram of the power grid user view V NR of the present invention;

[0041] Figure 4 It is a specific example diagram of the power grid semi-dimensional model S SMD of the present invention;

[0042] Figure 5 It is a specific example diagram of the power grid multi-dimensional user view V MD of the present invention;

[0043] Figure 6 It is a schematic diagram of the process of the synchronization and matching method of the power grid data warehouse model and the multi-dimensional model of the present invention in the case of adding tables or attributes to the multi-dimensional user view V MD of the present invention;

[0044] Figure 7 It is a specific example diagram of the power grid user view EV MD of the present invention;

[0045] Figure 8 It is a partial example diagram of map6 of the present invention's view EV MD mapped to the multi-dimensional user view V MD of the present invention;

[0046] Figure 9 For the view EV of the present invention MD Mapped to the semi - dimensional model S SMD Partial example diagram of the map7 part of the mapping table;

[0047] Figure 10 For the view EV of the present invention MD To the view EV MD — Partial example diagram of the map8 part of the mapping table;

[0048] Figure 11 For the model ES of the present invention SMD — Schematic diagram;

[0049] Figure 12 For the view EV of the present invention MD — To the model EV SMD — Partial example diagram of the map9 part of the mapping table;

[0050] Figure 13 For the view EV of the present invention MD To the model ES SMD — Partial example diagram of the map10 part of the mapping table;

[0051] Figure 14 For the view EV of the present invention SMD — To the view EV SMD Partial example diagram of the map11 part of the mapping table;

[0052] Figure 15 For the merged view ES of the present invention SMD Specific example diagram;

[0053] Figure 16(a) is a partial example diagram of the entity part of the merged map5 of the present invention;

[0054] Figure 16(b) is a partial example diagram of the relationship part of the merged map5 of the present invention

[0055] Figure 17(a) is for the power grid data warehouse model S of the present invention DV Mapped to the temporary model T SMD Central point and partial schematic diagram of its attached map12 part of the mapping table;

[0056] Figure 17(b) is for the power grid data warehouse model S of the present invention DV Mapped to the temporary model T SMD Link and partial schematic diagram of its attached map12 part of the mapping table;

[0057] Figure 18 The temporary model T of the present invention SMD Schematic diagram;

[0058] Figure 19 The temporary model T of the present invention SMD To model ES SMD A partial example diagram of the mapping table map13;

[0059] FIG. 20( a ) is a power grid data warehouse model S of the present invention. VD To model ES SMD A partial example diagram of the center point and its affiliated mapping table map4;

[0060] FIG. 20( b ) is a power grid data warehouse model S of the present invention. VD To model ES SMD A partial example diagram of a link and its associated mapping table map4;

[0061] Figure 21 The present invention deletes the multi-dimensional user view V MD Flow chart of the synchronous matching method of the power grid data warehouse model and the multidimensional model under the condition of tables or attributes. DETAILED DESCRIPTION

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

[0063] Example 1

[0064] like Figure 1 As shown, this embodiment provides a method for synchronously matching a power grid data warehouse model with a multidimensional model, comprising the following steps:

[0065] S1: In order to organize the massive data of the power grid, the data organization requirements for the power grid are: a centralized, highly scalable, and highly available platform that supports full-network and cross-domain data integration, as well as dynamic on-demand supply and real-time allocation of resources, to build a power grid data warehouse model. Power Grid Data Warehouse Model S DV It is the DV model of the data warehouse layer, which is mainly composed of three types of DV data tables, namely: hub table (Hub), link table (Link), and satellite table (Satellite), which store the marketing data, production data, and material data of power grid enterprises, and then use the mapping method to present the user view V to users according to the paradigm model. NR At the same time, according to the model evolution mode, the power grid DV data warehouse model S DV Mapping to the semi-dimensional model S of the data mart partSMD stores the data required for end - user analysis, and then the semi - dimensional model S SMD is remapped to the multi - dimensional user view V MD .

[0066] As Figure 2 shown, specifically including: (1) Use three types of tables, namely the central point, link, and affiliated tables, to store the power grid business entities, relationships, and their attribute data respectively; in the figure, there are the power grid customer central point table Hub_Customer (with the customer affiliated table Sat_Customer and the customer address affiliated table Sat_CustAddr), the power consumption contract central point table Hub_Contract (with the contract affiliated table Sat_Contract), and the service central point table Hub_Service (with the service affiliated table Sat_Service), as well as the power consumption status table Lnk_Usage (with the power consumption status affiliated table Sat_Usage) and the contract - service link table Lnk_Cont - Serv;

[0067] (2) The central point table is connected to the link table and the affiliated table based on the business key, and the link table stores many - to - many relationships;

[0068] (3) One central point or link may have multiple affiliates, and each affiliate forms historical records of different periods of related attributes according to the timestamp (Load_Date). The three types of tables store the record source (Rec_Source) attribute, which can store the data sets of all source power grid business systems.

[0069] The power grid DV model presents the normalized user view V to users NR , mainly including the business entity table and the business relationship table, and shows the data situation of the power grid data warehouse model S DV to users. As Figure 3 shown, specifically including: The business entity table represents the business involved in the current power grid data warehouse model S DV , including the customer entity table V1_Customer, the service entity table V1_Service, and the power consumption contract entity table V1_Contract; the relationship table represents the business relationships involved in the current power grid data warehouse model S DV , including the power consumption status relationship table V1_Usage and the power consumption contract - service relationship table V1_Cont - Serv.

[0070] The power grid DV model is suitable for efficiently storing the massive data of the power grid, but it is not conducive to user use. Therefore, in the DV data warehouse environment, it is also necessary to construct the power grid MD model, which is mainly a multi - dimensional model or user view composed of fact tables and dimension tables, and is used to support end - user data analysis. The power grid MD model includes the power grid data warehouse model S according to the model evolution method DVThe converted semi - dimensional model S SMD and its multi - dimensional user view V MD , specifically including: 1) As Figure 4 shown, the semi - dimensional model S SMD uses three types of tables: center point, link, and attachment to store power grid business entity, relationship, and attribute data of the center point / link respectively; in the figure, there are the power grid customer center point table Hub_Customer (with the customer attachment table Sat_Customer) and the service center point table Hub_Service (with the service attachment table Sat_Service), as well as the power consumption status table Lnk_Usage (with the power consumption status attachment table Sat_Usage) and the common date dimension table Date;

[0071] 2) The center point table is connected to the link table and the attachment table based on the business key, and the link table stores many - to - many relationships;

[0072] 3) Merge the attachment tables in the power grid DV data warehouse model S DV so that each center point or link has only one attachment, and each attachment forms historical records of different periods of relevant attributes according to the timestamp (Load_Date).

[0073] The DV data warehouse model S DV evolves into the power grid semi - dimensional model S SMD which is still not suitable for data analysis users, and it is necessary to present the multi - dimensional user view V MD to the users. It mainly has a fact table and dimension tables, showing the data situation of S SMD to the users. As Figure 5 shown, specifically including: the customer dimension table V2_Customer, the service dimension table V2_Service, and the date dimension table V2_Date; the power consumption status fact table V2_Usage, which includes the measurement values of power consumption.

[0074] After the above - mentioned model is built, during the process of users using the model or data, for analysis needs and other purposes, users may propose to modify the multi - dimensional user view V MD . Therefore, this embodiment implements a user view EV MD after the user modifies the multi - dimensional user view V MD , and uses the mapping method to automatically synchronize the original model in reverse to obtain the model ES SMD , and the process of mapping table map4 and mapping table map5.

[0075] The mapping technology adopted in this embodiment, that is, for models M1 and M2, the mapping map(M1,M2) is specifically as follows:

[0076] A mapping device is located between two data models M1 and M2 and can be regarded as a map of a model. Specifically, it generates a two-dimensional table. The rows of the map table represent the attributes of M1, and the columns represent the attributes of M2. The intersection point <row, col> represents the mapping behavior. If an attribute of M1 exists in a row but no corresponding attribute of M2 exists in the column, it means that the attribute of M1 is not mapped (deleted). If no attribute of M1 exists in a row but an attribute of M2 exists in the column, it means that the attribute of M2 is not mapped (added). If a row directly corresponds to a column, an "=" is placed at the <row, col> point of that row and column to indicate direct assignment. If multiple rows correspond to a column, the operation expression is placed at the <row, col> point of those multiple rows and the column. For example, if the column Name is composed of the rows FirstName and LastName, then "=LastName+FirstName" is placed in this column of these two rows to indicate that the "Name" column is composed of the "LastName" row plus the "FirstName" row. Conversely, if a row corresponds to multiple columns, the operation expression is placed at the <row, col> points of those multiple columns of that row. For example, if the row Name is composed of the columns FirstName and LastName, then "=right(Name,8)" is placed in the column FirstName of that row to represent the right 8 characters of the "Name" row, and "=left(Name,2)" is placed in the column LastName of that row to represent the left 2 characters of the "Name" row. Here, right() and left() represent functions to extract the right string and the left string respectively. In addition, some comments can also be added at the <row, col> point, placed between " / *" and "* / ".

[0077] In this embodiment, when the user is using the multi-dimensional user view V MD and to further meet the data analysis requirements, a power consumption contract dimension is added to the multi-dimensional user view V MD to form the view EV MD , it is necessary to automatically synchronize the corresponding user view, as well as the mapping process of the power grid data warehouse model S DV and the semi-dimension model ES SMD . Specifically, it is to automatically output the ES SMD model, as well as the mapping tables map4 and map5.

[0078] When it is determined that the modification method of the multi-dimensional user view V MD evolves into the view EV MD is: when certain tables or attributes of the multi-dimensional user view V MD are added, the multi-dimensional user view V MD evolves into the view EV MD , and the mapping technology means are used to synchronize the ES SMDThe process of the model, as well as mapping table map4 and mapping table map5, is as follows Figure 6 As shown, the specific steps include: for the multi-dimensional power grid model, view EV MD Adding a table or attribute can only be adding a dimension table or adding an attribute of a (fact or dimension) table.

[0079] As Figure 7 Shown, assume adding a V3_Contract entity to the multi-dimensional user view V MD to obtain the corresponding view EV MD ;

[0080] Step 1: Match and map view EV MD with the multi-dimensional user view V MD to form mapping table map6 (EV MD , V MD ), that is, an established mapping table row is the attribute of an entity or relationship in view EV MD , and the column is the attribute of an entity or relationship in the multi-dimensional user view V MD ; Some tables or attributes in view EV MD are not mapped (due to addition), as Figure 8 shown, there is no mapping for the newly added V3_Contract and its attributes;

[0081] Step 2: Combine as Figure 1 shown, establish a mapping table map7 from view EV MD to the semi-dimensional model S SMD : Combine mapping table map6 and mapping table map3 into mapping table map7, as Figure 9 shown, the algorithm is: for each corresponding point <row V , col S > in mapping table map3, if there is also a corresponding point <row EV , col V > in mapping table map6, where col V = row V , then form a transitive mapping corresponding point <row EV , col S > and store it in mapping table map7.

[0082] Step 3: Generate the initial model ES SMD and the initial mapping table map5: Copy the mapping in the semi-dimensional model S SMD and mapping table map7 to form the initial model ES SMD and the initial mapping table map5, while the newly added tables or attributes in view EV MD are not in the initial model ES SMDand generated in the initial mapping table map5, such as the above-mentioned view EV MD The newly added table V3_Contract in SMD is not generated in the initial model ES

[0083] Step 4: Generate view EV MD — and mapping table map8: Establish view EV MD Some tables or attributes that do not appear in the multi-dimensional model view V MD form view EV MD — ; such as Figure 10 shown, using the table attributes in view EV MD as rows and the table attributes in view EV MD — as columns to form mapping table map8. The view EV in this embodiment MD — contains the V4_Contract entity table and the V4_Usage relationship table (excluding non-primary attributes);

[0084] Step 5: According to the following rules, export new model elements based on the newly added tables or attributes in view EV MD — to generate model ES SMD — and establish the mapping table map9 from view EV MD - to ES SMD — ;

[0085] 1) For the entity tables in view EV MD — generate them as the central point table and the affiliated table in model ES SMD — using the primary key of the entity table as the business key and the date attribute in the relationship table as the timestamp for the central point table and its affiliates;

[0086] 2) For the relationship tables in view EV MD — generate them as the link table and the affiliated table in model ES SMD — using the primary key of the relationship table as the primary key for the link table and its affiliates, and the date attribute in the relationship table as the timestamp for the central point table and its affiliates;

[0087] such as Figure 11 、 Figure 12 shown, for view EV MD —The newly added entity table V4_Contract in it, in model ES SMD — Generate it into the central point table Hub_Contract and the affiliated table Sat_Contract (including the "total amount" and "discount" of V4_Contract) in the model ES. The primary key Cont_key of the entity table V4_Contract is used as the business key, and the date attribute Date_id in the relationship table is used as the timestamp Load_Date of the central point table and its affiliates; for the view EV MD — In the relationship table V4_Usage in it, since there are no non-primary attributes, so in model ES SMD — Only generate the link table Lnk_Usage in it, and its primary key is (Cust_key, Serv_key, Cont_key, Date_id);

[0088] Step 6: Establish the mapping table map10 from the view EV MD to model ES SMD — : Combine the mapping table map8 and the mapping table map9 into the mapping table map10. The algorithm is: for each corresponding point <row EV - ,col ES - > in the mapping table map9, if there is also a corresponding point <row EV ,col EV - > in the mapping table map8, where col EV - = row EV - , then form the transfer mapping corresponding point <row EV ,col ES - >, and store it in the mapping table map10. As Figure 13 shown, which only includes the mapping of the newly added tables and attributes.

[0089] Step 7: Match and map model ES SMD — with model ES SMD to form the mapping table map11 (ES SMD — ,ES SMD ), that is, a mapping table established. The rows are the tables and their newly added attributes of model ES SMD — , and the columns are the tables and their attributes in model ES SMD . As Figure 14As shown, only the mapping model ES SMD — and the model ES SMD have common points.

[0090] Step 8: Incorporate ES SMD — into ES SMD , and incorporate the mapping table map10 into the mapping table map5: The incorporation is based on the mapping table map11. Add the attributes in the common center point table, link table, and their affiliated tables of the two models ES SMD in ES SMD — and ES SMD , and add the tables and their attributes of ES SMD — ;

[0091] As Figure 15 shown, the incorporation is based on the mapping table map11. Add the attributes in the common link table of the two models ES SMD in ES SMD — and ES SMD (that is, add Cont_key as the primary key in Lnk_Usage and extend Cont_key as the primary key to Sat_Usage), and add the tables Hub_Contract, Sat_Contract and their attributes of ES SMD — ;

[0092] As shown in Figure 16(a) and Figure 16(b), add all the mappings of the mapping table map10 to the mapping table map5 (simultaneously complete the model ES SMD and the mapping table map5).

[0093] Step 9: As shown in Figure 17(a) and Figure 17(b), establish a temporary model T DV for the power grid data warehouse model S SMD according to the following rules, and establish the mapping table map12:

[0094] 1) Copy all the center points (Hub_Customer, Hub_Service, Hub_Contract), links (Lnk_Usage, Lnk_Cont-Serv) and affiliated tables in the power grid data warehouse model S DV to establish the corresponding tables of the temporary model T SMD ;

[0095] 2) If a center point or link table has multiple affiliated tables, only retain the user-specified main affiliated table, merge the other affiliated tables into the main affiliated table according to the timestamp, and delete all record source attributes;

[0096] In this embodiment, for the central point Hub_Customer with two affiliated tables, only the main affiliated table Sat_Customer is retained, and the attributes in the Sat_CustAddr affiliated table are merged into Sat_Customer according to the timestamp.

[0097] 3) If a link table stores a many-to-one functional dependency, several of its business keys are added as foreign keys to the primary key area to establish a dependency relationship with the corresponding central point table. These foreign keys are merged as the primary key, and the original primary key is deleted; check the link table Lnk_Cont-Serv, which stores a many-to-many relationship and is not deleted.

[0098] 4) As shown in FIGS. 17(a) and 17(b), establish a mapping table map12: According to the corresponding relationships of the above central points, links, and affiliated tables, establish the mapping table map12.

[0099] 5) As Figure 18 shown, add the common dimension date table of the multi-dimensional model to the temporary model T SMD .

[0100] Step 10: Match and map the temporary model T SMD with the model ES SMD to form a mapping table map13(T SMD , ES SMD ), that is, a mapping table established, where the rows are the attributes of the tables in T SMD and the columns are the attributes of the tables in ES SMD ; some tables or attributes in the T SMD model have no mapping. As Figure 19 shown, the mapping table map13 has several unmapped parts only in the link table, and all others are matched.

[0101] Step 11: As shown in FIGS. 20(a) and 20(b), generate a mapping table map4 from the power grid data warehouse model S DV to the model ES SMD : Combine the mapping table map12 and the mapping table map13 into the mapping table map4. The algorithm is: for each corresponding point <row T , col ES > in the mapping table map13, if there is also a corresponding point <row S , col T > in the mapping table map12, where col T = row T , then form a transitive mapping corresponding point <row S , col ES>, store in mapping table map4 (synchronously complete mapping map4); So far, the user view EV modified by the user is obtained MD The corresponding model ES SMD , as well as mapping table map4 and mapping table map5.

[0102] Example 2

[0103] This embodiment provides a method for synchronously matching a power grid data warehouse model with a multidimensional model, comprising the following steps:

[0104] DV Data Warehouse Model S DV Presenting the user view V to the user according to the paradigm model NR , and at the same time map it to the half-dimensional model S of the multidimensional data model part SMD , construct the power grid data warehouse model S DV To half-dimensional model S SMD Mapping table, half-dimensional model S SMD Then map it to the multi-dimensional user view V MD ; Then, modify the multidimensional user view V MD , evolved into user view EV MD ;

[0105] In this embodiment, when determining the multi-dimensional user view V MD Evolving into User View EV MD The modification method is: delete the multi-dimensional user view V MD Some tables or attributes in the multidimensional user view V MD Evolving into User View EV MD , using mapping technology to synchronize the model ES SMD , and the process of mapping table map4 and mapping table map5, such as Figure 21 As shown, combined with Figure 1 As shown, the specific steps include:

[0106] Step 1: Present the user view V to the user according to the traditional paradigm model NR Mapping to the power grid data warehouse model S DV , forming a mapping table map1;

[0107] The power grid data warehouse model is converted into a semi-dimensional model according to the evolution of the DV model, and a power grid data warehouse model S is constructed. DV To half-dimensional model S SMDThe mapping table map2: Specifically, establish a mapping table for each center point of the power grid business entity and its affiliated table in the power grid data warehouse model, corresponding to each center point of the power grid business entity and its affiliated table in the semi-dimensional model. Establish a mapping table for each power grid business relationship link and its affiliated table in the power grid data warehouse model, corresponding to each power grid business relationship link and its affiliated table in the semi-dimensional model. Establish the mapping method between rows and columns for each mapping table to form the mapping table map2 that maps from the power grid data warehouse model to the semi-dimensional model. Then map the semi-dimensional model S SMD to the multi-dimensional user view V MD , forming the mapping table map3;

[0108] Match and map the user view EV MD with the multi-dimensional user view V MD to form the mapping table map6(EV MD ,V MD ), that is, a mapping table established. The rows are the attributes of the entities or relationships in the user view EV MD , and the columns are the attributes of the entities or relationships in the multi-dimensional user view V MD ; Some tables or attributes in the multi-dimensional user view V MD are not mapped (due to deletion).

[0109] Step 2: Establish the mapping table map7 from the view EV MD to the semi-dimensional model S SMD : Combine the mapping table map6 and the mapping table map3 into the mapping table map7. The algorithm is: For each corresponding point <row v ,col S > in the mapping table map3, if there is also a corresponding point <row EV ,col V > in the mapping table map6, where col V = row V , then form the transfer mapping corresponding point <row EV ,col S > and store it in the mapping table map7. Otherwise, store it in the mapping table of map0 (for simplicity, map0 is not drawn in Figure 1 ).

[0110] Step 3: Generate the initial model ES SMD and the initial mapping table map5: Copy the mapping in the semi-dimensional model S SMD and the mapping table map7 to form the initial model ES SMD and the initial mapping table map5.

[0111] Step 4: Delete the useless mappings in the mapping table map5: Find the view EV in the mapping table of the mapping table map0 (only the mapping table map3 has no corresponding mapping table map6). MD and ES SMD The useless mapping correspondence points between them are deleted.

[0112] Step 5: Generate an initial mapping table map4: Copy the mapping in the mapping table map2 to form an initial mapping table map4.

[0113] Step 6: Delete useless mappings in mapping table map4: Find the mappings without ES in the mapping table of mapping table map4. SMD Map and delete the corresponding point tables and attributes.

[0114] Step 7: Now, view EV MD ES has been synchronized SMD Model, and mapping table map4 and mapping table map5.

[0115] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A synchronization and matching method for a power grid data warehouse model and a multi-dimensional model, characterized in that including the following steps: Build the DV data warehouse model S of the power grid based on the DV modeling method DV , and use the central point table, link table, and affiliated table to store the power grid business entities, relationships, and their attribute data respectively; DV Data Warehouse Model S DV Mapping to the semi - dimensional model S of the multi - dimensional data model part SMD , semi - dimensional model S SMD Remapping to the multi - dimensional user view V MD ; Modify the multi-dimensional user view V MD , which evolves into the user view EV MD ; When it is determined that the modification method is to add a table or attribute in the multi-dimensional user view V MD perform the following steps: Match the user view EV MD with the multi-dimensional user view V MD to form a mapping table map6; Establish a user view EV MD to a semi-dimensional model S SMD mapping table map7; Copy the semi-dimensional model S SMD and the mapping in the mapping table map7 to form the initial model ES SMD and the initial mapping table map5; Establish user view EV MD The tables or attributes not present in the multi-dimensional user view V MD appear to form view EV MD — Using the table attributes in view EV MD as rows and the table attributes in view EV MD — as columns, a mapping table map8 is formed; According to view EV MD — Export new model elements from the new tables or attributes in to generate model ES SMD — Establish view EV MD — To model ES SMD — Mapping table map9; synthesize mapping table map8 and mapping table map9 into mapping table map10; Match the model ES SMD — with the model ES SMD to perform matching mapping and form a mapping table map11; Integrate model ES SMD — Merge into model ES SMD , and merge mapping table map10 into mapping table map5; Copy the DV data warehouse model S DV , create a temporary model T SMD , create a mapping table map12 according to the correspondence between the center point table, the link table, and the affiliated table; Match the temporary model T SMD with the model ES SMD to form a mapping table map13; Generate DV data warehouse model S DV To model E S SMD Mapping table map4: Combine mapping table map12 and mapping table map13 into mapping table map4; Obtain the modified user view EV MD The corresponding model ES SMD , and mapping tables map4 and map5 2. The synchronous matching method of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that Match the user view EV MD with the multi-dimensional user view V MD to form a mapping table map6, specifically including: The rows of the mapping table map6 are the attributes of the entities or relationships in the user view EV MD and the columns are the attributes of the entities or relationships in the multi-dimensional user view V MD ​ 3. A method for synchronous matching of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that Establish user view EV MD to semi - dimensional model S SMD mapping table map7, and the specific steps include: Map the semi - dimensional model S SMD to the multi - dimensional user view V MD , and form a mapping table map3; synthesize mapping table map6 and mapping table map3 into mapping table map7.

4. A synchronization and matching method for a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that According to view EV MD — Export new model elements from the new tables or attributes in to generate model ES SMD — Establish view EV MD — To ES SMD — The mapping table map9 from to, the specific steps include: For view EV MD — in the entity table, in model ES SMD — generate the entity table into a center point table and an affiliated table, use the primary key of the entity table as the business key, and use the date attribute in the relationship table as the timestamp for the center point table and its affiliated tables; For view EV MD — in the relationship table, in model ES SMD — generate the entity table as a link table and an affiliated table, use the primary key of the relationship table as the primary key of the link table and its affiliated table, and use the date attribute in the relationship table as the timestamp of the central point table and its affiliation.

5. A method for synchronous matching of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that Model ES SMD — with Model ES SMD to perform matching mapping to form mapping table map11, specifically represented as: The rows of mapping table map11 are the tables of model ES SMD — and its new attributes, and the columns are the tables of model ES SMD in the model and their attributes.

6. A synchronization and matching method for a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that, Integrate model ES SMD — Merge into model ES SMD , the mapping table map10 is merged into the mapping table map5, specifically including: Based on the mapping table map11, in ES SMD add two models to ES SMD — and the common center point table, link table and their affiliated table attributes in ES SMD and add the tables and their attributes of ES SMD — ; add all mappings of mapping table map10 to mapping table map5.

7. A method for synchronous matching of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that Copy DV data warehouse model S DV , establish a temporary model T SMD , establish a mapping table map12 according to the corresponding relationships of the center point, links, and affiliated tables, specifically including: Copy the central point tables, link tables, and affiliated tables in the power grid data warehouse model S to establish a corresponding temporary model T DV and the tables in SMD ; if it is determined that a center point or a link table has multiple attached tables, retain the specified main attached table, merge the remaining attached tables into the main attached table according to the timestamp, and delete all record source attributes; if it is determined that a link table stores a many-to-one functional dependency, add its business key as a foreign key to the primary key area, establish a dependency relationship with the corresponding center point table, merge the foreign keys as the new primary key, and delete the original primary key; establish mapping table map12 according to the corresponding relationship between the center point table, the link table and the attached table; Add the common dimension date table of the multi-dimensional model to the temporary model T SMD ​ 8. A method for synchronous matching of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that Match the temporary model T SMD with the model ES SMD to form a mapping table map13, which is specifically represented as: The rows of the mapping table map13 are the temporary model T SMD Attributes of the table in SMD the table, and the columns are the model ES Attributes of the table in 9. A method for synchronous matching of a power grid data warehouse model and a multi-dimensional model according to claim 1, characterized in that synthesize map12 and map13 into map4, specifically including: For each corresponding point <row T , col ES > in the mapping table map13, if there is also a corresponding point <row S , col T > in the mapping table map12, where col T = row T , then a transfer mapping corresponding point <row S , col ES > is formed and stored in the mapping table map4.

10. A synchronization and matching method for a power grid data warehouse model and a multi-dimensional model, characterized in that, including the following steps: Construct the DV data warehouse model S of the power grid based on the DV modeling method DV , and use the central point table, link table, and affiliated table to store the power grid business entities, relationships, and their attribute data respectively; DV Data Warehouse Model S DV Map and convert the semi - dimensional model S in the multi - dimensional data model part SMD , construct the mapping table map2 from the power grid data warehouse model S DV to the semi - dimensional model S SMD , and then remap the semi - dimensional model S SMD to the multi - dimensional user view V MD ; Modify the multi-dimensional user view V MD , which evolves into the user view EV MD ; When it is determined that the modification method is to delete a table or attribute in the multi-dimensional user view V MD the following steps are executed: Match the user view EV MD with the multi-dimensional user view V MD to form a mapping table map6; Establish a user view EV MD to the semi-dimensional model S SMD mapping table map7; Copy the semi-dimensional model S SMD and the mappings in the mapping table map7 to form the initial model ES SMD and the initial mapping table map5, and delete the useless mappings in the initial mapping table map5; copy the mappings in mapping table map2 to form the initial mapping table map4, and delete the useless mappings in the initial mapping table map4; Obtain the modified user view EV MD The corresponding model ES SMD , as well as mapping table map4 and mapping table map5.

Citation Information

Patent Citations

  • Method and system for synchronously constructing and mapping service model and data warehouse model

    CN104252506A

  • Converting method from open EHR Template to relation database

    CN106844693A