CN102354277A - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN102354277A
CN102354277A CN201110280416XA CN201110280416A CN102354277A CN 102354277 A CN102354277 A CN 102354277A CN 201110280416X A CN201110280416X A CN 201110280416XA CN 201110280416 A CN201110280416 A CN 201110280416A CN 102354277 A CN102354277 A CN 102354277A
Authority
CN
China
Prior art keywords
data
layer
information table
summary information
storage controller
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
CN201110280416XA
Other languages
Chinese (zh)
Other versions
CN102354277B (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.)
China Minsheng Banking Corp Ltd
Original Assignee
China Minsheng Banking Corp Ltd
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 China Minsheng Banking Corp Ltd filed Critical China Minsheng Banking Corp Ltd
Priority to CN201110280416.XA priority Critical patent/CN102354277B/en
Publication of CN102354277A publication Critical patent/CN102354277A/en
Application granted granted Critical
Publication of CN102354277B publication Critical patent/CN102354277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data storage method and device. The data storage method comprises that: a storage controller of the data storage device acquires a data storage command; the storage controller controls an infrastructure layer of the data storage device to store infrastructure data; the storage controller controls an intermediate layer of the data storage device to extract intermediate data corresponding to at least one application from the infrastructure data of the infrastructure layer and store the intermediate data into an intermediate summary information table; and the storage controller controls an application layer of the data storage device to extract the universal summary data of the application from the intermediate data of the intermediate layer, store the universal summary data into a universal summary information table, extract the data mart data of the application from the intermediate data and universal summary information table of the intermediate layer and store the data mart data into at least one application data mart. By the data storage method and device provided by the invention, data access efficiency can be improved.

Description

数据存储方法和装置Data storage method and device

技术领域 technical field

本发明实施例涉及数据存储技术,尤其涉及一种数据存储方法和装置。Embodiments of the present invention relate to data storage technologies, and in particular, to a data storage method and device.

背景技术 Background technique

目前,采用金融服务逻辑数据模型(Finance Serve Logic DataModel,简称FS-LDM)的数据仓库的数据存储技术在银行业具有广泛应用。该采用FS-LDM的数据仓库的数据存储技术独立于任何物理数据库平台,因此具有广适性。At present, the data storage technology of the data warehouse using the Financial Service Logic Data Model (FS-LDM) is widely used in the banking industry. The data storage technology of the data warehouse using FS-LDM is independent of any physical database platform, so it has wide applicability.

FS-LDM的数据仓库采用二层架构,相应地,基于该FS-LDM的数据仓库的数据存储装置也采用二层架构,即,该数据存储装置包括基础层和汇总层。其中,基础层严格遵循标准的第三范式。具体地,在采用第三范式的基础层中:源业务系统表的一笔记录需要分拆到几张目标表中存储,业务数据零散拆分;父类表囊括所有子类业务的共性信息,使得涵盖子类较多的父类表的数据量极其庞大,子类业务数据的完整存取需要用子表关联庞大的父类表;对于任意两实体之间的各种关系都记录到关联实体中,用关系种类来区分不同的关系类型,关系表非常庞大。在现有的基于FS-LDM的数据仓库的数据存储装置中,在基础层之上是汇总层。汇总层存储面向各个应用的衍生数据,对于不同应用的共性部分,在汇总层对基础层数据进行重复汇总。The data warehouse of the FS-LDM adopts a two-tier architecture, and correspondingly, the data storage device based on the FS-LDM data warehouse also adopts a two-tier architecture, that is, the data storage device includes a base layer and a summary layer. Among them, the base layer strictly follows the standard third normal form. Specifically, in the base layer using the third normal form: a record in the source business system table needs to be split into several target tables for storage, and the business data is scattered and split; the parent table includes the common information of all sub-type businesses, The amount of data in the parent table covering many subclasses is extremely large, and the complete access of subclass business data needs to be associated with the huge parent table with the subtable; all kinds of relationships between any two entities are recorded in the associated entity In , the relationship type is used to distinguish different relationship types, and the relationship table is very large. In the existing data storage device of the data warehouse based on FS-LDM, the summarization layer is above the base layer. The summary layer stores the derived data for each application. For the common parts of different applications, the summary layer repeatedly summarizes the basic layer data.

总之,根据现有的数据存储装置的上述特点,采用该数据存储装置,数据存取操作的响应速度慢、效率低。In a word, according to the above-mentioned characteristics of the existing data storage device, the data storage device adopts the data storage device, and the response speed of the data access operation is slow and the efficiency is low.

发明内容Contents of the invention

本发明实施例提供一种数据存储方法,用以解决现有技术中的缺陷,提高数据存取效率。An embodiment of the present invention provides a data storage method, which is used to solve defects in the prior art and improve data access efficiency.

本发明实施例还提供一种数据存储装置,用以解决现有技术中的缺陷,提高数据存取效率。The embodiment of the present invention also provides a data storage device, which is used to solve the defects in the prior art and improve data access efficiency.

本发明实施例提供一种数据存储方法,包括:An embodiment of the present invention provides a data storage method, including:

数据存储装置的存储控制器获取数据存储命令;The storage controller of the data storage device obtains the data storage command;

所述存储控制器控制数据存储装置的基础层存储基础数据;The storage controller controls the base layer of the data storage device to store basic data;

所述存储控制器控制数据存储装置的中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表;The storage controller controls the middle layer of the data storage device to extract at least one intermediate data corresponding to the application from the basic data of the basic layer and store it in an intermediate summary information table;

所述存储控制器控制数据存储装置的应用层从所述中间层的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从所述中间层的中间数据和所述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。The storage controller controls the application layer of the data storage device to extract the general summary data of the application from the intermediate data of the middle layer and store it in the general summary information table, from the intermediate data of the middle layer and the general summary information table The data mart data of the application is extracted from and stored in at least one application data mart.

如上所述的方法,其中,所述存储控制器控制数据存储装置的基础层存储基础数据包括:The method as described above, wherein the storage controller controlling the basic layer of the data storage device to store basic data includes:

所述存储控制器控制协议信息表存储至少一种协议号和协议种类代码;所述存储控制器控制作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码;所述存储控制器控制作为类型信息表的子表的至少一个数据表存储对应协议的数据;The storage controller controls the protocol information table to store at least one protocol number and protocol type code; the storage controller controls at least one type information table as a sub-table of the protocol information table to store the corresponding type of protocol number and protocol type code; The storage controller controls at least one data table as a sub-table of the type information table to store data corresponding to the protocol;

和/或,所述存储控制器控制属性历史表根据协议类型,分类存储至少一个协议的属性信息。And/or, the storage controller controls the attribute history table to classify and store the attribute information of at least one protocol according to the protocol type.

如上所述的方法,其中,所述存储控制器控制数据存储装置的中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表包括:In the above method, wherein the storage controller controls the middle layer of the data storage device to extract at least one intermediate data corresponding to the application from the basic data of the basic layer and store the intermediate data in the intermediate summary information table comprising:

所述存储控制器控制所述中间层从所述基础层的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表;The storage controller controls the middle layer to extract the data corresponding to the account-level summary information from the basic data of the base layer and store it in the account-level summary information table;

和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the voucher-level summary information from the basic data of the base layer and store it in the voucher summary information table;

和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the IOU level summary information from the basic data of the base layer and store it in the IOU summary information table;

和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer and store it in the customer deposit summary information table;

和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。And/or, the storage controller controls the middle layer to extract data corresponding to customer loan level summary information from the basic data of the base layer and store it in the customer loan summary information table.

如上所述的方法,其中,所述存储控制器控制所述数据存储装置的中间层将所述中间数据存储到中间汇总信息表包括:The method as described above, wherein the storage controller controlling the intermediate layer of the data storage device to store the intermediate data in the intermediate summary information table includes:

采用添加前缀的基础层的数据表的主键作为所述中间汇总信息表的主键,或,采用基础层的数据表的主键和预设的补充字段组成所述中间汇总信息表的主键;Using the primary key of the data table of the base layer with the prefix added as the primary key of the intermediate summary information table, or using the primary key of the data table of the base layer and preset supplementary fields to form the primary key of the intermediate summary information table;

和/或,根据至少一个基础层的数据表中的共性字段的类型,确定所述中间汇总信息表的该共性字段的类型,当至少一个基础层的数据表中的共性字段的类型不同时,所述中间汇总信息表的该共性字段的类型为可变类型;And/or, according to the type of the common field in the data table of at least one base layer, determine the type of the common field in the intermediate summary information table, when the types of the common field in the data table of at least one base layer are different, The type of the common field of the intermediate summary information table is a variable type;

和/或,采用基础层的数据表的币种字段与值类型代码字段的组合作为所述中间汇总信息表的主键,将基础层的数据表中不同币种的数据转换为指定币种并存储到所述中间汇总信息表;And/or, using the combination of the currency field and the value type code field of the data table of the basic layer as the primary key of the intermediate summary information table, converting the data of different currencies in the data table of the basic layer into the specified currency and storing to said intermediate summary information table;

和/或,根据所述基础数据计算衍生属性的数据并存储到所述中间汇总信息表;And/or, calculate derived attribute data according to the basic data and store it in the intermediate summary information table;

和/或,向所述中间汇总信息表存储预设时间周期内的所述中间数据。And/or, storing the intermediate data within a preset time period in the intermediate summary information table.

如上所述的方法,其中,所述存储控制器控制数据存储装置的应用层从所述中间层的中间数据中提取应用的通用汇总数据之后还包括:所述存储控制器控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的通用汇总数据;The method as described above, wherein after the storage controller controls the application layer of the data storage device to extract the general summary data of the application from the intermediate data of the intermediate layer, it further includes: the storage controller controls the data storage device The application layer extracts the general summary data of the application from the basic data of the basic layer;

所述存储控制器控制数据存储装置的应用层从所述中间层的中间数据和所述通用汇总信息表中提取应用数据集市数据之后还包括:所述存储控制器控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的数据集市数据。After the storage controller controls the application layer of the data storage device to extract the application data mart data from the intermediate data of the middle layer and the general summary information table, the method further includes: the storage controller controls the data storage device The application layer extracts the data mart data of the application from the basic data of the base layer.

本发明实施例还提供一种数据存储装置,包括:存储控制器、基础层、中间层和应用层;The embodiment of the present invention also provides a data storage device, including: a storage controller, a base layer, an intermediate layer, and an application layer;

存储控制器获取数据存储命令,控制基础层存储基础数据,控制中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表,控制应用层从所述中间层的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从所述中间层的中间数据和所述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。The storage controller acquires data storage commands, controls the base layer to store basic data, controls the middle layer to extract at least one intermediate data corresponding to an application from the basic data of the base layer and stores it in an intermediate summary information table, and controls the application layer to store the intermediate data from the intermediate data. The general summary data of the application is extracted from the intermediate data of the middle layer and stored in the general summary information table, and the data mart data of the application is extracted from the intermediate data of the intermediate layer and the general summary information table and stored in at least one application data set city.

