A data warehouse, a data processing system and a computer device

Through the connection between the data warehouse and the stream processing platform, the persistent storage of real-time data and the direct acquisition of historical offline data are realized, which solves the problems of complex acquisition and high storage cost of historical offline data in the Kappa architecture, and improves the convenience of calculation.

CN114860780BActive Publication Date: 2024-09-27ZHEJIANG FANKE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210642584.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2024-09-27
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

When the existing Kappa architecture obtains historical offline data, the storage cost of Kafka increases and the acquisition complexity is high, requiring handwritten code to obtain data from Kafka.

Method used

A data warehouse is designed that connects to the stream processing platform through the data storage module, obtains real-time data from the data source and stores it persistently. The stream data processing engine obtains historical offline data from the storage module and obtains it directly through the standard interface to avoid handwritten code. .

Benefits of technology

It improves the convenience of real-time calculation of real-time data and batch calculation of historical offline data, reduces the data storage cost of the stream processing platform, and simplifies the acquisition process of historical offline data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860780B
    Figure CN114860780B
Patent Text Reader

Abstract

The embodiment of the present invention provides a data warehouse, a data processing system and a computer device for improving the convenience of calculating streaming data and historical offline data. The data warehouse in the embodiment of the present invention includes: a data source, a data storage module and a data service module, the data storage module includes at least one of a first data storage device and a streaming data processing engine; the data service module includes at least one of a first data query module, a data analysis module and a second data query module; the first data storage device is used to persistently store the real-time data obtained from the data source; the first data query module is used to display the queried historical offline data; the data analysis module is used to analyze and display the obtained historical offline data; the streaming data processing engine is used to obtain real-time data from the streaming processing platform and obtain historical offline data from the first data storage device to perform data processing on the real-time data and the historical offline data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data warehouse, a data processing system and a computer device. Background Art

[0002] Data warehouse: A data warehouse is a subject-oriented, integrated, non-volatile data collection that reflects historical changes (time variant) and is used to support management decisions.

