Effective and agile data warehouse design method
By optimizing data extraction, loading, and transformation, a star schema data model is created. Combined with online analytical processing and data mining algorithms, the problems of insufficient flexibility and slow response speed in traditional data warehouse design are solved, thereby improving data processing speed and quality, and enhancing data insight and predictive accuracy.
Patent Information
- Application Number
- CN202411666857.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional data warehouse designs suffer from insufficient flexibility, high maintenance costs, and slow response times, limiting their effectiveness in rapidly changing business environments.
By optimizing the data extraction, loading, and transformation processes, a star-shaped data model is created. Combined with online analytical processing, data mining algorithms are applied to perform multidimensional data analysis and prediction, generating statistical reports to meet different business needs.
It significantly improved data processing speed and quality, enhanced data insight and predictive accuracy, and met the multi-dimensional data analysis and business needs of senior management.
Smart Images

Figure CN120950476A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management, and more specifically, to an effective and agile data warehouse design method. Background Technology
[0002] In today's data-driven business environment, data warehouses play a crucial role by integrating large amounts of data from different sources, supporting complex queries and analyses, and thus helping organizations make data-driven decisions.
[0003] Traditional data warehouse designs often suffer from insufficient flexibility, high maintenance costs, and slow response times, which limit the effectiveness of data warehouses in rapidly changing business environments. Therefore, this paper proposes an effective and agile data warehouse design methodology. Summary of the Invention
[0004] The purpose of this invention is to provide an effective and agile data warehouse design method to solve the problems of insufficient flexibility, high maintenance costs and slow response speed that traditional data warehouse designs often face in the background art.
[0005] To achieve the above objectives, the present invention aims to provide an effective and agile data warehouse design method, comprising the following steps:
[0006] S1. Based on the input raw data, the data cleaning module extracts, loads, and transforms the raw data from the data source and loads it into the data warehouse;
[0007] S2. Create a star schema data model;
[0008] S3. Based on online analytical processing, it provides multi-dimensional data analysis, mining, and prediction results for senior management.
[0009] S4 generates statistical reports to support different business needs.
[0010] As a further improvement to this technical solution, the specific steps involved in extracting, loading, and transforming the original data from the data source in step S1 are as follows:
[0011] Extracting data from various heterogeneous data sources without altering the original state of the data involves the following arithmetic expression:
[0012]
[0013] In the formula, D extract The extracted dataset; E(S) i ) represents the function that extracts data from the i-th source Si; n represents the total number of data sources; i represents the index coefficient;
[0014] Data loading is the process of storing the extracted raw data into a data warehouse. The arithmetic expressions involved are as follows:
[0015] D load =L(D extract ,T);
[0016] In the formula, D load This represents the original data set loaded into the target storage; it also represents the data D. extract Loading function for data warehouse T (such as a data warehouse or data lake); T represents the data warehouse;
[0017] Data transformation is used to generate result data that meets analytical needs, and the arithmetic expressions involved are as follows:
[0018]
[0019] In the formula, D transform T represents the transformed data set; f This indicates that the function f j Applied to D after loading load The data conversion process; f j represents the transformation logic function; m represents the number of transformation logic functions to be applied; j represents the index coefficient.
[0020] As a further improvement to this technical solution, the specific steps for creating the star schema data model in step S2 are as follows:
[0021] S1.1 Identify and define the sales fact table and product dimension table;
[0022] S1.2 Establish the relationship between the sales fact table and the product dimension table;
[0023] S1.3, Data model design based on composite index optimization and data pre-aggregation optimization.
[0024] As a further improvement to this technical solution, in S1.1, the sales fact table is used to record multiple metrics, including date dimension, product dimension, store dimension, sales amount, sales quantity and profit;
[0025] The product dimension table is used to describe the contextual data related to the fact table. The contextual data related to the fact table includes the product unique identifier, product name, product category, and product price.
[0026] As a further improvement to this technical solution, in S1.2, a column in the sales fact table is associated with a unique identifier column in the dimension table through a foreign key, and SQL JOIN is used to connect the tables.
[0027] As a further improvement to this technical solution, in S1.3, the composite index optimization accelerates the retrieval of data in the table by creating indexes on the fields. To optimize query performance, pre-aggregation is performed during the data loading stage and stored in a separate summary table.
[0028] As a further improvement to this technical solution, the steps involved in online analysis and processing in S3 are as follows:
[0029] S2.1 Multidimensional data analysis is calculated based on the relationship between the sales fact table and the product dimension table to expand the business with more dimension details;
[0030] S2.2 Data mining based on information gain algorithm is used to calculate and evaluate the importance of features;
[0031] S2.3 Finally, a linear prediction algorithm is used to learn the relationships between features from historical data, thereby predicting future sales.
[0032] As a further improvement to this technical solution, the computational metric derived from the multidimensional data analysis requirement design in S2.1 is specifically as follows:
[0033] Derivation of unit price:
[0034]
[0035] In the formula, Unit Price represents the unit price; Revenue represents the sales revenue; and Quantity Sold represents the sales quantity.
[0036] Gross profit margin derivation:
[0037]
[0038] In the formula, Profit Margin represents the gross profit margin; Profit represents profit; and Revenue represents sales revenue.
[0039] As a further improvement to this technical solution, the information gain algorithm in S2.2 is specifically as follows:
[0040]
[0041] In the formula, D transform A represents the dataset after data cleaning and transformation; A represents the candidate feature; Entropy(D) transform ) represents dataset D transform The entropy of feature A; Values(A) represents all possible values of feature A; D v |D represents a subset of feature A with value v; v | represents subset Dv Size; |D transform | represents dataset D transform Size; Entropy(D v ) represents subset D v The entropy.
[0042] As a further improvement to this technical solution, in S2.3, the relationship between evaluation features is learned through historical data based on a linear prediction algorithm to predict future sales, specifically as follows:
[0043] SRevenue=β0+β1×QuantitySold+β2×Unit Price+β3×Profit Margin+ε;
[0044] In the formula, SRevenue represents the predicted sales revenue; β0 represents the intercept term; β1 represents the degree of influence of sales quantity on sales revenue; β2 represents the degree of influence of unit price on sales revenue; β3 represents the degree of influence of gross profit margin on sales revenue; ε represents the error term; QuantitySold represents the sales quantity; Unit Price represents the unit price; and Profit Margin represents the gross profit margin.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] This effective and agile data warehouse design methodology significantly improves data processing speed and quality by optimizing data extraction, loading, and transformation processes, and by creating a high-efficiency star schema. It enhances data insight and predictive accuracy through the design of computational metrics and the application of data mining algorithms, such as derived indicators like unit price and gross profit margin, and by applying data mining techniques like information gain algorithms. Furthermore, it provides multi-dimensional data analysis, mining, and predictive results for senior management through online analytical processing; finally, it generates statistical reports to meet diverse business needs. Attached Figure Description
[0047] Figure 1 This is a flowchart of the overall method of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Example:
[0050] Please see Figure 1 As shown, this embodiment provides an effective and agile data warehouse design method, including the following steps:
[0051] S1. Using the input raw data, the data cleaning module extracts, loads, and transforms the raw data from the data source, and then loads it into the data warehouse. The specific steps involved in extracting, loading, and transforming the raw data from the data source are as follows:
[0052] Extracting data from various heterogeneous data sources without altering the original state of the data involves the following arithmetic expression:
[0053]
[0054] In the formula, D extract The extracted dataset; E(S) i ) represents the function that extracts data from the i-th source Si; n represents the total number of data sources; i represents the index coefficient;
[0055] Data loading is the process of storing the extracted raw data into a data warehouse. The arithmetic expressions involved are as follows:
[0056] D load =L(D extract ,T);
[0057] In the formula, D load This represents the original data set loaded into the target storage; it also represents the data D. extract Loading function for data warehouse T (such as a data warehouse or data lake); T represents the data warehouse;
[0058] Data transformation is used to generate result data that meets analytical needs, and the arithmetic expressions involved are as follows:
[0059]
[0060] In the formula, D transform T represents the transformed data set; f This indicates that the function f j Applied to D after loading load The data conversion process; f j represents the transformation logic function; m represents the number of transformation logic functions to be applied; j represents the index coefficient;
[0061] Heterogeneous data sources refer to data sources with different structures, formats, storage methods, or access methods. These data sources may be distributed across multiple systems, implemented with different technology stacks, and using different data models and protocols. Their heterogeneity poses challenges to data integration, migration, and analysis.
[0062] S2. Create a star schema data model; the specific steps for creating the star schema data model are as follows:
[0063] Identify and define the sales fact table and product dimension table; the sales fact table is used to record multiple metrics, including date dimension, product dimension, store dimension, sales amount, sales quantity, and profit;
[0064] The product dimension table is used to describe the contextual data related to the fact table. The contextual data related to the fact table includes the product unique identifier, product name, product category, and product price.
[0065] Establish the relationship between the sales fact table and the product dimension table; associate a column in the sales fact table with a unique identifier column in the dimension table using a foreign key, and use SQL JOIN to join the tables. The relationship between the sales fact table and the product dimension table after joining via SQL JOIN is as follows:
[0066]
[0067] Sales Fact Table represents the sales facts; Product.Category represents the product category; SUM(Revenue) represents the total sales; Product Dimension Table represents the product dimension table; Table.ProductID represents the product ID; Product.Category represents the product category.
[0068] The data model design is based on composite index optimization and data pre-aggregation optimization. Composite index optimization accelerates data retrieval in the table by creating indexes on fields. The specific SQL statement for the composite index is as follows:
[0069] CREATE INDEX idx_product_id ON Sales_Fact_Table(Product ID Date ID );
[0070] CREATE INDEX idx_product_id indicates that an index named idx_product_id is created; ONSales_Fact_Table(Product ID Date ID ) indicates the Product in the sales fact table ID Date ID Create an index on the field;
[0071] To optimize query performance, pre-aggregation is performed during the data loading phase and stored in a separate summary table. The structure of the pre-aggregation is as follows:
[0072] Pre--Aggregated Sales Table=
[0073] {Week, Product ID, Store ID, Total Revenue, Total Quantity Sold};
[0074] In the formula, Week represents the week to which the sales data belongs; Product ID represents the unique identifier of the product; Store ID represents the unique identifier of the store; Total Revenue represents the total sales revenue for the week or month; and Total QuantitySold represents the total sales quantity for the week or month.
[0075] S3. Based on online analytical processing, provide multi-dimensional data analysis, mining, and prediction results for senior management; the steps involved in online analytical processing are as follows:
[0076] Multidimensional data analysis is based on the relationship between the sales fact table and the product dimension table to calculate and expand the business with more dimensional details. The calculation metrics derived from the design of multidimensional data analysis requirements are specifically:
[0077] Derivation of unit price:
[0078]
[0079] In the formula, Unit Price represents the unit price; Revenue represents the sales revenue; and Quantity Sold represents the sales quantity.
[0080] Gross profit margin derivation:
[0081]
[0082] In the formula, Profit Margin represents the gross profit margin; Profit represents profit; and Revenue represents sales revenue.
[0083] Data mining based on the information gain algorithm is used to calculate and evaluate the importance of features; the information gain algorithm is specifically as follows:
[0084]
[0085] In the formula, D transform A represents the dataset after data cleaning and transformation; A represents the candidate feature; Entropy(D) transform ) represents dataset D transformThe entropy of feature A; Values(A) represents all possible values of feature A; D v |D represents a subset of feature A with value v; v | represents subset D v Size; |D transform | represents dataset D transform Size; Entropy(D v ) represents subset D v The entropy.
[0086] Finally, a linear prediction algorithm is used to learn the relationships between features from historical data, thereby predicting future sales; specifically:
[0087] SRevenue=β0+β1×Quantity Sold+β2×Unit Price+β3×Profit Margin+∈;
[0088] In the formula, SRevenue represents the predicted sales revenue; β0 represents the intercept term; β1 represents the degree of influence of sales quantity on sales revenue; β2 represents the degree of influence of unit price on sales revenue; β3 represents the degree of influence of gross profit margin on sales revenue; ε represents the error term; Quantity Sold represents sales quantity; Unit Price represents unit price; and Profit Margin represents gross profit margin.
[0089] S4 generates statistical reports to support different business needs.
[0090] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. An effective and agile data warehouse design method, characterized in that: Includes the following steps: S1. Based on the input raw data, the data cleaning module extracts, loads, and transforms the raw data from the data source and loads it into the data warehouse; S2. Create a star schema data model; S3. Based on online analytical processing, it provides multi-dimensional data analysis, mining, and prediction results for senior management. S4 generates statistical reports to support different business needs.
2. The effective and agile data warehouse design method according to claim 1, characterized in that: In step S1, the specific steps involved in extracting, loading, and transforming the raw data from the data source are as follows: The arithmetic expression involved in extracting data from various heterogeneous data sources without altering the original state of the data is: In the formula, D extract The extracted dataset; E(S) i ) represents a function that extracts data from the i-th source Si; n represents the total number of data sources; i represents the index coefficient; Data loading is the process of storing the extracted raw data into a data warehouse. The arithmetic expressions involved are as follows: D load =L(D extract ,T); In the formula, D load This represents the original data set loaded into the target storage; it also represents the data D. extract Loading function for data warehouse T (such as a data warehouse or data lake); T represents the data warehouse; Data transformation is used to generate result data that meets analytical needs, and the arithmetic expressions involved are as follows: In the formula, D transform T represents the transformed data set; f This indicates that the function f j Applied to D after loading load The data conversion process; f j represents the transformation logic function; m represents the number of transformation logic functions to be applied; j represents the index coefficient.
3. The effective and agile data warehouse design method according to claim 1, characterized in that: In step S2, the specific steps for creating the star schema data model are as follows: S1.1 Identify and define the sales fact table and product dimension table; S1.2 Establish the relationship between the sales fact table and the product dimension table; S1.3, Data model design based on composite index optimization and data pre-aggregation optimization.
4. The effective and agile data warehouse design method according to claim 3, characterized in that: In S1.1, the sales fact table is used to record multiple metrics, including date dimension, product dimension, store dimension, sales amount, sales quantity, and profit. The product dimension table is used to describe the contextual data related to the fact table. The contextual data related to the fact table includes the product unique identifier, product name, product category, and product price.
5. The effective and agile data warehouse design method according to claim 3, characterized in that: In S1.2, a column in the sales fact table is associated with a unique identifier column in the dimension table through a foreign key, and the tables are joined using SQL J0 IN.
6. The effective and agile data warehouse design method according to claim 3, characterized in that: In S1.3, composite index optimization accelerates the retrieval of data in the table by creating indexes on fields. To optimize query performance, pre-aggregation is performed during the data loading stage and stored in a separate summary table.
7. The effective and agile data warehouse design method according to claim 1, characterized in that: In step S3, the online analysis and processing involves the following steps: S2.1 Multidimensional data analysis is calculated based on the relationship between the sales fact table and the product dimension table to expand the business with more dimension details; S2.2 Data mining based on information gain algorithm is used to calculate and evaluate the importance of features; S2.3 Finally, a linear prediction algorithm is used to learn the relationships between features from historical data, thereby predicting future sales.
8. The effective and agile data warehouse design method according to claim 7, characterized in that: In S2.1, the computational metrics derived from the design of multidimensional data analysis requirements are specifically as follows: Derivation of unit price: In the formula, Unit Price represents the unit price; Revenue represents the sales revenue; and Quantity Sold represents the sales quantity. Gross profit margin derivation: In the formula, Profit Margin represents the gross profit margin; Profit represents profit; and Revenue represents sales revenue.
9. The effective and agile data warehouse design method according to claim 7, characterized in that: In S2.2, the information gain algorithm is specifically as follows: In the formula, D transform A represents the dataset after data cleaning and transformation; E represents the candidate feature. ntropy(D transform ) represents dataset D transform The entropy of feature A; Values(A) represents all possible values of feature A; D v |D represents a subset of feature A with value v; v | represents subset D v Size; |D transform | represents dataset D transform Size; Entropy(D v ) represents subset D v The entropy.
10. The effective and agile data warehouse design method according to claim 7, characterized in that: In step S2.3, the linear prediction algorithm learns the relationships between evaluation features using historical data to predict future sales, specifically as follows: SRevenue=β0+β1×Quantity Sold+β2×Unit Price+β3× Profit Margin + ε; In the formula, SRevenue represents the predicted sales revenue; β0 represents the intercept term; β1 represents the degree of influence of sales quantity on sales revenue; β2 represents the degree of influence of unit price on sales revenue; β3 represents the degree of influence of gross profit margin on sales revenue; ∈ represents the error term; Quantity Sold represents the sales quantity; Unit Price represents the unit price; and Profit Margin represents the gross profit margin.
Citation Information
Patent Citations
Method and system for multi-dimensional analysis of message service data
CN101197876A
Internet finance big data warehouse analyzing and mining method
CN107958046A
Dimension context propagation techniques for optimizing SQL query plans
CN111971666A
Data warehouse design and data analysis acceleration system for industrial analysis
CN115309724A
Big data experiment system for science and technology service
CN115309749A