如上所述的数据存储装置,其中,所述基础层具体用于根据所述存储控制器的控制,在协议信息表存储至少一种协议号和协议种类代码,在作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码,在作为类型信息表的子表的至少一个数据表存储对应协议的数据;In the above-mentioned data storage device, wherein, the base layer is specifically used to store at least one protocol number and protocol type code in the protocol information table according to the control of the storage controller, and store at least one protocol number and protocol type code in the protocol information table as a sub-table of the protocol information table. At least one type information table stores the protocol number and the protocol type code of the corresponding type, and stores the data of the corresponding protocol in at least one data table as a sub-table of the type information table;

和/或,所述基础层具体用于根据所述存储控制器的控制,在属性历史表根据协议类型分类存储至少一个协议的属性信息。And/or, the base layer is specifically configured to, according to the control of the storage controller, classify and store at least one protocol attribute information in the attribute history table according to the protocol type.

如上所述的数据存储装置,其中,The data storage device as described above, wherein,

所述中间层具体用于根据所述存储控制器的控制从所述基础层的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表;The middle layer is specifically configured to extract the data corresponding to the account-level summary information from the basic data of the base layer according to the control of the storage controller and store it in the account-level summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表;And/or, the intermediate layer is specifically configured to, according to the control of the storage controller, extract the data corresponding to the voucher-level summary information from the basic data of the basic layer and store it in the voucher summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表;And/or, the intermediate layer is specifically configured to extract the data corresponding to the IOU level summary information from the basic data of the basic layer according to the control of the storage controller and store it in the IOU summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表;And/or, the middle layer is specifically configured to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer according to the control of the storage controller and store it in the customer deposit summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。And/or, the middle layer is specifically configured to, according to the control of the storage controller, extract data corresponding to customer loan level summary information from the basic data of the base layer and store it in the customer loan summary information table.

如上所述的数据存储装置,其中,The data storage device as described above, wherein,

所述中间层具体用于根据所述存储控制器的控制,采用添加前缀的基础层的数据表的主键作为所述中间汇总信息表的主键,或,采用基础层的数据表的主键和预设的补充字段组成所述中间汇总信息表的主键;The intermediate layer is specifically configured to use the primary key of the data table of the base layer with the prefix added as the primary key of the intermediate summary information table according to the control of the storage controller, or use the primary key of the data table of the basic layer and the preset The supplementary fields of constitute the primary key of the intermediate summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,根据至少一个基础层的数据表中的共性字段的类型,确定所述中间汇总信息表的该共性字段的类型,当至少一个基础层的数据表中的共性字段的类型不同时,所述中间汇总信息表的该共性字段的类型为可变类型;And/or, the intermediate layer is specifically configured to determine the type of the common field in the intermediate summary information table according to the type of the common field in the data table of at least one base layer according to the control of the storage controller, when When the types of the common fields in the data tables of at least one base layer are different, the type of the common fields in the intermediate summary information table is a variable type;

和/或,所述中间层具体用于根据所述存储控制器的控制,采用基础层的数据表的币种字段与值类型代码字段的组合作为所述中间汇总信息表的主键,将基础层的数据表中不同币种的数据转换为指定币种并存储到所述中间汇总信息表;And/or, the intermediate layer is specifically configured to use the combination of the currency field and the value type code field of the data table of the basic layer as the primary key of the intermediate summary information table according to the control of the storage controller, and convert the basic layer The data in different currencies in the data table is converted into the specified currency and stored in the intermediate summary information table;

和/或,所述中间层具体用于根据所述存储控制器的控制,根据所述基础数据计算衍生属性的数据并存储到所述中间汇总信息表;And/or, the intermediate layer is specifically configured to calculate derived attribute data according to the basic data and store it in the intermediate summary information table according to the control of the storage controller;

和/或,所述中间层具体用于根据所述存储控制器的控制,向所述中间汇总信息表存储预设时间周期内的所述中间数据。And/or, the intermediate layer is specifically configured to store the intermediate data within a preset time period in the intermediate summary information table according to the control of the storage controller.

如上所述的数据存储装置,其中,The data storage device as described above, wherein,

所述存储控制器还用于控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的通用汇总数据和数据集市数据;The storage controller is also used to control the application layer of the data storage device to extract the general summary data and data mart data of the application from the basic data of the basic layer;

所述数据存储装置的应用层还用于根据所述存储控制器的控制,从所述基础层的基础数据中提取应用的通用汇总数据和数据集市数据。The application layer of the data storage device is also used to extract the general summary data and data mart data of the application from the basic data of the basic layer according to the control of the storage controller.

由上述技术方案可知,本发明实施例通过在数据存储装置中增加中间层,存储控制器控制该中间层从基础层中提取基础数据并汇总成中间数据,将中间数据存储到中间层。存储控制器控制应用层从中间层存储的数据中提取数据。由于在中间层对基础层的数据进行初步的汇总,应用层能够从中间层的存储表格中获取数据,而不必逐一查找基础层的大量的存储表格,并且避免了现有的二层架构的技术方案中应用层对基础层数据的重复汇总,从而提高了数据存取操作的效率。It can be seen from the above technical solutions that in the embodiment of the present invention, an intermediate layer is added to the data storage device, and the storage controller controls the intermediate layer to extract basic data from the base layer and summarize them into intermediate data, and store the intermediate data in the intermediate layer. The storage controller controls the application layer to extract data from the data stored in the middle layer. Due to the preliminary summary of the data in the base layer in the middle layer, the application layer can obtain data from the storage tables in the middle layer without having to search for a large number of storage tables in the base layer one by one, and avoid the existing two-tier architecture technology In the scheme, the application layer repeatedly summarizes the data of the base layer, thereby improving the efficiency of data access operations.

附图说明 Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例一的数据存储方法的流程图;FIG. 1 is a flowchart of a data storage method according to Embodiment 1 of the present invention;

图2为本发明实施例二的数据存储装置的结构示意图。FIG. 2 is a schematic structural diagram of a data storage device according to Embodiment 2 of the present invention.

具体实施方式 Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

图1为本发明实施例一的数据存储方法的流程图。如图1所示,该方法包括如下过程。FIG. 1 is a flowchart of a data storage method according to Embodiment 1 of the present invention. As shown in Figure 1, the method includes the following processes.

步骤101:数据存储装置的存储控制器获取数据存储命令。Step 101: A storage controller of a data storage device acquires a data storage command.

步骤102:存储控制器控制数据存储装置的基础层存储基础数据。Step 102: the storage controller controls the base layer of the data storage device to store basic data.

步骤103:存储控制器控制数据存储装置的中间层从基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表。Step 103: the storage controller controls the middle layer of the data storage device to extract at least one intermediate data corresponding to the application from the basic data of the basic layer and store it in the intermediate summary information table.

步骤104:存储控制器控制数据存储装置的应用层从中间层的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从中间层的中间数据和通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。Step 104: the storage controller controls the application layer of the data storage device to extract the general summary data of the application from the intermediate data of the middle layer and store it in the general summary information table, and extract the application data from the intermediate data of the middle layer and the general summary information table Mart data and store in at least one application data mart.

在本发明实施例一中,在数据存储过程中增加了中间层存储过程。在将基础数据存储到基础层之后,从基础层中提取应用对应的中间数据存储到中间层,应用层存储的数据是从中间层存储的数据中提取而来的。由于在基础层与应用层之间增加了中间层,在中间层对基础层的数据进行初步的汇总,从而增强了数据粒度的层次化。应用层的存储表格与对数据进行初步汇总的中间层的存储表格相关联,减少了与繁多的基础层的存储表格的关联。在读取数据时,应用层能够从中间层的存储表格中获取数据,而不必像现有技术那样逐一查找基础层的大量的存储表格,并且通过中间层的初步汇总,避免了现有的二层架构的技术方案中应用层对基础层数据的重复汇总,从而提高了数据存取操作的效率。In Embodiment 1 of the present invention, an intermediate layer storage process is added to the data storage process. After the basic data is stored in the base layer, the intermediate data corresponding to the application is extracted from the base layer and stored in the middle layer, and the data stored in the application layer is extracted from the data stored in the middle layer. Since the middle layer is added between the base layer and the application layer, the data of the base layer is initially summarized in the middle layer, thereby enhancing the hierarchical level of data granularity. The storage table of the application layer is associated with the storage table of the middle layer for the preliminary summary of data, reducing the association with various storage tables of the basic layer. When reading data, the application layer can obtain data from the storage table of the middle layer, without having to look up a large number of storage tables of the base layer one by one like the existing technology, and through the preliminary summary of the middle layer, the existing binary data is avoided. In the technical solution of layer architecture, the application layer repeatedly summarizes the data of the base layer, thereby improving the efficiency of data access operations.

在上述技术方案的基础上,具体地,步骤101中,使用数据存储装置的用户通过客户端向数据存储装置的存储控制器发送数据存储命令,该数据存储命令中包括待存储的基础数据。在步骤104之后,还可以包括步骤105:存储控制器返回数据存储完成消息。具体地,存储控制器向用户的客户端返回数据存储完成消息。On the basis of the above technical solution, specifically, in step 101, the user using the data storage device sends a data storage command to the storage controller of the data storage device through the client, and the data storage command includes basic data to be stored. After step 104, step 105 may also be included: the storage controller returns a data storage completion message. Specifically, the storage controller returns a data storage completion message to the client of the user.

在上述技术方案的基础上,进一步地,在上述步骤103中,存储控制器还可以控制数据存储装置的应用层从基础层的基础数据中提取应用的通用汇总数据,并且,存储控制器还可以控制数据存储装置的应用层从基础层的基础数据中提取应用的数据集市数据。具体地,数据存储装置的应用层可细分为两部分,即:通用汇总部分和数据集市部分,步骤103的具体过程包括:第一步,存储控制器控制数据存储装置的应用层的通用汇总部分从中间层的中间数据和基础层的基础数据中提取应用的通用汇总数据并存储到至少一个应用汇总信息表;第二步,存储控制器控制数据存储装置的应用层的数据集市部分从上述应用汇总信息表、中间层的中间数据和基础层的基础数据中提取应用的数据集市数据并存储到至少一个应用数据集市表。其中,在第一步中,通用汇总部分优先从中间层的中间数据中提取所需的通用汇总数据,如果中间层的中间数据无法满足通用汇总数据的需要,通用汇总部分再从基础层的基础数据中进行提取。在第二步中,数据集市部分优先从通用汇总信息表和中间层的中间数据中提取所需的数据集市数据,如果通用汇总信息表和中间层的中间数据均无法满足数据集市数据的需要,数据集市部分再从基础层的基础数据中进行提取。此步骤通过从中间层和基础层共同提取应用层的数据,增加了数据存储的灵活性。On the basis of the above technical solution, further, in the above step 103, the storage controller can also control the application layer of the data storage device to extract the general summary data of the application from the basic data of the basic layer, and the storage controller can also The application layer controlling the data storage device extracts the data mart data of the application from the basic data of the base layer. Specifically, the application layer of the data storage device can be subdivided into two parts, namely: the general summary part and the data mart part. The specific process of step 103 includes: the first step, the storage controller controls the general application layer of the data storage device The summary part extracts general summary data of the application from the intermediate data of the middle layer and the basic data of the base layer and stores it in at least one application summary information table; in the second step, the storage controller controls the data mart part of the application layer of the data storage device The application data mart data is extracted from the application summary information table, the intermediate data of the middle layer and the basic data of the base layer and stored in at least one application data mart table. Among them, in the first step, the general summary part first extracts the required general summary data from the intermediate data in the middle layer. Extract from the data. In the second step, the data mart part preferentially extracts the required data mart data from the general summary information table and the intermediate data of the middle layer, if neither the general summary information table nor the intermediate data of the middle layer can satisfy the data mart data According to the needs, the data mart part is extracted from the basic data of the basic layer. This step increases the flexibility of data storage by jointly extracting the data of the application layer from the middle layer and the base layer.

