CN106557388A - Time serieses storage method and device - Google Patents

Time serieses storage method and device Download PDF

Info

Publication number
CN106557388A
CN106557388A CN201611088597.5A CN201611088597A CN106557388A CN 106557388 A CN106557388 A CN 106557388A CN 201611088597 A CN201611088597 A CN 201611088597A CN 106557388 A CN106557388 A CN 106557388A
Authority
CN
China
Prior art keywords
data
data block
time serieses
write
index
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.)
Pending
Application number
CN201611088597.5A
Other languages
Chinese (zh)
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.)
Shanghai Ctrip Business Co Ltd
Original Assignee
Shanghai Ctrip Business Co 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 Shanghai Ctrip Business Co Ltd filed Critical Shanghai Ctrip Business Co Ltd
Priority to CN201611088597.5A priority Critical patent/CN106557388A/en
Publication of CN106557388A publication Critical patent/CN106557388A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of time serieses storage method and device, the time serieses storage method is comprised the following steps:It is written into data flow and is divided into data block;Timestamp is indexed for each data block;Write the data block;Write the timestamp of the data block index and form index file;Generate control head and write index file.The present invention realizes more fast and convenient data recovery by the index building file in storing process and its control head.

Description

Time serieses storage method and device
Technical field
The present invention relates to a kind of storage method and device, especially a kind of time serieses storage method and device.
Background technology
During to database application, artificial maloperation, artificial malicious sabotage, unstable, the storage medium of system Damage etc. reason, be likely to cause the loss of significant data.Once data go out active or damage, all will be to enterprise Huge loss is brought with individual.This is accomplished by carrying out database recovery.But existing database data recovery difficulty is high, extensive Compound recipe method is complicated, and especially different failure conditions need different recovery operations, so the fast quick-recovery of data cannot be realized.
The content of the invention
The technical problem to be solved in the present invention is the data recovery difficulty in order to overcome in prior art after database corruption Height, the complicated defect of restoration methods, there is provided a kind of time serieses storage method and device, by rope is built in storing process Quotation part and its control head, realize more fast and convenient data recovery.
The present invention is solving above-mentioned technical problem by following technical proposals:
The invention provides a kind of time serieses storage method, is characterized in, the time serieses storage method include with Lower step:
It is written into data flow and is divided into data block;
Timestamp is indexed for each data block;
Write the data block;
Write the timestamp of the data block index and form index file;
Generate control head and write index file.
It is preferred that the capacity of the data block is 64Kb.
Preferably, before splitting traffic, data to be stored are generated into data flow according to database storage requirement.
The invention provides a kind of time serieses storage device, is characterized in, the time serieses storage device includes:
Segmentation module, is divided into data block for being written into data flow;
Time index module, for indexing timestamp for each data block;
Data write. module, for writing the data block;
Index writing module, for writing the timestamp of the data block index and forming index file;
Index writing module is additionally operable to generate control head and write index file.
Not only stab to determine Data writing time for each data block setup time in data flow in the present invention, also by writing Enter in data flow procedure, write control head mode come determine data write integrity, so as to in data recovery procedure number According to verity and reliability provide enough reference.
It is preferred that the capacity of the data block is 64Kb.
Preferably, the time serieses storage device includes also including data flow generation module, for by data to be stored Data flow is generated according to database storage requirement.
The present invention provides again a kind of time serieses storage device, is characterized in, the time serieses storage device includes:
Server and data base;
Wherein described server is written into data flow and is divided into data block;
The server records the timestamp of the data block index while by data block write into Databasce;
Server is by the timestamp write into Databasce of all data block indexes in data flow and generates index file;
The server generates the index file of control head write into Databasce.
It is preferred that the capacity of the data block is 64Kb.
Preferably, the server receives data to be stored, and generates data flow according to database storage requirement.
Heretofore described application program can be not limited solely to apply class using any program for needing to access data base Program.
On the basis of common sense in the field is met, above-mentioned each optimum condition, can combination in any, obtain final product each preferable reality of the present invention Example.
The present invention positive effect be:
By the index building file in storing process and its control head, especially set up for each data block in data flow Determining Data writing time, also by write data flow procedure, the mode of write control head is determining data for timestamp The integrity of write, realizes more fast and convenient data recovery.
Description of the drawings
Flow charts of the Fig. 1 for the time serieses storage of embodiments of the invention 1.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to described reality Among applying a scope.
The present invention in order to realize more fast and convenient data recovery, by the index building file in storing process and its Control head, then by writing data blocks successively, timestamp and control head, using index file and the completeness guarantee of control head The effectiveness of the data of the file having been written into.
The present invention is further explained below by following embodiments.
Embodiment 1
As shown in figure 1, time serieses storage method is comprised the following steps in the present embodiment:
Step S1, receives data to be stored, and generates data flow according to target database memory requirement or storage configuration.
Step S2, is written into data flow and is divided into the data block that capacity is 64Kb.Wherein can be according to data base or number According to the amount of capacity for needing adjustment data block recovered, such as 32Kb, 128Kb or 256Kb etc..
Step S3, is that each data block indexes timestamp.
Step S4, writes the data block.
Step S5, writes the timestamp of the data block index and forms index file.
Step S6, generates control head and writes index file.
In order to realize said method, it is possible to use hardware platform build time serieses storage device, it include server and Data base, wherein the server receives data to be stored, and generates data flow according to database storage requirement.Hereafter, it is described Server is written into data flow and is divided into data block.
Then, the server records the timestamp of the data block index while by data block write into Databasce. After the data block that the data base obtains data flow, the timestamp write into Databasce that data block described in data flow is indexed is simultaneously Generate index file.Finally, the server generates the index file of control head write into Databasce.
In addition also can using platforms such as Database Systems, rebuilding Implement of Function Module time serieses storage device, For example build in database platform for data to be stored are given birth to according to the data flow that database storage requirement generates data flow Into module, the segmentation module of data block is divided into for being written into data flow, during for timestamp being indexed for each data block Between index module, for write the data block Data write. module and for write data block index timestamp simultaneously The index writing module of index file is formed, writing module is indexed in addition and is additionally operable to generate control head and write index file.It is logical Structure above-mentioned functions module is crossed so as to realize that time serieses are stored.
The description of the specific embodiment of the time serieses storage method by more than, those skilled in the art can Can be come in the way of adding required general hardware platform by software by the time serieses Stored Procedure for being well understood to the application Realize.Based on such understanding, the part that the technical scheme of the application is substantially contributed to prior art in other words can be with Embodied in the form of software product, the computer software product can be stored in storage medium, such as ROM/RAM is (only Read memorizer/random access memory), magnetic disc, CD etc., using including some instructions so that computer equipment (can be with It is personal computer, server, or network equipment etc.) perform described in some parts of the embodiment of the present application or embodiment Method.
The application can be used in numerous general or special purpose computing system environment or configuration.For example:Personal computer, service Device computer, handheld device or portable set, laptop device, multicomputer system, based on the system of microprocessor, top set Box, programmable consumer-elcetronics devices, network PC (PC), minicomputer, mainframe computer, including any of the above system Distributed computing environment of system or equipment etc..
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes execution particular task or realizes the routine of particular abstract data type, program, object, group Part, data structure etc..The application is put into practice in a distributed computing environment can also, in these distributed computing environment, by The remote processing devices connected by communication network are performing task.In a distributed computing environment, program module can be with In local and remote computer-readable storage medium including including storage device.
Although the foregoing describing the specific embodiment of the present invention, it will be appreciated by those of skill in the art that these It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back On the premise of the principle and essence of the present invention, various changes or modifications, but these changes can be made to these embodiments Protection scope of the present invention is each fallen within modification.

