Cloud-native, highly flexible expression, storage, and computing decoupled database architecture approach

By introducing cloud-native highly flexible expression, storage and computing decoupling architecture into the database, and combining the advantages of relational and non-relational databases, the problem of insufficient flexibility and scalability of existing databases is solved, and high flexibility is achieved and high-performance database solutions.

CN113849519BActive Publication Date: 2024-10-22SMART CHAIN FUTURE (SHENZHEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111140908.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2024-10-22
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

Existing databases have deficiencies in flexibility, scalability and ease of use, especially when business needs change and massive data processing occurs. Relational databases have low flexibility, non-relational databases have poor flexibility and ease of use, and new databases Flexibility and consistency are difficult to meet the needs of cloud-native environments.

Method used

It adopts a cloud-native and highly flexible decoupled database architecture for expression, storage and computing. Through multiple relational database connection protocols and unified interfaces in the upper layer, serverless architecture computing in the middle layer, and decoupling non-relational database storage engines in the lower layer, it is realized SQL structured query and high scalability, support automatic expansion and strong consistency.

Benefits of technology

It improves the flexibility and scalability of the database, reduces the difficulty of use, adapts to various business needs, and improves system performance and application applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849519B_ABST
    Figure CN113849519B_ABST
Patent Text Reader

Abstract

The present invention provides a cloud-native highly flexible expression, storage and computing decoupled database architecture. The cloud-native highly flexible expression, storage and computing decoupled database architecture includes: a relational database connection protocol representation and conversion at the upper layer, a serverless architecture calculation at the middle layer, and a variable decoupled non-relational data storage engine or service at the lower layer. The cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention has a new database (NewSQL) compared to the upper layer. The upper layer fully supports a variety of relational database protocols, and the lower layer realizes completely decoupled storage. There is no need to expand and couple representation, calculation and storage in a node server manner, and there is no dependence on the upper and middle layers. It realizes a cloud-native, more versatile, and highly flexible storage-computing separated transactional relational database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database models, and in particular to a cloud-native, highly flexible expression, storage and computing decoupled database architecture method. Background Art

[0002] For relational databases, data is stored in a structured manner. Each data table must have its fields defined and then the data is stored according to the table structure. Once the data is stored, it will be very difficult to modify the structure of the data table. As the number of data tables increases, data management will become more and more complex. Therefore, in scenarios where business needs are not fixed or business changes frequently, relational databases have low flexibility. In scenarios with massive data, relational databases have low data processing efficiency, slow response, poor scalability, and high costs.

[0003] For non-relational databases, high performance is achieved by sacrificing strong data consistency. NoSQL generally does not support SQL structured language, has poor usability, and is not supported by RDB. NoSQL is based on key-value pairs, and there is no coupling between data. Compared with relational databases, it has better scalability; but in terms of flexibility, a single NoSQL database is essentially a functional subset of a traditional relational database, which is oriented to specific domain scenarios and has low flexibility.

[0004] For new databases developed in recent years, a certain degree of scalability is achieved by binding one relational database or NoSQL one by one, but flexibility, strong data consistency or SQL functionality are sacrificed, and they have poor usability, complex modules, high communication costs, and cannot adapt to multiple storage engines in cloud-native environments.

[0005] In response to the above-mentioned defects, the purpose of the present invention is to combine relational databases and non-relational databases to complement each other's advantages, and to switch flexibly without a one-to-one correspondence, in line with the design concept and architecture of cloud native, and to design a new cloud native highly flexible expression, storage and computing decoupled database architecture method.

[0006] Therefore, it is necessary to provide a cloud-native, highly flexible expression, storage, and computing decoupled database architecture method to solve the above technical problems. Summary of the invention

[0007] The present invention provides a cloud-native, highly flexible expression, storage and computing decoupled database architecture, which solves the problems of low flexibility and poor scalability of relational databases, low flexibility and poor usability of non-relational databases, and poor flexibility of new databases.

[0008] To solve the above technical problems, the cloud-native highly flexible expression, storage and computing decoupled database architecture method provided by the present invention includes:

[0009] The multiple relational database connection protocol representation and compatibility functions at the upper layer, the infinitely scalable serverless architecture computing functions at the middle layer, and the variable decoupled non-relational database storage engine or service functions at the lower layer;

[0010] The upper layer provides corresponding relational database unified interface adaptation according to the database connection protocols used by different applications, supports SQL structured data operations and query languages, meets the universality and ACID characteristics of relational databases, and does not require applications to change application code when switching databases, thus reducing the difficulty of use and improving ease of use;

[0011] The middle layer automatically expands computing power according to the performance needs of the application, allocates computing resources, decomposes SQL tasks, and ensures strong consistency of data to meet the storage and computing needs of massive data, and realizes concurrent management of server-free requests to meet the strong consistency requirements of transactional databases.

[0012] The lower layer can connect to different non-relational database storage engines or services without any modification or dependency on existing NoSQL storage. It is completely decoupled and takes advantage of its high performance and high scalability. It can adapt different numbers or types of non-relational data storage engines or services according to business needs.

[0013] Taking SQL statement query as an example, the usage steps under this database architecture are as follows:

[0014] S1 user types in a SQL statement and sends a query request;

[0015] The upper layer of S2 automatically converts and adapts SQL query tasks according to the corresponding relational database protocol;

[0016] The S3 query task is assigned to the middle-level computing layer, which executes the query according to its own strategy;

[0017] S4 determines whether metadata data_k that meets the conditions is found;

[0018] S5 determines whether the metadata data_k is stored in a lower-level non-relational data storage engine or service;

[0019] S6 sends a non-relational data storage or service query request corresponding to the SQL in a serverless manner;

[0020] S7 non-relational data storage or service executes query requests converted by SQL;

[0021] S8 returns the query result.

[0022] Preferably, in the step S1, the user sends an SQL query request that complies with a certain relational database protocol according to his own business needs.

[0023] Preferably, in the step S2, the user application database interface takes MySQL as an example, and the upper layer specifies the MySQL relational database protocol to process the SQL request.

[0024] Preferably, the computing layer executes the query strategy as follows: after receiving the query request, the computing server first checks the query cache. If the cache is hit, the result stored in the cache is immediately returned. Otherwise, it enters the next stage, and the computing server performs SQL parsing and preprocessing, and then the optimizer generates the corresponding execution plan.

[0025] Preferably, the computing layer calls the storage engine's API to execute the query based on the execution plan generated by the optimizer.

[0026] Preferably, when the judgment in step S3 is yes, the process proceeds to step S4, and when the judgment is no, the query result is returned: no data meeting the conditions is found.

[0027] Preferably, when the judgment in step S4 is yes, step S5 is entered; when the judgment is no, it means that the metadata data_k is only stored in the lower-level non-relational data storage engine or service, and the query results are returned according to the adapted own strategy and are consistent with the query results of the user using the MySQL database.

[0028] Preferably, in the step S6, the metadata data_k is stored in a MongoDB cluster as an example: first, the SQL statement is converted into a MongoDB cluster query statement, and then the statement query request is sent to the underlying MongoDB cluster in a serverless manner.

[0029] Preferably, the step S6 is a continuation of the step S5. After receiving the query request, the MongoDB cluster executes the query statement according to its own query strategy, returns the query result, and keeps consistent with the query result of the user using the MySQL database.

[0030] Preferably, the conversion of SQL query statements based on multiple protocols into query statements for multiple non-relational data storage or services in step S7 requires a corresponding semantic conversion module.

[0031] Compared with related technologies, the cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention has the following beneficial effects:

[0032] The present invention provides a cloud-native, highly flexible expression, storage, and computing decoupled database architecture. Compared with relational databases, the present invention utilizes the easy-to-expand and flexible data model characteristics of non-relational data storage engines or services, integrates a variety of non-relational data storage engines or services at the lower layer, meets the different business application needs of users, adapts to cloud-native storage services, and achieves high scalability and high flexibility of storage; compared with non-relational databases, the upper layer is compatible with a variety of relational database connection protocols, provides a corresponding flexible RDB unified universal interface to the outside, realizes support for SQL structured query language, supports unified deployment and management of serverless data access tasks through the middle-layer computing layer, supports ACID strong data consistency guarantee, and greatly improves computing scalability and flexibility; compared with new databases, flexible expression and storage without one-to-one correspondence are realized, the difficulty of user use is reduced, server-free request management is adopted, the overall performance of the system is improved, it is suitable for a variety of application scenarios, and the scalability and flexibility of the application are greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 System diagram of the cloud-native, highly flexible expression, storage, and computing decoupled database architecture provided by the present invention.

[0034] Figure 2 A database architecture diagram of a preferred embodiment of the cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention;

[0035] Figure 3 This is the entire SQL query process of the present invention based on the cloud-native highly flexible expression, storage and computing decoupled database architecture. DETAILED DESCRIPTION

[0036] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.

[0037] Please refer to Figure 1 , Figure 2 and Figure 3 ,in, Figure 1 System diagram of the cloud-native, highly flexible expression, storage, and computing decoupled database architecture provided by the present invention. Figure 2 A database architecture diagram of a preferred embodiment of the cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention; Figure 3 This is the entire SQL query process of the present invention based on the cloud-native highly flexible expression, storage and computing decoupled database architecture.

[0038] A cloud-native, highly flexible, decoupled database architecture for expression, storage, and computing includes:

[0039] The multiple relational database connection protocol representation and compatibility functions at the upper layer, the infinitely scalable serverless architecture computing functions at the middle layer, and the variable decoupled non-relational database storage engine or service functions at the lower layer;

[0040] The upper layer provides corresponding relational database unified interface adaptation according to the database connection protocols used by different applications, supports SQL structured data operations and query languages, meets the universality and ACID characteristics of relational databases, and does not require applications to change application code when switching databases, thus reducing the difficulty of use and improving ease of use;

[0041] The middle layer automatically expands computing power according to the performance needs of the application, allocates computing resources, decomposes SQL tasks, and ensures strong consistency of data to meet the storage and computing needs of massive data, and realizes concurrent management of server-free requests to meet the strong consistency requirements of transactional databases.

[0042] The lower layer can connect to different non-relational database storage engines or services without any modification or dependency on existing NoSQL storage. It is completely decoupled and takes advantage of its high performance and high scalability. It can adapt different numbers or types of non-relational data storage engines or services according to business needs.

[0043] Taking SQL statement query as an example, the usage steps under this database architecture are as follows:

[0044] S1 user types in a SQL statement and sends a query request;

[0045] The upper layer of S2 automatically converts and adapts SQL query tasks according to the corresponding relational database protocol;

[0046] The S3 query task is assigned to the middle-level computing layer, which executes the query according to its own strategy;

[0047] S4 determines whether metadata data_k that meets the conditions is found;

[0048] S5 determines whether the metadata data_k is stored in a lower-level non-relational data storage engine or service;

[0049] S6 sends a non-relational data storage or service query request corresponding to the SQL in a serverless manner;

[0050] S7 non-relational data storage or service executes query requests converted by SQL;

[0051] S8 returns the query result.

[0052] The proposed highly scalable and flexible database architecture has the following advantages over traditional relational databases (RDBs) and NoSQL non-relational databases:

[0053] Compared with relational databases, non-relational databases are easy to expand and have flexible data models. Through the integration of NoSQL in the lower layer, they can meet the different business application needs of users and achieve high scalability and flexibility.

[0054] Compared with non-relational databases, it encapsulates relational databases in the upper layer and provides a unified universal interface corresponding to RDB to the outside world, thereby supporting SQL structured query language and ensuring ACID strong data consistency.

[0055] In summary, the present invention greatly improves the scalability and flexibility based on the existing technology.

[0056] In the step S1, the user sends an SQL query request that complies with a certain relational database protocol according to his own business needs.

[0057] In the step S2, the user application database interface takes MySQL as an example, and the upper layer specifies the MySQL relational database protocol to process the SQL request.

[0058] The computing layer executes the query strategy as follows: After receiving the query request, the computing server first checks the query cache. If the cache is hit, the result stored in the cache is immediately returned. Otherwise, it enters the next stage, and the computing server performs SQL parsing and preprocessing, and then the optimizer generates the corresponding execution plan.

[0059] The computing layer calls the storage engine API to execute the query based on the execution plan generated by the optimizer.

[0060] If the judgment in step S3 is yes, the process proceeds to step S4, and if the judgment is no, the process returns the query result: no data meeting the condition is found.

[0061] If the judgment in step S4 is yes, proceed to step S5; if the judgment is no, it means that the metadata data_k is only stored in the lower-level non-relational data storage engine or service, and the query results are returned according to the adapted strategy, and are consistent with the query results of the user using the MySQL database.

[0062] In the step S6, the metadata data_k is stored in the MongoDB cluster as an example: first, the SQL statement is converted into a MongoDB cluster query statement, and then the statement query request is sent to the underlying MongoDB cluster in a serverless manner.

[0063] The step S6 is a continuation of the step S5. After receiving the query request, the MongoDB cluster executes the query statement according to its own query strategy and returns the query result, which is consistent with the query result of the user using the MySQL database.

[0064] The conversion of SQL query statements based on multiple protocols into query statements for multiple non-relational data stores or services in step S7 requires a corresponding semantic conversion module.

[0065] The working principle of the cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention is as follows:

[0066] The user types in an SQL statement and sends a query request;

[0067] The upper-level relational database executes the query according to its own strategy;

[0068] Determine whether metadata data_k that meets the conditions is found;

[0069] Determine whether the metadata data_k is stored in the underlying NoSQL database;

[0070] Send the NoSQL database query request corresponding to the SQL;

[0071] NoSQL databases execute query requests converted by SQL;

[0072] Returns the query results.

[0073] Compared with related technologies, the cloud-native highly flexible expression, storage and computing decoupled database architecture provided by the present invention has the following beneficial effects:

[0074] Compared with traditional relational databases (RDB) and NoSQL non-relational databases, its advantages are as follows:

[0075] Compared with relational databases, non-relational databases are easy to expand and have flexible data models. Through the integration of NoSQL in the lower layer, they can meet the different business application needs of users and achieve high scalability and flexibility.

[0076] Compared with non-relational databases, it encapsulates relational databases in the upper layer and provides a unified universal interface corresponding to RDB to the outside world, thereby supporting SQL structured query language and ensuring ACID strong data consistency.

[0077] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A cloud-native, highly flexible, decoupled database architecture for expression, storage, and computing, characterized by: include: The multiple relational database connection protocol representation and compatibility functions at the upper layer, the infinitely scalable serverless architecture computing functions at the middle layer, and the variable decoupled non-relational database storage engine or service functions at the lower layer; The upper layer provides corresponding relational database unified interface adaptation according to the database connection protocols used by different applications, supports SQL structured data operations and query languages, meets the universality and ACID characteristics of relational databases, and does not require applications to change application code when switching databases, thus reducing the difficulty of use and improving ease of use; The middle layer automatically expands computing power according to the performance requirements of the application, allocates computing resources, decomposes SQL tasks, and ensures strong consistency of data, meeting the storage and computing needs of massive data, and realizing concurrent management of server-free requests to meet the strong consistency requirements of transactional databases; The lower layer can connect to different non-relational database storage engines or services without any modification or dependency on existing NoSQL storage. It is completely decoupled and takes advantage of its high performance and high scalability. It can adapt different numbers or types of non-relational data storage engines or services according to business needs. The steps for using this database architecture are as follows: S1 user types in a SQL statement and sends a query request; The upper layer of S2 automatically converts and adapts SQL query tasks according to the corresponding relational database protocol; The S3 query task is assigned to the middle-level computing layer, which executes the query according to its own strategy; S4 determines whether metadata data_k that meets the conditions is found; S5 determines whether the metadata data_k is stored in a lower-level non-relational data storage engine or service; S6 sends a non-relational data storage or service query request corresponding to the SQL in a serverless manner; S7 Non-relational data storage or service executes the query request converted by SQL; S8 returns the query result.

2. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: In the step S1, the user sends an SQL query request that complies with a certain relational database protocol according to his own business needs.

3. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: In the step S2, the user application database interface is applied to MySQL, and the upper layer specifies the MySQL relational database protocol to process the SQL request.

4. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 3 is characterized in that: The computing layer executes the query strategy as follows: After receiving the query request, the computing server first checks the query cache. If the cache is hit, the result stored in the cache is immediately returned. Otherwise, it enters the next stage, and the computing server performs SQL parsing and preprocessing, and then the optimizer generates the corresponding execution plan.

5. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 4, characterized in that: The computing layer calls the storage engine API to execute the query based on the execution plan generated by the optimizer.

6. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: If the judgment in step S3 is yes, the process proceeds to step S4, and if the judgment is no, the process returns the query result: no data meeting the condition is found.

7. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: If the judgment in step S4 is yes, proceed to step S5; if the judgment is no, it means that the metadata data_k is only stored in the lower-level non-relational data storage engine or service, and the query results are returned according to the adapted strategy, and are consistent with the query results of the user using the MySQL database.

8. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 7, characterized in that: In the step S6, the metadata data_k is stored in the MongoDB cluster: first, the SQL statement is converted into a MongoDB cluster query statement, and then the statement query request is sent to the underlying MongoDB cluster in a serverless manner.

9. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: The step S6 is a continuation of the step S5. After receiving the query request, the MongoDB cluster executes the query statement according to its own query strategy and returns the query result, which is consistent with the query result of the user using the MySQL database.

10. The cloud-native highly flexible expression, storage and computing decoupled database architecture according to claim 1, characterized in that: In the step S7, the conversion of SQL query statements based on multiple protocols into query statements for multiple non-relational data stores or services requires a corresponding semantic conversion module.