以下分别通过具体实例,对在存储控制器的控制下,基础层、中间层、应用层的存储过程进行详细介绍。The following describes in detail the storage processes of the base layer, the middle layer, and the application layer under the control of the storage controller through specific examples.

基础层base layer

在上述步骤101中,在存储控制器的控制下,数据存储装置的基础层存储基础数据时,对于协议主题的存储,采用如下处理方式:首先,存储控制器控制协议信息表存储至少一种协议号和协议种类代码;然后,存储控制器控制作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码;最后,存储控制器控制作为类型信息表的子表的至少一个数据表存储对应协议的数据。In the above step 101, under the control of the storage controller, when the base layer of the data storage device stores the basic data, the following processing method is adopted for the storage of the protocol subject: first, the storage controller controls the protocol information table to store at least one protocol number and protocol type code; then, the storage controller controls at least one type information table as a sub-table of the protocol information table to store the protocol number and the protocol type code of the corresponding type; finally, the storage controller controls as the sub-table of the type information table At least one data table stores data corresponding to the protocol.

以下通过一个具体实施例介绍本发明提出的基础层在存储控制器的控制下的存储方法。基础层涵盖了业务系统的基础数据,例如,基础层可以包括以下系统的数据:核心系统、个贷系统、对公风险系统、网银系统、基金系统、三方存管系统、票据系统、国际结算系统、外汇买卖系统、贷记卡系统、大额支付系统、小额支付系统等。在本发明提出的数据存储方法中,根据业务需求以及数据的查询和使用频率,对基础层的数据存储按照协议对应的业务特点和业务逻辑进行分类。协议是金融机构与客户之间针对某种特定产品或服务而签立的契约关系,一个协议的数据内容可以包括:银行的存款账户、贷款账户、内部账户、贷款借据、合同、保险公司的保单等。以源业务系统为例,表1为源业务系统中各种协议的数据表。参见表1,该源业务系统包括但不限于表1中记载的协议,具体的,各个协议的数据内容如表1中。The following describes the method for storing the base layer under the control of the storage controller proposed by the present invention through a specific embodiment. The basic layer covers the basic data of the business system. For example, the basic layer can include the data of the following systems: core system, personal loan system, corporate risk system, online banking system, fund system, tripartite depository system, bill system, international settlement system , foreign exchange trading system, credit card system, large payment system, small payment system, etc. In the data storage method proposed by the present invention, the data storage of the base layer is classified according to the business characteristics and business logic corresponding to the protocol according to business requirements and data query and usage frequency. An agreement is a contractual relationship signed between a financial institution and a customer for a specific product or service. The data content of an agreement can include: bank deposit accounts, loan accounts, internal accounts, loan notes, contracts, insurance policies of insurance companies wait. Taking the source business system as an example, Table 1 is the data table of various protocols in the source business system. Referring to Table 1, the source business system includes but is not limited to the protocols recorded in Table 1. Specifically, the data content of each protocol is shown in Table 1.

表1为源业务系统中各种协议的数据表Table 1 is the data table of various protocols in the source business system

Figure BDA0000092711870000091
Figure BDA0000092711870000091

在本发明实施例中,针对上述各种协议,根据业务特点的不同,对上述协议进行分类,根据分类存储各个协议的数据。例如,在表1记载的各种协议中:存款账户协议、贷款账户协议和内部账户协议均属于账户类协议;个人贷款借据协议和对公贷款借据协议均数据借据类协议。在基础层存储的表格中,包括协议信息表、类型信息表和数据表,其中,协议信息表作为超级父表,协议信息表下属至少一个类型信息表,类型信息表作为协议信息表的子表。类型信息表作为父表,类型信息表下属至少一个数据表,数据表作为类型信息表的子表。其中,协议信息表存储至少一种协议号和协议种类代码。类型信息表存储对应类型的协议号和协议种类代码。根据表1记载的各种协议,类型信息表可以分为账户类信息表和借据类信息表,账户类信息表中存储账户类协议的协议号和协议种类代码,借据类信息表中存储借据类协议的协议号和协议种类代码。数据表存储对应协议的数据。根据表1记载的各种协议,账户类信息表下属的数据表可以包括存款账户数据表、贷款账户数据表和内部账户数据表等等。借据类合约信息表下属的数据表可以包括个人贷款借据数据表、对公贷款借据数据表等等。其中,各个数据表存储各自对应的协议的相关数据。以存款账户数据表为例,存款账户数据表中存储存款账户协议的协议号、协议种类代码、机构号、协议状态代码、币种、协议开始日期、协议终止日期、利率、科目代码、钞汇标志、存款余额、最后财务交易日和客户经理等数据。进一步地,对于不便分类的协议,例如表1中记载的卡和合同等协议,其对应的卡数据表和合同数据表可以直接作为协议信息表的子表。In the embodiment of the present invention, for the above-mentioned various protocols, the above-mentioned protocols are classified according to different service characteristics, and the data of each protocol is stored according to the classification. For example, among the various agreements recorded in Table 1: deposit account agreements, loan account agreements, and internal account agreements are all account agreements; personal loan IOU agreements and corporate loan IOU agreements are all data IOU agreements. The tables stored in the base layer include a protocol information table, a type information table and a data table, wherein the protocol information table is used as a super parent table, and at least one type information table is subordinate to the protocol information table, and the type information table is used as a child table of the protocol information table . The type information table serves as a parent table, the type information table has at least one data table under it, and the data table serves as a child table of the type information table. Wherein, the protocol information table stores at least one protocol number and protocol type code. The type information table stores the protocol number and protocol type code of the corresponding type. According to various agreements recorded in Table 1, the type information table can be divided into account information table and IOU information table. The account information table stores the agreement number and agreement type code of the account agreement, and the IOU information table stores the IOU information table. Protocol number and protocol type code of the protocol. The data table stores the data corresponding to the protocol. According to the various agreements recorded in Table 1, the data tables under the account information table may include deposit account data tables, loan account data tables, internal account data tables, and so on. The data tables under the IOU contract information table can include personal loan IOU data tables, corporate loan IOU data tables, and so on. Wherein, each data table stores the relevant data of the corresponding protocol. Taking the deposit account data table as an example, the deposit account data table stores the agreement number, agreement type code, institution number, agreement status code, currency, agreement start date, agreement termination date, interest rate, account code, bank remittance Data such as logo, deposit balance, last financial transaction date and account manager. Furthermore, for agreements that are inconvenient to be classified, such as the cards and contracts recorded in Table 1, the corresponding card data table and contract data table can be directly used as sub-tables of the agreement information table.

一种较佳的实施方式是,在实际应用中,上述作为超级父表的协议信息表表和作为父表的类型信息表都只是逻辑表,实际未物理化。A preferred implementation manner is that, in practical applications, the above-mentioned protocol information table as a super parent table and the type information table as a parent table are only logical tables, and are not actually physicalized.

在上述技术方案中,在存储基础层的基础数据时,通过根据业务特点对协议进行分类,对不同协议对应的数据分类存储,从而便于读取数据时根据分类快速准确地获取所需数据,提高了数据存取效率。In the above technical solution, when storing the basic data of the basic layer, the protocols are classified according to the business characteristics, and the data corresponding to different protocols are classified and stored, so that it is convenient to quickly and accurately obtain the required data according to the classification when reading the data, and improve improved data access efficiency.

在上述步骤101中,在存储控制器的控制下,数据存储装置的基础层存储基础数据时,对于属性历史表的存储,采用如下处理方式:存储控制器控制属性历史表根据协议类型,分类存储至少一个协议的属性信息。通过将不同协议类型的属性分类存放,针对某一类协议的数据的存取操作只涉及该协议对应的属性历史表。与现有基础层不区分协议类型而将各个协议属性均直接存储到协议主表的属性历史表集中相比,本发明实施例的上述分类存储协议属性的方法能够显著提高数据存取过程中用户访问定位的效率。In the above step 101, under the control of the storage controller, when the base layer of the data storage device stores the basic data, the following processing method is adopted for the storage of the attribute history table: the storage controller controls the attribute history table according to the protocol type, and classifies and stores Attribute information of at least one protocol. By classifying and storing the attributes of different protocol types, the data access operation for a certain type of protocol only involves the corresponding attribute history table of the protocol. Compared with the existing basic layer that does not distinguish the protocol type and directly stores each protocol attribute in the attribute history table set of the protocol master table, the above-mentioned method for classifying and storing protocol attributes in the embodiment of the present invention can significantly improve the data access process of the user. Efficiency of access location.

中间层middle layer

在本发明实施例的数据存储方法中,在基础层和应用层之间增加了中间层。In the data storage method of the embodiment of the present invention, an intermediate layer is added between the base layer and the application layer.

