A hybrid data processing system for distributed large-scale parallel processing database

Through a hybrid data processing system that distributes large-scale parallel processing databases, combines ClickHouse and OLTP databases, and uses time stamps and JDBC-ODBC bridges, it solves the problem of the existing system's difficulty in processing OLTP and OLAP tasks at the same time, and achieves efficient hybrid data processing and real-time analysis.

CN118427279BActive Publication Date: 2024-09-24广州睿帆科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410874428.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-24
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

It is difficult for existing hybrid data processing systems to efficiently process both highly concurrent and transaction-intensive OLTP tasks and massive historical data OLAP tasks at the same time, resulting in a single processing engine or system being unable to efficiently process both tasks.

Method used

Design a hybrid data processing system for distributed large-scale parallel processing of databases, combining ClickHouse database and OLTP database, distributing data requests through time stamp mechanism, and using timing synchronization and loosely coupled subsystems and high-level communication protocols (JDBC-ODBC Bridge) to access the TP subsystem to merge historical and latest data during OLAP requests.

Benefits of technology

It realizes the integration of other OLTP data systems under the high-performance ClickHouse database framework, supports high-concurrency, strong transaction OLTP processing, and analyzes massive historical data in real time during OLAP requests, improving the efficiency and performance of mixed data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427279B
    Figure CN118427279B
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and specifically discloses a hybrid data processing system of a distributed large-scale parallel processing database, comprising: a processing requirement clarification module, used to determine the hybrid data processing requirement; a data writing execution module, used to send the user business data to an OLTP database based on the time stamp of the user business data when the data processing requirement is to write user business data; a database reading clarification module, used to determine the target database to which the read data request should be sent based on the corresponding time stamp in the read data request and the first time stamp in the ClickHouse database when the data processing requirement is a read data request; a first read feedback execution module and a second read feedback execution module, used to return the corresponding data to the client based on the target database to which the read data request should be sent; so as to realize high-performance hybrid data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a hybrid data processing system for distributed large-scale parallel processing databases. Background Art

[0002] At present, hybrid data processing (HTAP) systems involve two processing tasks at the same time: OLTP (On-Line Transaction Processing) and OLAP (On-Line Analytical Processing). Among them, OLTP is characterized by high concurrent reading and writing, small amount of data processed in a single request, high frequency of data changes, and high transaction capability requirements. The corresponding data processing system is the OLTP database system, such as MySQL, Oracle, CrockroachDB and other database systems, which generally use row storage and uncompressed data. OLAP tasks process large amounts of data, low data changes, and weak corresponding transaction capability requirements. In order to consider performance, wide table design and column storage are often used, and data is often compressed and stored. Moreover, due to the use of column storage, the OLAP database system is inefficient when processing data with frequent update operations. The difference in the processing tasks between the two determines that a single processing engine or system cannot efficiently process the above two processing tasks.

[0003] However, in real-world application scenarios, there is a need to analyze massive amounts of historical data and a small amount of latest data in real time while meeting OLTP tasks. Therefore, a hybrid processing (HTAP) system is needed that supports both high-concurrency, strong-transaction OLTP processing and can integrate massive amounts of historical data and latest data to efficiently perform OLAP tasks in real time.

[0004] Therefore, the present invention proposes a hybrid data processing system for distributed large-scale parallel processing database. Summary of the invention

[0005] The present invention provides a hybrid data processing system of a distributed large-scale parallel processing database, which is used to integrate other OLTP data systems under the framework of a high-performance ClickHouse database to achieve high-performance hybrid data processing.

[0006] The present invention provides a hybrid data processing system for distributed large-scale parallel processing of databases, comprising:

[0007] A processing requirement clarification module for determining mixed data processing requirements of a distributed massively parallel processing database;

[0008] A data writing execution module is used to send the user business data to the OLTP database based on the time stamp of the user business data to obtain the data processing result when the data processing requirement is to write the user business data;

[0009] The read database clarification module is used to determine the target database to which the read data request should be sent based on the corresponding time stamp in the read data request and the first time stamp in the ClickHouse database when the data processing requirement is a read data request, wherein the target database includes an OLTP database and a ClickHouse database, and the first time stamp is used to limit the data range that the user can access in the ClickHouse database;

