[go: up one dir, main page]

CN117112691A - A storage method for multi-storage engine database oriented to big data - Google Patents

A storage method for multi-storage engine database oriented to big data Download PDF

Info

Publication number
CN117112691A
CN117112691A CN202310883974.8A CN202310883974A CN117112691A CN 117112691 A CN117112691 A CN 117112691A CN 202310883974 A CN202310883974 A CN 202310883974A CN 117112691 A CN117112691 A CN 117112691A
Authority
CN
China
Prior art keywords
data
unified
management
storage
sql
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310883974.8A
Other languages
Chinese (zh)
Other versions
CN117112691B (en
Inventor
岳丽军
周万宁
届峰
刘静涛
邹雨
刘超
苏思
王一
杨春
陈单英
谢德晓
张新建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unit 91977 Of Pla
Original Assignee
Unit 91977 Of Pla
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Unit 91977 Of Pla filed Critical Unit 91977 Of Pla
Priority to CN202310883974.8A priority Critical patent/CN117112691B/en
Publication of CN117112691A publication Critical patent/CN117112691A/en
Application granted granted Critical
Publication of CN117112691B publication Critical patent/CN117112691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/221Column-oriented storage; Management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a big data-oriented multi-storage engine database system and a storage method thereof, wherein the system comprises the following steps: an SQL compiler; a stored procedure compiler; a transaction management unit; storing in a distributed memory array; a distributed execution engine; a data source connector; a multi-tenant management component; and a middleware management unit. The method comprises the following steps: unified data storage; unified metadata management; unifying the data model; a unified SQL parsing engine; and unified safety control. The invention ensures that at least more than two domestic processors are supported, and the performance of the multi-storage engine database is improved by 10x to 100x times compared with the open source Hadoop version, thereby meeting the low-delay requirement of an online storage and online service analysis system. SQL supports integrity and performance far ahead of Cloudera Impala. The method is also superior to other Hadoop and MPP products in TPC-DS and TPC-H reference tests, and can realize deep fusion of military databases, typical domestic CPUs and military application scenes.

Description

一种面向大数据的多存储引擎数据库的存储方法A storage method for multi-storage engine database oriented to big data

技术领域Technical field

本发明涉及数据存储技术领域,具体涉及一种面向大数据的多存储引擎数据库的存储方法。The present invention relates to the field of data storage technology, and in particular to a storage method for a multi-storage engine database oriented to big data.

背景技术Background technique

随着战场信息的爆炸式增长,传感器大量使用、信息系统的不断完善,传统的数据库存储方式已经不能满足战场信息以及大量军事知识的捕获和理解。军事应用中大量图片、文本、数值等数据类型变得越加复杂和庞大。在海量杂乱无章的数据中进行统计、筛选、机器学习几乎是不可能的,这就要求数据分析人员与模型训练人员在分析与训练之前对数据进行初始化,也就是将数据进行规整、分类,过滤脏错数据,填补缺失数据。而由于军事信息数据的不断扩大,导致数据分析人员与模型训练人员需要花费巨大的精力在数据整理上,需要学习很多额外的数据处理知识,并且需要一定的工程能力,这就使得分析人员与算法人员门槛加大,企业人力成本大大增加。为了解决上述问题,急需一个高可用的基于大数据架构的多存储引擎数据库来自动将数据进行规整、分类以降低更多的人力成本,让数据分析人员与模型训练人员将更多的时间精力花费在分析与算法上。为了填补这项技术空白,面向大数据的多存储引擎数据库技术在解决知识表示、知识存储、知识查询等方面展现出了巨大的优势,能够满足军事信息检索、情报分析和态势感知等需求。作为数据分析的物理起点,存储正面临着大数据应用的挑战。With the explosive growth of battlefield information, the extensive use of sensors, and the continuous improvement of information systems, traditional database storage methods can no longer meet the requirements for capturing and understanding battlefield information and a large amount of military knowledge. A large number of data types such as pictures, text, and numerical values in military applications have become increasingly complex and large. It is almost impossible to perform statistics, screening, and machine learning in massive and disorganized data. This requires data analysts and model trainers to initialize the data before analysis and training, that is, to organize and classify the data, and filter dirty data. Wrong data and fill in missing data. Due to the continuous expansion of military information data, data analysts and model training personnel need to spend a lot of energy on data sorting, need to learn a lot of additional data processing knowledge, and require certain engineering capabilities, which makes analysts and algorithms The personnel threshold has increased, and the company's labor costs have greatly increased. In order to solve the above problems, there is an urgent need for a highly available multi-storage engine database based on big data architecture to automatically organize and classify data to reduce more labor costs and allow data analysts and model training personnel to spend more time and energy. in analysis and algorithms. In order to fill this technological gap, multi-storage engine database technology for big data has shown great advantages in solving knowledge representation, knowledge storage, knowledge query, etc., and can meet the needs of military information retrieval, intelligence analysis, and situation awareness. As the physical starting point for data analysis, storage is facing the challenges of big data applications.

以典型作战与保障数据需求为背景,基于国产基础软硬件结构和技术特点,力争突破面向海量军用数据的多存储引擎统一管理技术、统一SQL解析与模型映射技术、多引擎分布式弹性扩展技术、数据库实时计算引擎技术、图数据库等关键技术,形成典型国产自主可控的多存储引擎融合数据库,研制出数据库核心引擎的原型系统可支撑典型军事应用场景中复杂数据的统一管理、处理等问题。Taking the typical combat and support data requirements as the background, based on the domestic basic software and hardware structure and technical characteristics, we strive to break through the multi-storage engine unified management technology, unified SQL parsing and model mapping technology, and multi-engine distributed elastic expansion technology for massive military data. Key technologies such as database real-time computing engine technology and graph database have formed a typical domestic independently controllable multi-storage engine fusion database, and a prototype system of the database core engine has been developed to support the unified management and processing of complex data in typical military application scenarios.

发明内容Contents of the invention

本发明的目的在于提供一种面向大数据的多存储引擎数据库的系统以及存储方法,用以解决现有技术存在的问题。The purpose of the present invention is to provide a multi-storage engine database system and storage method for big data, so as to solve the problems existing in the existing technology.

为实现上述目的,本发明提供的一种面向大数据的多存储引擎数据库系统,包括:In order to achieve the above objectives, the present invention provides a multi-storage engine database system for big data, including:

SQL编译器,支持ANSI SQL 92和SQL 99标准,并且支持ANSI SQL 2003 OLAP核心扩展,满足数据仓库业务对SQL的要求,方便应用平滑迁移;SQL compiler supports ANSI SQL 92 and SQL 99 standards, and supports ANSI SQL 2003 OLAP core extensions to meet the SQL requirements of the data warehouse business and facilitate smooth migration of applications;

存储过程编译器,支持完整的数据类型、流程控制、Package、游标、异常处理以及动态SQL执行,并且支持在存储过程中做高速统计,增删改查与分布式事务操作,满足数据应用的从关系型数据库到Inceptor平台的迁移;The stored procedure compiler supports complete data types, process control, packages, cursors, exception handling and dynamic SQL execution, and supports high-speed statistics, additions, deletions, modifications and distributed transaction operations in stored procedures to meet the requirements of data applications. Migration of database to Inceptor platform;

事务管理单元,通过两阶段封锁协议和MVCC来实现一致性和隔离性的控制,支持Serializable Snapshot Isolation隔离级别,因而可以保证并发情况下的事务一致性;The transaction management unit implements consistency and isolation control through the two-stage blocking protocol and MVCC, and supports the Serializable Snapshot Isolation isolation level, thus ensuring transaction consistency under concurrent conditions;

分布式内存列式存储,基于内存或者SSD的列式存储引擎Holodesk,所述Holodesk将数据在内存或者SSD中做列式存储,辅以基于内存的执行引擎,完全避免IO带来的延时;Distributed memory column storage, based on memory or SSD column storage engine Holodesk, which stores data in memory or SSD in column format, supplemented by a memory-based execution engine, completely avoiding the delay caused by IO;

分布式执行引擎,独立构建了分布式数据层,将计算数据从计算引擎JVM内存空间中独立出来,有效减少JVM GC对系统性能和稳定性的影响;The distributed execution engine independently builds a distributed data layer, which separates the calculation data from the JVM memory space of the calculation engine, effectively reducing the impact of JVM GC on system performance and stability;

数据源连接器,连接执行引擎和各种数据源,将多种不同数据源的数据接入引擎做实时的统计分析,无需事先将数据导入HDFS,从而更加方便用户的业务构建多样化需求;The data source connector connects the execution engine and various data sources, and connects data from multiple different data sources to the engine for real-time statistical analysis without the need to import the data into HDFS in advance, making it more convenient for users to build diverse business needs;

多租户管理组件,提供完整的多租户管理功能,包括租户资源管理、租户权限管理以及安全控制模块,方便企业在统一的大数据平台上的多租户的管理和分配;允许对多租户进行CPU和内存资源的配置和管理,不同的租户使用不同的CPU和内存资源池,因而不会互相干扰;The multi-tenant management component provides complete multi-tenant management functions, including tenant resource management, tenant permission management and security control modules, which facilitates the management and allocation of multi-tenants on a unified big data platform; allows CPU and For the configuration and management of memory resources, different tenants use different CPU and memory resource pools, so they will not interfere with each other;

中间件管理单元,支持JDBC 4.0和ODBC 3.5标准,因此能够支持Hibernate/Spring中间件,完全兼容Tableau/QlikView/Cognos报表工具,能够和企业当前的数据应用层完整对接。The middleware management unit supports JDBC 4.0 and ODBC 3.5 standards, so it can support Hibernate/Spring middleware, is fully compatible with Tableau/QlikView/Cognos reporting tools, and can be fully connected with the current data application layer of the enterprise.

进一步,所述存储过程编译器包含一个完整的优化器,包含CFG Optimizer,Parallel Optimizer,和DAG Optimizer,CFG Optimizer对存储过程中的代码进行优化,完成循环展开,冗余代码消除,函数内联等主要优化。Furthermore, the stored procedure compiler includes a complete optimizer, including CFG Optimizer, Parallel Optimizer, and DAG Optimizer. CFG Optimizer optimizes the code in the stored procedure, completes loop unrolling, redundant code elimination, function inlining, etc. Major optimizations.

进一步,所述事务管理单元支持以Begin Transaction启动事务,以commit或者rollback来结束事务,通过两阶段封锁协议和MVCC来实现一致性和隔离性的控制,支持Serializable Snapshot Isolation隔离级别,因而可以保证并发情况下的事务一致性。Furthermore, the transaction management unit supports starting transactions with Begin Transaction, ending transactions with commit or rollback, achieving consistency and isolation control through the two-stage blocking protocol and MVCC, and supporting the Serializable Snapshot Isolation isolation level, thus ensuring concurrency. transactional consistency.

进一步,所述Holodesk支持为数据字段构建分布式索引,允许用户对多字段组合构建OLAP-Cube,并将cube直接存储于内存或者SSD上,无需额外的BI工具来构建Cube。Furthermore, the Holodesk supports building distributed indexes for data fields, allowing users to build OLAP-Cubes for multi-field combinations, and store the cubes directly in memory or SSD, without the need for additional BI tools to build cubes.

进一步,所述分布式执行引擎基于代价的优化器和基于规则的优化器,辅以100种优化规则,保证SQL应用在无需手工改动的情况下能够发挥最大的性能;所述分布式执行引擎包含两种执行模式:低延时模式和高吞吐模式。Furthermore, the distributed execution engine's cost-based optimizer and rule-based optimizer, supplemented by 100 optimization rules, ensure that SQL applications can maximize performance without manual changes; the distributed execution engine includes Two execution modes: low-latency mode and high-throughput mode.

进一步,所述数据源连接器在执行计划开始后,通过预先建立的连接从其他数据源中抽取需要的数据,进入执行引擎层参与SQL计算,在计算完成后,释放相关的数据库连接以及对应的资源。Further, after the execution plan starts, the data source connector extracts the required data from other data sources through pre-established connections, enters the execution engine layer to participate in SQL calculation, and after the calculation is completed, releases the relevant database connection and the corresponding resource.

本发明还提供一种采用所述面向大数据的多存储引擎数据库系统的面向大数据的多存储引擎数据库的存储方法,包括:The present invention also provides a storage method for a big data-oriented multi-storage engine database using the big data-oriented multi-storage engine database system, including:

步骤1、统一数据存储,将物理上独立、管理上分离的各大数据库系统融合为一个完整统一的数据存储;Step 1. Unify data storage, integrating the physically independent and management-separated major database systems into a complete and unified data storage;

步骤2、统一元数据管理,在逻辑数仓中部署一个元数据仓库,用于专门存储和管理元数据的RDBMS集群;在各数据库系统中创建一个新表或新索引,逻辑数仓会在元数据仓库中同步创建一个元数据二维映射表,同时记录下所述元数据二维映射表与原表和/或索引之间的关系,为SQL统一访问打下基础;元数据管理系统存储所有的数据库对象的信息,提供查询接口给其他的系统来检索,其可查询的信息包括并不限于数据的物理分布、数据的分布特征、最大值最小值、权限信息;Step 2: Unify metadata management and deploy a metadata warehouse in the logical data warehouse to use an RDBMS cluster specifically to store and manage metadata; create a new table or new index in each database system, and the logical data warehouse will store the metadata in the metadata warehouse. Synchronously create a two-dimensional metadata mapping table in the data warehouse, and record the relationship between the two-dimensional metadata mapping table and the original table and/or index, laying the foundation for unified SQL access; the metadata management system stores all Database object information provides a query interface for other systems to retrieve. The queryable information includes but is not limited to the physical distribution of data, data distribution characteristics, maximum and minimum values, and permission information;

步骤3、统一数据模型,将多引擎数据库系统的数据模型统一映射为关系数据库的关系数据二维映射表,为元数据集中统一管理、SQL统一访问奠定了理论基础;Step 3. Unify the data model and uniformly map the data model of the multi-engine database system to the two-dimensional relational data mapping table of the relational database, laying a theoretical foundation for centralized and unified management of metadata and unified SQL access;

步骤4、统一SQL解析引擎,为逻辑数仓中的所有数据系统提供统一的SQL解析、优化和执行服务,用户提交的SQL语句首先由SQL引擎接收,经解析和优化后转换为Spark代码,然后交由高性能的分布式计算集群来执行,执行过程中会调用各系统的原生API实现数据访问;Step 4. Unify the SQL parsing engine to provide unified SQL parsing, optimization and execution services for all data systems in the logical data warehouse. The SQL statements submitted by the user are first received by the SQL engine, converted into Spark code after parsing and optimization, and then It is executed by a high-performance distributed computing cluster. During the execution process, the native API of each system will be called to achieve data access;

步骤5、统一安全管控,基于用户和角色的认证统一体系,遵从帐户和/或角色RBAC模型,实现通过角色进行权限管理,对用户进行批量授权管理;支持安全协议Kerberos,使用LDAP作为帐户管理系统,并通过Kerberos对帐户信息进行统一的安全认证。Step 5. Unify security management and control, a unified authentication system based on users and roles, comply with the account and/or role RBAC model, implement permission management through roles, and batch authorization management for users; support the security protocol Kerberos, and use LDAP as the account management system , and perform unified security authentication of account information through Kerberos.

进一步,所述步骤2中统一元数据管理进一步包括提供Hive、HDFS、HBase的元数据接入采集;提供统一元数据管理的UI界面以及相关Service的Restful形式的API接口,提供各类型的微服务对接方式,统一元数据管理的UI前台页面数据的数据存储采用MySQL数据库表;提供Messaging消息队列(目前使用Kafka)以及API接口的元数据操作接口与数据消息总线方式;提供元数据统一的TypeSystem类型系统、Graph图计算存储查询引擎层、智能标签算法、知识图谱模型;提供图计算查询引擎的公共存储封装层,支持JanusGraph开源图计算存储查询引擎。Furthermore, the unified metadata management in step 2 further includes providing metadata access and collection of Hive, HDFS, and HBase; providing a UI interface for unified metadata management and an API interface in Restful form of related services, and providing various types of microservices In the docking method, the data storage of the UI front-end page data of unified metadata management adopts MySQL database table; provides the Messaging message queue (currently using Kafka) and the metadata operation interface and data message bus mode of the API interface; provides the TypeSystem type of unified metadata System, graph computing storage query engine layer, smart label algorithm, knowledge graph model; provides a public storage encapsulation layer for the graph computing query engine, and supports the JanusGraph open source graph computing storage query engine.

进一步,所述步骤2统一元数据管理进一步包括面向图、键值、文档、关系的异构数据进行实时高效索引,支持数值点属性、数值段属性、空间位置以及文本的混合索引BRPQ,具体包括PSPQ索引的构建、PSPQ与关键词索引结合、带关系属性的空间关键字分布式查询以及基于Lucene的索引构建。Furthermore, the unified metadata management in step 2 further includes real-time and efficient indexing of heterogeneous data of graphs, key values, documents, and relationships, and supports mixed index BRPQ of numerical point attributes, numerical segment attributes, spatial locations, and text, specifically including Construction of PSPQ index, combination of PSPQ and keyword index, spatial keyword distributed query with relational attributes, and index construction based on Lucene.

进一步,所述步骤5中统一安全管控架构分为4层:系统层使用改进的ApacheDS,使读写效率提升10倍以上,使用同一套用户和统一的LDAP/Kerberos认证方式,避免OpenLDAP使用Kerberos认证,加速LDAP认证效率;业务层实现完整的ARBAC模型支持,提供了RESTAPI,以及用户友好的WebUI和密码策略的功能支持;插件层使用插件的形式,为各个组件提供认证、授权、组映射以及配额管理,使得各组件可以使用统一的用户、组和权限管理模型;服务层对接的各种平台PaaS与SaaS服务,受统一安全管控的保护。Furthermore, the unified security management and control architecture in step 5 is divided into 4 layers: the system layer uses improved ApacheDS to increase reading and writing efficiency by more than 10 times, and uses the same set of users and a unified LDAP/Kerberos authentication method to avoid OpenLDAP using Kerberos authentication. , to accelerate the efficiency of LDAP authentication; the business layer implements complete ARBAC model support, providing REST API, user-friendly WebUI and password policy functional support; the plug-in layer uses plug-ins to provide authentication, authorization, group mapping and quotas for each component Management enables each component to use a unified user, group and permission management model; various platform PaaS and SaaS services connected to the service layer are protected by unified security management and control.

本发明方法具有如下优点:The method of the present invention has the following advantages:

本发明确保能够支持至少两种以上国产处理器,通过验证原型系统,多存储引擎数据库相比开源Hadoop版本有10x-100x倍的性能提升,满足在线存储和在线业务分析系统的低延时需求。综合在执行引擎及数据存储层上的优化,SQL支持完整程度和性能大幅领先Cloudera Impala。在TPC-DS和TPC-H基准测试中也胜于其他Hadoop和MPP产品,可实现军用数据库、典型国产CPU及军事应用场景的深度融合。The invention ensures that it can support at least two domestic processors. By verifying the prototype system, the multi-storage engine database has 10x-100x performance improvement compared to the open source Hadoop version, meeting the low-latency requirements of online storage and online business analysis systems. Combined with the optimization of the execution engine and data storage layer, the completeness and performance of SQL support are significantly ahead of Cloudera Impala. It also outperforms other Hadoop and MPP products in TPC-DS and TPC-H benchmark tests, and can achieve deep integration of military databases, typical domestic CPUs and military application scenarios.

附图说明Description of drawings

图1示出了关键技术实现总体架构图;Figure 1 shows the overall architecture diagram of key technology implementation;

图2示出了统一的元数据管理架构;Figure 2 shows the unified metadata management architecture;

图3示出了Thrift通信协议图;Figure 3 shows the Thrift communication protocol diagram;

图4示出了统一安全管控架构图;Figure 4 shows the unified security management and control architecture diagram;

图5示出了Kerbeors认证过程图;Figure 5 shows the Kerbeors authentication process diagram;

图6示出了PSPQ索引结构;Figure 6 shows the PSPQ index structure;

图7示出了基于B树查询示意;Figure 7 shows a schematic diagram of query based on B-tree;

图8示出了BRPQ索引结构。Figure 8 shows the BRPQ index structure.

具体实施方式Detailed ways

下面将结合具体实施方案对本发明的技术方案进行清楚、完整的描述,但是本领域技术人员应当理解,下文所述的实施方案仅用于说明本发明,而不应视为限制本发明的范围。基于本发明中的实施方案,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方案,都属于本发明保护的范围。The technical solutions of the present invention will be described clearly and completely below with reference to specific embodiments. However, those skilled in the art should understand that the embodiments described below are only used to illustrate the present invention and should not be regarded as limiting the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

本发明基于国产处理器平台,创新地提出了通过面向大数据的多存储引擎数据库技术,构建统一的数据存储引擎,建立统一的元数据管理机制,统一的数据模型,打造统一的高效分布式SQL引擎,为军事业务场景提供强大的平台支撑。Based on the domestic processor platform, the present invention innovatively proposes to build a unified data storage engine through multi-storage engine database technology for big data, establish a unified metadata management mechanism, a unified data model, and create a unified and efficient distributed SQL Engine provides powerful platform support for military business scenarios.

本发明一种面向大数据的多存储引擎数据库系统如图1所示,包括:A multi-storage engine database system for big data of the present invention is shown in Figure 1, including:

1.SQL编译器SQL 2003 Compiler1.SQL CompilerSQL 2003 Compiler

企业级数据仓库、数据集市等应用大多基于SQL来开发,而Hadoop业界的产品大部分对SQL的兼容程序比较差,或者不支持SQL的模块化扩展,因而应用迁移的成本非常高,甚至是不具备可行性。为了降低应用迁移成本,Transwarp Inceptor开发了完整的SQL编译器,支持ANSI SQL 92和SQL 99标准,并且支持ANSI SQL 2003 OLAP核心扩展,可以满足绝大部分现有的数据仓库业务对SQL的要求,方便应用平滑迁移。Applications such as enterprise-level data warehouses and data marts are mostly developed based on SQL. However, most products in the Hadoop industry have poor SQL compatibility programs or do not support modular expansion of SQL. Therefore, the cost of application migration is very high, even Not feasible. In order to reduce application migration costs, Transwarp Inceptor has developed a complete SQL compiler that supports ANSI SQL 92 and SQL 99 standards, and supports ANSI SQL 2003 OLAP core extensions, which can meet the SQL requirements of most existing data warehouse businesses. Facilitates smooth migration of applications.

除了更好的SQL语义分析层以外,Inceptor包含强大的优化器保证SQL在引擎上有最佳的性能。Inceptor包含3级优化器:首先是基于规则的优化器,应用静态优化规则并生成一个逻辑执行计划,其次是基于成本的优化器,通过衡量多个不同执行计划的CPU,IO和网络成本,来选择一个更合理的计划并生成物理执行计划;最后是代码生成器,对一些比较核心的执行逻辑生成更高效的执行代码或者JavaByte Code,从而保证SQL业务在分布式平台上有最佳性能。In addition to a better SQL semantic analysis layer, Inceptor includes a powerful optimizer to ensure the best performance of SQL on the engine. Inceptor contains 3 levels of optimizers: first, a rule-based optimizer, which applies static optimization rules and generates a logical execution plan, and second, a cost-based optimizer, which measures the CPU, IO and network costs of multiple different execution plans. Choose a more reasonable plan and generate a physical execution plan; finally, there is the code generator, which generates more efficient execution code or JavaByte Code for some core execution logic, thereby ensuring the best performance of SQL business on a distributed platform.

2.存储过程编译器PL/SQL Compiler2. Stored procedure compiler PL/SQL Compiler

国内现有的数据仓库应用大都基于SQL 2003,而且大量使用存储过程来构建复杂应用。因此除了SQL编译器以外,Transwarp Inceptor还包含存储过程编译器用于对存储过程的编译和执行。Most of the existing data warehouse applications in China are based on SQL 2003, and a large number of stored procedures are used to build complex applications. Therefore, in addition to the SQL compiler, Transwarp Inceptor also contains a stored procedure compiler for compiling and executing stored procedures.

Inceptor支持Oracle PL/SQL和DB2 SQL PL两大主流SQL标准,包括完整的数据类型、流程控制、Package、游标、异常处理以及动态SQL执行,并且支持在存储过程中做高速统计,增删改查与分布式事务操作。因此,有了存储过程编译器的补充,Inceptor可以满足绝大部分数据应用的从关系型数据库到Inceptor平台的迁移。Inceptor supports the two mainstream SQL standards of Oracle PL/SQL and DB2 SQL PL, including complete data types, process control, Package, cursor, exception handling and dynamic SQL execution, and supports high-speed statistics, addition, deletion, modification, query and Distributed transaction operations. Therefore, with the addition of the stored procedure compiler, Inceptor can satisfy the migration of most data applications from relational databases to the Inceptor platform.

除了SQL语法层面的支持,存储过程编译器包含一个完整的优化器,包含CFGOptimizer,Parallel Optimizer,和DAG Optimizer。CFG Optimizer对存储过程中的代码进行优化,完成循环展开,冗余代码消除,函数内联等主要优化。Parallel Optimizer将一些原本串行的逻辑做并行化处理,利用集群的计算能力来提高整体执行速度,对一些关键的功能如游标的性能提升非常明显。DAG Optimizer会根据生成的DAG图二次优化,生成更合理的物理执行计划,重点降低了shuffle等任务开销。为了有效的和其他数据库兼容,Inceptor支持通过不同的方言设置来隔离不同的SQL标准之间的差异,从而避免数据计算和处理标准的二义性,因此保证数据处理的正确性。In addition to support at the SQL syntax level, the stored procedure compiler includes a complete optimizer, including CFGOptimizer, Parallel Optimizer, and DAG Optimizer. CFG Optimizer optimizes the code in the stored procedure and completes major optimizations such as loop unrolling, redundant code elimination, and function inlining. Parallel Optimizer parallelizes some originally serial logic and uses the computing power of the cluster to improve the overall execution speed. The performance improvement of some key functions such as cursors is very obvious. DAG Optimizer will perform secondary optimization based on the generated DAG graph to generate a more reasonable physical execution plan, focusing on reducing the overhead of tasks such as shuffle. In order to be effectively compatible with other databases, Inceptor supports isolating the differences between different SQL standards through different dialect settings, thereby avoiding the ambiguity of data calculation and processing standards, thus ensuring the correctness of data processing.

3.事务管理单元Transaction Manager3.Transaction Manager

为了更好的满足数据仓库业务场景的需求,Inceptor提供完整的增删改SQL支持,允许从多数据源中加工数据。同时为了有效的保证数据处理的准确性,Inceptor提供了分布式事务的支持,保证了处理过程中数据的ACID,即原子性、一致性、隔离性和持久性。In order to better meet the needs of data warehouse business scenarios, Inceptor provides complete SQL support for additions, deletions, and modifications, allowing data to be processed from multiple data sources. At the same time, in order to effectively ensure the accuracy of data processing, Inceptor provides distributed transaction support to ensure the ACID of data during processing, that is, atomicity, consistency, isolation, and durability.

Inceptor支持以Begin Transaction启动事务,以commit或者rollback来结束事务。事务管理单元通过两阶段封锁协议和MVCC来实现一致性和隔离性的控制,支持Serializable Snapshot Isolation隔离级别,因而可以保证并发情况下的事务一致性。Inceptor supports starting transactions with Begin Transaction and ending transactions with commit or rollback. The transaction management unit implements consistency and isolation control through the two-stage blocking protocol and MVCC, and supports the Serializable Snapshot Isolation isolation level, thus ensuring transaction consistency under concurrent conditions.

Inceptor支持SQL2003中关于增删改查部分的语义规范,支持Insert,Update,Delete,Truncate以及Merge Into原语,支持单条或者从其他数据表以及嵌套查询中更新数据表,并且内置一致性检查功能以防止非法改动。Inceptor supports the semantic specifications of the add, delete, modify and query parts in SQL2003, supports Insert, Update, Delete, Truncate and Merge Into primitives, supports single or updating data tables from other data tables and nested queries, and has built-in consistency checking functions to Prevent illegal changes.

通过SQL编译器的优化,增删改SQL执行计划通过分布式引擎在集群中并发执行,系统整体的吞吐率能够达到关系数据库的数倍,能够满足批处理业务的高吞吐率要求。另外,通过合理的资源规划,Inceptor在做数据的增删改的同时,允许租户对数据做高速的统计分析。Through the optimization of the SQL compiler, the addition, deletion and modification of SQL execution plans are executed concurrently in the cluster through the distributed engine. The overall throughput of the system can reach several times that of the relational database, which can meet the high throughput requirements of batch processing business. In addition, through reasonable resource planning, Inceptor allows tenants to perform high-speed statistical analysis on data while adding, deleting, and modifying data.

4.分布式内存列式存储Holodesk4. Distributed memory column storage Holodesk

为了加速交互式分析的速度,Inceptor推出了基于内存或者SSD的列式存储引擎Holodesk。Holodesk将数据在内存或者SSD中做列式存储,辅以基于内存的执行引擎,可以完全避免IO带来的延时,极大地提高数据扫描速度。In order to speed up interactive analysis, Inceptor launched Holodesk, a column storage engine based on memory or SSD. Holodesk stores data in columnar format in memory or SSD, supplemented by a memory-based execution engine, which can completely avoid delays caused by IO and greatly improve data scanning speed.

除了列式存储加快统计分析速度,Holodesk支持为数据字段构建分布式索引。通过智能索引技术为查询构建最佳查询方案,Inceptor可以将SQL查询延时降低到毫秒级。In addition to columnar storage to speed up statistical analysis, Holodesk supports building distributed indexes for data fields. Using intelligent indexing technology to build the best query plan for queries, Inceptor can reduce SQL query latency to milliseconds.

Holodesk允许用户对多字段组合构建OLAP-Cube,并将cube直接存储于内存或者SSD上,无需额外的BI工具来构建Cube,因此对于一些复杂的统计分析和报表交互查询,Holodesk能够实现秒级的反应。Holodesk allows users to build OLAP-Cube for multi-field combinations and store the cube directly in memory or SSD. No additional BI tools are needed to build the cube. Therefore, for some complex statistical analysis and report interactive queries, Holodesk can achieve seconds-level processing. reaction.

除了性能优势,Holodesk在可用性方面也表现出色。Holodesk的元数据和存储都原生支持高可用性,通过一致性协议和多版本来支持异常处理和灾难恢复。在异常情况下,Holodesk能够自动恢复重建所有的表信息和数据,无需手工恢复,从而减少开发与运维的成本,保证系统的In addition to performance advantages, Holodesk also excels in usability. Holodesk's metadata and storage natively support high availability, supporting exception handling and disaster recovery through consistency protocols and multiple versions. Under abnormal circumstances, Holodesk can automatically restore and reconstruct all table information and data without manual recovery, thereby reducing development and operation and maintenance costs and ensuring system stability.

稳定性。Inceptor重点优化了基于SSD的Holodesk性能,使得基于PCIE SSD的性能达到全内存的方案的80%以上。因此结合使用低成本的内存/闪存混合存储方案,可接近全内存存储的分析性能,保证解决方案的高性价比。stability. Inceptor focuses on optimizing the performance of Holodesk based on SSD, making the performance based on PCIE SSD reach more than 80% of the full memory solution. Therefore, the combination of low-cost memory/flash hybrid storage solutions can approach the analysis performance of full-memory storage, ensuring a cost-effective solution.

5.分布式执行引擎Distributed Execution Engine5. Distributed Execution Engine

Inceptor基于Apache Spark深度开发了专用分布式计算引擎,不仅大幅提高了计算性能,而且有效的解决了Spark在稳定性方面的很多问题,确保计算引擎能够7x24小时无间断运行。此外,Inceptor引擎独立构建了分布式数据层,将计算数据从计算引擎JVM内存空间中独立出来,因此可以有效减少JVM GC对系统性能和稳定性的影响。Inceptor has deeply developed a dedicated distributed computing engine based on Apache Spark, which not only greatly improves computing performance, but also effectively solves many stability problems of Spark, ensuring that the computing engine can run 24/7 without interruption. In addition, the Inceptor engine independently builds a distributed data layer, which separates the calculation data from the JVM memory space of the computing engine, thus effectively reducing the impact of JVM GC on system performance and stability.

在SQL执行计划优化方面,Inceptor实现了基于代价的优化器和基于规则的优化器,辅以100多种优化规则,可以保证SQL应用在无需手工改动的情况下能够发挥最大的性能。对于数据倾斜等常见的数据处理难题,执行引擎也能够自动识别并加以优化,能够解决绝大部分存在数据倾斜的计算场景,杜绝数据倾斜对系统稳定性的影响。In terms of SQL execution plan optimization, Inceptor implements a cost-based optimizer and a rule-based optimizer, supplemented by more than 100 optimization rules, to ensure that SQL applications can maximize performance without manual changes. For common data processing problems such as data skew, the execution engine can also automatically identify and optimize it, which can solve most computing scenarios with data skew and eliminate the impact of data skew on system stability.

为了更好的适应各种数据场景,Inceptor的执行引擎包含两种执行模式:低延时模式和高吞吐模式。低延时模式主要应用在数据量比较小的场景,执行引擎会生成执行延时低的物理执行计划,通过减少或避免一些高延时的任务(如IO,网络等)来保证SQL的执行时间很短,达到或者逼近关系型数据库在这些场景下的性能。高吞吐模式主要应用在大数据的场景,通过合理的分布式执行来提高超大数据量上的复杂统计分析的性能。因此,Inceptor的执行引擎可以满足从GB到PB的各种数据量上的数据业务需求。In order to better adapt to various data scenarios, Inceptor's execution engine includes two execution modes: low-latency mode and high-throughput mode. The low-latency mode is mainly used in scenarios where the amount of data is relatively small. The execution engine will generate a physical execution plan with low execution latency to ensure that the execution time of SQL is short by reducing or avoiding some high-latency tasks (such as IO, network, etc.) , reaching or approaching the performance of relational databases in these scenarios. The high-throughput mode is mainly used in big data scenarios to improve the performance of complex statistical analysis on extremely large amounts of data through reasonable distributed execution. Therefore, Inceptor's execution engine can meet data business needs on various data volumes from GB to PB.

6.数据源连接器Stargate6. Data source connector Stargate

企业数据可能会分散在多个系统中,彼此不能共享数据或者进行相关的分析,从而造成数据孤岛的现象。通过构建统一的大数据平台可以有效的解决大部分场景下的数据孤岛问题,然后仍然存在一些数据因为各种关系无法迁移统一平台上的现象。为了解决此类问题,Inceptor推出了数据源连接器Stargate。Stargate是连接执行引擎和各种数据源的连接器,可以将多种不同数据源的数据接入引擎做实时的统计分析,而无需事先将数据导入HDFS,从而更加方便用户的业务构建多样化需求。在语法层面,Inceptor兼容OracleDB-Link规范,通过创建database link来预先建立和其他数据源的连接池,然后就可以在SQL中通过table_name@database link的方式在Inceptor中实时访问该数据源的数据,无需其他操作。在执行计划开始后,Stargate通过预先建立的连接从其他数据源中抽取需要的数据,输入进入执行引擎层参与SQL计算。在计算完成后,释放相关的数据库连接以及对应的资源。Enterprise data may be scattered in multiple systems, and they cannot share data or perform relevant analysis with each other, resulting in the phenomenon of data islands. By building a unified big data platform, the problem of data islands in most scenarios can be effectively solved. However, there is still a phenomenon that some data cannot be migrated to the unified platform due to various relationships. In order to solve such problems, Inceptor launched the data source connector Stargate. Stargate is a connector that connects execution engines and various data sources. It can connect data from multiple different data sources to the engine for real-time statistical analysis without having to import the data into HDFS in advance, making it more convenient for users to build diverse business needs. . At the syntax level, Inceptor is compatible with the OracleDB-Link specification. By creating a database link to pre-establish a connection pool with other data sources, you can then access the data of the data source in SQL in real time through table_name@database link in Inceptor. No further action is required. After the execution plan starts, Stargate extracts the required data from other data sources through pre-established connections and inputs it into the execution engine layer to participate in SQL calculations. After the calculation is completed, the relevant database connections and corresponding resources are released.

目前Stargate支持关系数据库包括Oracle,DB2,Mysql,Teradata以及PostgreSQL。此外,Stargate目前可以接入Holodesk,HDFS,Hyperbase,Elastic Search等,未来可接入Redis作为数据源。Stargate currently supports relational databases including Oracle, DB2, Mysql, Teradata and PostgreSQL. In addition, Stargate can currently be connected to Holodesk, HDFS, Hyperbase, Elastic Search, etc., and can be connected to Redis as a data source in the future.

7.多租户管理组件Guardian7.Multi-tenant management component Guardian

Guardian提供完整的多租户管理功能,包括租户资源管理,租户权限管理以及安全控制等模块,可以方便企业在统一的大数据平台上的多租户的管理和分配。Guardian provides complete multi-tenant management functions, including tenant resource management, tenant permission management, security control and other modules, which can facilitate the management and distribution of multi-tenants on a unified big data platform for enterprises.

Guardian允许对多租户进行CPU和内存资源的配置和管理,不同的租户使用不同的CPU和内存资源池,因而不会互相干扰。此外可以给不同的用户设定不同的优先级来实现服务质量控制(QoS)。Guardian支持通过SQL对用户磁盘空间的配置和管理,包括对数据空间和临时空间的配额,更改和管理,以方便平台对存储资源的合理分配,管控和计费。Guardian allows configuration and management of CPU and memory resources for multi-tenants. Different tenants use different CPU and memory resource pools, so they will not interfere with each other. In addition, different priorities can be set for different users to implement quality of service control (QoS). Guardian supports the configuration and management of user disk space through SQL, including the quota, change and management of data space and temporary space, to facilitate the platform's reasonable allocation, control and billing of storage resources.

Guardian支持使用LDAP协议做用户访问控制,支持Kerberos协议用作底层访问控制,从而保证数据的安全性和隔离性。Guardian支持一整套基于SQL的数据库/表的权限控制,管理员可以设置用户对表的查询,修改,删除等权限,并包含一整套的角色设定,可以通过角色组的设置来便捷的实现用户权限控制。Guardian supports the use of LDAP protocol for user access control and Kerberos protocol for underlying access control to ensure data security and isolation. Guardian supports a complete set of SQL-based database/table permission control. Administrators can set user permissions for table query, modification, deletion, etc., and includes a complete set of role settings, which can be conveniently implemented through role group settings. Permission control.

此外,Guardian支持Row Level Security,对表的数据进行精确的行级权限控制。在多租户的场景下,可以保证不同租户只能看到表中自身有权限的数据,而不会看到属于其他租户的数据,从而有精确的数据隔离。In addition, Guardian supports Row Level Security to perform precise row-level permission control on table data. In a multi-tenant scenario, it can be ensured that different tenants can only see the data in the table that they have permission to, and will not see the data belonging to other tenants, thus achieving precise data isolation.

8.中间件管理单元Connector8.Middleware management unit Connector

Inceptor完整的支持JDBC 4.0和ODBC 3.5标准,因此能够支持Hibernate/Spring等中间件,完全兼容Tableau/QlikView/Cognos等报表工具,可以和企业当前的数据应用层完整对接。Inceptor fully supports JDBC 4.0 and ODBC 3.5 standards, so it can support middleware such as Hibernate/Spring, is fully compatible with reporting tools such as Tableau/QlikView/Cognos, and can be fully connected with the current data application layer of the enterprise.

此外,Inceptor也支持与其他数据同步工具的对接,已经完成了和IBM CDC的相互认证与整合,并且能够支持Oracle Golden Gate,SAPData Service等工具。因此,企业用户可以实时的将交易数据同步到Inceptor内做交互式统计分析业务。In addition, Inceptor also supports docking with other data synchronization tools, has completed mutual certification and integration with IBM CDC, and can support Oracle Golden Gate, SAP Data Service and other tools. Therefore, enterprise users can synchronize transaction data to Inceptor in real time for interactive statistical analysis.

本发明技术方案包括:The technical solution of the present invention includes:

1.统一数据存储1. Unified data storage

将物理上独立、管理上分离的各大数据库系统融合为一个完整统一的数据存储。Integrates physically independent and management-separated major database systems into a complete and unified data storage.

2.统一元数据管理机制2. Unified metadata management mechanism

为了实现元数据的集中统一管理,在逻辑数仓中部署一个元数据仓库,即用于专门存储和管理元数据的RDBMS集群。如果在各数据库系统中创建一个新表或新索引,逻辑数仓会在元数据仓库中同步创建一个元数据二维映射表,同时记录下映射表与原表/索引之间的关系,这样就为SQL统一访问打下基础。In order to achieve centralized and unified management of metadata, a metadata warehouse is deployed in the logical data warehouse, that is, an RDBMS cluster specifically used to store and manage metadata. If a new table or index is created in each database system, the logical data warehouse will simultaneously create a metadata two-dimensional mapping table in the metadata warehouse, and record the relationship between the mapping table and the original table/index, so that Lay the foundation for SQL unified access.

元数据管理系统负责存储所有的数据库对象的信息,包括schema、table、view、column、trigger、sequence以及存储过程等对象,同时提供查询接口给其他的系统来检索,其可查询的信息包括并不限于数据的物理分布、数据的分布特征、最大值最小值、权限信息等。因为元数据信息是非常关键的数据,其可靠性决定了整个数据库系统是否能够提供服务,因此原型系统需要充分的设计和考虑元数据存储系统的可靠性。本发明计划使用一致性高可靠的存储服务来记录元数据信息,可选择的系统包括Apache Zookeeper或ApacheEtcd系统。Zookeeper和Etcd都将同一份数据存储在多个实例中,通过一致性的算法(如Raft算法)来保证每个实例中的数据是完全一致的。这样即使某些实例因为软硬件问题不能提供服务,只要有一个实例仍然在正常工作,那么元数据系统仍然能够保证服务不掉线。The metadata management system is responsible for storing information on all database objects, including schema, table, view, column, trigger, sequence and stored procedures. It also provides query interfaces for other systems to retrieve. The queryable information includes Limited to the physical distribution of data, distribution characteristics of data, maximum and minimum values, permission information, etc. Because metadata information is very critical data, and its reliability determines whether the entire database system can provide services, the prototype system needs to fully design and consider the reliability of the metadata storage system. The present invention plans to use a consistent and highly reliable storage service to record metadata information. Optional systems include Apache Zookeeper or Apache Etcd system. Both Zookeeper and Etcd store the same data in multiple instances, and use consistency algorithms (such as Raft algorithms) to ensure that the data in each instance is completely consistent. In this way, even if some instances cannot provide services due to software and hardware problems, as long as one instance is still working normally, the metadata system can still ensure that the service is not dropped.

3.统一数据模型3. Unified data model

为了让多引擎中的所有数据系统都支持SQL访问,就必须在数据模型上实现统一。经研究发现,虽然各系统的技术原理不同,但是大部分都采用了类二维表的数据模型,比HBase为例,虽然它采用四维表模型,但也是按行组织数据,并引入列族放松了列的限制,所以在特定约束条件下可以将四维表映射为二维表。通过这一思路,本发明可以将多引擎数据库系统的数据模型统一映射为关系数据库的二维表,又称关系数据二维映射表,这为元数据集中统一管理、SQL统一访问奠定了理论基础。In order for all data systems in multiple engines to support SQL access, the data model must be unified. Research has found that although the technical principles of each system are different, most of them adopt a two-dimensional table-like data model. Take HBase as an example. Although it uses a four-dimensional table model, it also organizes data by rows and introduces column family relaxation. Column restrictions are eliminated, so a four-dimensional table can be mapped to a two-dimensional table under certain constraints. Through this idea, the present invention can uniformly map the data model of the multi-engine database system into a two-dimensional table of a relational database, also known as a two-dimensional relational data mapping table. This lays a theoretical foundation for centralized and unified management of metadata and unified SQL access. .

4.统一SQL解析引擎4. Unified SQL parsing engine

基于高性能计算框架Spark,打造一个通用的分布式SQL引擎。该引擎负责为逻辑数仓中的所有数据系统提供统一的SQL解析、优化和执行服务,用户提交的SQL语句首先由SQL引擎接收,经解析和优化后转换为Spark代码,然后交由高性能的分布式计算集群来执行,执行过程中会调用各系统的原生API实现数据访问。Based on the high-performance computing framework Spark, a universal distributed SQL engine is built. The engine is responsible for providing unified SQL parsing, optimization and execution services for all data systems in the logical data warehouse. SQL statements submitted by users are first received by the SQL engine, converted into Spark codes after parsing and optimization, and then handed over to high-performance A distributed computing cluster is used for execution. During the execution process, the native API of each system will be called to achieve data access.

5.统一安全管控5. Unified security control

基于用户和角色的认证统一体系,遵从帐户/角色RBAC(Role-BasedAccessControl)模型,实现通过角色进行权限管理,对用户进行批量授权管理。支持安全协议Kerberos,使用LDAP作为帐户管理系统,并通过Kerberos对帐户信息进行统一的安全认证。在复杂的战场对抗环境下,统一安全管控可以防止敌方信息对抗系统窃听已方的信息传输内容、对已方系统信号的干扰和信息系统注入虚假的欺骗信息。信息化战争对数据应用的信息安全要求有:The unified authentication system based on users and roles follows the account/role RBAC (Role-BasedAccessControl) model to implement permission management through roles and batch authorization management of users. It supports the security protocol Kerberos, uses LDAP as the account management system, and performs unified security authentication of account information through Kerberos. In a complex battlefield confrontation environment, unified security management and control can prevent the enemy's information countermeasures system from eavesdropping on one's own information transmission content, interfering with one's own system signals, and injecting false and deceptive information into the information system. The information security requirements for data applications in information warfare include:

(1)数据加密:提供数据在传输过程及静态存储的加密保护,在敏感数据被越权访问时仍然能够得到有效保护。在数据加解密方面,能通过高效的加解密方案,实现高性能、低延迟的端到端和存储层加解密(非敏感数据可不加密,不影响性能)。同时,加密的有效使用需要安全灵活的密钥管理,这方面开源方案还比较薄弱,需要借助商业化的密钥管理产品。此外,加解密对上层业务透明,上层业务只需指定敏感数据,加解密过程业务完全不感知。(1) Data encryption: Provides encryption protection for data during transmission and static storage, and can still be effectively protected when sensitive data is accessed without authorization. In terms of data encryption and decryption, high-performance, low-latency end-to-end and storage layer encryption and decryption can be achieved through efficient encryption and decryption solutions (non-sensitive data does not need to be encrypted, which does not affect performance). At the same time, the effective use of encryption requires secure and flexible key management. In this regard, open source solutions are still relatively weak and commercial key management products are needed. In addition, encryption and decryption are transparent to upper-layer services. Upper-layer services only need to specify sensitive data, and the business is completely unaware of the encryption and decryption process.

(2)用户隐私数据脱敏:提供数据脱敏和个人信息去标识化功能,提供满足国际密码算法的用户数据加密服务。(2) User privacy data desensitization: Provide data desensitization and personal information de-identification functions, and provide user data encryption services that meet international cryptographic algorithms.

(3)多租户隔离:实施多租户访问隔离措施,实施数据安全等级划分,支持基于标签的强制访问控制,提供基于ACL的数据访问授权模型,提供全局数据视图和私有数据视图,提供数据视图的访问控制。(3) Multi-tenant isolation: Implement multi-tenant access isolation measures, implement data security level division, support tag-based mandatory access control, provide ACL-based data access authorization model, provide global data view and private data view, and provide data view Access control.

(4)数据生命周期管理:理解大数据平台中数据的来源,以及知道数据怎么被使用的,何人在何地对其进行销毁,对监测大数据系统中是否存在非法数据访问非常关键,这需要通过安全审计来实现。安全审计的目的是捕获系统内的完整活动记录,且不可被更改。大数据平台要能对数据进行全方位安全管控,做到“事前可管、事中可控、事后可查”。(4) Data life cycle management: Understanding the source of data in the big data platform, as well as knowing how the data is used and who and where destroys it, is very critical to monitoring whether there is illegal data access in the big data system. This requires This is achieved through security audits. The purpose of a security audit is to capture a complete record of activity within a system that cannot be altered. A big data platform must be able to conduct comprehensive security management and control of data, so that it can be managed beforehand, controllable during the process, and auditable afterward.

(5)日志审计:日志审计作为数据管理,数据溯源以及攻击检测的重要措施不可或缺。大数据平台具备日志管理和分析能力。(5) Log audit: Log audit is indispensable as an important measure for data management, data traceability and attack detection. The big data platform has log management and analysis capabilities.

本发明具体实施例:Specific embodiments of the invention:

1)统一元数据管理实施方式1) Unified metadata management implementation method