在实际应用中,利用基础层存储的数据,实际业务需要实现多种应用,例如,可以包括但不限于以下应用:客户单一视图、客户关系管理、利润贡献度分析、客户积分管理、零售客户经理考核、财务总账报表等。这些应用涉及的数据都来源于基础层存储的基础数据,并需要根据应用的具体需求对基础数据进行处理。例如,客户单一视图应用需要从基础数据中提取客户基本信息、各类存款账户、卡及每笔贷款借据的余额、月日均余额、季日均余额及年日均余额等数据,以及客户级的存贷款余额和各类日均余额等数据。客户关系管理应用需要从基础数据中提取客户的基本信息、客户各类产品的持有情况、客户交易偏好汇总等数据。客户积分管理应用需要从基础数据中提取各类账户及贷款余额、交易分类的汇总、客户基本信息等数据。零售客户经理考核应用需要从基础数据中提取客户经理开发或提升的每位客户的资产、负债、中间业务信息等数据。财务总账报表应用需要从基础数据中提取各科目下的账户余额数据并进行汇总,以使总账和分户账保持一致。In practical applications, using the data stored in the basic layer, the actual business needs to implement a variety of applications, for example, may include but not limited to the following applications: customer single view, customer relationship management, profit contribution analysis, customer points management, retail account manager Assessment, financial general ledger report, etc. The data involved in these applications all come from the basic data stored in the basic layer, and the basic data needs to be processed according to the specific requirements of the application. For example, the customer single-view application needs to extract basic customer information, various deposit accounts, card and IOU balances of each loan, monthly average daily balance, quarterly daily average balance, and annual daily average balance from the basic data. Data on deposit and loan balances and various daily average balances. The customer relationship management application needs to extract the basic information of the customer, the holding status of various products of the customer, the summary of customer transaction preferences and other data from the basic data. The customer points management application needs to extract various account and loan balances, summary of transaction classification, basic customer information and other data from the basic data. The assessment application of retail account managers needs to extract the assets, liabilities, intermediary business information and other data of each customer developed or promoted by the account manager from the basic data. The financial general ledger report application needs to extract the account balance data under each subject from the basic data and summarize them so that the general ledger and the sub-accounts are consistent.

根据对上述应用以及其它应用所需数据的分析,在本发明实施例中,在应用层提取数据之前,先在中间层对基础数据进行初步的提取和汇总。在此基础上,应用层直接应用上述中间层提取的数据或者再将中间层提取的数据汇总到客户级、科目级和机构级等更粗粒度的数据。According to the analysis of the data required by the above applications and other applications, in the embodiment of the present invention, before extracting data at the application layer, the basic data is initially extracted and summarized at the middle layer. On this basis, the application layer directly applies the data extracted by the above-mentioned middle layer or summarizes the data extracted by the middle layer to more coarse-grained data such as customer level, subject level and institution level.

具体地,在上述步骤102中,中间汇总信息表可以包括以下各表中的一种或任意几种的组合:账户级汇总信息表、凭证汇总信息表、借据汇总信息表、客户存款汇总信息表和客户贷款汇总信息表。相应地,在存储控制器的控制下,数据存储装置的中间层从基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表时,采用如下处理方式中的一种或任意几种的组合:第一,存储控制器控制中间层从基础层的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表;第二,存储控制器控制中间层从基础层的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表;第三,存储控制器控制中间层从基础层的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表;第四,存储控制器控制中间层从基础层的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表;第五,存储控制器控制中间层从基础层的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。Specifically, in the above step 102, the intermediate summary information table may include one or any combination of the following tables: account-level summary information table, voucher summary information table, IOU summary information table, customer deposit summary information table and Customer Loan Summary Information Sheet. Correspondingly, under the control of the storage controller, when the middle layer of the data storage device extracts the intermediate data corresponding to at least one application from the basic data of the base layer and stores it in the intermediate summary information table, one of the following processing methods or Any combination of several types: first, the storage controller controls the middle layer to extract the data corresponding to the account-level summary information from the basic data of the base layer and store it in the account-level summary information table; second, the storage controller controls the middle layer to extract the data corresponding to the account-level summary information from the basic data The data corresponding to the voucher-level summary information is extracted from the basic data of the basic layer and stored in the voucher summary information table; third, the storage controller controls the middle layer to extract the data corresponding to the IOU-level summary information from the basic data of the basic layer and store it in the IOU summary information table; fourth, the storage controller controls the middle layer to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer and store it in the customer deposit summary information table; fifth, the storage controller controls the middle layer The data corresponding to the customer loan-level summary information is extracted from the basic data and stored in the customer loan summary information table.

以中间层从基础层的基础数据中提取账户级汇总信息对应的数据为例,中间层从基础层提取账户级别的属性、余额及各频度的均值数据。以上述表1所示的各种协议以及上述基础层的存储方法为例,根据各种应用的具体需求,在存储控制器的控制下,中间层从基础层中提取需要记账的基础数据,即,中间层从基础层中提取有科目代码和业务代号的基础层数据。例如,采用上述方法的基础层存储的数据中,中间层从基础层中提取存款账户数据表、贷款账户数据表和内部账户数据表中的数据。Taking the middle layer extracts the data corresponding to account-level summary information from the basic data of the base layer as an example, the middle layer extracts account-level attributes, balances, and average data of each frequency from the base layer. Taking the various protocols shown in the above Table 1 and the storage methods of the above-mentioned base layer as examples, according to the specific needs of various applications, under the control of the storage controller, the middle layer extracts the basic data that needs to be accounted for from the base layer, That is, the middle layer extracts the basic layer data with the subject code and business code from the basic layer. For example, among the data stored in the base layer using the above method, the middle layer extracts the data in the deposit account data table, loan account data table and internal account data table from the base layer.

在中间层从基础层提取到数据之后,将上述数据存储到中间汇总信息表中。具体地,在上述步骤102中,在存储控制器的控制下,数据存储装置的中间层将中间数据存储到中间汇总信息表时,采用如下处理方式:After the intermediate layer extracts the data from the base layer, the above data is stored in the intermediate summary information table. Specifically, in the above step 102, under the control of the storage controller, when the intermediate layer of the data storage device stores the intermediate data in the intermediate summary information table, the following processing method is adopted:

第一,采用添加前缀的基础层的数据表的主键作为中间汇总信息表的主键,或,采用基础层的数据表的主键和预设的补充字段组成中间汇总信息表的主键。First, use the primary key of the data table of the base layer with the prefix added as the primary key of the intermediate summary information table, or use the primary key of the data table of the base layer and preset supplementary fields to form the primary key of the intermediate summary information table.

根据所需提取的数据,如果将所需的多个基础层的数据表中的主键设置在一张表格中时各个主键仍然具有唯一性,则可以以基础层的数据表中的主键作为中间汇总信息表的主键。否则,如果将所需的多个基础层的数据表中的主键设置在一张表格中时存在主键不具有唯一性的情况,则可以采用以下两种方式中的任意一种方式设置中间汇总信息表的主键。方式一:在各个基础层的数据表的主键前添加不同的前缀加以区分,以添加前缀的基础层的数据表的主键作为中间汇总信息表的主键。方式二:中间汇总信息表的主键采用组合主键,将基础层的数据表的主键作为该组合主键的一部分,并且再增加另外一个用于区分基础层的数据表主键的字段,作为中间汇总信息表补充字段,由基础层的数据表的主键和补充字段组合作为中间汇总信息表的组合主键。方式二不改变原表主键的记录,既有利于快速准确查找又能提高中间层与基础层的表间关联的效率。According to the data to be extracted, if the primary keys in the data tables of the required multiple base layers are set in one table, each primary key is still unique, then the primary keys in the data tables of the base layer can be used as an intermediate summary The primary key of the info table. Otherwise, if the primary key in the data tables of the required multiple base layers is set in one table, the primary key is not unique, you can use any of the following two methods to set the intermediate summary information The primary key of the table. Method 1: Different prefixes are added before the primary keys of the data tables of each base layer to distinguish them, and the primary keys of the data tables of the base layer to which the prefixes are added are used as the primary keys of the intermediate summary information table. Method 2: The primary key of the intermediate summary information table adopts a combined primary key, and the primary key of the data table of the base layer is used as a part of the combined primary key, and another field for distinguishing the primary key of the data table of the base layer is added as the intermediate summary information table Supplementary field, the combination of the primary key and supplementary field of the data table of the basic layer is used as the combined primary key of the intermediate summary information table. The second method does not change the primary key record of the original table, which is not only conducive to fast and accurate search, but also improves the efficiency of the association between the tables in the middle layer and the base layer.

第二,根据至少一个基础层的数据表中的共性字段的类型,确定中间汇总信息表的该共性字段的类型。当至少一个基础层的数据表中的共性字段的类型不同时,中间汇总信息表的该共性字段的类型为可变类型。Second, according to the type of the common field in the data table of at least one base layer, determine the type of the common field in the intermediate summary information table. When the type of the common field in at least one data table of the base layer is different, the type of the common field in the intermediate summary information table is a variable type.

在中间汇总信息表中,设置共性字段的类型时,需要同时考虑各个基础层的数据表该字段的类型,进一步还需要考虑未来其它数据源的扩展需要。例如,某个共性字段在基础层的第一个数据表中的类型为4位字符型,记为CHAR(4);在基础层的第二个数据表中的类型为5位字符型,记为CHAR(5);在基础层的第三个数据表中的类型为6位字符型,记为CHAR(6),则可以将该共性字段在中间汇总信息表中的类型设置为6位变量字符型,记为VARCHAR(6),进一步地,还可以考虑未来其它业务所需的数据源的需要,对该字段的长度进行扩展,将该共性字段在中间汇总信息表中的类型设置为8位变量字符型,记为VARCHAR(8)。采用上述方式设置中间汇总信息表中的共性字段的类型,能够保证对从基础层的数据表中提取的数据进行准确存储,并且还可以节省存储空间。进一步地,通过对字段长度进行扩展,提高了中间层的中间汇总信息表的可扩展性。In the intermediate summary information table, when setting the type of the common field, it is necessary to consider the type of the field in the data table of each basic layer at the same time, and further consider the expansion needs of other data sources in the future. For example, the type of a common field in the first data table of the basic layer is a 4-bit character type, which is recorded as CHAR(4); the type in the second data table of the basic layer is a 5-bit character type, which is recorded as is CHAR(5); the type in the third data table of the basic layer is a 6-bit character type, which is recorded as CHAR(6), then the type of the common field in the intermediate summary information table can be set as a 6-bit variable Character type, denoted as VARCHAR(6). Further, the length of this field can be extended by considering the needs of data sources required by other businesses in the future, and the type of the common field in the intermediate summary information table is set to 8 Bit variable character type, denoted as VARCHAR(8). Setting the types of the common fields in the intermediate summary information table in the above manner can ensure accurate storage of the data extracted from the data table of the base layer, and can also save storage space. Further, by extending the field length, the scalability of the intermediate summary information table in the intermediate layer is improved.

第三,采采用基础层的数据表的币种字段与值类型代码字段的组合作为中间汇总信息表的主键,将基础层的数据表中不同币种的数据转换为指定币种并存储到中间汇总信息表。Third, the combination of the currency field and the value type code field of the data table of the basic layer is used as the primary key of the intermediate summary information table, and the data of different currencies in the data table of the basic layer are converted into the specified currency and stored in the middle Summary information table.

