WO2021068612A1 - 过期数据的归档方法和装置 - Google Patents

过期数据的归档方法和装置 Download PDF

Info

Publication number
WO2021068612A1
WO2021068612A1 PCT/CN2020/105969 CN2020105969W WO2021068612A1 WO 2021068612 A1 WO2021068612 A1 WO 2021068612A1 CN 2020105969 W CN2020105969 W CN 2020105969W WO 2021068612 A1 WO2021068612 A1 WO 2021068612A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
expired
price
column cluster
business
Prior art date
Application number
PCT/CN2020/105969
Other languages
English (en)
French (fr)
Inventor
许军
周毅
司孝波
叶国华
Original Assignee
苏宁云计算有限公司
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 苏宁云计算有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3157820A priority Critical patent/CA3157820A1/en
Publication of WO2021068612A1 publication Critical patent/WO2021068612A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]

Definitions

  • This application relates to the field of big data technology, and in particular to a method and device for archiving expired data.
  • the e-commerce industry has a large amount of commodity SKUs (Stock Keeping Unit), and at the same time, there are a large amount of price data maintenance every day, and the amount of accumulated data is huge. If the expired price data is not processed, the amount of price data in the price system will become larger and larger.
  • SKUs Stock Keeping Unit
  • data is stored in relational databases, which will occupy more and more memory. At the same time, the performance of querying the database is getting lower and lower when the amount of data increases.
  • this application provides a method and device for archiving expired data.
  • a method for archiving expired data including:
  • the extraction of expired data in the business system includes:
  • periodical extraction of expired data in the business system includes:
  • the business data in the previous timing period is extracted from the business system as the expired data of this timing period.
  • archive database is used to store historical data
  • the storage format of historical data is: grouping according to preset business units, each business unit corresponds to a unique set of data; each group of data is set with a data column cluster and a date column cluster;
  • the key of the data column cluster is the effective period, and the value is the value of the business data;
  • the key of the date column cluster is the date of each day, and the value is the effective period corresponding to the date.
  • the temporarily storing the expired data in the preset transfer data table includes:
  • the transferring the expired data in the transfer data table to a preset archive database includes:
  • the business system is a price system
  • the data column cluster is a price column cluster
  • the value of the price column cluster is a price value
  • the business unit is a commodity type
  • the merging of the expired data after initialization into the historical data of the archive database includes:
  • the separately merging the expiration data of each product category into the historical data of the product category includes:
  • the historical data is updated according to the judgment result.
  • the updating historical data according to the judgment result includes:
  • the price column cluster is not updated, and a date relationship of the day is added to the date column cluster;
  • a device for archiving expired data including:
  • the extraction module is used to extract the expired data in the business system and temporarily store the expired data in the preset transfer data table;
  • Delete module used to delete expired data from the business system
  • the dump module is used to dump the expired data in the transfer data table to the preset archive database.
  • the solution of this application deletes and archives outdated data in the business system to ensure that only valid data is stored in the business system, thereby reducing the amount of data stored in the business system, and avoiding system performance degradation caused by a surge in data volume; expiring data is removed Transferring to another archive database does not affect the normal operation of the business system, and at the same time it can provide historical data query services.
  • Fig. 1 is a flow chart showing a method for archiving expired data according to an exemplary embodiment.
  • Fig. 2 is a system flowchart showing a method for archiving expired data according to an exemplary embodiment.
  • Fig. 3 is a schematic diagram showing a storage format of a price system according to an exemplary embodiment.
  • Fig. 4 is a schematic diagram showing a storage format of an HBase database according to an exemplary embodiment.
  • Fig. 5 is a schematic diagram showing a data table of an HBase database according to an exemplary embodiment.
  • Fig. 6 is a schematic diagram of a data table based on the merged data of Fig. 5.
  • Fig. 1 is a flow chart showing a method for archiving expired data according to an exemplary embodiment. This method can be applied to data archiving and cold and hot separation of trading systems, and specifically includes the following steps:
  • Step S1 Extract the expired data in the business system, and temporarily store the expired data in the preset transit data table;
  • Step S2 Delete expired data from the business system
  • Step S3 Transfer the expired data in the transfer data table to the preset archive database.
  • the solution of this application deletes and archives outdated data in the business system to ensure that only valid data is stored in the business system, thereby reducing the amount of data stored in the business system, and avoiding system performance degradation caused by a surge in data volume; expiring data is removed Transferring to another archive database does not affect the normal operation of the business system, and at the same time it can provide historical data query services.
  • the extraction of expired data in the business system includes:
  • a scheduled task can be set to extract business data once a day. If there are fewer data maintenance times, you can reduce the frequency of timing tasks; if you have more data maintenance times, you can increase the frequency of timing tasks.
  • the periodical extraction of expired data in the business system includes:
  • the business data in the previous timing period is extracted from the business system as the expired data of this timing period.
  • a timing period can be one day, and the timing task is executed once a day.
  • the overdue tasks extracted from each timed task are the business data of the previous day.
  • the archive database is used to store historical data
  • the storage format of historical data is: grouping according to preset business units, each business unit corresponds to a unique set of data; each group of data is set with a data column cluster and a date column cluster;
  • the key of the data column cluster is the effective period, and the value is the value of the business data;
  • the key of the date column cluster is the date of each day, and the value is the effective period corresponding to the date.
  • the business system is a price system
  • the data column cluster is a price column cluster
  • the value of the price column cluster is a price value
  • the business unit is a commodity type, that is, a commodity SKU
  • the transfer data table can be It is a Hive table
  • the archive database can be an HBase database.
  • the solution of this application first extracts the expired data in the price system and deletes the data in the price system, and then temporarily stores the expired data in the Hive table. Then convert the expired data temporarily stored in the Hive table into the storage format of the HBase database. Finally, the expired data after the conversion format is transferred to the HBase database.
  • the figure shows the current price data storage format of the price system.
  • expired data is stored in the format shown in the figure.
  • FIG 4 the figure shows the data storage format of the HBase database.
  • the historical price data stored in the HBase database is grouped by HBase Rowkey, and each product SKU corresponds to a set of data. Then the price data in each group is divided into time periods according to the start and end time. If the price data in different time periods are the same, the time periods are merged to reduce the amount of data. The last price data defaults to 2099231, which is convenient for expansion.
  • the price storage data is shown in the "price column cluster” in Figure 5.
  • the key is the date of each day, and the value is the key of the price column cluster corresponding to the date.
  • temporarily storing the expired data in a preset transit data table includes:
  • the transferring the expired data in the transfer data table to a preset archive database includes:
  • the merging the expired data after initialization into the historical data of the archive database includes:
  • Expired data must be initialized first, that is, converted to the format of the HBase database, before it can be transferred to the HBase database.
  • To initialize the expired price data is to group it by HBase Rowkey. After grouping, the product data of each SKU can be merged into the same data table to save storage space.
  • the separately merging the expiration data of each product category into the historical data of the product category includes:
  • the historical data is updated according to the judgment result.
  • the updating historical data according to the judgment result includes:
  • the price column cluster is not updated, and a date relationship of the day is added to the date column cluster;
  • the expiration price data after the format conversion is merged into the HBase database to determine whether the price of the day is the same as the price of the previous time. If it is the same, the price column cluster is not updated, and a date relationship is directly added to the date column cluster; if the price changes, the last data in the price column cluster is split.
  • the price column cluster remains unchanged, and a data column with the key “20190714” and the column value “20190103 ⁇ 20991231” can be added to the date column cluster.
  • HBase stores all row data of the price system according to time periods, and combines different types of prices, thereby reducing the occupied disk storage space.
  • the solution of this application archives and deletes the expired price data in the price system every day through timed tasks to ensure that only valid data is stored in the price system, so that the amount of data stored in the price system can be controlled, and the data storage cost of the price system can be reduced, and Does not affect the normal operation of the business system.
  • An archiving device for expired data including:
  • the extraction module is used to extract the expired data in the business system and temporarily store the expired data in the preset transfer data table;
  • Delete module used to delete expired data from the business system
  • the dump module is used to dump the expired data in the transfer data table to the preset archive database.
  • each part of this application can be implemented by hardware, software, firmware, or a combination thereof.
  • multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if it is implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: Discrete logic circuits, application-specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
  • a person of ordinary skill in the art can understand that all or part of the steps carried in the method of the foregoing embodiments can be implemented by a program instructing relevant hardware to complete.
  • the program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium. When executed, it includes one of the steps of the method embodiment or a combination thereof.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
  • the aforementioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种过期数据的归档方法和装置,所述方法包括:抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表(S1);将过期数据从业务系统中删除(S2);将中转数据表中的过期数据转存到预设的归档数据库(S3)。该方法将业务系统中的过期数据进行删除和归档,保证业务系统中只存储有效的数据,从而减少业务系统中存储的数据量,避免数据量暴增导致的系统性能下降;将过期数据转存到另外的归档数据库中,不影响业务系统的正常运行,同时还能提供历史数据查询服务。