[0003] A commonly used data warehouse architecture in the prior art is the Kappa architecture ( Figure 1 A schematic diagram of the Kappa architecture is given, where the Kappa architecture is a real-time data processing technology that efficiently processes massive amounts of data. Its core idea is to solve the problem of full data processing by improving the stream computing system, that is, to use the same processing flow for both real-time computing of streaming data (dynamic data) and batch computing of static data.

[0004] Specifically, when the data flows from the data source to the real-time data layer in the Kappa architecture, Kafka or a similar MQ queue system is generally used to collect various data, and the amount of data that needs to be processed for a few days is stored for a few days. When a full recalculation is required, a new stream computing instance is initiated, the calculation is started from scratch, and the output is stored in a new result storage.

[0005] The Kappa architecture data warehouse has at least the following defects:

[0006] The Kappa architecture generally uses Kafka to store historical offline data. Kafka is a channel for obtaining data. When the amount of historical offline data is large, on the one hand, the storage cost of Kafka increases. On the other hand, when obtaining historical offline data from Kafka, it is necessary to write code by hand each time and publish the code to the platform for running before obtaining historical offline data, which increases the complexity of obtaining historical offline data. Summary of the invention

[0007] The embodiments of the present invention provide a data warehouse, a data processing system and a computer device for improving the convenience of performing real-time calculations on streaming data (dynamic data) and performing batch calculations on historical offline data.

[0008] A first aspect of an embodiment of the present application provides a data warehouse, including:

[0009] A data source, a data storage module and a data service module, wherein the data storage module includes at least one of a first data storage device and a stream data processing engine; the data service module includes at least one of a first data query module, a data analysis module and a second data query module;

[0010] When the data storage module includes the first data storage device, the first data storage device is connected to the data source through the stream processing platform to obtain real-time data from the data source and store the real-time data persistently;

[0011] When the data service module includes the first data query module, the first data query module is in communication connection with the first data storage device, and the first data query module is used to query the first data storage device according to the first query request upon receiving a first query request from a user, and display the queried historical offline data, wherein the first query request is used to query the historical offline data;

[0012] When the data service module includes the data analysis module, the data analysis module is in communication connection with the first data storage device, and the data analysis module is used to obtain the historical offline data from the first data storage device according to the historical offline data analysis request upon receiving the historical offline data analysis request from the user, and analyze and display the obtained historical offline data;

[0013] When the data storage device includes the stream data processing engine, and the data service module includes the second data query module, the stream data processing engine is used to obtain real-time data from the stream processing platform and obtain historical offline data from the first data storage device, so as to perform data processing on the real-time data and the historical offline data, and write the processed historical offline data into the first data storage device through the stream processing platform, and write the processed real-time data into the second data query module;

[0014] The second data query module is used to receive a second query request from a user and display the queried real-time data according to the second query request, wherein the second query request is used to query the real-time data.

[0015] Optionally, the data storage module also includes a second data storage device, which is communicatively connected to the data source through the stream processing platform. The second data storage device is used to obtain real-time data from the data source through the stream processing platform, and perform persistent storage on the obtained real-time data as backup data of the data in the first data storage device.

[0016] Optionally, the data source includes at least one of a relational database of a business system, a terminal tracking log, and an online service log; the stream processing platform includes a Kafka stream processing platform; and the first data storage device includes Clickhouse;

[0017] The Clickhouse is connected to the relational database of the business system, the terminal tracking log and at least one of the online service logs through the Kafka stream processing platform to obtain real-time data of at least one of the relational database, the terminal tracking log and the online service log.

[0018] Optionally, the Clickhouse includes a source layer ODS, a detail data table DWD and a data warehouse service DWS;

[0019] The source layer ODS is used to obtain real-time data from the Kafka stream processing platform through the Clickhouse connector, and after performing extraction, cleaning, conversion and / or loading operations on the real-time data, permanently write it into the detailed data table DWD;

[0020] If the detail data table DWD receives a data aggregation and / or data deduplication request for permanently written data, the permanently written data is written to the aggregation table of the data warehouse service DWS according to the data aggregation and / or data deduplication request, so as to perform aggregation and / or deduplication processing on the permanently written data.

[0021] Optionally, the source layer ODS, detailed data table DWD and tables in the data warehouse service DWS adopt the same naming rules, and the naming rules include: at least one of the source layer of data, materialized view name of data, subject domain name and destination layer of data.

[0022] Optionally, the source layer ODS, the detail data table DWD and the data warehouse service DWS are respectively provided with an online service and a replica service, wherein the online service is used to receive a user's data write request and perform real-time writing of the to-be-written data according to the data write request, and the replica service is used to receive a user's data read request and read the data in real time according to the data read request;

[0023] The online service and the replica service are also used to synchronize the storage data of both parties in real time.

[0024] Optionally, the Clickhouse is a service cluster, and the processing cluster includes multiple processing terminals, and the multiple processing terminals are used to perform block parallel processing on the real-time data obtained from the data source.

[0025] Optionally, the stream data processing engine includes Flink, and the Flink is used to obtain historical offline data from the detailed data table DWD, and store the processed historical offline data to the Clickhouse through the Kafka stream processing platform;

[0026] The Flink is also used to obtain real-time data from the Kafka stream processing platform, and store the processed real-time data in the second data storage query module, wherein the second data storage query module includes an Hbase database.

[0027] Optionally, the first data query module includes superset, and the data analysis module includes a Druid data processing system and a Pivot visualization tool.

[0028] A second aspect of an embodiment of the present application provides a data processing system, including the data warehouse described in the first aspect of an embodiment of the present application.

[0029] A third aspect of an embodiment of the present application provides a computer device, including a processor and a memory, wherein the memory stores the data warehouse described in the first aspect of the embodiment of the present application.

[0030] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

[0031] Because the data warehouse in the embodiment of the present application can be connected to the stream processing platform through the first data storage device to obtain real-time data (dynamic data) from the data source, and perform persistent storage on the real-time data, thereby converting the real-time data (dynamic data) into historical offline data (static data), so that the stream data processing engine can obtain real-time data from the stream processing platform and obtain historical offline data from the first data storage device, which improves the convenience of performing real-time calculations on real-time data and batch calculations on historical offline data.

[0032] Furthermore, the stream data processing engine can also directly obtain historical offline data from the first data storage device through a standard interface. Compared with the prior art, this avoids the process of handwriting codes and further improves the convenience of obtaining historical online data. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of an embodiment of a Kappa architecture in the prior art;

[0034] Figure 2 This is a schematic diagram of an embodiment of a data warehouse in an embodiment of the present application;

[0035] Figure 3 This is another schematic diagram of an embodiment of the data warehouse in the embodiment of the present application;

[0036] Figure 4 This is another schematic diagram of an embodiment of the data warehouse in the embodiment of the present application;

[0037] Figure 5 This is a schematic diagram of an embodiment of a data processing system in an embodiment of the present application;

[0038] Figure 6 It is a schematic diagram of an embodiment of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The embodiments of the present invention provide a data warehouse, a data processing system and a computer device for improving the convenience of performing real-time calculations on streaming data (dynamic data) and performing batch calculations on historical offline data.

[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0041] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] For ease of understanding, the professional terms in the embodiments of the present application are described below and will be used in the subsequent descriptions without further elaboration.