在基础层存储的基础数据中,不同的账户采用的币种可能各不相同。因为在应用层无法对不同的币种直接进行运算,因此在中间层对不同币种的情况进行汇总,从而使得应用层能够仅通过简单求和的方式即可根据账户获得客户级、科目级、机构级等细粒度的汇总结果。在中间层的中间汇总信息表中,采用基础层的数据表中的币种字段和值类型代码字段的组合,作为中间汇总信息表的主键的一部分。在中间层,将基础层的数据表中不同币种的数据转换为指定币种并存储到中间汇总信息表。例如,将基础层数据表中存储的余额类属性的数据转换到人民币和/或美元对应的数据,在中间汇总信息表中,对原币、折人民币和折美元的数据分别进行存储。在中间层对币种及对应的数据进行折算,从而为应用层提取汇总数据提供方便,节省了应用层提取数据的时间,提高了数据存取效率。In the basic data stored in the base layer, different accounts may use different currencies. Because different currencies cannot be directly calculated at the application layer, the situation of different currencies is summarized at the middle layer, so that the application layer can obtain customer-level, account-level, Institutional level and other fine-grained summary results. In the intermediate summary information table of the middle layer, the combination of the currency field and the value type code field in the data table of the base layer is used as a part of the primary key of the intermediate summary information table. In the middle layer, the data in different currencies in the data table of the basic layer is converted into the specified currency and stored in the intermediate summary information table. For example, the data of the balance attribute stored in the base layer data table is converted to the data corresponding to RMB and/or US dollars, and the data of the original currency, converted RMB and converted US dollars are stored respectively in the intermediate summary information table. The currency and corresponding data are converted in the middle layer, so as to provide convenience for the application layer to extract summary data, save the time for the application layer to extract data, and improve the efficiency of data access.

第四,根据基础数据计算衍生属性的数据并存储到中间汇总信息表。Fourth, calculate the derived attribute data based on the basic data and store it in the intermediate summary information table.

根据应用层的各种应用的具体需要,在中间层对各应用层所需的根据基础层数据进行计算的衍生属性进行计算。例如,从基础层存储的余额历史表中提取当日余额数据,并根据应用的具体业务规则,根据当日余额数据计算获得余额月均数据、余额季均数据、余额年均数据、余额近三个月日均数据、余额近一年日均数据等衍生属性对应的数据,将上述衍生属性及对应的数据存储到中间汇总信息表中。在应用层需要提取上述衍生数据时,不必对基础层的基础数据进行提取和计算,只需要从中间层提取所需的衍生属性对应的数据即可,从而提高了应用层读取数据的速度,提高了数据存取效率。According to the specific needs of various applications in the application layer, the derived attributes required by each application layer calculated based on the data of the basic layer are calculated in the middle layer. For example, the balance data of the day is extracted from the balance history table stored in the base layer, and according to the specific business rules of the application, the monthly average data of the balance, the quarterly average data of the balance, the annual average data of the balance, and the balance of the past three months For data corresponding to derived attributes such as daily average data, daily average balance data in the past year, etc., store the above derived attributes and corresponding data in the intermediate summary information table. When the application layer needs to extract the above-mentioned derived data, it is not necessary to extract and calculate the basic data of the base layer. It is only necessary to extract the data corresponding to the required derived attributes from the middle layer, thereby improving the speed of reading data at the application layer. Improved data access efficiency.

第五,向中间汇总信息表存储预设时间周期内的中间数据。Fifth, the intermediate data within a preset time period is stored in the intermediate summary information table.

在中间层需要对基础层的数据进行汇总,并且要求中间层汇总的数据能够支持应用层的多种应用的具体需求,因此,中间层的中间汇总信息表中需要存储预设时间周期内的中间数据。如果该预设时间周期过长,会浪费存储空间,如果该预设时间周期过短,则无法满足应用层全部应用的具体需求。一种较佳的实施方式是,将该时间周期预设为13个月,即中间层的中间汇总信息表中保留最近13个月月底的数据。并且,在此基础上,还可以根据应用的具体情况对预设的时间周期进行调整。In the middle layer, the data of the base layer needs to be summarized, and the data summarized in the middle layer is required to support the specific needs of various applications in the application layer. Therefore, the intermediate summary information table of the middle layer needs to store the intermediate data. If the preset time period is too long, storage space will be wasted, and if the preset time period is too short, specific requirements of all applications at the application layer cannot be met. A preferred implementation manner is that the time period is preset as 13 months, that is, the data at the end of the last 13 months is kept in the intermediate summary information table of the middle layer. Moreover, on this basis, the preset time period can also be adjusted according to the specific conditions of the application.

具体地,在中间层采用上述提取、汇总并存储中间数据的方法,在中间层可以存储多种中间汇总信息表,具体可以包括但不限于以下各表:账户级汇总信息表、卡汇总信息表、其它凭证汇总信息表、借据汇总信息表、客户存款汇总信息表和客户贷款汇总信息表。Specifically, the above-mentioned method of extracting, summarizing, and storing intermediate data is adopted in the middle layer, and various intermediate summary information tables can be stored in the middle layer, specifically including but not limited to the following tables: account-level summary information table, card summary information table , Other certificate summary information table, IOU summary information table, customer deposit summary information table and customer loan summary information table.

在上述技术方案中,通过在基础层与应用层之间设置中间层,在基础层与应用层之间起到传承作用。对于基础层而言,中间层存储对基础层数据进行加工、汇总后的数据,更加接近应用的需要;而对于应用层而言,中间层从基础层提取并计算出支持应用层的各种应用的汇总数据。在应用层提取数据之前,先在中间层对基础数据进行初步的提取和汇总。在应用层需要提取数据时,首选从中间层提取中间数据,当中间层未保存应用层所需的数据时,应用层再从基础层提取基础数据。从而通过增加中间层的存储丰富了应用层数据的汇总层级与粒度,使得数据汇总粒度更加精细化。并且,通过设置中间层,避免了在应用层通过多张表中存储满足各种应用的共性数据,减少了冗余,有效地减少了共性应用的重复汇总,提高了数据存取操作的访问响应速度。In the above technical solution, by setting an intermediate layer between the base layer and the application layer, an inheritance function is played between the base layer and the application layer. For the base layer, the middle layer stores the processed and summarized data of the base layer, which is closer to the needs of the application; while for the application layer, the middle layer extracts and calculates various applications that support the application layer from the base layer. summary data. Before the application layer extracts data, the basic data is initially extracted and summarized in the middle layer. When the application layer needs to extract data, it is preferred to extract the intermediate data from the middle layer. When the middle layer does not save the data required by the application layer, the application layer extracts the basic data from the base layer. Therefore, by increasing the storage in the middle layer, the aggregation level and granularity of the application layer data are enriched, making the granularity of data aggregation more refined. Moreover, by setting the middle layer, it avoids storing common data satisfying various applications in multiple tables in the application layer, reduces redundancy, effectively reduces repeated summarization of common applications, and improves the access response speed of data access operations.

应用层application layer

在存储控制器的控制下,应用层根据各种应用的具体需求,对基础层和中间层存储的数据进行提取和汇总,将汇总后的数据存储到的通用汇总数据表和至少一个面向特定应用的应用数据集市表中。Under the control of the storage controller, the application layer extracts and summarizes the data stored in the base layer and the middle layer according to the specific needs of various applications, and stores the summarized data in a general summary data table and at least one specific application-oriented in the application data mart table.

其中,应用数据集市表与具体的应用直接相关。例如,按照业务条线和业务类型可以划分为以下应用数据集市表,但并不局限于以下各表,包括:客户单一视图集市、客户关系管理集市、经营指标快报集市、反洗钱集市、零售非凡积分集市、零售考核集市、电子银行数据集市、多维数据集市、对公及事业部集市等。具体地,不同集市的数据粒度和时间周期根据该集市的具体需求设置。例如,对于全面风险管理数据集市,满足新巴塞尔协议的要求,需要保留最近五年的明细数据;对于各分行零售考核数据集市,需要保留最近两年季末的客户经理和各团队的考核汇总结果;对于没有特殊需求的数据集市,保留近一年月末的汇总数据。Among them, the application data mart table is directly related to the specific application. For example, according to the business line and business type, it can be divided into the following application data mart tables, but not limited to the following tables, including: customer single view mart, customer relationship management mart, business index express mart, anti-money laundering Bazaar, Retail Extraordinary Points Bazaar, Retail Assessment Bazaar, Electronic Banking Data Mart, Multidimensional Data Mart, Corporate and Business Department Bazaar, etc. Specifically, the data granularity and time period of different bazaars are set according to the specific needs of the bazaars. For example, for the comprehensive risk management data mart, to meet the requirements of the new Basel Accord, it is necessary to retain the detailed data of the last five years; for the retail assessment data mart of each branch, it is necessary to retain the assessment of the account manager and each team at the end of the last two years Summary results; for data marts without special requirements, the summary data at the end of the last year is retained.

以上述客户单一视图集市中的客户汇总信息表为例,在存储控制器的控制下,应用层从中间层或者从中间层和基础层提取数据并汇总具体包括如下过程。Taking the customer summary information table in the customer single-view bazaar as an example, under the control of the storage controller, the application layer extracts data from the middle layer or from the middle layer and the base layer and summarizes the specific process as follows.

应用层从中间层的账户汇总信息表、借据汇总信息表、客户存款汇总信息表和客户贷款汇总信息表中提取相同统计日期的数据,并通过核心客户号主键、币种和值类型代码主键进行关联。客户汇总信息表中存储客户开户机构号、当事人分类代码、持有产品数、存款余额月日均、存款余额季日均、存款余额年日均、存款余额和贷款总额等数据。其中,从中间层的客户存款汇总信息表中的客户开户机构号字段提取客户汇总信息表中的客户开户机构号的数据;从中间层的客户存款汇总信息表中的当事人分类代码字段提取客户汇总信息表中的当事人分类代码的数据;通过对中间层的账户汇总信息表和借据汇总信息表中不同的产品编号字段按照核心客户号属性进行汇总,获取客户汇总信息表的持有产品数的数据;分别通过对中间层的客户存款汇总信息表中余额月均、余额季均、余额年均和余额字段,按照核心客户号属性进行汇总,分别获取客户汇总信息表的存款余额月日均、存款余额季日均、存款余额年日均和存款余额等数据;通过对中间层的客户贷款汇总信息表中的剩余本金字段按照核心客户号属性进行汇总,获取客户汇总信息表的贷款总额的数据。应用层的客户汇总信息表中的数据全部从中间层存储的数据中提取;进一步地,在应用层存储的其它的汇总信息表中,部分汇总信息表存储的数据需要同时从中间层存储的数据以及基础层存储的数据中进行提取。在上述技术方案中,通过在数据存储时设置中间层,应用层在提取数据时优选从中间层提取数据,从而使得应用层的操作更加简洁、快速。The application layer extracts the data of the same statistical date from the account summary information table, IOU summary information table, customer deposit summary information table and customer loan summary information table of the middle layer, and uses the core customer number primary key, currency and value type code primary key associated. The customer summary information table stores data such as customer account opening institution number, party classification code, number of products held, monthly average deposit balance, quarterly daily average deposit balance, annual average deposit balance, deposit balance, and total loan amount. Among them, extract the data of customer account opening institution number in the customer summary information table from the customer account opening institution number field in the customer deposit summary information table in the middle layer; extract the customer summary from the party classification code field in the customer deposit summary information table in the middle layer The data of the classification code of the party in the information table; by summarizing the different product number fields in the account summary information table and the IOU summary information table of the middle layer according to the core customer number attribute, the data of the number of products held in the customer summary information table is obtained ;According to the attributes of the core customer number, the monthly average balance, quarterly average balance, annual average balance, and balance fields in the customer deposit summary information table in the middle layer are respectively summarized to obtain the monthly average daily deposit balance, deposit Data such as quarterly daily average balance, annual average deposit balance, and deposit balance; obtain the total loan data in the customer summary information table by summarizing the remaining principal field in the customer loan summary information table in the middle layer according to the core customer number attribute . The data in the customer summary information table of the application layer is all extracted from the data stored in the middle layer; further, in other summary information tables stored in the application layer, the data stored in some summary information tables need to be extracted from the data stored in the middle layer at the same time And extract from the data stored in the base layer. In the above technical solution, by setting an intermediate layer when storing data, the application layer preferably extracts data from the intermediate layer when extracting data, so that the operation of the application layer is simpler and faster.