[0010] The first read feedback execution module is used to merge the historical data stored in the ClickHouse database and the latest data stored in the OLTP database and return them to the client to obtain the data processing result if the target database to which the read data request should be sent is the ClickHouse database;

[0011] The second read feedback execution module is used to return the latest data stored in the OLTP database to the client to obtain the data processing result if the target database to which the read data request should be sent is the OLTP database.

[0012] Preferably, the data is written into the execution module, including:

[0013] A first write execution submodule is used for sending the user service data to the OLTP database based on the time stamp included in the user service data when the user service data includes a time stamp;

[0014] The second write execution submodule is used to generate a time stamp for the user business data when the user business data does not contain a time stamp, and send the user business data to the OLTP database based on the generated time stamp to obtain a data processing result.

[0015] Preferably, the database clear module is read, including:

[0016] The first database determination submodule is used to determine that the target database to which the read data request should be sent is an OLTP database when the corresponding time stamp in the read data request is later than the first time stamp in the ClickHouse database;

[0017] The second database determination submodule is used to determine that the target database to which the read data request should be sent is the ClickHouse database when the corresponding time stamp in the read data request is not later than the first time stamp in the ClickHouse database.

[0018] Preferably, the first reading feedback execution module includes:

[0019] A historical data reading submodule is used to read historical data in the ClickHouse database based on the first time mark in the ClickHouse database if the target database to which the data reading request should be sent is the ClickHouse database;

[0020] The latest data reading submodule is used to read the latest data in the OLTP database based on the second time mark and the third time mark in the OLTP database if the target database to which the data reading request should be sent is the ClickHouse database, wherein the second time mark is used to limit the data range of the ClickHouse database to synchronize and read data from the OLTP database, and the third time mark is used to limit the data range that the user can access in the OLTP database;

[0021] The data stream merging submodule is used to merge the historical data in the ClickHouse database and the latest data in the OLTP database and return them to the client to obtain the data processing results.

[0022] Preferably, it also includes:

[0023] The DDL operation processing module is used to send the DDL operation request to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a DDL operation request, and then forward the DDL operation request in the ClickHouse database to the OLTP database based on the JDBC-ODBC bridge to obtain the data processing result.

[0024] Preferably, the DDL operation processing module includes:

[0025] The statement forwarding submodule is used to send the create table statement to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a create table request in the DDL operation request;

[0026] The syntax conversion and forwarding submodule is used to convert the table creation statements in the ClickHouse database into syntax and forward them to the OLTP database based on the JDBC-ODBC bridge;

[0027] The table creation execution submodule is used to create the corresponding data table based on the table creation statement after syntax conversion received by the OLTP database. At the same time, it updates the status table in the OLTP database based on the ClickHouse database to obtain the data processing results.

[0028] Preferably, it also includes:

[0029] The current data synchronization interval determination module is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database;

[0030] ClickHouse data synchronization module, which is used to stop merging local data blocks when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database, and move all data blocks in the OLTP database that are later than the second time mark and earlier than the third time mark to the ClickHouse database;

[0031] The record information update module is used to update the record information in the OLTP database and the ClickHouse database when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database.

[0032] Preferably, the current data synchronization interval determination module includes:

[0033] The historical data acquisition submodule is used to acquire multiple groups of user service historical data of the same type as the user service data to be processed currently, and to acquire the full life cycle update timestamp of each group of user service historical data;

[0034] The timing alignment submodule is used to perform timing alignment on each group of user service history data and the current user service data to be processed to obtain an aligned data group;

[0035] A calculation submodule, for calculating the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the full life cycle update timestamp of each group of user business history data and the corresponding alignment data group;

[0036] The current data synchronization interval determination submodule is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database based on the partial life cycle update timestamp corresponding to the part of the user business history data after the current moment in the corresponding data group based on the maximum data update cycle evolution similarity.

[0037] Preferably, the computing submodule includes:

[0038] A distinguishing position determining unit, configured to determine, based on the aligned data group of each group of user service history data, a position aligned with the current end position of the current data to be processed in the corresponding full life cycle update timestamp as the distinguishing position;

[0039] A reference timestamp partitioning unit, used to use a portion of the life cycle update timestamp located before the distinguishing position in the corresponding full life cycle update timestamp as a reference life cycle update timestamp;