[0043] ODS: Operation Data Store data preparation area, also known as the source layer. The data table of the source system of the data warehouse is usually stored intact, which is called the ODS layer and is the source of the subsequent data warehouse processing data.

[0044] DWD: Data Warehouse Details is the isolation layer between the business layer and the data warehouse. It mainly performs some data cleaning and normalization operations on the ODS data layer.

[0045] DWS: Data Warehouse Service data service layer, based on the detailed data on DWD, integrates and summarizes it into a service data layer for analyzing a certain subject domain.

[0046] Flink: Flink is a unified computing framework that combines batch processing and stream processing. Its core is a stream data processing engine that provides data distribution and parallel computing.

[0047] Hadoop: Hadoop is an Apache open source framework written in Java that allows distributed processing of large data sets across clusters of computers using simple programming models.

[0048] Kafka: Kafka is an open source stream processing platform developed by the Apache Software Foundation and written in Scala and Java. The goal of the project is to provide a unified, high-throughput, low-latency platform for processing real-time data.

[0049] SQL: SQL (Structured Query Language: Structured Query Language).

[0050] Clickhouse: Clickhouse is a column-based storage database (DBMS: Database Management System) for online analytical processing (OLAP) MPP architecture that was open sourced by Russia's Yandex in 2016. It can generate analytical data reports in real time using SQL queries.

[0051] Superset: Superset is a modern, enterprise-level business intelligence WEB application. We can simply understand it as an open source data visualization tool.

[0052] Druid / Pivot: Druid is a distributed data processing system that supports real-time multi-dimensional OLAP analysis, and Pivot is an OLAP visualization tool provided for Druid.

[0053] MySQL:MySQL is a relational database management system.

[0054] Canal: Canal is an open source project under Alibaba, developed in pure Java. It provides incremental data subscription and consumption based on database incremental log analysis.

[0055] JDBC: JDBC is the abbreviation of Java DataBase Connectivity, which is the standard interface for Java programs to access databases.

[0056] HBASE: HBase is a distributed, column-oriented (but not column-stored) storage system built on HDFS.

[0057] Data warehouse, as a subject-oriented, integrated, relatively stable (Non-Volatile), and time-variant data collection, is used to support the management decision-making of enterprises.

[0058] With respect to the Kappa architecture in the prior art, because when obtaining historical offline data, it is necessary to obtain historical offline data from Kafka, which on the one hand increases the storage cost of Kafka, and on the other hand, because handwritten code is required to obtain historical offline data from Kafka, which leads to a high complexity in the process of obtaining historical offline data. This application proposes a data warehouse for improving the convenience of performing real-time calculations on streaming data (dynamic data, also called real-time data) and batch calculations on historical offline data (static data).

[0059] For ease of understanding, the data warehouse in the embodiment of the present application is described below. Figure 2 , the data warehouse in the embodiment of the present application includes a data source 201, a data storage module 202 and a data service module 203, wherein the data storage module 202 includes at least one of a first data storage device 2021 and a stream data processing engine 2022; the data service module 203 includes at least one of a first data query module 2031, a data analysis module 2032 and a second data query module 2033;

[0060] Specifically, when the data storage module 202 includes a first data storage device 2021, the first data storage device 2021 is communicated with the data source 201 through the stream processing platform 204 to obtain real-time data (dynamic data) from the data source 201 and perform persistent storage of the real-time data (dynamic data).

[0061] It should be noted that the persistent storage here is the process of converting real-time data (dynamic data) into historical offline data (static data). Therefore, the first data storage device 2021 here can perform persistent storage of real-time data (dynamic data). It can be a database such as Hbase, mysql, hive or clickhouse, and there is no specific limitation here.