Claims (9)

1. a kind of time serieses storage method, it is characterised in that the time serieses storage method is comprised the following steps:
It is written into data flow and is divided into data block;
Timestamp is indexed for each data block;
Write the data block data stream;
Write the timestamp of the data block index and form index file;
Generate control head and write index file.
2. time serieses storage method as claimed in claim 1, it is characterised in that the capacity of the data block is 64Kb.
3. time serieses storage method as claimed in claim 1, it is characterised in that before splitting traffic, will be to be stored Data generate data flow according to database storage requirement.
4. a kind of time serieses storage device, it is characterised in that the time serieses storage device includes:
Segmentation module, is divided into data block for being written into data flow;
Time index module, for indexing timestamp for each data block;
Data write. module, for writing the data block;
Index writing module, for writing the timestamp of the data block index and forming index file;
Index writing module is additionally operable to generate control head and write index file.
5. time serieses storage device as claimed in claim 4, it is characterised in that the capacity of the data block is 64Kb.
6. time serieses storage device as claimed in claim 4, it is characterised in that the time serieses storage device is included also Including data flow generation module, for data to be stored are generated data flow according to database storage requirement.
7. a kind of time serieses storage device, it is characterised in that the time serieses storage device includes:
Server and data base;
Wherein described server is written into data flow and is divided into data block;
The server records the timestamp of the data block index while by data block write into Databasce;
Timestamp write into Databasce that data block described in data flow is indexed by server simultaneously generates index file;
The server generates the index file of control head write into Databasce.
8. time serieses storage device as claimed in claim 7, it is characterised in that the capacity of the data block is 64Kb.
9. time serieses storage device as claimed in claim 7, it is characterised in that the server receives data to be stored, And data flow is generated according to database storage requirement.
CN201611088597.5A 2016-12-01 2016-12-01 Time serieses storage method and device Pending CN106557388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611088597.5A CN106557388A (en) 2016-12-01 2016-12-01 Time serieses storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611088597.5A CN106557388A (en) 2016-12-01 2016-12-01 Time serieses storage method and device