Description

过期数据的归档方法和装置 技术领域
本申请涉及大数据技术领域,具体涉及一种过期数据的归档方法和装置。
背景技术
电商行业的商品SKU(Stock Keeping Unit,库存量单位)量很大,同时每天都有大量的价格数据维护,日积月累数据量非常巨大。如果不对过期的价格数据进行处理,那么价格系统中价格数据的数据量会越来越大。当前数据都是存储在关系型数据库,占用内存就会越来越大,同时数据量暴增的情况查询数据库性能也越来越低。
并且这些价格数据大部分都是过期的价格数据,这些数据对用户实时交易无任何影响;但是对于这些过期的价格数据也不能简单粗暴地进行删除,因为历史数据还需要用于经营分析、报表系统、指标分析等业务场景,以及用户查询历史价格的场景。
发明内容
为至少在一定程度上克服相关技术中存在的问题,本申请提供一种过期数据的归档方法和装置。
根据本申请实施例的第一方面,提供一种过期数据的归档方法,包括:
抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
将过期数据从业务系统中删除;
将中转数据表中的过期数据转存到预设的归档数据库。
进一步地,所述抽取业务系统中的过期数据,包括:
通过定时任务,定期抽取业务系统中的过期数据。
进一步地,所述定期抽取业务系统中的过期数据,包括:
在每个定时周期开始时,从业务系统中抽取上一个定时周期内的业务数据,作为本次定时周期的过期数据。
进一步地,所述归档数据库用于存储历史数据;
历史数据的存储格式为:照预设的业务单元进行分组,每个业务单元对应唯一的一组数据;每一组数据中都设置有一个数据列簇和一个日期列簇;
其中,所述数据列簇的key是生效时段,value是业务数据的数值;所述日期列簇的key是每天的日期,value是该日期对应的生效时段。
进一步地,所述将过期数据暂存到预设的中转数据表,包括:
对抽取的过期数据进行初始化,将过期数据的格式转换为历史数据的存储格式;
将初始化之后的过期数据暂存到预设的中转数据表中。
进一步地,所述将中转数据表中的过期数据转存到预设的归档数据库,包括:
将初始化之后的过期数据合并到归档数据库的历史数据中。
进一步地,所述业务系统是价格系统;所述数据列簇是价格列簇,所述价格列簇的value是价格数值;所述业务单元是商品种类;
所述将初始化之后的过期数据合并到归档数据库的历史数据中,包括:
将初始化之后的过期数据与历史数据进行商品种类的一一对应匹配;
分别将每一个商品种类的过期数据合并到该商品种类的历史数据中。
进一步地,所述分别将每一个商品种类的过期数据合并到该商品种类的历史数据中,包括:
判断过期数据的价格数值与历史数据中最后一个生效时段的价格数值是否相同;
根据判断结果对历史数据进行更新。
进一步地,所述根据判断结果对历史数据进行更新,包括:
如果相同,则不更新价格列簇,并在日期列簇中添加一条当天的日期关 系;
如果不相同,则拆分价格列簇中的最后一个生效时段,并修改日期列簇中的最后一个生效时段。
根据本申请实施例的第二方面,提供一种过期数据的归档装置,包括:
抽取模块,用于抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
删除模块,用于将过期数据从业务系统中删除;
转存模块,用于将中转数据表中的过期数据转存到预设的归档数据库。
本申请的实施例提供的技术方案具备以下有益效果:
本申请的方案将业务系统中的过期数据进行删除和归档,保证业务系统中只存储有效的数据,从而减少业务系统中存储的数据量,避免数据量暴增导致的系统性能下降;将过期数据转存到另外的归档数据库中,不影响业务系统的正常运行,同时还能提供历史数据查询服务。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。
图1是根据一示例性实施例示出的一种过期数据的归档方法的流程图。
图2是根据一示例性实施例示出的一种过期数据的归档方法的系统流程图。
图3是根据一示例性实施例示出的一种价格系统的存储格式示意图。
图4是根据一示例性实施例示出的一种HBase数据库的存储格式示意图。
图5是根据一示例性实施例示出的一个HBase数据库的数据表示意图。
图6是基于图5的合并数据后的数据表示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种过期数据的归档方法的流程图。该方法可以应用于交易系统的数据归档、冷热分离,具体包括以下步骤:
步骤S1:抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
步骤S2:将过期数据从业务系统中删除;
步骤S3:将中转数据表中的过期数据转存到预设的归档数据库。
本申请的方案将业务系统中的过期数据进行删除和归档,保证业务系统中只存储有效的数据,从而减少业务系统中存储的数据量,避免数据量暴增导致的系统性能下降;将过期数据转存到另外的归档数据库中,不影响业务系统的正常运行,同时还能提供历史数据查询服务。
一些实施例中,所述抽取业务系统中的过期数据,包括:
通过定时任务,定期抽取业务系统中的过期数据。
比如,定时任务可以设置为,每天抽取一次业务数据。如果数据维护次数较少,可以降低定时任务的频率;如果数据维护次数较多,可以提高定时任务的频率。
一些实施例中,所述定期抽取业务系统中的过期数据,包括:
在每个定时周期开始时,从业务系统中抽取上一个定时周期内的业务数据,作为本次定时周期的过期数据。
比如,一个定时周期可以是一天,则每天执行一次定时任务。每次定时任务抽取的过期任务,就是前一天的业务数据。
一些实施例中,所述归档数据库用于存储历史数据;
历史数据的存储格式为:照预设的业务单元进行分组,每个业务单元对应唯一的一组数据;每一组数据中都设置有一个数据列簇和一个日期列簇;
其中,所述数据列簇的key是生效时段,value是业务数据的数值;所述日期列簇的key是每天的日期,value是该日期对应的生效时段。
下面以电商平台的价格系统为例,结合具体的应用场景对本申请的方案进行拓展说明。
在价格系统中,所述业务系统是价格系统;所述数据列簇是价格列簇,所述价格列簇的value是价格数值;所述业务单元是商品种类,即商品SKU;中转数据表可以是Hive表,归档数据库可以是HBase数据库。
参照图2,本申请的方案,首先要抽取价格系统里面的过期数据并删除价格系统里面的数据,然后将过期数据暂存到Hive表。然后将暂存在Hive表的过期数据转换成HBase数据库的存储格式。最后将转换格式后的过期数据转存到HBase数据库。
参照图3,图中示出了价格系统当前的价格数据存储格式。在价格系统中,过期数据即是按照图示的格式进行存储的。
参照图4,图中示出了HBase数据库的数据存储格式。
参照图5,HBase数据库中存储的历史价格数据,按HBase的Rowkey分组,每个商品SKU对应一组数据。然后对每个组里面的价格数据再根据开始和结束时间划分好时间段,如果不同时间段的价格数据相同,则合并时间段以减少数据量。最后一条价格数据默认到20991231,从而方便扩展。
格式转换后,价格存储数据如图5中“价格列簇”所示。同时为了快速检索再新建一个日期列簇,用于查询使用,如图5中“日期列簇”所示,key是每天的日期,value是该日期对应的价格列簇的key。
一些实施例中,所述将过期数据暂存到预设的中转数据表,包括:
对抽取的过期数据进行初始化,将过期数据的格式转换为历史数据的存储格式;
将初始化之后的过期数据暂存到预设的中转数据表中。
一些实施例中,所述将中转数据表中的过期数据转存到预设的归档数据库,包括:
将初始化之后的过期数据合并到归档数据库的历史数据中。
一些实施例中,所述将初始化之后的过期数据合并到归档数据库的历史数据中,包括:
将初始化之后的过期数据与历史数据进行商品种类的一一对应匹配;
分别将每一个商品种类的过期数据合并到该商品种类的历史数据中。
过期数据要先进行初始化,也即将其转换为HBase数据库的格式,才能转存到HBase数据库中。对过期价格数据进行初始化,就是将其按HBase的Rowkey进行分组。进行分组后,即可将每一种SKU的商品数据合并到同一个数据表中,以节省存储空间。
一些实施例中,所述分别将每一个商品种类的过期数据合并到该商品种类的历史数据中,包括:
判断过期数据的价格数值与历史数据中最后一个生效时段的价格数值是否相同;
根据判断结果对历史数据进行更新。
一些实施例中,所述根据判断结果对历史数据进行更新,包括:
如果相同,则不更新价格列簇,并在日期列簇中添加一条当天的日期关系;
如果不相同,则拆分价格列簇中的最后一个生效时段,并修改日期列簇中的最后一个生效时段。
将格式转换后的过期价格数据合并到HBase数据库中,先判断当天的价格和之前时间的价格是否一样。如果一样,则不更新价格列簇,直接在日期列簇加一条当天的日期关系;如果价格发生变化,则将价格列簇里面的最后一条数据进行拆分。
更具体来讲,假设20190714的价格数据发生变化,那么基于图5处理后的数据如图6所示。在此情况下,即价格发生变化,需要将图5中价格列簇 的最后一行“20190103~20991231”拆分为图6中价格列簇的最后两行;同时由于价格列簇的列key改变,则日期列簇的列value也要相应改变,即图5的日期列簇中最后一行的生效时段要进行同样的拆分。
在20190714的价格数据不变的情况下,价格列簇不变,日期列簇中添加一条列key为“20190714”、列value为“20190103~20991231”的数据即可。
需要说明的是,如果价格连续不变动,在HBase里面记录永远是一条。同时HBase里面把价格系统的所有行数据按时间段存储,并把不同类型的价格合并,从而减少了占用的磁盘存储空间。
本申请的方案通过定时任务每天归档删除价格系统中的过期价格数据,保证价格系统中只存储有效的数据,从而使价格系统中存储的数据量可控,能够降低价格系统的数据存储成本,并且不影响业务系统正常运行。
将数据转换格式后存储到HBase里,可以提供多维度的、快速的历史数据查询服务,能够实现价格过期数据系统的快速检索;转换格式后,将业务系统中不同的过期价格数据按商品维度进行合并,并按时间段归类,这样能够节约存储空间,存储成本比常见的关系型数据库会减少很多。
本申请还提供如下的实施例:
一种过期数据的归档装置,包括:
抽取模块,用于抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
删除模块,用于将过期数据从业务系统中删除;
转存模块,用于将中转数据表中的过期数据转存到预设的归档数据库。
关于上述实施例中的装置,其中各个模块执行操作的具体步骤已经在有关该方法的实施例中进行了详细描述,此处不再详细阐述说明。
可以理解的是,上述各实施例中相同或相似部分可以相互参考,在一些实施例中未详细说明的内容可以参见其他实施例中相同或相似的内容。
需要说明的是,在本申请的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中, 除非另有说明,“多个”的含义是指至少两个。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例 中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (10)

  1. 一种过期数据的归档方法,其特征在于,包括:
    抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
    将过期数据从业务系统中删除;
    将中转数据表中的过期数据转存到预设的归档数据库。
  2. 根据权利要求1所述的方法,其特征在于,所述抽取业务系统中的过期数据,包括:
    通过定时任务,定期抽取业务系统中的过期数据。
  3. 根据权利要求2所述的方法,其特征在于,所述定期抽取业务系统中的过期数据,包括:
    在每个定时周期开始时,从业务系统中抽取上一个定时周期内的业务数据,作为本次定时周期的过期数据。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述归档数据库用于存储历史数据;
    历史数据的存储格式为:照预设的业务单元进行分组,每个业务单元对应唯一的一组数据;每一组数据中都设置有一个数据列簇和一个日期列簇;
    其中,所述数据列簇的key是生效时段,value是业务数据的数值;所述日期列簇的key是每天的日期,value是该日期对应的生效时段。
  5. 根据权利要求4所述的方法,其特征在于,所述将过期数据暂存到预设的中转数据表,包括:
    对抽取的过期数据进行初始化,将过期数据的格式转换为历史数据的存储格式;
    将初始化之后的过期数据暂存到预设的中转数据表中。
  6. 根据权利要求5所述的方法,其特征在于,所述将中转数据表中的过期数据转存到预设的归档数据库,包括:
    将初始化之后的过期数据合并到归档数据库的历史数据中。
  7. 根据权利要求5所述的方法,其特征在于,所述业务系统是价格系统; 所述数据列簇是价格列簇,所述价格列簇的value是价格数值;所述业务单元是商品种类;
    所述将初始化之后的过期数据合并到归档数据库的历史数据中,包括:
    将初始化之后的过期数据与历史数据进行商品种类的一一对应匹配;
    分别将每一个商品种类的过期数据合并到该商品种类的历史数据中。
  8. 根据权利要求7所述的方法,其特征在于,所述分别将每一个商品种类的过期数据合并到该商品种类的历史数据中,包括:
    判断过期数据的价格数值与历史数据中最后一个生效时段的价格数值是否相同;
    根据判断结果对历史数据进行更新。
  9. 根据权利要求8所述的方法,其特征在于,所述根据判断结果对历史数据进行更新,包括:
    如果相同,则不更新价格列簇,并在日期列簇中添加一条当天的日期关系;
    如果不相同,则拆分价格列簇中的最后一个生效时段,并修改日期列簇中的最后一个生效时段。
  10. 一种过期数据的归档装置,其特征在于,包括:
    抽取模块,用于抽取业务系统中的过期数据,并将过期数据暂存到预设的中转数据表;
    删除模块,用于将过期数据从业务系统中删除;
    转存模块,用于将中转数据表中的过期数据转存到预设的归档数据库。