[0062] Furthermore, the stream processing platform 204 here generally refers to a unified, high-throughput, low-latency platform provided for processing real-time data, which can be any one of Kafka, Flume, Logstash, Storm, and Spark Streaming, and no specific limitation is made here.

[0063] Specifically, when the data service module 203 includes a first data query module 2031, the first data query module 2031 is communicatively connected to the first data storage device 2021, and the first data query module 2031 is used to query the first data storage device 2021 according to the first query request when receiving the user's first query request, and display the queried historical offline data, wherein the first query request is used to query the historical offline data; when the data service module 203 includes a data analysis module 2032, the data analysis module 2032 is communicatively connected to the first data storage device 2021, and the data analysis module 2032 is used to obtain the historical offline data from the first data storage device 2021 according to the historical offline data analysis request when receiving the user's historical offline data analysis request, and analyze and display the obtained historical offline data.

[0064] When the data storage module 202 includes a stream data processing engine 2022 and the data service module 203 includes a second data query module 2033, the stream data processing engine 2022 is used to obtain real-time data (dynamic data) from the stream processing platform 204 and historical offline data (static data) from the first data storage device 2021 to perform data processing on the real-time data and the historical offline data, and write the processed historical offline data into the first data storage device 2021 through the stream processing platform 204, and write the processed real-time data into the second data query module 2033.

[0065] The second data query module 2033 is used to display the queried real-time data according to the second query request when receiving the second query request of the user, wherein the second query request is used to query the real-time data.

[0066] Specifically, the stream data processing engine here is a unified computing framework that combines batch processing (static data processing) and stream processing (dynamic data processing, also known as real-time data processing). It can be Flink or Spark, etc., and there is no specific restriction here.

[0067] The second data query module 2033 is a storage module that can provide query functions to the outside, such as hive or Hbase, etc., and there is no specific limitation here.

[0068] In an embodiment of the present application, a data warehouse includes a data source, a data storage module and a data service module, wherein the data storage module includes at least one of a first data storage device and a stream data processing engine; the data service module includes at least one of a first data query module, a data analysis module and a second data query module; when the data storage module includes the first data storage device, the first data storage device is communicatively connected to the data source through a stream processing platform to obtain real-time data from the data source and to perform persistent storage of the real-time data; when the data service module includes the first data query module, the first data query module is communicatively connected to the first data storage device, and the first data query module is used to query the first data storage device according to the first query request when receiving a first query request from a user, and to display the queried historical offline data, wherein the first query request is used to query the historical offline data; when the data service module includes the data When the data service module comprises a data analysis module, the data analysis module is communicatively connected with the first data storage device, and the data analysis module is used to obtain historical offline data from the first data storage device according to the historical offline data analysis request when receiving a historical offline data analysis request from the user, and analyze and display the obtained historical offline data; when the data storage device includes the stream data processing engine and the data service module includes the second data query module, the stream data processing engine is used to obtain real-time data from the stream processing platform and obtain historical offline data from the first data storage device to perform data processing on the real-time data and the historical offline data, and write the processed historical offline data to the first data storage device through the stream processing platform, and write the processed real-time data to the second data query module; the second data query module is used to receive the user's second query request, and display the queried real-time data according to the second query request, wherein the second query request is used to query the real-time data.

[0069] Because the data warehouse in the embodiment of the present application can be connected to the stream processing platform through the first data storage device, obtain real-time data (dynamic data) from the data source, and perform persistent storage on the real-time data, thereby converting the real-time data (dynamic data) into historical offline data (static data), so that the stream data processing engine can obtain real-time data from the stream processing platform and obtain historical offline data from the first data storage device, which reduces the data storage cost of the stream processing platform, thereby improving the convenience of performing real-time calculations on real-time data and batch calculations on historical offline data.

[0070] Furthermore, when the first data storage device is a database such as Hbase, MySQL, Hive or Clickhouse, the stream data processing engine can also directly obtain historical offline data from the first data storage device through a standard interface (such as JDBC interface, API interface), avoiding the process of handwriting code, thereby further improving the convenience of obtaining historical offline data.

[0071] based on Figure 2 In the embodiment described above, the data storage module in the data warehouse of the present application embodiment may also include a second data storage device 2023, see Figure 3 :