[0040] The calculation unit is used to calculate the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the reference life cycle update timestamp of each group of user business history data and the current traversed life cycle update timestamp of the current data to be processed.

[0041] Preferably, the record information updating module includes:

[0042] The first record information updating submodule is used to update the first time mark in the ClickHouse database when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database;

[0043] The second record information updating submodule is used to update the second time marker and the third time marker in the OLTP database when the time interval between the first time marker in the ClickHouse database and the third time marker in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database.

[0044] The beneficial effects of the present invention compared to the prior art are: loosely coupled subsystems (i.e., OLTP database and ClickHouse database) and high-level communication protocols (i.e., JDBC-ODBC bridge), so that the OLTP database can be a stand-alone MySQL, Oracle, and can also easily replace other distributed OLTP systems, such as YugabyteDB. Although the ClickHouse database and OLTP use timed synchronization, when processing OLAP requests, the ClickHouse database will access the TP subsystem and merge historical and latest data to achieve real-time data analysis effects, and then integrate other OLTP data systems under the framework of the high-performance ClickHouse database to achieve high-performance hybrid data processing.

[0045] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.

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

[0047] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0048] Figure 1 Schematic diagram of a hybrid data processing system of a distributed large-scale parallel processing database in an embodiment of the present invention;

[0049] Figure 2 is a schematic diagram of the architecture of a moderated data processing system in an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram of time marks before data synchronization between the OLTP database and the ClickHouse database in an embodiment of the present invention;

[0051] Figure 4 This is a schematic diagram of the time mark after data synchronization between the OLTP database and the ClickHouse database in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0053] Embodiment 1:

[0054] The present invention provides a hybrid data processing system for distributed large-scale parallel processing of databases, referring to Figures 1 to 4 ,include:

[0055] A processing requirement clarification module for determining mixed data processing requirements of a distributed massively parallel processing database;

[0056] A data writing execution module is used to send the user business data to the OLTP database based on the time stamp of the user business data to obtain the data processing result when the data processing requirement is to write the user business data;

[0057] The read database clarification module is used to determine the target database to which the read data request should be sent based on the corresponding time stamp in the read data request and the first time stamp in the ClickHouse database when the data processing requirement is a read data request, wherein the target database includes an OLTP database and a ClickHouse database, and the first time stamp is used to limit the data range that the user can access in the ClickHouse database;

[0058] The first read feedback execution module is used to merge the historical data stored in the ClickHouse database and the latest data stored in the OLTP database and return them to the client to obtain the data processing result if the target database to which the read data request should be sent is the ClickHouse database;

[0059] The second read feedback execution module is used to return the latest data stored in the OLTP database to the client to obtain the data processing result if the target database to which the read data request should be sent is the OLTP database.

[0060] In this embodiment, data processing requirements include reading data in the OLTP database and / or ClickHouse database, writing user business data (i.e., writing user business data to the OLTP database), DDL operation requests (such as creating libraries, tables, etc.), etc.

[0061] In this embodiment, the corresponding time stamp in the data read request is the time stamp indicated by the "row_life_time" field, which is used to limit the time stamp of the data range to be read.

[0062] In this embodiment, reference Figure 3 and 4 The first time mark in the ClickHouse database is the time mark represented by the "allowed_max_block_number" field in the ClickHouse database, and its initial value is 0.

[0063] In this embodiment, the OLTP database is a database specially designed to support OLTP workload.

[0064] In this embodiment, the ClickHouse database is a scalable column storage database designed for large-scale data warehouses and complex queries.

[0065] In this embodiment, the client is a computer terminal used to initiate a data processing request.

[0066] In this embodiment, the data processing result includes the data processing result obtained after reading the OLTP database, writing user business data to the OLTP database, or performing a DDL operation on the OLTP database.

[0067] In this embodiment, the ClickHouse database synchronizes data from the OLTP database at a regular interval according to the current data synchronization interval. The length of the current data synchronization interval depends on the changing characteristics of the user's business data: if the user's business data is frequently updated, the data synchronization interval is correspondingly shorter. The data synchronization between the ClickHouse database and the OLTP database adopts scheduled synchronization instead of real-time synchronization in order to reduce the impact of frequent update operations on the OLTP side on the performance of the ClickHouse database.