以上对本发明提出的数据存储方法进行了介绍,以下通过本发明实施例二,介绍采用上述数据存储方法的数据存储装置。The data storage method proposed by the present invention has been introduced above, and the data storage device adopting the above data storage method will be introduced below through Embodiment 2 of the present invention.

图2为本发明实施例二的数据存储装置的结构示意图。如图2所示,该数据存储装置包括:存储控制器20、基础层21、中间层22和应用层23。FIG. 2 is a schematic structural diagram of a data storage device according to Embodiment 2 of the present invention. As shown in FIG. 2 , the data storage device includes: a storage controller 20 , a base layer 21 , an intermediate layer 22 and an application layer 23 .

其中,存储控制器20获取数据存储命令,控制基础层21存储基础数据,控制中间层22从基础层21的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表,控制应用层23从中间层22的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从所述中间层的中间数据和所述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。Among them, the storage controller 20 obtains the data storage command, controls the base layer 21 to store the basic data, controls the intermediate layer 22 to extract at least one application-corresponding intermediate data from the basic data of the base layer 21 and stores it in the intermediate summary information table, and controls the application layer 23 Extract the general summary data of the application from the intermediate data of the middle layer 22 and store it in the general summary information table, and extract the data mart data of the application from the intermediate data of the middle layer and the general summary information table and store it in at least An application data mart.

基础层21用于在存储控制器20的控制下存储基础数据。中间层22用于在存储控制器20的控制下从基础层21的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表。应用层23用于在存储控制器20的控制下从中间层22的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,并且用于在存储控制器20的控制下从中间层22的中间数据和上述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。The base layer 21 is used to store basic data under the control of the storage controller 20 . The intermediate layer 22 is configured to extract at least one intermediate data corresponding to an application from the basic data of the basic layer 21 under the control of the storage controller 20 and store it in an intermediate summary information table. The application layer 23 is used to extract the general summary data of the application from the intermediate data of the middle layer 22 under the control of the storage controller 20 and store it in the general summary information table, and to extract the application general summary data from the middle layer 22 under the control of the storage controller 20. The application data mart data is extracted from the intermediate data and the above general summary information table and stored in at least one application data mart.

在上述方案的基础上,具体地,基础层21用于在存储控制器20的控制下,在协议信息表存储至少一种协议号和协议种类代码,在作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码,在作为类型信息表的子表的至少一个数据表存储对应协议的数据。在上述方案的基础上,具体地,基础层21还可以用于在存储控制器20的控制下,在属性历史表中,根据协议类型,分类存储至少一个协议的属性信息。On the basis of the above scheme, specifically, the base layer 21 is used to store at least one protocol number and protocol type code in the protocol information table under the control of the storage controller 20, and store at least one protocol number and protocol type code in the protocol information table as at least one of the sub-tables of the protocol information table. The type information table stores the protocol number and the protocol type code of the corresponding type, and at least one data table which is a sub-table of the type information table stores the data of the corresponding protocol. On the basis of the above solution, specifically, the base layer 21 can also be used to classify and store attribute information of at least one protocol in the attribute history table under the control of the storage controller 20 according to the protocol type.

在上述方案的基础上,具体地,中间层22具体用于在存储控制器20的控制下从基础层21的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表。和/或,中间层22具体用于在存储控制器20的控制下从基础层21的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表。和/或,中间层22具体用于在存储控制器20的控制下从基础层21的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表。和/或,中间层22具体用于在存储控制器20的控制下从基础层21的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表。和/或,中间层22具体用于在存储控制器20的控制下从基础层21的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。On the basis of the above solution, specifically, the middle layer 22 is specifically configured to extract data corresponding to the account-level summary information from the basic data of the base layer 21 under the control of the storage controller 20 and store it in the account-level summary information table. And/or, the middle layer 22 is specifically configured to extract the data corresponding to the voucher-level summary information from the basic data of the base layer 21 under the control of the storage controller 20 and store it in the voucher summary information table. And/or, the middle layer 22 is specifically configured to extract the data corresponding to the IOU level summary information from the basic data of the base layer 21 under the control of the storage controller 20 and store it in the IOU summary information table. And/or, the middle layer 22 is specifically configured to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer 21 under the control of the storage controller 20 and store it in the customer deposit summary information table. And/or, the middle layer 22 is specifically configured to extract the data corresponding to the customer loan level summary information from the basic data of the base layer 21 under the control of the storage controller 20 and store it in the customer loan summary information table.

在上述方案的基础上,具体地,中间层22用于根据存储控制器20的控制,采用添加前缀的基础层21的数据表的主键作为中间汇总信息表的主键,或,采用基础层21的数据表的主键和预设的补充字段组成中间汇总信息表的主键。中间层22还用于根据存储控制器20的控制,根据至少一个基础层21的数据表中的共性字段的类型,确定中间汇总信息表的该共性字段的类型,当至少一个基础层21的数据表中的共性字段的类型不同时,中间汇总信息表的该共性字段的类型为可变类型。中间层22还用于根据存储控制器20的控制,采用基础层21的数据表的币种字段与值类型代码字段的组合作为中间汇总信息表的主键,将基础层21的数据表中不同币种的数据转换为指定币种并存储到中间汇总信息表。中间层22还用于根据存储控制器20的控制,根据基础数据计算衍生属性的数据并存储到中间汇总信息表。中间层22还用于根据存储控制器20的控制,向中间汇总信息表存储预设时间周期内的中间数据。On the basis of the above scheme, specifically, the intermediate layer 22 is used to adopt the primary key of the data table of the base layer 21 with the prefix added as the primary key of the intermediate summary information table according to the control of the storage controller 20, or, adopt the primary key of the base layer 21 The primary key of the data table and the preset supplementary fields form the primary key of the intermediate summary information table. The intermediate layer 22 is also used to determine the type of the common field in the intermediate summary information table according to the control of the storage controller 20 and according to the type of the common field in the data table of at least one base layer 21. When the data of at least one base layer 21 When the types of the common fields in the tables are different, the type of the common fields in the intermediate summary information table is a variable type. The middle layer 22 is also used to use the combination of the currency field and the value type code field of the data table of the base layer 21 as the primary key of the intermediate summary information table according to the control of the storage controller 20, and convert different currencies in the data table of the base layer 21 The data in the specified currency is converted into the specified currency and stored in the intermediate summary information table. The middle layer 22 is also used to calculate the derived attribute data according to the basic data and store it in the middle summary information table according to the control of the storage controller 20 . The intermediate layer 22 is also used to store intermediate data within a preset time period in the intermediate summary information table according to the control of the storage controller 20 .

在上述方案的基础上,具体地,存储控制器20还用于控制数据存储装置的应用层23从基础层21的基础数据中提取应用的通用汇总数据和数据集市数据。数据存储装置的应用层23还用于根据存储控制器20的控制,从基础层21的基础数据中提取应用的通用汇总数据和数据集市数据。On the basis of the above solution, specifically, the storage controller 20 is further configured to control the application layer 23 of the data storage device to extract general summary data and data mart data of the application from the basic data of the basic layer 21 . The application layer 23 of the data storage device is also used to extract general summary data and data mart data of the application from the basic data of the base layer 21 according to the control of the storage controller 20 .

上述数据存储装置中,存储控制器20控制基础层21、中间层22和应用层23的数据存储方法按照本发明实施例一记载的数据存储方法执行,在此不再赘述。In the above data storage device, the storage controller 20 controls the data storage method of the base layer 21, the middle layer 22 and the application layer 23 to execute according to the data storage method described in Embodiment 1 of the present invention, which will not be repeated here.

在上述技术方案的基础上,在实际应用中,可以采用一个存储控制器20对基础层21、中间层22和应用层23进行综合控制,也可以对基础层21、中间层22和应用层23分别采用三个存储控制器进行控制,即,采用基础层存储控制器、中间层存储控制器和应用层存储控制器分别对基础层21、中间层22和应用层23进行控制,具体对各层的控制方法与上述技术方案相同,在需要向数据存储装置存储新的数据时,基础层存储控制器控制基础层21进行存储操作。在基础层存储控制器控制基础层21完成存储操作后,基础层存储控制器向中间层存储控制器发送通知消息。在中间层存储控制器控制中间层22完成存储操作后,中间层存储控制器向应用层存储控制器发送通知消息。在应用层存储控制器控制应用层23完成存储操作后,应用层存储控制器向用户的客户端返回数据存储完成消息。On the basis of the above technical solutions, in practical applications, a storage controller 20 can be used to comprehensively control the base layer 21, the middle layer 22 and the application layer 23, and can also control the base layer 21, the middle layer 22 and the application layer 23 Three storage controllers are used for control respectively, that is, the base layer 21, the middle layer 22 and the application layer 23 are respectively controlled by using the base layer storage controller, the middle layer storage controller and the application layer storage controller. The control method is the same as the above-mentioned technical solution. When new data needs to be stored in the data storage device, the base layer storage controller controls the base layer 21 to perform a storage operation. After the base layer storage controller controls the base layer 21 to complete the storage operation, the base layer storage controller sends a notification message to the intermediate layer storage controller. After the middle layer storage controller controls the middle layer 22 to complete the storage operation, the middle layer storage controller sends a notification message to the application layer storage controller. After the application layer storage controller controls the application layer 23 to complete the storage operation, the application layer storage controller returns a data storage completion message to the user's client.