[0072] The second data storage device 2023 is connected to the data source 201 through the stream processing platform 204, and the second data storage device is used to obtain real-time data from the data source 201 through the stream processing platform 204, and perform persistent storage on the obtained real-time data as backup data of the data in the first data storage device 2021. Generally, the backup data is not provided to the outside world, but is only used as training data for some training tasks, and the backup data is obtained from the second data storage device 2023 only when the data in the first data storage device 2021 is irreversibly damaged, so as to ensure the security of the backup data.

[0073] based on Figure 3 In the embodiment described below, the processing platform is a Kafka stream processing platform, the stream data processing engine is Flink, the first data storage device is Clickhouse, and the data source includes at least one of a relational database of a business system, a terminal point log, and an online service log. The process of the first data storage device communicating with the data source through the stream processing platform to obtain real-time data from the data source is described. Please refer to Figure 4 , Figure 4 Another embodiment of a data warehouse:

[0074] Specifically, the Kafka stream processing platform communicates with at least one of the relational database, terminal tracking points and online services of the business system, so that the real-time data in the relational database of the business system is generally written to the Kafka message queue in real time through Canal, while the terminal tracking point log is uploaded to the server through the SDK and written to the Kafka message queue in real time, and the online service log is generally delivered directly from the container to the Kafka message queue. In this way, the data source is uniformly stored in the Kafka message queue.

[0075] Among them, canal means waterway / pipeline / ditch, and its main purpose is to provide incremental data subscription and consumption based on incremental log analysis of MySQL database; and terminal embedding is to implant some SDK (a tool code, mainly used for collecting various events) in the program of the business system to collect various events.

[0076] Furthermore, Clickhouse obtains real-time data from the Kafka message queue through the Kafka data engine. Since the Kafka data engine supports data in various formats (such as txt, word, pdf, etc.), the data warehouse in the embodiment of the present application can support data formats of multiple business systems in multiple fields (such as the Internet field, hardware field, sales field, financial processing field and human resource management field).

[0077] The following is a detailed description of Clickhouse in the embodiment of this application:

[0078] Specifically, the Clickhouse in the embodiment of the present application includes the source layer ODS, the detail data table DWD and the data warehouse service DWS;

[0079] Among them, ODS is used to obtain real-time data from the Kafka stream processing platform through the Clickhouse connector, and then perform basic ETL (Extract, Transform and Load) on the real-time data through the materialized view (Materialized View) provided by Clickhouse, and then permanently write it into the DWD;

[0080] If data aggregation and / or data deduplication needs to be performed on the permanently written data (that is, historical offline data), the detail data table DWD writes the permanently written data into the aggregation table of the data warehouse service DWS, so as to perform aggregation and / or deduplication on the permanently written data with the help of Clickhouse's merge tree (MergeTree).

[0081] Furthermore, the source layer ODS, detailed data table DWD and data warehouse service DWS in the embodiment of the present application respectively include Online service and Replica service, wherein the data in Online service and Replica service are synchronized in real time, that is, the data in Online service and Replica service are replica data of each other. Among them, the Online service is used to write data in real time in the source layer ODS, detailed data table DWD and data warehouse service DWS through materialized view according to the data write request when receiving the user's data write request, and the Replica service is used to provide query service to the outside, that is, when receiving the user's data read request, it realizes real-time reading of data according to the data read request.

[0082] In order to achieve data traceability, the naming rules of the source layer ODS, detailed data table DWD and tables in the data warehouse service DWS in the embodiment of the present application are the same, where the naming rules at least include: the source layer of the data, the materialized view name of the data, the subject domain name (such as sales domain, administrative domain or after-sales domain) and the destination layer of the data.

[0083] That is, the embodiment of the present application makes the blood relationship between data clear and explicit through data layering (source layer ODS, detailed data table DWD and data warehouse service DWS), subject domain division and naming specifications to ensure data traceability.

[0084] Clickhouse is a service cluster that includes multiple processing terminals to perform separate parallel processing on real-time data obtained from data sources.

[0085] For easier understanding, the following example is given:

[0086] Assume that Clickhouse is used as a service cluster with three terminals (the first terminal, the second terminal and the third terminal). When Clickhouse receives real-time data, it can divide the received real-time data into three blocks (such as the first data block, the second data block and the third data block), and process the first data block through the first terminal, the second data block through the second terminal, and the third data block through the third terminal. In this way, Clickhouse can realize block-by-block parallel processing of the acquired real-time data to improve the data processing efficiency and ensure the high availability of data services.

[0087] Furthermore, because the Clickhouse in the embodiment of the present application is configured with an Online service and a Replica service, wherein the Online service is used to provide a real-time data write service, and the Replica service is used to provide a real-time data read service, and the data in the Online service and the Replica service are synchronized in real time, that is, the data warehouse in the embodiment of the present application realizes the separation of data reading and writing through Clickhouse on the one hand, and further ensures the high availability of the data service by configuring multiple copies of the data on the other hand.

[0088] Furthermore, the embodiment of the present application also implements block processing of acquired real-time data through multiple terminals in Clickhouse, which further ensures the high availability of data services.

[0089] The following describes the processing process of real-time data and historical offline data by the stream data processing engine Flink:

[0090] Specifically, assuming that both historical offline data and real-time data need to be obtained in a scenario (such as in the process of performing multi-stream attribution operations on data), the stream data processing engine Flink in the embodiment of the present application obtains historical offline data from the DWD of Clickhouse through the standard interface JDBC, and obtains real-time data from the Kafka stream processing platform, and Flink is also used to store the processed data in Clickhouse through Kafka, or to store the processed data in the second data query module 2033, so as to ensure high-frequency query services for users for data.

[0091] As an optional embodiment, the second data query module 2033 in the embodiment of the present application is an Hbase database, the first data query module 2031 is Superset, and the data analysis module 2032 is Druid and Pivot.

[0092] Specifically, Hbase database, as a column-oriented data storage system, is suitable for storing massive data at the PB (1000TB) level. When storing PB-level data and using cheap PC storage, it can return data within tens to hundreds of milliseconds, thus ensuring data response speed. Hbase also has good scalability, which also provides a foundation for the storage of massive data.

[0093] As a web application, Superset can realize visual query and display of data. As a distributed data processing system that supports real-time multidimensional OLAP (online analytical processing) analysis, Druid can realize data analysis and processing. Pivot is an OLAP (online analytical processing) visualization display tool provided for Druid to show the results of data processing and analysis to users.

[0094] Experiments have shown that the data warehouse in the embodiment of the present application can generally provide a query response speed of seconds when providing data services to the outside world, and because of the multiple copies of the data warehouse, the availability of data can be guaranteed to be at least 99.9%.

[0095] In addition, the data warehouse in the embodiment of the present application can further ensure the accuracy of the data in the data warehouse through the cooperation between Kafka and Clickhouse. Specifically, because Kafka can ensure that the data is consumed at least once, and Clickhouse reports the consumption record only after confirming that the acquired data has been consumed, the integrity of the data obtained by Clickhouse from Kafka is ensured, and the DWD layer in Clickhouse can perform deduplication processing on the data, so the accuracy of the data in this data warehouse is further guaranteed.

[0096] Furthermore, the Clickhouse in the data warehouse in the embodiment of the present application can use SQL statements to write materialized views, and the SQL statement writing and maintenance process is more convenient than the maintenance process in the prior art of handwriting code and publishing the code to the platform for operation.

[0097] The above describes the data warehouse in the embodiment of the present application in detail. Next, the data processing system in the present application is described. Figure 5 :

[0098] Specifically, the data processing system in the embodiment of the present application is applied to data processing in different fields (such as sales, human resource management or financial management) to realize rapid processing and display of data. Figures 2 to 4 The data warehouse described in the Figures 2 to 4 The description is similar to that in , and will not be repeated here.

[0099] Furthermore, the present application also provides a schematic diagram of the structure of a computer device, see Figure 6The computer device includes one or more central processing units (CPU) 601 and a memory 602. The memory 602 stores one or more data warehouses, wherein the description of the data warehouse is the same as that of the present application. Figures 2 to 4 The description in the embodiment is similar and will not be repeated here.

[0100] The memory 602 may be a volatile storage or a persistent storage. The program stored in the memory 602 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processor 601 may be configured to communicate with the memory 602 and execute a series of instruction operations in the memory 602 on the computer device.