PCT/CN2020/105969 2019-10-12 2020-07-30 过期数据的归档方法和装置 WO2021068612A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3157820A CA3157820A1 (en) 2019-10-12 2020-07-30 Method of and device for archiving stale data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910967896.3A CN110866006A (zh) 2019-10-12 2019-10-12 过期数据的归档方法和装置
CN201910967896.3 2019-10-12

Publications (1)

Publication Number Publication Date
WO2021068612A1 true WO2021068612A1 (zh) 2021-04-15

Family

ID=69652650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/105969 WO2021068612A1 (zh) 2019-10-12 2020-07-30 过期数据的归档方法和装置

Country Status (3)

Country Link
CN (1) CN110866006A (zh)
CA (1) CA3157820A1 (zh)
WO (1) WO2021068612A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866006A (zh) * 2019-10-12 2020-03-06 苏宁云计算有限公司 过期数据的归档方法和装置
CN111737243A (zh) * 2020-06-19 2020-10-02 中国银行股份有限公司 历史数据清理方法及装置
CN111881138A (zh) * 2020-07-29 2020-11-03 北京微步在线科技有限公司 一种数据存储方法及装置
CN114116685A (zh) * 2020-08-25 2022-03-01 福建天泉教育科技有限公司 一种非结构化数据库中历史数据的清理方法及终端
CN112416937A (zh) * 2020-11-24 2021-02-26 平安普惠企业管理有限公司 数据归档方法、装置、电子设备及存储介质
CN113806451A (zh) * 2021-09-17 2021-12-17 平安普惠企业管理有限公司 数据划分处理方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514295A (zh) * 2013-10-10 2014-01-15 中国电子科技集团公司第十五研究所 历史数据归档方法及历史数据归档装置
CN105653560A (zh) * 2014-11-28 2016-06-08 华为软件技术有限公司 数据归档方法和装置
CN106557578A (zh) * 2016-11-23 2017-04-05 中国工商银行股份有限公司 历史数据查询方法及系统
US20170286470A1 (en) * 2014-12-22 2017-10-05 Huawei Technologies Co., Ltd. Method and Apparatus for Querying Service Data, and Database System
CN107832463A (zh) * 2017-11-28 2018-03-23 中国银行股份有限公司 一种金融数据服务平台
CN110866006A (zh) * 2019-10-12 2020-03-06 苏宁云计算有限公司 过期数据的归档方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8904226B2 (en) * 2010-08-26 2014-12-02 Cleversafe, Inc. Migrating stored copies of a file to stored encoded data slices
CN106294009B (zh) * 2016-08-05 2019-09-10 北京小米支付技术有限公司 数据库归档方法及系统
CN109522314B (zh) * 2018-10-16 2023-04-14 平安科技(深圳)有限公司 基于区块链的数据归档方法及终端设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514295A (zh) * 2013-10-10 2014-01-15 中国电子科技集团公司第十五研究所 历史数据归档方法及历史数据归档装置
CN105653560A (zh) * 2014-11-28 2016-06-08 华为软件技术有限公司 数据归档方法和装置
US20170286470A1 (en) * 2014-12-22 2017-10-05 Huawei Technologies Co., Ltd. Method and Apparatus for Querying Service Data, and Database System
CN106557578A (zh) * 2016-11-23 2017-04-05 中国工商银行股份有限公司 历史数据查询方法及系统
CN107832463A (zh) * 2017-11-28 2018-03-23 中国银行股份有限公司 一种金融数据服务平台
CN110866006A (zh) * 2019-10-12 2020-03-06 苏宁云计算有限公司 过期数据的归档方法和装置