[0068] In many existing hybrid data processing systems, the operation log replay method of the OLTP database system is used to synchronize the latest data in the OLTP database to the OLAP subsystem in real time. However, this real-time synchronization method will significantly reduce the performance of the OLAP subsystem (i.e. ClickHouse database) due to the impact of high-frequency updates. The data synchronization between the ClickHouse database and the OLTP database adopts scheduled synchronization, which will reduce the significant impact on the performance of the OLAP subsystem (i.e. ClickHouse database) compared to the traditional real-time synchronization method.

[0069] The beneficial effects of the above technologies are: loosely coupled subsystems (i.e., OLTP database and ClickHouse database) and high-level communication protocols (i.e., JDBC-ODBC bridge), so that the OLTP database can be a stand-alone MySQL, Oracle, and can also easily replace other distributed OLTP systems, such as YugabyteDB. Although the ClickHouse database and OLTP use timed synchronization, when processing OLAP requests, the ClickHouse database will access the OLTP subsystem and merge historical and latest data to achieve real-time data analysis effects, and then integrate other OLTP data systems under the framework of the high-performance ClickHouse database to achieve high-performance hybrid data processing.

[0070] Embodiment 2:

[0071] Based on Example 1, data is written into the execution module, including:

[0072] A first write execution submodule is used for sending the user service data to the OLTP database based on the time stamp included in the user service data when the user service data includes a time stamp;

[0073] The second write execution submodule is used to generate a time stamp for the user business data based on the client-driven Sharding ClickHouse JDBC when the user business data does not contain a time stamp, and send the user business data to the OLTP database based on the generated time stamp to obtain the data processing result.

[0074] In this embodiment, the user service data is sent to the OLTP database based on the time stamp included in (or generated by) the user service data, as follows:

[0075] Based on the time stamp contained in (or generated by) the user business data, the user business data is added to the parallel processing task at the corresponding time in the OLTP database.

[0076] In this embodiment, Sharding ClickHouse JDBC (Java Database Connectivity) is an interface specification for integrating the distributed database Sharding-based ClickHouse with Java applications. Java developers can use this interface to directly execute SQL queries, update data, and other operations in ClickHouse without worrying about the underlying sharding transactions and sharding processing. Sharding ClickHouse JDBC provides a simpler and more efficient way to access the database for Java applications.

[0077] The beneficial effect of the above technology is: using the time stamp of the user business data itself or the time stamp of the user business data generated based on the client-driven Sharding ClickHouse JDBC to complete the writing process of the user business data in the OLTP database.

[0078] Embodiment 3:

[0079] Based on Example 1, the database clearing module is read, including:

[0080] The first database determination submodule is used to determine that the target database to which the read data request should be sent is an OLTP database when the corresponding time stamp in the read data request is later than the first time stamp in the ClickHouse database;

[0081] The second database determination submodule is used to determine that the target database to which the read data request should be sent is the ClickHouse database when the corresponding time stamp in the read data request is not later than the first time stamp in the ClickHouse database.

[0082] The beneficial effects of the above technology are: by comparing the corresponding time stamp in the data read request with the first time stamp in the ClickHouse database used to limit the data range that the user can access in the ClickHouse database, the target database to which the data read request should be sent is determined, so as to achieve more data reading requirements and determine whether the ClickHouse database needs to access the OLTP subsystem and merge historical and latest data, thereby achieving the effect of real-time mixed data processing.

[0083] Embodiment 4:

[0084] Based on Example 1, the first read feedback execution module, referring to Figure 3 and 4 ,include:

[0085] A historical data reading submodule is used to read historical data in the ClickHouse database based on the first time mark in the ClickHouse database if the target database to which the data reading request should be sent is the ClickHouse database;

[0086] The latest data reading submodule is used to read the latest data in the OLTP database based on the second time mark and the third time mark in the OLTP database if the target database to which the data reading request should be sent is the ClickHouse database, wherein the second time mark is used to limit the data range of the ClickHouse database to synchronize and read data from the OLTP database, and the third time mark is used to limit the data range that the user can access in the OLTP database;

[0087] The data stream merging submodule is used to merge the historical data in the ClickHouse database and the latest data in the OLTP database and return them to the client to obtain the data processing results.