[0101] The computer device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and / or one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0102] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0106] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data warehouse, characterized in that: include: A data source, a data storage module and a data service module, wherein the data storage module includes at least one of a first data storage device and a stream data processing engine; the data service module includes at least one of a first data query module, a data analysis module and a second data query module; When the data storage module includes the first data storage device, the first data storage device is connected to the data source through a stream processing platform to obtain real-time data from the data source and perform persistent storage on the real-time data, the first data storage device includes Clickhouse, and the stream processing platform includes a Kafka stream processing platform; When the data service module includes the first data query module, the first data query module is in communication connection with the first data storage device, and the first data query module is used to query the first data storage device according to the first query request upon receiving a first query request from a user, and display the queried historical offline data, wherein the first query request is used to query the historical offline data; When the data service module includes the data analysis module, the data analysis module is in communication connection with the first data storage device, and the data analysis module is used to obtain the historical offline data from the first data storage device according to the historical offline data analysis request upon receiving the historical offline data analysis request from the user, and analyze and display the obtained historical offline data; When the data storage module includes the stream data processing engine, and the data service module includes the second data query module, the stream data processing engine is used to obtain real-time data from the stream processing platform and obtain historical offline data from the first data storage device, so as to perform data processing on the real-time data and the historical offline data, and write the processed historical offline data into the first data storage device through the stream processing platform, and write the processed real-time data into the second data query module; The second data query module is used to receive a second query request from a user, and display the queried real-time data according to the second query request, wherein the second query request is used to query the real-time data; The Clickhouse includes the source layer ODS, the detail data table DWD and the data warehouse service DWS; The source layer ODS is used to obtain real-time data from the Kafka stream processing platform through the Clickhouse connector, and after performing extraction, cleaning, conversion and / or loading operations on the real-time data, permanently write it into the detailed data table DWD; If the detail data table DWD receives a data aggregation and / or data deduplication request for permanently written data, the permanently written data is written to the aggregation table of the data warehouse service DWS according to the data aggregation and / or data deduplication request, so as to perform aggregation and / or deduplication processing on the permanently written data.

2. The data warehouse according to claim 1, characterized in that: The data storage module also includes a second data storage device, which is communicatively connected to the data source through the stream processing platform. The second data storage device is used to obtain real-time data from the data source through the stream processing platform, and perform persistent storage on the obtained real-time data to serve as backup data of the data in the first data storage device.

3. The data warehouse according to claim 1, characterized in that: The data source includes at least one of a relational database of a business system, a terminal embedding log, and an online service log; The Clickhouse is connected to the relational database of the business system, the terminal tracking log and at least one of the online service logs through the Kafka stream processing platform to obtain real-time data of at least one of the relational database, the terminal tracking log and the online service log.

4. The data warehouse according to claim 1, characterized in that: The tables in the source layer ODS, detail data table DWD and data warehouse service DWS adopt the same naming rules, which include at least one of the source layer of data, materialized view name of data, subject domain name and destination layer of data.

5. The data warehouse according to claim 1, characterized in that: The source layer ODS, the detailed data table DWD and the data warehouse service DWS are respectively provided with an online service and a replica service, wherein the online service is used to receive a user's data write request and perform real-time writing of the data to be written according to the data write request, and the replica service is used to receive a user's data read request and read the data in real time according to the data read request; The online service and the replica service are also used to perform real-time synchronization of the storage data of both parties.

6. The data warehouse according to claim 1, characterized in that: The Clickhouse is a service cluster, which includes multiple processing terminals. The multiple processing terminals are used to perform block parallel processing on the real-time data obtained from the data source.

7. The data warehouse according to claim 1, characterized in that: The stream data processing engine includes Flink, and the Flink is used to obtain historical offline data from the detailed data table DWD, and store the processed historical offline data to the Clickhouse through the Kafka stream processing platform; The Flink is also used to obtain real-time data from the Kafka stream processing platform, and store the processed real-time data in the second data storage query module, wherein the second data storage query module includes an Hbase database.

8. The data warehouse according to claim 1, characterized in that: The first data query module includes superset, and the data analysis module includes a Druid data processing system and a Pivot visualization tool.

9. A data processing system, characterized in that: Comprising a data warehouse as claimed in any one of claims 1 to 8.

10. A computer device comprising a processor and a memory, characterized in that: The memory stores the data warehouse according to any one of claims 1 to 8.