Also Published As

Publication number Publication date
CN110866006A (zh) 2020-03-06
CA3157820A1 (en) 2021-04-15

Similar Documents

Publication Publication Date Title
WO2021068612A1 (zh) 过期数据的归档方法和装置
CN111563102A (zh) 缓存更新方法、服务器、系统及存储介质
US5995980A (en) System and method for database update replication
US9342573B2 (en) Universal delta data load
US11487714B2 (en) Data replication in a data analysis system
JP4403068B2 (ja) データウェアハウジングのための高性能な変更の捕捉
US8280917B1 (en) Batching content management operations to facilitate efficient database interactions
US10671641B1 (en) Method and computer program product for efficiently loading and synchronizing column-oriented databases
Yang et al. F1 Lightning: HTAP as a Service
US20100223231A1 (en) Merging Records From Different Databases
Bear et al. The Vertica database: SQL RDBMS for managing big data
CN110096509A (zh) 大数据环境下实现历史数据拉链表存储建模处理的系统及方法
CN102411632B (zh) 基于链表的内存数据库页式存储方法
US20220019567A1 (en) Data storage using vectors of vectors
US9886490B1 (en) Common extract store
US10915513B2 (en) Archival of data in a relational database management system using block level copy
US11061926B2 (en) Data warehouse management and synchronization systems and methods
JP2018514886A (ja) 多数の重複するソースからの大量の時間データの集計
US11144373B2 (en) Data pipeline using a pluggable topology connecting components without altering code of the components
US20170329830A1 (en) Read-optimized database changes
US20180293270A1 (en) Relational database management method and update reflection apparatus
US20030158767A1 (en) Method and system for adaptive software system interface and external database synchronization
US20170357691A1 (en) Managing Data Obsolescence in Relational Databases
US20060004846A1 (en) Low-overhead relational database backup and restore operations
US10216784B1 (en) Referential sampling of polygot datasets

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20874217

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3157820

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20874217

Country of ref document: EP

Kind code of ref document: A1