(1)元数据管理架构(1) Metadata management architecture

为了实现元数据的集中统一管理,在逻辑数仓中部署一个元数据仓库,即用于专门存储和管理元数据的RDBMS集群。如果在各数据库系统中创建一个新表或新索引,逻辑数仓会在元数据仓库中同步创建一个元数据二维映射表,同时记录下元数据二维映射表与原表/索引之间的关系,这样就为SQL统一访问打下基础。我们对元数据管理做了深入研究,架构设计如图2所示:In order to achieve centralized and unified management of metadata, a metadata warehouse is deployed in the logical data warehouse, that is, an RDBMS cluster specifically used to store and manage metadata. If a new table or index is created in each database system, the logical data warehouse will simultaneously create a metadata two-dimensional mapping table in the metadata warehouse, and record the relationship between the metadata two-dimensional mapping table and the original table/index. relationship, thus laying the foundation for SQL unified access. We have done in-depth research on metadata management, and the architectural design is shown in Figure 2:

Metadata Sources AccessMetadata Sources Access

提供Hive、HDFS、HBase等的元数据接入采集等功能Provide metadata access and collection functions for Hive, HDFS, HBase, etc.

Spring Framework UI&Restful APISpring Framework UI&Restful API

提供统一元数据管理的UI界面以及相关Service的Restful形式的API接口,提供各类型的微服务对接方式,统一元数据管理的UI前台页面数据的数据存储采用MySQL数据库表,页面数据通过前台页面操作录入、实时或离线方式查询后台的平台服务获得Provides a UI interface for unified metadata management and a Restful API interface for related services, and provides various types of microservice docking methods. The data storage of the UI front-end page data of unified metadata management uses MySQL database tables, and the page data is operated through the front-end page. Input, real-time or offline query backend platform service acquisition

Metadata Integration&Notification APIMetadata Integration&Notification API

提供Messaging消息队列(目前使用Kafka)以及API接口(HTTP或REST方式)的元数据操作接口与数据消息总线方式Provides Messaging message queue (currently using Kafka) and API interface (HTTP or REST mode) metadata operation interface and data message bus mode

Core PlatformCore Platform

提供元数据统一的Type System类型系统、Graph图计算存储查询引擎层、智能标签算法、知识图谱模型等Provides a unified metadata Type System, Graph computing storage query engine layer, smart label algorithm, knowledge graph model, etc.

Graph DatabaseGraph Database

提供图计算查询引擎的公共存储封装层,支持Janus Graph开源图计算存储查询引擎。Provides a public storage encapsulation layer for graph computing query engines and supports the Janus Graph open source graph computing storage query engine.

(2)元数据存储原理(2) Metadata storage principle

Metadata store使用HBase存储entity实体信息,索引Index信息存储使用ElasticSearch;Metadata store客户端连接Metadata store服务,Metadata store再去连接MySQL数据库来存取元数据。有了metastore服务,就可以有多个客户端同时连接,而且这些客户端不需要知道MySQL数据库的用户名和密码,只需要连接metastore服务即可。统一元数据通过将metadata作为一个单独的服务进行启动。在服务器端启动一个MetaStoreServer,客户端利用Thrift协议通过MetaStoreServer访问元数据库。Thrift通信协议如图3所示:The Metadata store uses HBase to store entity information, and Index information is stored using ElasticSearch; the Metadata store client connects to the Metadata store service, and the Metadata store then connects to the MySQL database to access metadata. With the metastore service, multiple clients can connect at the same time, and these clients do not need to know the user name and password of the MySQL database, they only need to connect to the metastore service. Unified metadata starts by launching metadata as a separate service. Start a MetaStoreServer on the server side, and the client uses the Thrift protocol to access the metadata database through MetaStoreServer. The Thrift communication protocol is shown in Figure 3:

底层IO模块,负责实际的数据传输,包括Socket,文件,或者压缩数据流等。The underlying IO module is responsible for actual data transmission, including Socket, files, or compressed data streams.

TTransport负责以字节流方式发送和接收Message,是底层IO模块在Thrift框架中的实现,每一个底层IO模块都会有一个对应TTransport来负责Thrift的字节流(ByteStream)数据在该IO模块上的传输。例如TSocket对应Socket传输,TFileTransport对应文件传输。TTransport is responsible for sending and receiving Messages in the form of byte streams. It is the implementation of the underlying IO module in the Thrift framework. Each underlying IO module will have a corresponding TTransport that is responsible for Thrift's byte stream (ByteStream) data on the IO module. transmission. For example, TSocket corresponds to Socket transmission, and TFileTransport corresponds to file transmission.

TProtocol主要负责结构化数据组装成Message,或者从Message结构中读出结构化数据。TProtocol将一个有类型的数据转化为字节流以交给TTransport进行传输,或者从TTransport中读取一定长度的字节数据转化为特定类型的数据。如int32会被TBinaryProtocol Encode为一个四字节的字节数据,或者TBinaryProtocol从TTransport中取出四个字节的数据Decode为int32。TProtocol is mainly responsible for assembling structured data into Message, or reading structured data from the Message structure. TProtocol converts a typed data into a byte stream and gives it to TTransport for transmission, or reads a certain length of byte data from TTransport and converts it into a specific type of data. For example, int32 will be encoded into a four-byte byte data by TBinaryProtocol, or the four-byte data taken out by TBinaryProtocol from TTransport will be decoded into int32.

TServer负责接收Client的请求,并将请求转发到Processor进行处理。TServer主要任务就是高效的接受Client的请求,特别是在高并发请求的情况下快速完成请求。TServer is responsible for receiving the Client's request and forwarding the request to the Processor for processing. The main task of TServer is to efficiently accept Client requests, especially in the case of high concurrent requests, to quickly complete the requests.

Processor(或者TProcessor)负责对Client的请求做出相应,包括RPC请求转发,调用参数解析和用户逻辑调用,返回值写回等处理步骤。Processor是服务器端从Thrift框架转入用户逻辑的关键流程。Processor同时也负责向Message结构中写入数据或者读出数据。The Processor (or TProcessor) is responsible for responding to the Client's request, including RPC request forwarding, call parameter parsing and user logic invocation, return value writing back and other processing steps. Processor is the key process for the server to transfer the user logic from the Thrift framework. The Processor is also responsible for writing data to or reading data from the Message structure.

2)统一安全管控实施方式2) Unified security management and control implementation methods

在复杂的战场对抗环境下,统一安全管控可以防止敌方信息对抗系统窃听已方的信息传输内容、对已方系统信号的干扰和信息系统注入虚假的欺骗信息。所以基于多存储引擎数据库的统一安全管控技术研究十分重要,本小节通过研究统一的安全管控架构,统一的服务加密和认证服务,统一的数据权限访问控制来保障整个多存储引擎数据库平台的安全统一管控。In a complex battlefield confrontation environment, unified security management and control can prevent the enemy's information countermeasures system from eavesdropping on one's own information transmission content, interfering with one's own system signals, and injecting false and deceptive information into the information system. Therefore, the research on unified security management and control technology based on multi-storage engine databases is very important. This section ensures the security and unity of the entire multi-storage engine database platform by studying the unified security management and control architecture, unified service encryption and authentication services, and unified data permission access control. Control.

如图4所示,统一安全管控架构分为4层:As shown in Figure 4, the unified security management and control architecture is divided into 4 layers:

系统层使用改进的ApacheDS,使读写效率提升10倍以上,使用同一套用户和统一的LDAP/Kerberos认证方式,避免OpenLDAP使用Kerberos认证,加速LDAP认证效率。The system layer uses improved ApacheDS to increase reading and writing efficiency by more than 10 times. It uses the same set of users and a unified LDAP/Kerberos authentication method to avoid OpenLDAP using Kerberos authentication and accelerate LDAP authentication efficiency.

业务层实现完整的ARBAC模型支持,提供了RESTAPI,以及用户友好的WebUI和密码策略等功能支持。同时采用JWTToken机制,为实现SSO做好基础准备。将用户认证授权进行了统一化,从Web服务到Hadoop底层使用同一套用户,同一套授权机制;同时开放了LDAP接口、RESTAPI和LoginService,供第三方应用进行认证和授权的整合。The business layer implements complete ARBAC model support and provides REST API, user-friendly WebUI, password policy and other functional support. At the same time, the JWTToken mechanism is used to make basic preparations for implementing SSO. User authentication and authorization are unified, and the same set of users and authorization mechanisms are used from Web services to the bottom layer of Hadoop. At the same time, the LDAP interface, REST API and Login Service are opened for third-party applications to integrate authentication and authorization.

插件层使用插件的形式,为各个组件提供认证、授权、组映射以及配额管理,使得各组件可以使用统一的用户、组和权限管理模型。The plug-in layer uses plug-ins to provide authentication, authorization, group mapping and quota management for each component, so that each component can use a unified user, group and permission management model.

服务层对接的各种平台PaaS与SaaS服务,受统一安全管控的保护。Various platform PaaS and SaaS services connected to the service layer are protected by unified security control.

通过Kerberos协议提供统一的服务加密和认证服务。Kerbeors认证的具体过程如下:客户机向认证服务器(AS)发送请求,要求得到某服务器的证书,然后AS的响应包含这些用客户端密钥加密的证书。Provides unified service encryption and authentication services through the Kerberos protocol. The specific process of Kerbeors authentication is as follows: the client sends a request to the authentication server (AS) to obtain a certificate from a certain server, and then the AS's response contains these certificates encrypted with the client key.

如图5所示,证书的构成为:1)服务器TGT;2)一个临时加密密钥(又称为会话密钥“sessionkey”)。客户机将TGT(包括用服务器密钥加密的客户机身份和一份会话密钥的拷贝)传送到服务器上。会话密钥可以(现已经由客户机和服务器共享)用来认证客户机或认证服务器,也可用来为通信双方以后的通讯提供加密服务,或通过交换独立子会话密钥为通信双方提供进一步的通信加密服务。As shown in Figure 5, the certificate consists of: 1) server TGT; 2) a temporary encryption key (also known as the session key "sessionkey"). The client transmits the TGT (which includes the client's identity encrypted with the server's key and a copy of the session key) to the server. The session key can be used (now shared by the client and server) to authenticate the client or the server, to provide encryption services for future communications between the communicating parties, or to provide further encryption services for the communicating parties by exchanging independent sub-session keys. Communication encryption services.

3)面向图、键值、文档、关系等异构数据的高效索引实时方式3) Efficient real-time indexing method for heterogeneous data such as graphs, key values, documents, relationships, etc.

针对传统关系型数据库难以满足军事大数据处理中数据类型复杂的问题,包含文档、关系、时空位置等异构数据,本发明提出处理基于数值点和数值段偏好属性信息的PSPQ(Point and Segment Preferences Query)索引,然后与关键词索引结合,提出了一种支持数值点属性、数值段属性、空间位置以及文本的混合索引BRPQ(Boolean Range withPreferences Query index)。具体包括PSPQ索引的构建,PSPQ与关键词索引结合,带关系属性的空间关键字分布式查询,以及基于Lucene的索引构建这几方面内容。In view of the difficulty of traditional relational databases in meeting the problem of complex data types in military big data processing, including heterogeneous data such as documents, relationships, spatio-temporal locations, etc., the present invention proposes to process PSPQ (Point and Segment Preferences) based on numerical point and numerical segment preference attribute information. Query) index, and then combined with the keyword index, a hybrid index BRPQ (Boolean Range with Preferences Query index) is proposed that supports numerical point attributes, numerical segment attributes, spatial positions and text. Specifically, it includes the construction of PSPQ index, the combination of PSPQ and keyword index, spatial keyword distributed query with relational attributes, and index construction based on Lucene.

PSPQ索引结构PSPQ index structure

PSPQ索引结构由哈希表和倒排文件两部分组成,结构如图6所示。The PSPQ index structure consists of two parts: a hash table and an inverted file. The structure is shown in Figure 6.

(1)哈希表。用来索引数值点关系属性信息,包含(key,pIF)的键值对。其中,key为数值点关系属性信息的标识,pIF为指向倒排文件的指针。(1) Hash table. Used to index numerical point relationship attribute information, including key-value pairs of (key, pIF). Among them, key is the identifier of the numerical point relationship attribute information, and pIF is the pointer to the inverted file.

哈希表key值设计。数值点属性包含多个,且针对各个属性的查询都是范围查询,保证剪枝率的同时,对多个属性进行联合范围查询是key值设计的一大挑战。针对这一挑战,将各个属性值区间切分为多个小区间,每个小区间的key值用区间最小值赋值,然后将各个属性的小区间key进行笛卡尔积得到哈希表的key值。这样做有两大优势,一方面,数据根据key值可以快速地存取,并能对多个属性进行联合范围查询,另一方面,剪枝时可以根据偏好查询快速过滤掉不符合查询范围的哈希表key值,各个属性值区间切分越多,过滤掉的哈希表key值越多,剪枝能力越强。Hash table key value design. There are multiple numerical point attributes, and the query for each attribute is a range query. While ensuring the pruning rate, joint range query for multiple attributes is a major challenge in key value design. In response to this challenge, each attribute value interval is divided into multiple small intervals, the key value of each small interval is assigned with the minimum value of the interval, and then the Cartesian product of the small interval keys of each attribute is performed to obtain the key value of the hash table. . This has two major advantages. On the one hand, data can be quickly accessed based on the key value, and joint range queries can be performed on multiple attributes. On the other hand, during pruning, data that does not meet the query range can be quickly filtered out based on preference queries. Hash table key values, the more each attribute value interval is divided, the more hash table key values are filtered out, and the stronger the pruning ability.

预处理切分各属性值区间得到哈希表key值。针对每一个数值点属性,对全部对象的属性值进行等份切分,得到各个区间。等份目的在于使得每份对应的区间中对象个数大致相等,数据均匀关联在各个哈希表key值下,剪枝时更趋于平稳,不会出现剪枝掉的哈希表key值关联的对象数量太多或者太少。Preprocessing divides each attribute value interval to obtain the hash table key value. For each numerical point attribute, the attribute values of all objects are divided into equal parts to obtain each interval. The purpose of equal parts is to make the number of objects in the corresponding interval of each part roughly equal. The data is evenly associated under each hash table key value. It becomes more stable during pruning and there will be no pruned hash table key value association. There are too many or too few objects.

当然,由于数值点属性是数值属性,并且不同属性之间是独立的,也可以使用B树索引数值点偏好属性。但基于B树后的代价相对于BRPQ索引的代价要高的多,所以本项目不采用B树索引。下面对此进行详细说明,如图7所示。Of course, since numerical point attributes are numerical attributes and different attributes are independent, B-trees can also be used to index numerical point preference attributes. However, the cost based on B-tree is much higher than that of BRPQ index, so this project does not use B-tree index. This is explained in detail below, as shown in Figure 7.

基于B树后查询代价增加。基于B树索引多个数值点偏好属性时,需要针对每一个属性建立一个B树索引,多个B树索引不能跟文中处理空间关键词的索引以及处理数值段用户偏好属性的索引结合。如上图所示,采用B树后,需要利用空间关键词索引得到满足空间和关键词查询的候选结果集,利用数值段用户偏好属性索引得到满足数值段偏好的候选结果集,在每一个B树上求得满足此属性偏好的候选结果集,然后对所有候选结果集求交集。基于BRPQ索引查询时,数据集经过空间关键词查询后的结果集再进行偏好查询。假设数值点用户偏好属性个数为p,基于B树后需要对全部数据集查询p+2次,而BRPQ索引只需要查询一次。在查询过程中,两者空间关键词查询过程代价相同,而对于偏好查询,BRPQ是在空间关键词查询得到的结果基础上进行偏好查询,而基于B树后是针对数据集进行p次偏好查询以查找满足各个属性偏好的对象。而且BRPQ针对数值点偏好查询时,采用哈希技术,时间复杂度O(1),而B树的时间复杂度为O(log2N),N为B树的高度,p个B树的时间复杂度为O(plog2N)。综上,基于B树后的查询代价要明显高于BRPQ。The query cost increases based on B-tree. When indexing multiple numerical point preference attributes based on B-trees, a B-tree index needs to be established for each attribute. Multiple B-tree indexes cannot be combined with the index that handles spatial keywords and the index that handles numerical segment user preference attributes. As shown in the figure above, after using B-tree, it is necessary to use the spatial keyword index to obtain the candidate result set that satisfies the spatial and keyword query, and use the numerical segment user preference attribute index to obtain the candidate result set that satisfies the numerical segment preference. In each B-tree Find the candidate result set that satisfies this attribute preference, and then find the intersection of all candidate result sets. When querying based on the BRPQ index, the result set after the spatial keyword query of the data set is then used for preference query. Assuming that the number of numerical point user preference attributes is p, based on the B-tree, the entire data set needs to be queried p+2 times, while the BRPQ index only needs to be queried once. In the query process, the cost of the two spatial keyword query processes is the same. As for preference query, BRPQ performs preference query based on the results obtained by spatial keyword query, and based on B-tree, it performs p preference queries on the data set. to find objects that satisfy each property preference. Moreover, BRPQ uses hash technology for numerical point preference query, and the time complexity is O(1), while the time complexity of B-tree is O(log2N), N is the height of B-tree, and the time complexity of p B-trees is O(plog2N). In summary, the query cost based on B-tree is significantly higher than BRPQ.

基于B树后索引空间增大。基于B树索引多个数值点偏好属性时,需要针对每一个属性建立一个B树索引。假设数值点用户偏好属性个数为p,数据集对象个数为n,不仅需要保存(p+2)*n个指向数据的指针,而且p个B树索引的占用空间较大。而BRPQ只需要增加哈希表的key值即可。The index space increases after being based on B-tree. When indexing multiple numerical point preference attributes based on B-tree, a B-tree index needs to be established for each attribute. Assume that the number of numerical point user preference attributes is p and the number of data set objects is n. Not only do (p+2)*n pointers to data need to be saved, but also p B-tree indexes take up a large space. BRPQ only needs to increase the key value of the hash table.

基于B树后插入代价增大。基于B树索引数值点用户偏好属性后,需要对全部数据集插入p+2次。而BRPQ只需要插入一次。在插入过程中,两者插入空间关键词索引的代价相同,但在插入偏好属性时,BRPQ采用哈希技术,插入代价为O(1),基于B树索引的最坏插入代价为O(logn),插入p个B树的时间复杂度为O(plogn)。因此,基于B树后的插入代价要明显高于BRPQ。The insertion cost increases after being based on B-tree. After indexing the user preference attributes based on the B-tree index, it is necessary to insert p+2 times into the entire data set. BRPQ only needs to be inserted once. During the insertion process, the cost of inserting the spatial keyword index is the same for both, but when inserting the preference attribute, BRPQ uses hash technology, the insertion cost is O(1), and the worst insertion cost based on the B-tree index is O(logn ), the time complexity of inserting p B-trees is O(plogn). Therefore, the insertion cost based on B-tree is significantly higher than BRPQ.

(2)倒排文件。用来索引数值段用户偏好属性信息,包含(key,pL)的键值对。其中,key为数值段用户偏好属性信息的标识,pL为key对应的倒排链表的指针,倒排链表中存储对象标识或者指针pO,唯一标识一个对象。(2) Inverted files. Used to index numerical segment user preference attribute information, including key-value pairs of (key, pL). Among them, key is the identifier of the user preference attribute information in the numerical segment, pL is the pointer of the inverted linked list corresponding to key, and the object identifier or pointer pO is stored in the inverted linked list to uniquely identify an object.

基于倒排文件索引查询时,DAAT算法对搜索同时出现在多个倒排列表中某一数据提供了高效性。数值段偏好查询时,利用key值快速大量剪枝,利用DAAT算法高效查询。When querying based on the inverted file index, the DAAT algorithm provides high efficiency for searching for a certain data that appears in multiple inverted lists at the same time. When querying numerical segment preferences, use key values to quickly prune a large number of data, and use the DAAT algorithm to query efficiently.

PSPQ与关键词索引结合PSPQ combined with keyword index

PSPQ索引支持数值点和数值段用户偏好属性协同剪枝,为了解决用户偏好约束的空间关键词范围查询,需要将PSPQ与空间关键词索引结合。The PSPQ index supports collaborative pruning of numerical point and numerical segment user preference attributes. In order to solve spatial keyword range queries with user preference constraints, PSPQ needs to be combined with the spatial keyword index.

目前对空间关键词查询已有大量的研究,对空间位置的索引一般利用四叉树或R树,如图8所示,BRPQ采用四叉树,但也可以用R树。考虑到少量的中间结果,以及用有序关键词树(ordered keyword trie)检索有序关键词时提供了较好的查询性能,采用有序关键词树索引文本信息,有序关键词树剪枝出来的路径将明确满足关键词查询。组合后的索引BRPQ结构如图所示。四叉树叶子节点包含一个指向有序关键词树的指针,并且为四叉树叶子节点所关联的对象设置阈值β,达到阈值时四叉树叶子结点分裂。为了保证少的中间结果,叶子节点(在后文中只将关联有序关键词树的节点称为叶子节点)会继续划分,直到每个四叉树节点中包含的对象个数小于等于k个。有序关键词树的每条路径包含一个指向PSPQ的指针。At present, there has been a lot of research on spatial keyword queries. Quadtrees or R-trees are generally used to index spatial locations. As shown in Figure 8, BRPQ uses quadtrees, but R-trees can also be used. Considering the small number of intermediate results and the fact that using ordered keyword trie provides better query performance when retrieving ordered keywords, the ordered keyword trie is used to index text information and the ordered keyword tree is pruned. The path that comes out will clearly satisfy the keyword query. The combined index BRPQ structure is shown in the figure. The quadtree leaf node contains a pointer to the ordered keyword tree, and a threshold β is set for the object associated with the quadtree leaf node. When the threshold is reached, the quadtree leaf node splits. In order to ensure few intermediate results, leaf nodes (only nodes associated with ordered keyword trees will be called leaf nodes in the following text) will continue to be divided until the number of objects contained in each quadtree node is less than or equal to k. Each path in the ordered keyword tree contains a pointer to PSPQ.

带关系属性的空间关键字分布式查询算法Spatial keyword distributed query algorithm with relational attributes

近年来,数据量已经从GB级变成TB甚至是PB级别。因此,大量数据管理在数据分析中占据非常重要的地位。但是如何高效的索引和查询数据是数据分析的瓶颈。搜索引擎获取数据的时候只会尽量去搜索到文本最接近、地理位置最相近并且满足关系属性属性的数据。但是由于数据量的陡然增加,目前已有的搜索引擎不能高效的应答包含这三类信息的查询语句因为没有相应的高效的索引能够同时处理这几类数据。甚至现有的面向空间关键字的查询都没有考虑到关系属性这个属性,从而降低查询效率。并且在此大规模的数据的时代,传统的索引结构和算法都是基于单机实现的,处理速度已经不能满足用户的需求。为了解决上述问题,提出一种支持关键字、地理位置信息和关系属性属性的Baseline分布式索引算法KLPDQ(Baseline Algorithm for Keywords and Location-aware withrelational attributes Distributed Query index)。并且在此基础上,提出更加高效的带有关系属性的空间关键字查询处理算法。这种算法不仅可以同时索引这三类数据并且采用分布式的索引和查询处理能够显著降低索引和查询的速度。In recent years, the amount of data has changed from gigabytes to terabytes or even petabytes. Therefore, bulk data management plays a very important role in data analysis. But how to efficiently index and query data is the bottleneck of data analysis. When the search engine obtains data, it will only try to search for data with the closest text, closest geographical location, and satisfying relationship attributes. However, due to the sudden increase in the amount of data, existing search engines cannot efficiently respond to query statements containing these three types of information because there are no corresponding efficient indexes that can process these types of data at the same time. Even existing spatial keyword-oriented queries do not take the relational attribute into account, thus reducing query efficiency. And in this era of large-scale data, traditional index structures and algorithms are implemented based on a single machine, and the processing speed can no longer meet the needs of users. In order to solve the above problems, a Baseline distributed index algorithm KLPDQ (Baseline Algorithm for Keywords and Location-aware with relational attributes Distributed Query index) is proposed that supports keywords, geographical location information and relational attributes. And on this basis, a more efficient spatial keyword query processing algorithm with relational attributes is proposed. This algorithm can not only index these three types of data at the same time, but also use distributed indexing and query processing to significantly reduce the speed of indexing and querying.

带关系属性的空间关键字对象(Object)={K,G,P}。O.K是对象的关键字集合,O.G是对象的经纬度坐标,O.P是关系属性属性的集合。O.P={P’,S}。O.P.P’是关系属性属性的数值点集合并且每个单位元都表示该属性的最小取值,O.P.S是关系属性属性的数值段属性的集合。在本发明中,数值段属性只考虑商户营业时段属性。Spatial keyword object (Object) with relational attributes = {K, G, P}. O.K is the keyword set of the object, O.G is the longitude and latitude coordinates of the object, and O.P is the set of relationship attributes. O.P={P’, S}. O.P.P’ is a set of numerical points of the relational attribute and each unit represents the minimum value of the attribute. O.P.S is a set of numerical segment attributes of the relational attribute. In the present invention, only the merchant's business hours attributes are considered for the numerical segment attributes.

带关系属性的空间关键字范围查询(Query)={K,R,P}。Q.K是查询的关键字的集合,Q.R是查询的地理位置范围的集合。Q.R=={T,L,B,R},Q.R.T是该地理位置范围的左上角;Q.R.L是该地理位置范围的左下角;Q.R.B是该地理位置范围的右下角;Q.R.R是该地理位置范围的右上角。Q.P是查询的关系属性的查询集合。类似于对象的构造,Q.P也是由分别对数值点和数值段的查询组成的。Spatial keyword range query (Query) with relational attributes = {K, R, P}. Q.K is the set of query keywords, and Q.R is the set of query geographical location ranges. Q.R=={T,L,B,R}, Q.R.T is the upper left corner of the geographical location range; Q.R.L is the lower left corner of the geographical location range; Q.R.B is the lower right corner of the geographical location range; Q.R.R is the lower left corner of the geographical location range upper right corner. Q.P is the query set of relational attributes of the query. Similar to the construction of objects, Q.P is also composed of queries for numerical points and numerical segments respectively.

对象满足查询的充分必要条件就是: 具体是指对象必须包含查询语句中所查询的关键字、必须在查询的空间范围以内、且其数值点属性必须大于查询的数值点属性以及数值段属性必须在查询的数值段属性范围内。The necessary and sufficient conditions for an object to satisfy the query are: Specifically, it means that the object must contain the keyword queried in the query statement, must be within the spatial range of the query, and its numerical point attribute must be greater than the queried numerical point attribute, and the numeric segment attribute must be within the queried numerical segment attribute range.

但是因为查询和索引过程都是基于大数据的环境下,所以该机制是基于Lucence的分布式索引和查询机制。将空间和文本以及关系属性同时进行索引,将多维信息转为一维信息,利用Lucence和Hadoop来存储和查询大数据下空间关键字对象。However, because the query and indexing processes are based on big data environment, this mechanism is based on Lucence's distributed indexing and query mechanism. Index space, text and relational attributes at the same time, convert multi-dimensional information into one-dimensional information, and use Lucence and Hadoop to store and query spatial keyword objects under big data.

Lucene索引构建Lucene index building

Lucene的一些基本的概念主要包括索引、文档、域和词元。一个索引代表一系列的文档。而一个文档代表一系列的域。一个域则代表一系列的词元。一个词元是一个字符串数组,如果同一个字符串属于不相同的域则是不同的词元。因此,词元表示的是一对字符串,其中一个是域名,另外一个则是域内的某一字符串。Some basic concepts of Lucene mainly include index, document, domain and token. An index represents a series of documents. A document represents a series of fields. A domain represents a series of tokens. A token is an array of strings. If the same string belongs to different domains, it is a different token. Therefore, the token represents a pair of strings, one of which is the domain name, and the other is a certain string within the domain.

(1)索引:在计算机领域内,倒排索引是一个可以用来存储文本的映射关系的数据结构。比如说文字、数字映射到其在数据库文件的位置等。(1) Index: In the computer field, the inverted index is a data structure that can be used to store text mapping relationships. For example, text and numbers are mapped to their locations in database files, etc.

(2)段:被切分成更小的块组织的Lucene索引则称为段。每个段是一个索引。在Lucene查询过程中会按顺序访问所有段。(2) Segment: A Lucene index that is divided into smaller blocks is called a segment. Each segment is an index. During the Lucene query process, all segments are accessed sequentially.

(3)文档:文档是Lucene索引和查询过程中的最小单位。一个文档表示一系列的域。每一个域都有一个域名和一系列的值。因为每个域存储在文档内,所以文档需要给每个域一个唯一的域名,防止冲突。(3) Document: Document is the smallest unit in the Lucene indexing and query process. A document represents a series of fields. Each domain has a domain name and a series of values. Because each field is stored within the document, the document needs to give each field a unique domain name to prevent conflicts.

(4)域:每个域由两个部分组成,域名和值。值可以是任意的字符串或者是数字等。这些值都是用来表示数据的。值可以选择被存储在索引中,以防该文档被选中而需要返回域内的各类信息。(4) Domain: Each domain consists of two parts, domain name and value. The value can be any string or number, etc. These values are used to represent data. Values can optionally be stored in the index in case the document is selected and the information within the domain needs to be returned.

(5)词元:词元代表的是一串字符串,由两个元素组成,一个是字符串文本信息还有一个是所属的域名。(5) Word element: The word element represents a string of characters, consisting of two elements, one is the string text information and the other is the domain name to which it belongs.

Lucene索引建立过程Lucene index creation process

比如,下列是三个文本信息:For example, the following are three text messages:

T0=I was a student,and I came from Nanjing.T0=I was a student, and I came from Nanjing.

T1=My father is a teacher,and I am a student.T1=My father is a teacher, and I am a student.

T2=Nanjing is my hometown,but my father’s hometown is Chengdu.T2=Nanjing is my hometown, but my father’s hometown is Chengdu.

首先,使用标记器从三个文本中获取关键词。处理程序如下。First, use a tokenizer to get keywords from three texts. The processing procedure is as follows.

1)在预处理阶段,Lucene利用标记器将文本内容分成段。对于中文来说,因为涉及到语义问题,所以可以选择使用中文语法分析器。1) In the preprocessing stage, Lucene uses tokenizer to divide the text content into segments. For Chinese, because it involves semantic issues, you can choose to use a Chinese syntax analyzer.

2)在分析阶段,Lucene需要过滤掉任何标点符号和连接词语,然后,将每个词转换成大写字母。然后索引器调用函数addDocument(Doc),传递输入值给Lucene从而进行索引。处理后的数据储存在索引文件中,作为倒排文件数据存储在磁盘中。2) During the analysis phase, Lucene needs to filter out any punctuation marks and connecting words, and then convert each word into uppercase letters. The indexer then calls the function addDocument(Doc), passing the input value to Lucene for indexing. The processed data is stored in index files and on disk as inverted file data.

在经过预处理和分析阶段,这三条文本数据的关键字信息变为:After the preprocessing and analysis stage, the keyword information of these three pieces of text data becomes:

key0=I am student I come from Nanjing.key0=I am student I come from Nanjing.

key1=My father is teacher I am student.key1=My father is teacher I am student.

key2=Nanjing is my hometown my father hometown is Chengdu.key2=Nanjing is my hometown my father hometown is Chengdu.

现在就可以基于关键字信息进行对倒排索引的建立。建立索引后,通过IndexReader可以操作更新或者删除。Now you can build an inverted index based on keyword information. After the index is established, it can be updated or deleted through IndexReader.

虽然,上文中已经用一般性说明及具体实施例对本发明作了详尽的描述,但在本发明基础上,可以对之作一些修改或改进,这对本领域技术人员而言是显而易见的。因此,在不偏离本发明精神的基础上所做的这些修改或改进,均属于本发明要求保护的范围。Although the present invention has been described in detail with general descriptions and specific examples above, it is obvious to those skilled in the art that some modifications or improvements can be made on the basis of the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.

Claims (10)

1. A big data oriented multi-storage engine database system comprising:
the SQL compiler supports ANSIQL 92 and SQL 99 standards, supports ANSI SQL 2003OLAP core expansion, meets the requirements of data warehouse business on SQL, and is convenient for application smooth migration;
the storage process compiler supports complete data types, flow control, package, cursor, exception handling and dynamic SQL execution, and supports high-speed statistics, addition, deletion, modification and distributed transaction operation in the storage process, so that migration of data application from a relational database to an indicator platform is satisfied;
The transaction management unit realizes the control of consistency and isolation through a two-stage locking protocol and MVCC, and supports Serializable SnapshotIsolation isolation level, so that the transaction consistency under the concurrent condition can be ensured;
the distributed memory is stored in a column mode, and a memory or SSD-based column storage engine Holodesk is used for storing data in a column mode in the memory or SSD, and is assisted with a memory-based execution engine, so that delay caused by IO is completely avoided;
the distributed execution engine independently constructs a distributed data layer, and the calculation data is independently from the JVM memory space of the calculation engine, so that the influence of JVM GC on the system performance and stability is effectively reduced;
the data source connector is used for connecting the execution engine and various data sources, carrying out real-time statistical analysis on the data access engines of various different data sources, and not needing to lead the data into the HDFS in advance, thereby being more convenient for users to construct diversified demands for the service;
the multi-tenant management component provides complete multi-tenant management functions, including tenant resource management, tenant authority management and security control module, and facilitates the management and distribution of multiple tenants of enterprises on a unified big data platform; the configuration and management of CPU and memory resources are allowed for multiple tenants, and different tenants use different CPU and memory resource pools, so that the multiple tenants cannot interfere with each other;
The middleware management unit supports JDBC 4.0 and ODBC 3.5 standards, so that the middleware management unit can support a Hibernate/Spring middleware, is completely compatible with a Tableau/QlikView/Cognos report tool, and can be completely docked with the current data application layer of an enterprise.
2. The big data oriented multi-storage engine database system of claim 1, wherein the storage process compiler comprises a complete Optimizer including CFG optimizers, parallel Optimizer and DAG optimizers, the CFG optimizers optimizing code in the storage process to accomplish loop unrolling, redundant code elimination, optimization of function inlining.
3. The method for storing a big data oriented multi-storage engine database according to claim 1, wherein the transaction management unit supports starting a transaction with BeginTransaction, ending the transaction with commit or rollback, implementing control of consistency and isolation by two-phase blocking protocol and MVCC, supporting Serializable SnapshotIsolation isolation level, thus guaranteeing transaction consistency in case of concurrency.
4. The big data oriented multi-storage engine database system of claim 1, wherein the Holodesk supports building a distributed index for data fields, allowing a user to build OLAP-Cube for multi-field combinations and store the Cube directly on memory or SSD without additional BI tools to build Cube.
5. The big data oriented multi-storage engine database system according to claim 1, wherein the distributed execution engine is based on a cost optimizer and a rule optimizer, and 100 optimization rules are used to ensure that the SQL application can exert the maximum performance without manual modification; the distributed execution engine includes two execution modes: a low latency mode and a high throughput mode.
6. The big data oriented multi-storage engine database system of claim 1, wherein the data source connector extracts the needed data from other data sources through pre-established connection after the execution plan is started, enters the execution engine layer to participate in SQL calculation, and releases the related database connection and the corresponding resources after the calculation is completed.
7. A method of storing a big data oriented multi-storage engine database employing the big data oriented multi-storage engine database system of any of claims 1-6, comprising:
step 1, unified data storage, which is to integrate each large database system which is physically independent and manageably separated into a complete unified data storage;
step 2, unified metadata management, namely, a metadata warehouse is arranged in a logic number bin, and an RDBMS cluster for specially storing and managing metadata is used; creating a new table or a new index in each database system, synchronously creating a metadata two-dimensional mapping table in a metadata warehouse by the logic number bin, and simultaneously recording the relation between the metadata two-dimensional mapping table and the original table and/or the index, thereby laying a foundation for SQL unified access; the metadata management system stores information of all database objects, provides a query interface for other systems to search, and the information which can be queried by the search comprises physical distribution of data, distribution characteristics of the data, maximum minimum value and authority information;
Step 3, unifying the data model, uniformly mapping the data model of the multi-engine database system into a relational data two-dimensional mapping table of a relational database, and laying a theoretical foundation for metadata centralized unified management and SQL unified access;
step 4, unifying SQL analysis engines, providing unifying SQL analysis, optimization and execution services for all data systems in a logic number bin, wherein SQL sentences submitted by users are firstly received by the SQL engines, are converted into Spark codes after analysis and optimization, and then are executed by a high-performance distributed computing cluster, and calling the native APIs of each system in the execution process to realize data access;
step 5, unified security management and control, namely, based on an authentication unified system of the user and the role, the user and the role follow account and/or role RBAC models, authority management is carried out through the role, and batch authorization management is carried out on the user; supporting a security protocol Kerberos, using LDAP as an account management system, and carrying out unified security authentication on account information through Kerberos.
8. The method of claim 7, wherein the step 2 of unified metadata management further comprises providing Hive, HDFS, HBase metadata access collection; providing a UI interface for unified metadata management and an API interface in a Restful form of related Service, providing a micro-Service docking mode of each type, and storing the data of the UI foreground page data for unified metadata management by using a MySQL database table; providing a message queue and a metadata operation interface and data message bus mode of an API interface; providing a Type System with unified metadata, a Graph calculation and storage query engine layer, an intelligent label algorithm and a knowledge Graph model; and providing a public storage packaging layer of the Graph computation query engine, and supporting the Janus Graph open source Graph computation storage query engine.
9. The method for storing the big data oriented multi-storage engine database according to claim 8, wherein the step 2 unified metadata management further comprises real-time efficient indexing of heterogeneous data oriented to graphs, key values, documents and relations, and supporting numerical point attributes, numerical segment attributes, spatial positions and text mixed indexes BRPQ, including PSPQ index construction, PSPQ and keyword index combination, spatial keyword distributed query with relation attributes and Lucene-based index construction.
10. The method for storing big data oriented multi-storage engine database according to claim 7, wherein the unified security management architecture in step 5 is divided into 4 layers: the system layer uses an improved Apache DS, so that the read-write efficiency is improved by more than 10 times, the same set of users and a unified LDAP/Kerberos authentication mode are used, the use of Kerberos authentication by OpenLDAP is avoided, and the LDAP authentication efficiency is accelerated; the service layer realizes complete ARBAC model support, and provides functional support of REST API, user-friendly Web UI and password strategy; the plug-in layer provides authentication, authorization, group mapping and quota management for each component by using a plug-in form, so that each component uses a unified user, group and authority management model; the service layer is in butt joint with the PaaS and SaaS services of various platforms, and is protected by unified safety control.
CN202310883974.8A 2023-07-19 2023-07-19 A storage method for multi-storage engine database for big data Active CN117112691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310883974.8A CN117112691B (en) 2023-07-19 2023-07-19 A storage method for multi-storage engine database for big data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310883974.8A CN117112691B (en) 2023-07-19 2023-07-19 A storage method for multi-storage engine database for big data

Publications (2)

Publication Number Publication Date
CN117112691A true CN117112691A (en) 2023-11-24
CN117112691B CN117112691B (en) 2025-02-14

Family

ID=88801026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310883974.8A Active CN117112691B (en) 2023-07-19 2023-07-19 A storage method for multi-storage engine database for big data

Country Status (1)

Country Link
CN (1) CN117112691B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632035A (en) * 2023-12-13 2024-03-01 中国电子投资控股有限公司 Data storage method, system, storage medium and computer equipment
CN117891895A (en) * 2024-03-15 2024-04-16 创云融达信息技术(北京)有限公司 Method, system and equipment for managing unstructured data in data center platform
CN118152362A (en) * 2024-01-17 2024-06-07 宁波霍德智能科技有限公司 Data management method and device
CN119088806A (en) * 2024-09-19 2024-12-06 北京市市政工程研究院 A method for constructing a standardized database for tunnel structure monitoring and detection data
CN120353823A (en) * 2025-06-25 2025-07-22 瀚高基础软件股份有限公司 Method, system and medium for realizing package function based on PostgreSQL database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149750A (en) * 2007-10-29 2008-03-26 浙江大学 A Method of Data Resource Integration Based on Metadata
US20100088685A1 (en) * 2008-10-06 2010-04-08 Microsoft Corporation System and method for mapping a domain modeling language to a relational store
US20200272638A1 (en) * 2019-02-22 2020-08-27 Snowflake Inc Multi-level metadata in database systems
CN115658679A (en) * 2022-09-09 2023-01-31 江苏新蝶数字科技有限公司 A Realization Method of Unified Data Access Model

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149750A (en) * 2007-10-29 2008-03-26 浙江大学 A Method of Data Resource Integration Based on Metadata
US20100088685A1 (en) * 2008-10-06 2010-04-08 Microsoft Corporation System and method for mapping a domain modeling language to a relational store
US20200272638A1 (en) * 2019-02-22 2020-08-27 Snowflake Inc Multi-level metadata in database systems
CN115658679A (en) * 2022-09-09 2023-01-31 江苏新蝶数字科技有限公司 A Realization Method of Unified Data Access Model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YUNQUAN ZHANG: "parallel processing systems for big data:a survey", IEEE, 19 August 2016 (2016-08-19) *
刘汪根;孙元浩;: "大数据3.0――后Hadoop时代大数据的核心技术", 数据与计算发展前沿, no. 05, 15 October 2019 (2019-10-15) *
龚博雅: "面向地面相控阵雷达数据流的传输和存储系统的设计与实现", 中国知网优秀硕士学位论文全文数据库信息科技辑, 15 July 2023 (2023-07-15) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632035A (en) * 2023-12-13 2024-03-01 中国电子投资控股有限公司 Data storage method, system, storage medium and computer equipment
CN117632035B (en) * 2023-12-13 2024-06-04 中国电子投资控股有限公司 Data storage method, system, storage medium and computer equipment
CN118152362A (en) * 2024-01-17 2024-06-07 宁波霍德智能科技有限公司 Data management method and device
CN118152362B (en) * 2024-01-17 2024-10-29 宁波霍德智能科技有限公司 Data management method and device
CN117891895A (en) * 2024-03-15 2024-04-16 创云融达信息技术(北京)有限公司 Method, system and equipment for managing unstructured data in data center platform
CN117891895B (en) * 2024-03-15 2024-07-05 创云融达信息技术(北京)有限公司 Method, system and equipment for managing unstructured data in data center platform
CN119088806A (en) * 2024-09-19 2024-12-06 北京市市政工程研究院 A method for constructing a standardized database for tunnel structure monitoring and detection data
CN120353823A (en) * 2025-06-25 2025-07-22 瀚高基础软件股份有限公司 Method, system and medium for realizing package function based on PostgreSQL database

Also Published As

Publication number Publication date
CN117112691B (en) 2025-02-14

Similar Documents

Publication Publication Date Title
Panda Relational, NoSQL, and Artificial Intelligence-Integrated Database Architectures: Foundations, Cloud Platforms, and Regulatory-Compliant Systems
US12339844B2 (en) Self-service data platform
Besta et al. Demystifying graph databases: Analysis and taxonomy of data organization, system designs, and graph queries
CN117112691B (en) A storage method for multi-storage engine database for big data
Gupta et al. NoSQL databases: Critical analysis and comparison
Tao et al. Minimal mapreduce algorithms
US10318491B1 (en) Object metadata query with distributed processing systems
Kvet et al. The complexity of the data retrieval process using the proposed index extension
Kleppmann Designing data-intensive applications
Yang et al. F1 Lightning: HTAP as a Service
US20140172794A1 (en) Replication Mechanisms for Database Environments
US20140172905A1 (en) Performing a function on rows of data determined from transitive relationships between columns
Borkar et al. Have your data and query it too: From key-value caching to big data management
US12174845B1 (en) Analytic query processing using a backup of a database
Caldarola et al. Big data: A survey-the new paradigms, methodologies and tools
Luo et al. From batch processing to real time analytics: Running presto® at scale
CN114925086A (en) Self-Service Data Platform
Jianmin et al. An improved join‐free snowflake schema for ETL and OLAP of data warehouse
Eldawy et al. Sphinx: empowering impala for efficient execution of SQL queries on big spatial data
US11803568B1 (en) Replicating changes from a database to a destination and modifying replication capacity
Böhm et al. Operational analytics data management systems
US10997160B1 (en) Streaming committed transaction updates to a data store
Chandra et al. Unity catalog: Open and universal governance for the lakehouse and beyond
Feuerlicht Database Trends and Directions: Current Challenges and Opportunities.
US12450229B1 (en) Providing query units to support external analytics queries to a backup of a database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Yue Lijun

Inventor after: Chen Danying

Inventor after: Xie Dexiao

Inventor after: Zhang Xinjian

Inventor after: Zhou Wanning

Inventor after: Qu Feng

Inventor after: Liu Jingtao

Inventor after: Zou Yu

Inventor after: Liu Chao

Inventor after: Su Si

Inventor after: Wang Yi

Inventor after: Yang Chun

Inventor before: Yue Lijun

Inventor before: Chen Danying

Inventor before: Xie Dexiao

Inventor before: Zhang Xinjian

Inventor before: Zhou Wanning

Inventor before: Jie Feng

Inventor before: Liu Jingtao

Inventor before: Zou Yu

Inventor before: Liu Chao

Inventor before: Su Si

Inventor before: Wang Yi

Inventor before: Yang Chun