[0088] In this embodiment, reference Figure 3 and 4 Reading historical data in the ClickHouse database based on the first time mark in the ClickHouse database is: reading data blocks in the ClickHouse database whose time mark (here represented by the "block_number" of the data block) is not later than the first time mark (that is, the "block_number" of the data block in the ClickHouse database is not greater than the "allowed_max_block_number" in the ClickHouse database) as historical data in the ClickHouse database.

[0089] In this embodiment, reference Figure 3 and4 , reading the latest data in the OLTP database based on the second time stamp and the third time stamp in the OLTP database is: reading a data block whose time stamp in the OLTP database (represented by "block_number" of the data block here) is not earlier than the second time stamp in the OLTP database (that is, "block_number" of the data block in the OLTP database is not less than "latest_row_life_time" in the OLTP database) and is earlier than the third time stamp in the OLTP database (that is, "block_number" of the data block in the OLTP database is less than "allowed_max_block_number" in the OLTP database) as the latest data in the OLTP database.

[0090] The beneficial effect of the above technology is: the time stamp represented by the "allowed_max_block_number" field in the ClickHouse database and the time stamp represented by the "latest_row_life_time" field in the OLTP database are respectively used to read the historical data required by the user in the ClickHouse database and read the latest data required by the user in the OLTP database.

[0091] Embodiment 5:

[0092] Based on Example 1, Figure 2 , also includes:

[0093] The DDL operation processing module is used to send the DDL operation request to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a DDL operation request, and then forward the DDL operation request in the ClickHouse database to the OLTP database based on the JDBC-ODBC bridge to obtain the data processing result.

[0094] In this embodiment, the JDBC-ODBC bridge is a JDBC driver that implements JDBC operations by converting JDBC operations into ODBC operations. For ODBC, it is like a normal application, and the JDBC-ODBC bridge implements JDBC for all databases available for ODBC (here, OLTP databases).

[0095] The beneficial effect of the above technology is: using loosely coupled subsystems (i.e., OLTP database and ClickHouse database) and high-level communication protocols (i.e., JDBC-ODBC bridge) to realize the processing of DDL operation requests in a hybrid data processing system.

[0096] Embodiment 6:

[0097] Based on Example 5, the DDL operation processing module includes:

[0098] The statement forwarding submodule is used to send the create table statement to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a create table request in the DDL operation request;

[0099] The syntax conversion and forwarding submodule is used to convert the table creation statements in the ClickHouse database into syntax and forward them to the OLTP database based on the JDBC-ODBC bridge;

[0100] The table creation execution submodule is used to create the corresponding data table based on the table creation statement after syntax conversion received by the OLTP database. At the same time, it updates the status table in the OLTP database based on the ClickHouse database to obtain the data processing results.

[0101] In this embodiment, the statement for creating a table is a "CREATE TABLE" statement.

[0102] In this embodiment, the syntax conversion is to convert the JDBC operation into an ODBC operation.

[0103] In this embodiment, the state table is a data_sync_state state table, and the synchronization state between the OLTP database and the ClickHouse database is maintained through the data_sync_state state table in the OLTP database.

[0104] In this embodiment, the status table in the OLTP database is updated based on the ClickHouse database as follows:

[0105] Use ClickHouse to insert a record "(database_name, table_name, null, null) into the data_sync_state status table in the OLTP database

[0106] create table data_sync_state (

[0108] database_name varchar(128),

[0109] table_name varchar(128) ,

[0110] allowed_max_block_number BigInt,

[0111] latest_row_life_time DateTime,

[0112] unique key(database_name, table_name)

[0113] );".

[0114] The beneficial effect of the above technology is: using loosely coupled subsystems (i.e., OLTP database and ClickHouse database) and high-level communication protocols (i.e., JDBC-ODBC bridge), it is possible to complete the table creation operation in the OLTP database in the hybrid data processing system.

[0115] Embodiment 7:

[0116] Based on Example 1, Figure 3 and 4 , also includes:

[0117] The current data synchronization interval determination module is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database;

[0118] ClickHouse data synchronization module, which is used to stop the merging of local data blocks (implemented by the "system stop merges db_name.table_name" statement) when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database, and move all data blocks in the OLTP database that are later than the second time mark and earlier than the third time mark to the ClickHouse database;