Publications (1)

Publication Number Publication Date
CN106557388A true CN106557388A (en) 2017-04-05

Family

ID=58445468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611088597.5A Pending CN106557388A (en) 2016-12-01 2016-12-01 Time serieses storage method and device

Country Status (1)

Country Link
CN (1) CN106557388A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280015A (en) * 2018-02-07 2018-07-13 福建星瑞格软件有限公司 Cluster server daily record real-time processing method based on big data and computer equipment
CN108470070A (en) * 2018-03-29 2018-08-31 重庆大学 A kind of multivariate time series distributed data storage and restoration methods

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260645A1 (en) * 2006-04-28 2007-11-08 Oliver Augenstein Methods and infrastructure for performing repetitive data protection and a corresponding restore of data
CN105072196A (en) * 2015-08-27 2015-11-18 携程计算机技术(上海)有限公司 Distributed data package storage, recall method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260645A1 (en) * 2006-04-28 2007-11-08 Oliver Augenstein Methods and infrastructure for performing repetitive data protection and a corresponding restore of data
CN105072196A (en) * 2015-08-27 2015-11-18 携程计算机技术(上海)有限公司 Distributed data package storage, recall method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨璐: ""【技术分享】姜祥宇:MySQL时间序列存储引擎的搜索与实践之旅"", 《HTTPS://MP.WEIXIN.QQ.COM/S/FUFRL8Y41AHDXXY1RIT5SG》 *
王有成: ""WiMAX协议分析软件的设计和实现"", 《中国优秀硕士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280015A (en) * 2018-02-07 2018-07-13 福建星瑞格软件有限公司 Cluster server daily record real-time processing method based on big data and computer equipment
CN108470070A (en) * 2018-03-29 2018-08-31 重庆大学 A kind of multivariate time series distributed data storage and restoration methods

Similar Documents

Publication Publication Date Title
US20190129649A1 (en) Data storage method and apparatus
US9372908B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
DE112019005770T5 (en) Storage management for a cloud-based storage system
US11010103B2 (en) Distributed batch processing of non-uniform data objects
CN104765693A (en) Data storage method, device and system
WO2019000950A1 (en) Fragment management method and fragment management apparatus
WO2006048780A3 (en) Method and system for network storage device failure protection and recovery
CN107340971B (en) A kind of storage of data with restore framework and method
CN105930226B (en) A kind of data processing method and device
CN104615577A (en) Big data server
CN105404565B (en) A kind of dual-active data guard method and device
CN110456984A (en) The method that the block device of a kind of pair of Ceph storage carries out continuous data protection
CN106557388A (en) Time serieses storage method and device
DE112013001108B4 (en) A METHOD, DEVICE, CONTROLLER, COMPUTER PROGRAM, AND COMPUTER PROGRAM PRODUCT FOR WRITING NEW DATA OF A FIRST BLOCK SIZE INTO A SECOND BLOCK SIZE USING A WRITE-WRITE MODE
US9015433B2 (en) Resiliency with a destination volume in a replication environment
CN104572492A (en) Method and apparatus of burning data to FAT (File Allocation Table)32 partition
CN104978241B (en) A kind of data reconstruction method and device of COW type file systems
CN104978279A (en) Continuous data protection method based on data block
CN111897684A (en) Disk fault simulation test method and device and electronic equipment
CN105095352B (en) Data processing method and device applied to distributed system
DE102020113691A1 (en) SYSTEMS AND PROCEDURES FOR MANAGING END POINT SAFETY STATES
CN103729269A (en) Cloud architecture-based network test data double-cache method
CN106407385A (en) Data management method and system, and equipment
CN110263060A (en) A kind of ERP electronic accessories management method and computer equipment
CN115185744A (en) Validity verification method and device of backup data and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170405

RJ01 Rejection of invention patent application after publication