CN102902606A - Data backup method and data backup device - Google Patents

Data backup method and data backup device Download PDF

Info

Publication number
CN102902606A
CN102902606A CN2012103844008A CN201210384400A CN102902606A CN 102902606 A CN102902606 A CN 102902606A CN 2012103844008 A CN2012103844008 A CN 2012103844008A CN 201210384400 A CN201210384400 A CN 201210384400A CN 102902606 A CN102902606 A CN 102902606A
Authority
CN
China
Prior art keywords
backup
time interval
time
value
parameter
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
CN2012103844008A
Other languages
Chinese (zh)
Other versions
CN102902606B (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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software 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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201210384400.8A priority Critical patent/CN102902606B/en
Publication of CN102902606A publication Critical patent/CN102902606A/en
Application granted granted Critical
Publication of CN102902606B publication Critical patent/CN102902606B/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 relates to a data backup method. The data backup method comprises the following steps: D1. obtaining a backup parameter and obtaining a time interval value of next backup according to the backup parameter; D2. recording the backup time interval value obtained by a backup time interval calculation module, and timing; D3. when execution time is up, backuping a file; and D4. recording the backup parameter of current backup. Relative to the prior art, the data backup method and the data backup device can automatically and dynamically adjust a file backup time interval according to a file data modification situation so as to perform an automatic backup operation.

Description

A kind of data back up method and device
Technical field
The present invention relates to the Computer Applied Technology field, be specifically related to a kind of data back up method and device.
Background technology
At computer application field, data backup refers to all or part of data acquisition in the computing machine is made copy replication to the process of other memory locations.And the file system of computing machine is the nucleus module of application program (such as office software) file management, is managing the local persistence work of data of application program.The user can run into the situation that program exception withdraws from often in the middle of the process of using software, achievement before is not owing to preserving and momentary loss.For fear of the generation of above-mentioned situation, application software generally can provide the function of timed backup.So-called timed backup, refer to that application program at set intervals, check whether the current document that moves is preserved, if do not preserve, then the current document of opening is backed up, like this, occur unusually withdrawing from or computer system fault or misoperation cause loss of data or when damaging in application program, can realize fast quick-recovery by the data of backup, to avoid unnecessary loss.
But the BACKUP TIME interval of present timed backup is fixed, as, the user sets the time interval of backup by menu page, and such as 10 minutes, then application program just once backed up automatically every 10 minutes.But the data of the time period between twice automated back-up still can not be backed up timely, if the user has carried out data modification by a relatively large margin and not backup then can produce larger loss within this time period.If the user with time interval of this timed backup arrange shorter, the risk less of its obliterated data, but the backup in editor can cause stronger interruption sense, and then cause the user to experience decline.
Summary of the invention
The object of the invention is to overcome shortcoming of the prior art with not enough, data back up method and the device of a kind of dynamic adjustment timing interval function is provided.
The present invention adopts following technical scheme to realize: a kind of data back up method, it comprises the steps:
Step D1: obtain the backup parameter, and according to the next time interval value that backs up of backup gain of parameter;
Step D2: record the BACKUP TIME spacing value that this BACKUP TIME interval calculation module obtains, and carry out timing;
Step D3: when arriving the execution time, file is backed up;
Step D4: the backup parameter that records current backup.
Wherein, this backup parameter be that the backup last time backed up is consuming time, current file is big or small, in the current memory size, file type, the rotation speed of hard disk one or more.
This step D4 comprises step by step:
Step D41: judge whether this document has newly-increased data, if enter step D42; If not, then return step D1;
Step D42: carry out file is backed up.
Consuming time during less than a threshold value when the backup of last time backup, higher to the frequency of file backup, consuming time during greater than this threshold value when the backup of last time backup, " time interval " definite value of then setting according to a Fixed Time Interval or user backs up.
And a kind of data backup device comprises:
BACKUP TIME interval calculation module, it obtains the backup parameter, and according to the next time interval value that backs up of backup gain of parameter;
Timing module, it records the BACKUP TIME spacing value that this BACKUP TIME interval calculation module obtains, and carries out timing;
Backup module, when arriving the execution time, this backup module backs up file;
Backup reference record module, it records the backup parameter of current backup.
Wherein, backup parameter of this backup reference record module records be that the backup last time backed up is consuming time, current file is big or small, in the current memory size, file type, the rotation speed of hard disk one or more.
This backup module comprises revises judging unit and backup performance element, whether this modification judgment unit judges this document has newly-increased data, if then instruction backup performance element is carried out file is backed up, if not, then instruction BACKUP TIME interval calculation module obtains the next time interval value that backs up.
With respect to prior art, data back up method of the present invention and device can carry out automated back-up according to the time interval that the modification situation automatic dynamic of file data is adjusted file backup.Guaranteeing that also having good user under the prerequisite that data can in time back up experiences.
In order to understand more clearly the present invention, set forth the specific embodiment of the present invention below with reference to description of drawings.
Description of drawings
Fig. 1 is the process flow diagram of data back up method of the present invention.
Fig. 2 is the module diagram of data backup device of the present invention.
Fig. 3 is the functional image of convergent function.
Embodiment
Embodiment 1
See also Fig. 1, it is the process flow diagram of data back up method of the present invention.This data back up method comprises the steps:
Step S11: open or a newly-built file.
Step S12: the backup parameter when calling this and last time backing up, and according to the time interval value of this backup gain of parameter backup next time.
In the present embodiment, be the time interval value that obtains backup next time by the mode of lookup table, this time interval value lookup table is as follows:
Last time the backup of backup was consuming time The time interval value of backup next time
0 30s
≤500ms 30s
≤1s 60s
≤10s 200s
≤20s 300s
>20s " time interval " definite value of setting according to the user backs up
Particularly, for new document, default setting its last time backed up consuming time be 0 value.Can see from above table, when the backup of last time backup consuming time more hour, next time the time interval value of backup just set less.This be because, last time the backup backup consuming time less, illustrate that its file data amount is fewer, then the backup speed faster, can not cause the interruption sense of card machine to the user; On the contrary, back up consuming time greatlyr, represent that then this document data volume is larger, then the speed of backup is slower, then might cause the interruption sense of card machine to the user.And within the time of 300s, the user changes the data volume of data can't be too large, can not cause very large risk to loss of data.Therefore, consuming time during less than a threshold value in the backup of last time backup, higher to the frequency of file backup, consuming time during greater than this threshold value when the backup of last time backup, " time interval " definite value of then setting according to the user backs up.
Step S13: beginning timing;
Step S14: when arriving the execution time, file is backed up;
Wherein, this step comprises again following substep:
Step S141: judge whether this document has newly-increased data; If then enter step S142; If not, then return step S12.
Particularly, when program is moved, be modified with expression this document because file can increase an attribute automatically in the process of revising, therefore, attribute that can be by access or inquiry file is to judge whether this document has newly-increased data.
Step S142: carry out file is backed up.
Step S15: the backup parameter that records current backup;
Wherein, the backup parameter of this current backup is that current backup is consuming time.
Step S16: judge whether close file, if not, then return step S12; If then this flow process finishes.
In above-mentioned method, the meaning of backup is included on the basis of former document backup or preserves new content, or again in other zone backups of storage medium or preserve a document.
See also Fig. 2, it is the module diagram of data backup device of the present invention.This data backup device comprises detection module 11, BACKUP TIME interval calculation module 12, timing module 13, backup module 14, backup reference record module 15 and closing of a file judge module 16.
This detection module 11 detects to be opened or a newly-built file.When detection is opened or during a newly-built file, namely notified BACKUP TIME interval calculation module 12.
This backup parameter when last time backing up that this time interval computing module 12 calls this backup reference record module 15 records, and according to the time interval value of this backup gain of parameter backup next time.Wherein, this backup parameter be that the backup last time backed up is consuming time.
In the present embodiment, this time interval computing module 12 is to comprise a time spacing value lookup table, obtains the time interval value of backup next time by parameter corresponding in lookup table, and this time interval value lookup table is as follows:
Last time the backup of backup was consuming time The time interval value of backup next time
0 30s
≤500ms 30s
≤1s 60s
≤10s 200s
≤20s 300s
>20s " time interval " definite value of setting according to the user backs up
Particularly, for new document, default setting its last time backed up consuming time be 0 value.Can see from above table, when the backup of last time backup consuming time more hour, next time the time interval value of backup just set less.This be because, last time the backup backup consuming time less, illustrate that its file data amount is fewer, then the backup speed faster, can not cause the interruption sense of card machine to the user; On the contrary, back up consuming time greatlyr, represent that then this document data volume is larger, then the speed of backup is slower, then might cause the interruption sense of card machine to the user.And within the time of 300s, the user changes the data volume of data can't be too large, can not cause very large risk to loss of data.Therefore, consuming time during less than a threshold value in the backup of last time backup, higher to the frequency of file backup, consuming time during greater than this threshold value when the backup of last time backup, " time interval " definite value of then setting according to the user backs up.
The BACKUP TIME spacing value that this this BACKUP TIME interval calculation module 12 of timing module 13 records obtains, and carry out timing.
When arriving the execution time, 14 pairs of files of this backup module back up.
Particularly, this backup module 14 comprises modification judging unit 141 and backup performance element 142.Wherein, this modification judging unit 141 judges whether this document has newly-increased data.Particularly, when program is moved, be modified with expression this document because file can increase an attribute automatically in the process of revising, therefore, attribute that can be by access or inquiry file is to judge whether this document has newly-increased data.When this modification judging unit 141 judges that this document has newly-increased data, then this backup performance element 142 of instruction is carried out file is backed up, when this was revised judging unit 141 and judges this document without newly-increased data, then BACKUP TIME spacing value next time should time interval computing module 12 be recomputated in instruction.
The backup parameter of the current backup of these backup reference record module 15 records, with call as time interval computing module 12 last time back up the time the backup parameter.Wherein, in the present embodiment, the backup parameter of this current backup is that current backup is consuming time.
Closing of a file judge module 16 judges whether close file, if file is not closed, then instruction should time interval computing module the 12 BACKUP TIME spacing values that calculate next time, close if judge file, then finish to judge.
With respect to prior art, data back up method of the present invention and device can carry out automated back-up according to the time interval that the big or small automatic dynamic of file data is adjusted file backup, under the prerequisite that has guaranteed timely automated back-up, avoided large data files is carried out the interruption sense that high-frequency backs up to cause.
Embodiment 2
The data back up method of the data back up method of the present embodiment 2 and embodiment 1 is roughly the same, and its difference only is: this step S12 replaces with: the backup parameter when calling current operation, and according to the next time interval value that backs up of this backup gain of parameter.
Wherein, the backup parameter in this current when operation is file size x value and current memory size a value.Calculate the time interval value y of backup next time by a convergent function y=f (a, x).Particularly, this function is:
y = f ( a , x ) = 20 × ( 1 + 200 x ) x 100 × 1 a 5
See also Fig. 3, it is the functional image of this convergent function.Among the figure, a1<a<a2
The time interval value y of next time backup is along with the change of current file size x value increases greatly, but amplification constantly reduces, until be tending towards certain fixed value.That is: when file size was larger, then the time interval of backup was relatively long.
Simultaneously, current memory size a value also can affect the result of the time interval value y of this backup next time: as a1<a2, and y1〉y2.That is: when memory value is larger, then the time interval of backup shorter, when memory value hour, the time interval of backup is longer, to avoid in hour frequent backup and cause card machine etc. affect the user to operate of memory value.
Further, the data backup device of the data backup device in the present embodiment 2 and embodiment 1 is roughly the same, and its difference only is: the backup parameter of these backup reference record module 15 records is current file size x value and current memory size a value.This time interval computing module 12 calls the backup parameter of these backup reference record module 15 records, and according to the next time interval value that backs up of this backup gain of parameter.Particularly, this time interval computing module 12 is the time interval value y that calculate backup next time by convergent function y=f (a, x).Particularly, this function is:
y = f ( a , x ) = 20 × ( 1 + 200 x ) x 100 × 1 a 5
In addition, backup parameter of the present invention refers to affect file and preserves factor (or data) consuming time; It can include but not limited to: file size, file type, device memory size, the rotation speed of hard disk, preservation are consuming time, backup is consuming time etc.
In above-mentioned case study on implementation, adopted different modes to obtain next BACKUP TIME interval.These modes include but not limited to: search the corresponding next BACKUP TIME of design parameter interval in form, parameter substitution function calculation is gone out next BACKUP TIME interval etc.According to other intensions of backup parameter, can set up operating function and set next BACKUP TIME interval.
The present invention is not limited to above-mentioned embodiment, if various changes of the present invention or distortion are not broken away from the spirit and scope of the present invention, if these changes and distortion belong within claim of the present invention and the equivalent technologies scope, then the present invention also is intended to comprise these changes and distortion.

Claims (10)

1. a data back up method comprises the steps:
Step D1: obtain the backup parameter, and according to the next time interval value that backs up of backup gain of parameter;
Step D2: record the BACKUP TIME spacing value that this BACKUP TIME interval calculation module obtains, and carry out timing;
Step D3: when arriving the execution time, file is backed up;
Step D4: the backup parameter that records current backup.
2. data back up method according to claim 1 is characterized in that: this backup parameter is consuming time for the backup of last time backup, current file is big or small, in the current memory size, file type, the rotation speed of hard disk one or more.
3. data back up method according to claim 2, it is characterized in that: this step D4 comprises step by step:
Step D41: judge whether this document has newly-increased data, if then enter step D42; If not, then return step D1;
Step D42: carry out file is backed up.
4. according to claim 1 and 2 or 3 described data back up method, it is characterized in that: when the backup of last time backup consuming time during less than a threshold value, frequency to file backup is higher, consuming time during greater than this threshold value when the backup of last time backup, " time interval " definite value of then setting according to a Fixed Time Interval or user backs up.
5. data back up method according to claim 4 is characterized in that: this step D1 is the time interval value that obtains backup next time by the mode of lookup table, and this time interval value lookup table is:
Last time the backup of backup was consuming time The time interval value of backup next time 0 30s ≤500ms 30s ≤1s 60s ≤10s 200s ≤20s 300s >20s " time interval " definite value of setting according to the user backs up
The backup parameter of the current backup among this step D4 is that the backup of current backup is consuming time.
6. according to claim 1 or 3 described data back up method, it is characterized in that: this step D1 passes through function
Figure DEST_PATH_FDA00002254623500011
Obtain the time interval value of backup next time, wherein, x is the file size value, and a is current memory size value, x〉0, a〉0.
7. a data backup device is characterized in that, comprising:
BACKUP TIME interval calculation module is obtained the backup parameter, and according to the next time interval value that backs up of backup gain of parameter;
Timing module, it records the BACKUP TIME spacing value that this BACKUP TIME interval calculation module obtains, and carries out timing;
Backup module, when arriving the execution time, this backup module backs up file;
Backup reference record module, it records the backup parameter of current backup.
8. data backup device according to claim 7, it is characterized in that: this BACKUP TIME interval calculation module comprises a time spacing value lookup table, this BACKUP TIME interval calculation module obtains the time interval value of backup next time by parameter corresponding in lookup table, this time interval value lookup table is:
Last time the backup of backup was consuming time The time interval value of backup next time 0 30s ≤500ms 30s ≤1s 60s ≤10s 200s ≤20s 300s >20s " time interval " definite value of setting according to the user backs up
The backup parameter of the current backup of record of this backup reference record module is that current backup is consuming time.
9. data backup device according to claim 7, it is characterized in that: this BACKUP TIME interval calculation module is passed through function Obtain the time interval value of backup next time, wherein, x is the file size value,
A is current memory size value, x〉0, a〉0, the backup parameter of the current backup of record of this backup reference record module is file size value and memory size value.
10. according to claim 8 or 9 described data backup devices, it is characterized in that: this backup module comprises revises judging unit and backup performance element, whether this modification judgment unit judges this document has newly-increased data, if, then instruction backup performance element is carried out file is backed up, if not, then instruction BACKUP TIME interval calculation module obtains the next time interval value that backs up.
CN201210384400.8A 2012-10-11 2012-10-11 A kind of data back up method and device Active CN102902606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210384400.8A CN102902606B (en) 2012-10-11 2012-10-11 A kind of data back up method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210384400.8A CN102902606B (en) 2012-10-11 2012-10-11 A kind of data back up method and device

Publications (2)

Publication Number Publication Date
CN102902606A true CN102902606A (en) 2013-01-30
CN102902606B CN102902606B (en) 2016-04-06

Family

ID=47574852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210384400.8A Active CN102902606B (en) 2012-10-11 2012-10-11 A kind of data back up method and device

Country Status (1)

Country Link
CN (1) CN102902606B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425547A (en) * 2013-08-22 2013-12-04 宁波三星电气股份有限公司 Electric power data processing method based on VxWorks operation system
CN103617098A (en) * 2013-12-03 2014-03-05 上海爱数软件有限公司 Intelligent backup method and system based on data changes
CN105677517A (en) * 2016-02-25 2016-06-15 努比亚技术有限公司 Data backup device, terminal and data backup method
CN106569916A (en) * 2016-11-07 2017-04-19 广东欧珀移动通信有限公司 Data backup method and mobile terminal
CN109032839A (en) * 2018-06-27 2018-12-18 郑州云海信息技术有限公司 A kind of cloud host backup method and device
WO2021184724A1 (en) * 2020-03-20 2021-09-23 平安科技(深圳)有限公司 Method and apparatus and device for automatically adjusting timing backup operation initiation time, and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015641A1 (en) * 2003-07-16 2005-01-20 International Business Machines Corporation System and method for automatically and dynamically optimizing application data resources to meet business objectives
US20060117221A1 (en) * 2004-11-05 2006-06-01 Fisher David J Method, apparatus, computer program and computer program product for adjusting the frequency at which data is backed up
CN101833489A (en) * 2010-05-06 2010-09-15 北京邮电大学 Method for file real-time monitoring and intelligent backup

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015641A1 (en) * 2003-07-16 2005-01-20 International Business Machines Corporation System and method for automatically and dynamically optimizing application data resources to meet business objectives
US20060117221A1 (en) * 2004-11-05 2006-06-01 Fisher David J Method, apparatus, computer program and computer program product for adjusting the frequency at which data is backed up
CN101833489A (en) * 2010-05-06 2010-09-15 北京邮电大学 Method for file real-time monitoring and intelligent backup

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425547A (en) * 2013-08-22 2013-12-04 宁波三星电气股份有限公司 Electric power data processing method based on VxWorks operation system
CN103425547B (en) * 2013-08-22 2016-04-27 宁波三星医疗电气股份有限公司 Based on the electric power data disposal route of vxworks operating system
CN103617098A (en) * 2013-12-03 2014-03-05 上海爱数软件有限公司 Intelligent backup method and system based on data changes
CN103617098B (en) * 2013-12-03 2017-06-16 上海爱数信息技术股份有限公司 Intelligent backup method and intelligent backup system based on data variation
CN105677517A (en) * 2016-02-25 2016-06-15 努比亚技术有限公司 Data backup device, terminal and data backup method
CN106569916A (en) * 2016-11-07 2017-04-19 广东欧珀移动通信有限公司 Data backup method and mobile terminal
CN109032839A (en) * 2018-06-27 2018-12-18 郑州云海信息技术有限公司 A kind of cloud host backup method and device
WO2021184724A1 (en) * 2020-03-20 2021-09-23 平安科技(深圳)有限公司 Method and apparatus and device for automatically adjusting timing backup operation initiation time, and medium

Also Published As

Publication number Publication date
CN102902606B (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN102902606A (en) Data backup method and data backup device
US10204016B1 (en) Incrementally backing up file system hard links based on change logs
CN103605585B (en) Intelligent backup method based on data discovery
CN106156355B (en) Log processing method and device
CN107145403A (en) The relevant database data retrogressive method of web oriented development environment
CN103019890A (en) Block-level disk data protection system and method thereof
US8478934B2 (en) Managing extended RAID caches using counting bloom filters
CN107870981A (en) Electronic installation, the method and storage medium of tables of data filing processing
CN103927251A (en) Log management method for embedded system
CN103713972B (en) A kind of incremental backup system and method
CN103176867A (en) Fast file differential backup method
CN110019063A (en) Method, terminal device and the storage medium of calculate node data disaster tolerance playback
CN102609484A (en) General method for managing log of system
AU2015265596B2 (en) System and method for recording the beginning and ending of job level activity in a mainframe computing environment
US9639701B1 (en) Scheduling data protection operations based on data activity
CN107273449B (en) Breakpoint processing method and system based on memory database
CN103544097A (en) Journal storing method, journal storing system, journal reading method and journal reading system of embedded system
CN106445735A (en) Data recovery method and system for VMware virtual machine
US9965491B2 (en) Method and device for recording system log
CN104142943A (en) Database expansion method and database
CN113608925A (en) Data backup method and system based on continuous data protection CDP protocol
CN109885539A (en) A kind of log file management method
CN117472647A (en) Database transaction rollback method and device
CN106126487A (en) A kind of journal file method for splitting and device
CN104503881B (en) The method of handheld device consumption detection, device and handheld device

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
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: Jinshan software building No. 8 Jingshan Hill Road, Lane 519015 Lianshan Jida Zhuhai city in Guangdong Province

Patentee after: Zhuhai Kingsoft Office Software Co., Ltd.

Patentee after: Beijing Kingsoft office software Limited by Share Ltd

Address before: Jinshan software building No. 8 Jingshan Hill Road, Lane 519015 Lianshan Jida Zhuhai city in Guangdong Province

Patentee before: Zhuhai Kingsoft Office Software Co., Ltd.

Patentee before: Beijing Kingsoft WPS Office Co., Ltd.