在本发明实施例二中,在数据存储装置中增加了中间层,从而增强了数据粒度的层次化。中间层从基础层中提取基础数据并汇总,获取中间数据并存储,应用层从中间层存储的中间数据中提取数据,而不必像现有技术那样逐一查找基础层的大量的存储表格,因此提高了数据存取效率。并且,通过中间层对数据的初步汇总,避免了现有的二层架构的技术方案中应用层对基础层数据的重复汇总,提高了数据存取效率。In the second embodiment of the present invention, an intermediate layer is added in the data storage device, thereby enhancing the hierarchical level of data granularity. The middle layer extracts the basic data from the base layer and summarizes them, acquires the intermediate data and stores them, and the application layer extracts data from the intermediate data stored in the middle layer, without having to look up a large number of storage tables of the base layer one by one like the existing technology, thus improving improved data access efficiency. Moreover, through the preliminary summarization of data by the middle layer, repeated summarization of the data of the base layer by the application layer in the technical solution of the existing two-tier architecture is avoided, and the efficiency of data access is improved.

本发明提出的数据存储方法和数据存储装置,采用三层架构,从传统的单一呆板的数据存储装置架构向能够体现不同层次分工的分层架构转化。与现有的二层架构相比,本发明提出的三层架构的数据存储装置层次分明、架构清晰,不仅提高了数据存储装置的可扩展性,而且还提高了数据存取的效率以及对数据存储装置进行管理和维护的效率。在银行业的具体应用中,各类信息应用与业务需求与日俱增,该数据存储装置的先进性、适用性与高效性对后续最大限度的发挥数据存储装置决策支持、营销支持、管理支持的职能起到决定性的作用。本发明提出的数据存储装置的三层架构,在继承业界现有的数据存储装置架构的基础上进行创新。在数据存储装置架构中首次设置中间层,构建出的多层数据存储装置架构,能够增强数据粒度的层次化和多样化,全面快速的满足各类应用的需求,有效地解决传统数据存储装置架构存在的重复汇总、冗余存储、共享度低、标准不一、一致性差等问题,为实现全行管理信息逻辑集中创造了条件,极大提高了全行经营管理数据的存储、处理和使用的效率,降低了管理成本。并且,本发明提出的数据存储装置的架构可以缩短数据建模周期和数据加载时间,提高数据存储装置的整体运行和维护效率。本发明的新型架构把银行数据分层设计,尽量减少各层数据之间的干扰和影响,使数据存储装置的扩展性更加强大,能灵活适应新形势下银行业务快速迅猛发展的需求,尤其适用于银行业对企业级数据存储装置的设置。The data storage method and data storage device proposed by the present invention adopt a three-layer structure, transforming from a traditional single rigid data storage device structure to a layered structure that can reflect the division of labor at different levels. Compared with the existing two-tier architecture, the data storage device of the three-tier architecture proposed by the present invention has a clear hierarchy and a clear structure, which not only improves the scalability of the data storage device, but also improves the efficiency of data access and the efficiency of data storage. The efficiency with which storage devices are managed and maintained. In the specific application of the banking industry, various information applications and business needs are increasing day by day. The advanced nature, applicability and high efficiency of the data storage device will play a role in maximizing the subsequent functions of the data storage device in decision support, marketing support and management support. to a decisive role. The three-layer architecture of the data storage device proposed by the present invention is innovated on the basis of inheriting the existing data storage device architecture in the industry. The middle layer is set up for the first time in the data storage device architecture, and the multi-layer data storage device architecture constructed can enhance the layering and diversification of data granularity, comprehensively and quickly meet the needs of various applications, and effectively solve the traditional data storage device architecture. Existing problems such as repeated summarization, redundant storage, low degree of sharing, inconsistent standards, and poor consistency have created conditions for the logical concentration of management information across the bank and greatly improved the efficiency of storage, processing, and use of business management data across the bank. Efficiency and reduced management costs. Moreover, the architecture of the data storage device proposed by the present invention can shorten the data modeling cycle and data loading time, and improve the overall operation and maintenance efficiency of the data storage device. The novel framework of the present invention designs bank data in layers, minimizes the interference and impact between data layers, makes the data storage device more scalable, and can flexibly adapt to the rapid and rapid development of banking business under the new situation. It is especially suitable for For the banking industry to set up enterprise-level data storage devices.

需要说明的是:对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

1.一种数据存储方法,其特征在于,包括:1. A data storage method, characterized in that, comprising: 数据存储装置的存储控制器获取数据存储命令;The storage controller of the data storage device obtains the data storage command; 所述存储控制器控制数据存储装置的基础层存储基础数据;The storage controller controls the base layer of the data storage device to store basic data; 所述存储控制器控制数据存储装置的中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表;The storage controller controls the middle layer of the data storage device to extract at least one intermediate data corresponding to the application from the basic data of the basic layer and store it in an intermediate summary information table; 所述存储控制器控制数据存储装置的应用层从所述中间层的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从所述中间层的中间数据和所述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。The storage controller controls the application layer of the data storage device to extract the general summary data of the application from the intermediate data of the middle layer and store it in the general summary information table, from the intermediate data of the middle layer and the general summary information table The data mart data of the application is extracted from and stored in at least one application data mart. 2.根据权利要求1所述的方法,其特征在于,所述存储控制器控制数据存储装置的基础层存储基础数据包括:2. The method according to claim 1, wherein the storage controller controlling the base layer of the data storage device to store basic data comprises: 所述存储控制器控制协议信息表存储至少一种协议号和协议种类代码;所述存储控制器控制作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码;所述存储控制器控制作为类型信息表的子表的至少一个数据表存储对应协议的数据;The storage controller controls the protocol information table to store at least one protocol number and protocol type code; the storage controller controls at least one type information table as a sub-table of the protocol information table to store the corresponding type of protocol number and protocol type code; The storage controller controls at least one data table as a sub-table of the type information table to store data corresponding to the protocol; 和/或,所述存储控制器控制属性历史表根据协议类型,分类存储至少一个协议的属性信息。And/or, the storage controller controls the attribute history table to classify and store the attribute information of at least one protocol according to the protocol type. 3.根据权利要求1或2所述的方法,其特征在于,所述存储控制器控制数据存储装置的中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表包括:3. The method according to claim 1 or 2, wherein the storage controller controls the intermediate layer of the data storage device to extract at least one intermediate data corresponding to the application from the basic data of the basic layer and store it in the intermediate The summary information table includes: 所述存储控制器控制所述中间层从所述基础层的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表;The storage controller controls the middle layer to extract the data corresponding to the account-level summary information from the basic data of the base layer and store it in the account-level summary information table; 和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the voucher-level summary information from the basic data of the base layer and store it in the voucher summary information table; 和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the IOU level summary information from the basic data of the base layer and store it in the IOU summary information table; 和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表;And/or, the storage controller controls the middle layer to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer and store it in the customer deposit summary information table; 和/或,所述存储控制器控制所述中间层从所述基础层的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。And/or, the storage controller controls the middle layer to extract data corresponding to customer loan level summary information from the basic data of the base layer and store it in the customer loan summary information table. 4.根据权利要求1或2所述的方法,其特征在于,所述存储控制器控制所述数据存储装置的中间层将所述中间数据存储到中间汇总信息表包括:4. The method according to claim 1 or 2, wherein the storage controller controlling the intermediate layer of the data storage device to store the intermediate data in an intermediate summary information table comprises: 采用添加前缀的基础层的数据表的主键作为所述中间汇总信息表的主键,或,采用基础层的数据表的主键和预设的补充字段组成所述中间汇总信息表的主键;Using the primary key of the data table of the base layer with the prefix added as the primary key of the intermediate summary information table, or using the primary key of the data table of the base layer and preset supplementary fields to form the primary key of the intermediate summary information table; 和/或,根据至少一个基础层的数据表中的共性字段的类型,确定所述中间汇总信息表的该共性字段的类型,当至少一个基础层的数据表中的共性字段的类型不同时,所述中间汇总信息表的该共性字段的类型为可变类型;And/or, according to the type of the common field in the data table of at least one base layer, determine the type of the common field in the intermediate summary information table, when the types of the common field in the data table of at least one base layer are different, The type of the common field of the intermediate summary information table is a variable type; 和/或,采用基础层的数据表的币种字段与值类型代码字段的组合作为所述中间汇总信息表的主键,将基础层的数据表中不同币种的数据转换为指定币种并存储到所述中间汇总信息表;And/or, using the combination of the currency field and the value type code field of the data table of the basic layer as the primary key of the intermediate summary information table, converting the data of different currencies in the data table of the basic layer into the specified currency and storing to said intermediate summary information table; 和/或,根据所述基础数据计算衍生属性的数据并存储到所述中间汇总信息表;And/or, calculate derived attribute data according to the basic data and store it in the intermediate summary information table; 和/或,向所述中间汇总信息表存储预设时间周期内的所述中间数据。And/or, storing the intermediate data within a preset time period in the intermediate summary information table. 5.根据权利要求1或2所述的方法,其特征在于,5. The method according to claim 1 or 2, characterized in that, 所述存储控制器控制数据存储装置的应用层从所述基础层的基础数据和所述中间层的中间数据中提取应用的通用汇总数据之后还包括:所述存储控制器控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的通用汇总数据;After the storage controller controls the application layer of the data storage device to extract the general summary data of the application from the basic data of the base layer and the intermediate data of the intermediate layer, the method further includes: the storage controller controls the data storage device The application layer extracts the general summary data of the application from the basic data of the basic layer; 所述存储控制器控制数据存储装置的应用层从所述中间层的中间数据和所述通用汇总信息表中提取应用数据集市数据之后还包括:所述存储控制器控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的数据集市数据。After the storage controller controls the application layer of the data storage device to extract the application data mart data from the intermediate data of the middle layer and the general summary information table, the method further includes: the storage controller controls the data storage device The application layer extracts the data mart data of the application from the basic data of the base layer. 6.一种数据存储装置,其特征在于,包括:存储控制器、基础层、中间层和应用层;6. A data storage device, comprising: a storage controller, a base layer, an intermediate layer, and an application layer; 存储控制器获取数据存储命令,控制基础层存储基础数据,控制中间层从所述基础层的基础数据中提取至少一个应用对应的中间数据并存储到中间汇总信息表,控制应用层从所述中间层的中间数据中提取应用的通用汇总数据并存储到通用汇总信息表,从所述中间层的中间数据和所述通用汇总信息表中提取应用的数据集市数据并存储到至少一个应用数据集市。The storage controller obtains a data storage command, controls the base layer to store basic data, controls the middle layer to extract at least one intermediate data corresponding to an application from the basic data of the base layer and stores it in an intermediate summary information table, and controls the application layer to store the intermediate data from the intermediate data. The general summary data of the application is extracted from the intermediate data of the middle layer and stored in the general summary information table, and the data mart data of the application is extracted from the intermediate data of the middle layer and the general summary information table and stored in at least one application data set city. 7.根据权利要求6所述的数据存储装置,其特征在于,7. The data storage device according to claim 6, wherein: 所述基础层具体用于根据所述存储控制器的控制,在协议信息表存储至少一种协议号和协议种类代码,在作为协议信息表的子表的至少一个类型信息表存储对应类型的协议号和协议种类代码,在作为类型信息表的子表的至少一个数据表存储对应协议的数据;The base layer is specifically used to store at least one protocol number and protocol type code in the protocol information table according to the control of the storage controller, and store the corresponding type of protocol in at least one type information table that is a sub-table of the protocol information table. No. and protocol type code, store the data of the corresponding protocol in at least one data table as a sub-table of the type information table; 和/或,所述基础层具体用于根据所述存储控制器的控制,在属性历史表根据协议类型分类存储至少一个协议的属性信息。And/or, the base layer is specifically configured to, according to the control of the storage controller, classify and store at least one protocol attribute information in the attribute history table according to the protocol type. 8.根据权利要求6或7所述的数据存储装置,其特征在于,8. The data storage device according to claim 6 or 7, characterized in that, 所述中间层具体用于根据所述存储控制器的控制从所述基础层的基础数据中提取账户级汇总信息对应的数据并存储到账户级汇总信息表;The middle layer is specifically configured to extract the data corresponding to the account-level summary information from the basic data of the base layer according to the control of the storage controller and store it in the account-level summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取凭证级汇总信息对应的数据并存储到凭证汇总信息表;And/or, the intermediate layer is specifically configured to, according to the control of the storage controller, extract the data corresponding to the voucher-level summary information from the basic data of the basic layer and store it in the voucher summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取借据级汇总信息对应的数据并存储到借据汇总信息表;And/or, the intermediate layer is specifically configured to extract the data corresponding to the IOU level summary information from the basic data of the basic layer according to the control of the storage controller and store it in the IOU summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取客户存款级汇总信息对应的数据并存储到客户存款汇总信息表;And/or, the middle layer is specifically configured to extract the data corresponding to the customer deposit level summary information from the basic data of the base layer according to the control of the storage controller and store it in the customer deposit summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,从所述基础层的基础数据中提取客户贷款级汇总信息对应的数据并存储到客户贷款汇总信息表。And/or, the middle layer is specifically configured to, according to the control of the storage controller, extract data corresponding to customer loan level summary information from the basic data of the base layer and store it in the customer loan summary information table. 9.根据权利要求6或7所述的数据存储装置,其特征在于,9. The data storage device according to claim 6 or 7, characterized in that, 所述中间层具体用于根据所述存储控制器的控制,采用添加前缀的基础层的数据表的主键作为所述中间汇总信息表的主键,或,采用基础层的数据表的主键和预设的补充字段组成所述中间汇总信息表的主键;The intermediate layer is specifically configured to use the primary key of the data table of the base layer with the prefix added as the primary key of the intermediate summary information table according to the control of the storage controller, or use the primary key of the data table of the basic layer and the preset The supplementary fields of constitute the primary key of the intermediate summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,根据至少一个基础层的数据表中的共性字段的类型,确定所述中间汇总信息表的该共性字段的类型,当至少一个基础层的数据表中的共性字段的类型不同时,所述中间汇总信息表的该共性字段的类型为可变类型;And/or, the intermediate layer is specifically configured to determine the type of the common field in the intermediate summary information table according to the type of the common field in the data table of at least one base layer according to the control of the storage controller, when When the types of the common fields in the data tables of at least one base layer are different, the type of the common fields in the intermediate summary information table is a variable type; 和/或,所述中间层具体用于根据所述存储控制器的控制,采用基础层的数据表的币种字段与值类型代码字段的组合作为所述中间汇总信息表的主键,将基础层的数据表中不同币种的数据转换为指定币种并存储到所述中间汇总信息表;And/or, the intermediate layer is specifically configured to use the combination of the currency field and the value type code field of the data table of the basic layer as the primary key of the intermediate summary information table according to the control of the storage controller, and convert the basic layer The data in different currencies in the data table is converted into the specified currency and stored in the intermediate summary information table; 和/或,所述中间层具体用于根据所述存储控制器的控制,根据所述基础数据计算衍生属性的数据并存储到所述中间汇总信息表;And/or, the intermediate layer is specifically configured to calculate derived attribute data according to the basic data and store it in the intermediate summary information table according to the control of the storage controller; 和/或,所述中间层具体用于根据所述存储控制器的控制,向所述中间汇总信息表存储预设时间周期内的所述中间数据。And/or, the intermediate layer is specifically configured to store the intermediate data within a preset time period in the intermediate summary information table according to the control of the storage controller. 10.根据权利要求6或7所述的数据存储装置,其特征在于,10. The data storage device according to claim 6 or 7, characterized in that, 所述存储控制器还用于控制所述数据存储装置的应用层从所述基础层的基础数据中提取应用的通用汇总数据和数据集市数据;The storage controller is also used to control the application layer of the data storage device to extract the general summary data and data mart data of the application from the basic data of the basic layer; 所述数据存储装置的应用层还用于根据所述存储控制器的控制,从所述基础层的基础数据中提取应用的通用汇总数据和数据集市数据。The application layer of the data storage device is also used to extract the general summary data and data mart data of the application from the basic data of the basic layer according to the control of the storage controller.
CN201110280416.XA 2011-09-20 2011-09-20 Data storage method and device Active CN102354277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110280416.XA CN102354277B (en) 2011-09-20 2011-09-20 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110280416.XA CN102354277B (en) 2011-09-20 2011-09-20 Data storage method and device