[0119] The record information update module is used to update the record information in the OLTP database and the ClickHouse database when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database.

[0120] In this embodiment, the current data synchronization interval is a timing synchronization compliance interval determined by using the change characteristics of the user service data currently to be processed.

[0121] In this embodiment, reference Figure 3 and4 The third time stamp in the OLTP database is a time stamp indicated by the “allowed_max_block_number” field in the OLTP database, and its initial value is 0.

[0122] In this embodiment, the local data blocks are data blocks stored in the ClickHouse database.

[0123] In this embodiment, all data blocks in the OLTP database that are later than the second time mark and earlier than the third time mark (that is, data in the OLTP database that are later than the second time mark and earlier than the third time mark) are transferred to the ClickHouse database, including:

[0124] Use "insert into ... select .." to read all data blocks later than the second time marker and earlier than the third time marker from the OLTP database, synchronize all data blocks later than the second time marker and earlier than the third time marker in the OLTP database to the ClickHouse database, and then remove all data blocks later than the second time marker and earlier than the third time marker in the OLTP database.

[0125] The beneficial effect of the above technology is: based on the current data synchronization interval between the OLTP database and the ClickHouse database, the ClickHouse database can synchronize the latest data from the OLTP database regularly, reducing the performance impact of frequent data updates on the ClickHouse database.

[0126] Embodiment 8:

[0127] Based on Example 7, the current data synchronization interval determination module includes:

[0128] The historical data acquisition submodule is used to acquire multiple groups of user service historical data of the same type as the user service data to be processed currently, and to acquire the full life cycle update timestamp of each group of user service historical data;

[0129] The timing alignment submodule is used to perform timing alignment on each group of user service history data and the current user service data to be processed to obtain an aligned data group;

[0130] A calculation submodule, for calculating the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the full life cycle update timestamp of each group of user business history data and the corresponding alignment data group;

[0131] The current data synchronization interval determination submodule is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database based on the partial life cycle update timestamp corresponding to the part of the user business history data after the current moment in the corresponding data group based on the maximum data update cycle evolution similarity.

[0132] In this embodiment, the user service data to be processed currently is service data initiated by the user and needs to be processed by the current hybrid data processing system.

[0133] In this embodiment, the user service history data is the previously processed user service data of the same type as the current service data to be processed, and the classification standard of the same type can be set according to user needs.

[0134] In this embodiment, the same type, for example, the same data type.

[0135] In this embodiment, the full life cycle update timestamp of the user service history data is a timestamp recording all data updates that occur during the full life cycle of the user service history data.

[0136] In this embodiment, the data update cycle evolution similarity indicates the similarity of the change trends of the user service history data and the current service data to be processed at the time point when the data is updated during their entire life cycle, which change over time.

[0137] In this embodiment, based on the partial life cycle update timestamps corresponding to the partial user business history data after the current moment in the corresponding data group of the user business history data with the maximum data update cycle evolution similarity, the current data synchronization interval between the OLTP database and the ClickHouse database is determined, including:

[0138] The minimum value of the time intervals between adjacent timestamps of all groups (one timestamp corresponds to each moment when data changes) in the partial life cycle update timestamps corresponding to the part of the user business history data after the current moment in the corresponding data group with the maximum data update cycle evolution similarity is taken as the current data synchronization interval between the OLTP database and the ClickHouse database.

[0139] The beneficial effects of the above technology are: based on the full life cycle update timestamps of multiple groups of user business history data of the same type as the current user business data to be processed, and the data group containing each group of user business history data and the current user business data to be processed after time alignment, the data update cycle evolution similarity between each group of user business history data and the current business data to be processed is calculated, and the calculated data update cycle evolution similarity is used to screen out user business history data whose data change characteristics are relatively similar to the data change characteristics of the current user business data to be processed, so as to reasonably determine the current data synchronization interval between the OLTP database and the ClickHouse database.

[0140] Embodiment 9:

[0141] Based on Example 8, the computing submodule includes:

[0142] A distinguishing position determining unit, configured to determine, based on the aligned data group of each group of user service history data, a position aligned with the current end position of the current data to be processed in the corresponding full life cycle update timestamp as the distinguishing position;

[0143] A reference timestamp partitioning unit, used to use a portion of the life cycle update timestamp located before the distinguishing position in the corresponding full life cycle update timestamp as a reference life cycle update timestamp;

[0144] The calculation unit is used to calculate the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the reference life cycle update timestamp of each group of user business history data and the current traversed life cycle update timestamp of the current data to be processed.

[0145] In this embodiment, the current end position is the time sequence position represented by the data with the largest "block_number" in the current data to be processed in the aligned data group.

[0146] In this embodiment, based on the reference life cycle update timestamp of each group of user service history data and the currently traversed life cycle update timestamp of the currently processed data, the data update cycle evolution similarity between each group of user service history data and the currently processed service data is calculated, including:

[0147] Sort the time intervals between all adjacent timestamps in the reference lifecycle update timestamp of each group of user service history data in time sequence to obtain a first time interval sequence;

[0148] Sort the time intervals between all adjacent timestamps in the currently traversed life cycle update timestamps of the currently processed data in chronological order to obtain a second time interval sequence;

[0149] The ratio of the difference between each group of time intervals with the same sequence number in each group of the first time interval sequence and the second time interval sequence to the average value is regarded as the data update cycle deviation between the corresponding groups of time intervals with the same sequence number;

[0150] and taking the average of the deviations between all time intervals with the same group number in the first time interval sequence and the second time interval sequence as the data update period evolution deviation between the corresponding group user service history data and the current service data to be processed;

[0151] The difference between 1 and the data update cycle evolution deviation between each group of user service history data and the current service data to be processed is regarded as the data update cycle evolution similarity between each group of user service history data and the current service data to be processed.

[0152] The beneficial effects of the above technology are: based on the aligned data group of each group of user business history data, the position aligned with the current end position of the current data to be processed is determined in the corresponding full life cycle update timestamp, and the reference life cycle update timestamp is determined in the corresponding full life cycle update timestamp; and based on the reference life cycle update timestamp of each group of user business history data and the currently traversed life cycle update timestamp of the current data to be processed, the data update cycle evolution similarity between each group of user business history data and the current business data to be processed is accurately calculated.

[0153] Embodiment 10:

[0154] Based on Example 7, the record information update module refers to Figure 3 and 4 ,include:

[0155] The first record information update submodule is used to update the first time mark in the ClickHouse database (that is, update the "max_allowed_block_number" in the ClickHouse database) when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database;

[0156] The second record information update submodule is used to update the second time marker and the third time marker in the OLTP database when the time interval between the first time marker in the ClickHouse database and the third time marker in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database (that is, update the "latest_row_life_time" and "max_allowed_block_number" in the data_sync_state data table in the OLTP database).

[0157] The beneficial effect of the above technology is: it clarifies the specific information class in the data_sync_state data table that needs to be updated each time the ClickHouse database synchronizes data from the OLTP database.

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

Claims

1. A hybrid data processing system for distributed large-scale parallel processing database, characterized in that: include: A processing requirement clarification module for determining mixed data processing requirements of a distributed massively parallel processing database; A data writing execution module is used to send the user business data to the OLTP database based on the time stamp of the user business data to obtain the data processing result when the data processing requirement is to write the user business data; The read database clarification module is used to determine the target database to which the read data request should be sent based on the corresponding time stamp in the read data request and the first time stamp in the ClickHouse database when the data processing requirement is a read data request, wherein the target database includes an OLTP database and a ClickHouse database, and the first time stamp is used to limit the data range that the user can access in the ClickHouse database; The first read feedback execution module is used to merge the historical data stored in the ClickHouse database and the latest data stored in the OLTP database and return them to the client to obtain the data processing result if the target database to which the read data request should be sent is the ClickHouse database; The second read feedback execution module is used to return the latest data stored in the OLTP database to the client to obtain the data processing result if the target database to which the read data request should be sent is the OLTP database; Among them, the database clear module is read, including: The first database determination submodule is used to determine that the target database to which the read data request should be sent is an OLTP database when the corresponding time stamp in the read data request is later than the first time stamp in the ClickHouse database; The second database determination submodule is used to determine that the target database to which the read data request should be sent is the ClickHouse database when the corresponding time stamp in the read data request is not later than the first time stamp in the ClickHouse database.

2. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 1, characterized in that: Data is written into the execution module, including: A first write execution submodule is used for sending the user service data to the OLTP database based on the time stamp included in the user service data when the user service data includes a time stamp; The second write execution submodule is used to generate a time stamp for the user business data when the user business data does not contain a time stamp, and send the user business data to the OLTP database based on the generated time stamp to obtain a data processing result.

3. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 1, characterized in that: The first reading feedback execution module includes: A historical data reading submodule is used to read historical data in the ClickHouse database based on the first time mark in the ClickHouse database if the target database to which the data reading request should be sent is the ClickHouse database; The latest data reading submodule is used to read the latest data in the OLTP database based on the second time mark and the third time mark in the OLTP database if the target database to which the data reading request should be sent is the ClickHouse database, wherein the second time mark is used to limit the data range of the ClickHouse database to synchronize and read data from the OLTP database, and the third time mark is used to limit the data range that the user can access in the OLTP database; The data stream merging submodule is used to merge the historical data in the ClickHouse database and the latest data in the OLTP database and return them to the client to obtain the data processing results.

4. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 1, characterized in that: Also includes: The DDL operation processing module is used to send the DDL operation request to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a DDL operation request, and then forward the DDL operation request in the ClickHouse database to the OLTP database based on the JDBC-ODBC bridge to obtain the data processing result.

5. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 4, characterized in that: DDL operation processing module, including: The statement forwarding submodule is used to send the create table statement to the ClickHouse database based on the client driver Sharding ClickHouse JDBC when the data processing requirement is a create table request in the DDL operation request; The syntax conversion and forwarding submodule is used to convert the table creation statements in the ClickHouse database into syntax and forward them to the OLTP database based on the JDBC-ODBC bridge; The table creation execution submodule is used to create the corresponding data table based on the table creation statement after syntax conversion received by the OLTP database. At the same time, it updates the status table in the OLTP database based on the ClickHouse database to obtain the data processing results.

6. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 1, characterized in that: Also includes: The current data synchronization interval determination module is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database; ClickHouse data synchronization module, which is used to stop merging local data blocks when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database, and move all data blocks in the OLTP database that are later than the second time mark and earlier than the third time mark to the ClickHouse database; The record information update module is used to update the record information in the OLTP database and the ClickHouse database when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database.

7. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 6, characterized in that: The current data synchronization interval determination module includes: The historical data acquisition submodule is used to acquire multiple groups of user service historical data of the same type as the user service data to be processed currently, and to acquire the full life cycle update timestamp of each group of user service historical data; The timing alignment submodule is used to perform timing alignment on each group of user service history data and the current user service data to be processed to obtain an aligned data group; A calculation submodule is used to calculate the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the full life cycle update timestamp of each group of user business history data and the corresponding alignment data group; The current data synchronization interval determination submodule is used to determine the current data synchronization interval between the OLTP database and the ClickHouse database based on the partial life cycle update timestamp corresponding to the part of the user business history data after the current moment in the corresponding data group based on the maximum data update cycle evolution similarity.

8. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 7, characterized in that: Computing submodule, including: A distinguishing position determining unit, configured to determine, based on the aligned data group of each group of user service history data, a position aligned with the current end position of the current data to be processed in the corresponding full life cycle update timestamp as the distinguishing position; A reference timestamp partitioning unit, used to use a portion of the life cycle update timestamp located before the distinguishing position in the corresponding full life cycle update timestamp as a reference life cycle update timestamp; The calculation unit is used to calculate the data update cycle evolution similarity between each group of user business history data and the current business data to be processed based on the reference life cycle update timestamp of each group of user business history data and the current traversed life cycle update timestamp of the current data to be processed.

9. The hybrid data processing system of the distributed large-scale parallel processing database according to claim 6, characterized in that: Record information update module, including: The first record information updating submodule is used to update the first time mark in the ClickHouse database when the time interval between the first time mark in the ClickHouse database and the third time mark in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database; The second record information updating submodule is used to update the second time marker and the third time marker in the OLTP database when the time interval between the first time marker in the ClickHouse database and the third time marker in the OLTP database reaches the current data synchronization interval between the OLTP database and the ClickHouse database.