Publications (2)

Publication Number Publication Date
CN102354277A true CN102354277A (en) 2012-02-15
CN102354277B CN102354277B (en) 2014-07-09

Family

ID=45577844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110280416.XA Active CN102354277B (en) 2011-09-20 2011-09-20 Data storage method and device

Country Status (1)

Country Link
CN (1) CN102354277B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156178A (en) * 2015-04-17 2016-11-23 阿里巴巴集团控股有限公司 A kind of data processing method and equipment
CN107016027A (en) * 2016-12-08 2017-08-04 阿里巴巴集团控股有限公司 The method and apparatus for realizing business information fast search
CN109634963A (en) * 2018-12-11 2019-04-16 泰康保险集团股份有限公司 Processing method, device and the readable storage medium storing program for executing of declaration form data
CN110569315A (en) * 2019-07-29 2019-12-13 北京创鑫旅程网络技术有限公司 Data processing method and device based on data warehouse
CN113067762A (en) * 2021-03-24 2021-07-02 重庆长安汽车股份有限公司 In-vehicle data recording and recorded data extraction method for automatic driving

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100642824B1 (en) * 2003-11-06 2006-11-10 주식회사 신한은행 Bank transaction method and system using customized account number
US7275684B2 (en) * 2004-12-06 2007-10-02 Bank Of America Corporation Method and system for consolidating cash letters
CN101183986A (en) * 2007-11-26 2008-05-21 河北全通通信有限公司 Method for economized storage, construction ''green'' database
CN101702798A (en) * 2009-11-11 2010-05-05 南京联创科技集团股份有限公司 Design method of multi-service drive share frame model
CN101714273A (en) * 2009-05-26 2010-05-26 北京银丰新融科技开发有限公司 Rule engine-based method and system for monitoring exceptional service of bank

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100642824B1 (en) * 2003-11-06 2006-11-10 주식회사 신한은행 Bank transaction method and system using customized account number
US7275684B2 (en) * 2004-12-06 2007-10-02 Bank Of America Corporation Method and system for consolidating cash letters
CN101183986A (en) * 2007-11-26 2008-05-21 河北全通通信有限公司 Method for economized storage, construction ''green'' database
CN101714273A (en) * 2009-05-26 2010-05-26 北京银丰新融科技开发有限公司 Rule engine-based method and system for monitoring exceptional service of bank
CN101702798A (en) * 2009-11-11 2010-05-05 南京联创科技集团股份有限公司 Design method of multi-service drive share frame model

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156178A (en) * 2015-04-17 2016-11-23 阿里巴巴集团控股有限公司 A kind of data processing method and equipment
CN107016027A (en) * 2016-12-08 2017-08-04 阿里巴巴集团控股有限公司 The method and apparatus for realizing business information fast search
CN109634963A (en) * 2018-12-11 2019-04-16 泰康保险集团股份有限公司 Processing method, device and the readable storage medium storing program for executing of declaration form data
CN109634963B (en) * 2018-12-11 2021-01-26 泰康保险集团股份有限公司 Policy data processing method and device and readable storage medium
CN110569315A (en) * 2019-07-29 2019-12-13 北京创鑫旅程网络技术有限公司 Data processing method and device based on data warehouse
CN113067762A (en) * 2021-03-24 2021-07-02 重庆长安汽车股份有限公司 In-vehicle data recording and recorded data extraction method for automatic driving

Also Published As

Publication number Publication date
CN102354277B (en) 2014-07-09

Similar Documents

Publication Publication Date Title
Lysandrou Global inequality, wealth concentration and the subprime crisis: a Marxian commodity theory analysis
CN106294521A (en) Date storage method and data warehouse
CN102354277B (en) Data storage method and device
Xie et al. Internet finance in China: Introduction and practical approaches
Yongjie Enterprise life cycle, financial technology and digital transformation of banks—Evidence from China
Liang Inside shadow banking in China: Credit driven growth vs. financial stability
Xie Study on enterprise financial risk prevention and early warning system based on blockchain technology
Su [Retracted] Blockchain Empowers Chain Enterprises in the Digital Economy to Strengthen Risk Management Research
TW200411453A (en) Budget and financial analysis management system and method
Efayena Financial intermediaries and economic growth: The Nigerian evidence
Li et al. Relationship between enterprise financing structure and business performance assisted by blockchain for internet of things financing mode
CN114742634A (en) Method and device for processing data of same-industry deposit receipt and electronic equipment
Quenum Fintech and sustainability: A literature review
Olk et al. A credit theory of anti-credit money: How the cryptocurrency sphere turned into a shadow banking system
Zhu et al. Case V: alibaba: a decade-long road to financial services
Chen The Role of Blockchain Technology In the Digital Transformation of Traditional Banking Industry
Chen The impact of internet finance on commercial banks and countermeasures
Yao et al. The Exploration of Commercial Banks’ Credit Business and Risk Management Path from the Perspective of Fusion of Big Data
Sun Accounting Data Quality Evaluation Method Based on Improved Particle Swarm Algorithm
Sanga et al. FinTech, Entrepreneurship and SME Financing in Developing and Emerging Countries
Lanteri et al. Blockchain for Social Good: Emerging Models of Crypto Philanthropy
Nguyen et al. Adoption of General-purpose Technologies (GPT) in Australia: The Role of Skills| Bulletin–September 2023
Singh et al. Artificial Intelligence and Blockchain: The Future of Financial Services Technology
CN116541351A (en) Data processing method, device, equipment and storage medium
CN119646081A (en) A technology innovation and financial data sharing service platform based on blockchain technology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant