CN104461380A - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN104461380A
CN104461380A CN201410652141.1A CN201410652141A CN104461380A CN 104461380 A CN104461380 A CN 104461380A CN 201410652141 A CN201410652141 A CN 201410652141A CN 104461380 A CN104461380 A CN 104461380A
Authority
CN
China
Prior art keywords
data
write
clock
memory device
written
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
CN201410652141.1A
Other languages
Chinese (zh)
Other versions
CN104461380B (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410652141.1A priority Critical patent/CN104461380B/en
Publication of CN104461380A publication Critical patent/CN104461380A/en
Application granted granted Critical
Publication of CN104461380B publication Critical patent/CN104461380B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/80Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in storage media based on magnetic or optical technology, e.g. disks with sectors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses a data storage method and device. The method includes the steps that a data writing command is received; whether the data writing command contains WORM identification or not is judged; if the data writing command contains the WORM identification, to-be-written key data, to-be-written value data, a target saving time length and written user identification are extracted from the data writing command; a current value of a compliance clock of a storage device is obtained to serve as a written compliance clock; the to-be-written key data, the to-be-written value data and the written compliance clock are calculated according to the preset algorithm to obtain digital digests; corresponding relations between the to-be-written key data and the target saving time length, the user identification and the digital digests are built; the to-be-written key data, the to-be-written value data and the corresponding relations are written into the storage device. In this way, the storage device supporting a key-value interface can have the WORM characteristic.

Description

Date storage method and device
Technical field
The present invention relates to technical field of data storage, particularly relate to a kind of date storage method and device.
Background technology
The data of designated period of time are stored in not modifiable medium by more and more multinational border enterprise institution and office of government department trend in accordance with the law now.For assisting users deals with this laws and regulations requirement, release WORM (Write Onece, Read Many, single writes, and repeatedly reads, and is called for short write once read many) technology, use WORM technology, data are not allowed to distort after write, can effectively avoid data unexpectedly to be wiped, rewrite or change.
Along with the rise that cloud stores, accelerate the application based on Key-Value (key-value) interface.There is IP (the Internet Protocol based on Key-Value semanteme in industry, Internet protocol) hard disk, SCSI (the SmallComputer System Interface discarded tradition, small computer system interface) interface and consensus standard, then adopt IP agreement to carry out PERCOM peripheral communication.The IP hard disk of current issue provides open Key-Value semantic interface, calls use rear end hard disk in client by API (Application Programming Interface, application programming interface).
But current IP hard disk only provides Key-Value semantic interface, do not provide more characteristics based on Key-Value semantic interface, so WORM technology cannot be supported.
Summary of the invention
A kind of date storage method and device is provided, to solve the problem that existing intelligent hard disc cannot support WORM technology in the embodiment of the present invention.
In order to solve the problems of the technologies described above, the embodiment of the invention discloses following technical scheme:
First aspect, embodiments provides a kind of date storage method, is applied to memory device, comprising:
By the key value Key-Value interface data write instruction of described memory device;
Judge that whether including write once read many WORM in described data write instruction identifies;
When comprising WORM mark in described data write instruction, from described data write instruction, extract Key data to be written, Value data to be written, target preservation duration and write user ID;
The currency obtaining the conjunction rule clock of described memory device closes rule clock as write;
Utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write to calculate, obtain digital digest;
Set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest;
Described Key data to be written, Value data to be written and described corresponding relation are written in described memory device.
In conjunction with first aspect, in the first possible implementation of first aspect, described method also comprises:
By the key value Key-Value interface data delete instruction of described memory device;
Key data to be deleted are extracted from described data delete instruction;
Judge whether the Key data described to be deleted in described memory device lost efficacy;
If lost efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
In conjunction with the first possible implementation of first aspect, in the implementation that first aspect the second is possible, whether the described Key data described to be deleted judged in described memory device lost efficacy, and comprising:
Obtain the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted to close and advise clock and target preserves duration;
Close rule clock according to described memory device and determine that rule clock is closed in the reception of described data delete instruction;
Close rule clock and said write conjunction rule clock according to described reception, judge whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration;
If exceed described target to preserve duration, determine the Key data failure described to be deleted in described memory device.
In conjunction with first aspect, in the third possible implementation of first aspect, described method also comprises:
Determine data to be migrated;
Digital digest when obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and write;
Utilize preset algorithm to close rule clock to described Key data to be migrated, Value data to be migrated and said write to calculate, obtain Contemporary Digital summary;
Judge that whether digital digest when described Contemporary Digital summary writes with described Key data to be migrated is equal;
If equal, determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
In conjunction with first aspect, in first aspect the 4th kind of possible implementation, described method also comprises:
Obtain migration data, described migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration;
Close rule clock according to described memory device and determine that rule clock is closed in the secondary write of described migration data;
Utilize preset algorithm to close rule clock to described migration Key data, migration Value data and the write of described secondary to calculate, obtain secondary write digital digest;
Preserve duration, write conjunction rule clock and migration according to described target and close rule clock calculation secondary preservation duration;
Set up described migration Key data and secondary to preserve the secondary that duration, user ID and secondary write digital digest and write corresponding relation;
Described migration Key data, migration Value data and described secondary write corresponding relation are written in described memory device.
In conjunction with first aspect, in first aspect the 5th kind of possible implementation, described method also comprises:
Send a NTP message by the Ethernet interface of described memory device to ntp server, in described NTP message, carry the very first time stamp T1 in the moment that described NTP message is sent out;
Obtain the response message that described ntp server returns according to described NTP message, in described response message, carry stamp T1 of the described very first time, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
Obtain the 4th time stamp T 4 that described memory device receives the moment of response message;
Utilize the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculate the mistiming between described ntp server and described memory device;
Clock is advised as described conjunction using after the mistiming described in the clock delay of described ntp server.
In conjunction with first aspect, in first aspect the 6th kind of possible implementation, described method also comprises:
The first moment Tc1 of TSA server clock is obtained by the Ethernet interface of described memory device;
Utilize described first moment Tc1 and presupposed information composition data to be signed, and described data to be signed are sent to described TSA server, to make described TSA server, described data to be signed are signed;
Receive the signature result that described TSA server returns, in described signature result, carry described first moment Tc1, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
The public key decryptions of described TSA server is utilized to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Utilize described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculate the mistiming between described TSA server and described memory device;
Clock is advised as described conjunction using after the mistiming described in the clock delay of described TSA server.
In conjunction with first aspect, in first aspect the 7th kind of possible implementation, described method also comprises:
Obtain the test moment value of each node local clock in the cluster at described memory device place simultaneously;
The average of the test moment value of each node in computing cluster, and calculate the test moment value of each node and the variance of described average respectively;
Variance is selected to be positioned at the node of preset range as destination node;
The local clock of all destination nodes selected is utilized to calculate standard time clock, as the conjunction rule clock of described memory device.
Second aspect, embodiments provides a kind of data storage device, and application memory equipment, comprising:
Write command reception module, for the key value Key-Value interface data write instruction by described memory device;
WORM identifies judge module, for judging that whether including write once read many WORM in described data write instruction identifies;
First extraction module, for when comprising WORM mark in described data write instruction, extracts Key data to be written, Value data to be written, target preservation duration and write user ID from described data write instruction;
Rule clock acquisition module is closed in write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as write;
First computing module, closes rule clock for utilizing preset algorithm to described Key data to be written, Value data to be written and write and calculates, obtain digital digest;
First corresponding relation building module, preserves the corresponding relation of duration, user ID and digital digest for setting up described Key data to be written and described target;
First writing module, for being written to described Key data to be written, Value data to be written and described corresponding relation in described memory device.
In conjunction with second aspect, in the first possible implementation of second aspect, described device also comprises:
Delete instruction receiver module, for the key value Key-Value interface data delete instruction by described memory device;
Second extraction module, for extracting Key data to be deleted from described data delete instruction;
Inefficacy judge module, for judging whether the Key data described to be deleted in described memory device lost efficacy;
Removing module, for when the judged result of described inefficacy judge module was for losing efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
In conjunction with the first possible implementation of second aspect, in the implementation that second aspect the second is possible, described inefficacy judge module, comprising:
Time obtains submodule, closes advise clock and target preserves duration for obtaining the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted;
Receive and close rule clock acquisition submodule, the currency for the conjunction rule clock obtaining described memory device closes rule clock as the reception of described data delete instruction;
Duration judges submodule, for closing rule clock and said write conjunction rule clock according to described reception, judges whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration;
Submodule is determined in inefficacy, during for judging that when described duration the judged result of submodule preserves duration as exceeding described target, determines the Key data failure described to be deleted in described memory device.
In conjunction with second aspect, in the third possible implementation of second aspect, described device also comprises:
Data determining module to be migrated, for determining data to be migrated;
Data message acquisition module to be migrated, digital digest during for obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and writing;
Second computing module, closes rule clock for utilizing preset algorithm to described Key data to be migrated, Value data to be migrated and said write and calculates, obtain Contemporary Digital summary;
Digital digest judge module, during for judging that described Contemporary Digital summary writes with described Key data to be migrated, whether digital digest is equal;
Transferring module, for when the judged result of described digital digest judge module is equal, determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
In conjunction with second aspect, in second aspect the 4th kind of possible implementation, described device also comprises:
Migration data acquisition module, for obtaining migration data, described migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration;
Rule clock acquisition module is closed in secondary write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as the secondary write of described migration data;
3rd computing module, closes rule clock for utilizing preset algorithm to described migration Key data, migration Value data and the write of described secondary and calculates, obtain secondary write digital digest;
Duration calculation module, closes rule clock calculation secondary preservation duration for preserving duration, write conjunction rule clock and migration according to described target;
Second corresponding relation building module, preserves the secondary that duration, user ID and secondary write digital digest write corresponding relation for setting up described migration Key data and secondary;
Second writing module, for being written to described migration Key data, migration Value data and described secondary write corresponding relation in described memory device.
In conjunction with second aspect, in second aspect the 5th kind of possible implementation, described device also comprises:
Message sending module, sends a NTP message for the Ethernet interface by described memory device to NTP (Network Time Protocol) ntp server, carries the very first time stamp T1 in the moment that described NTP message is sent out in described NTP message;
Response message acquisition module, for obtaining the response message that described ntp server returns according to described NTP message, carry stamp T1 of the described very first time in described response message, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
Timestamp acquisition module, receives the 4th time stamp T 4 in the moment of response message for obtaining described memory device;
Very first time difference computing module, for utilizing the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculates the mistiming between described ntp server and described memory device;
First closes rule clock determining unit, for advising clock using after the mistiming described in the clock delay of described ntp server as described conjunction.
In conjunction with second aspect, in second aspect the 6th kind of possible implementation, described device also comprises:
First moment acquisition module, for obtaining the first moment Tc1 of trusted timestamp TSA server clock by the Ethernet interface of described memory device;
Described data to be signed for utilizing described first moment Tc1 and presupposed information composition data to be signed, and being sent to described TSA server, signing to make described TSA server to described data to be signed by data to be signed processing module;
Signature result receiver module, for receiving the signature result that described TSA server returns, carry described first moment Tc1 in described signature result, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
Deciphering module, for utilizing the public key decryptions of described TSA server to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Second mistiming computing module, for utilizing described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculates the mistiming between described TSA server and described memory device;
Second closes rule clock determination module, for advising clock using after the mistiming described in the clock delay of described TSA server as described conjunction.
In conjunction with second aspect, in second aspect the 7th kind of possible implementation, described device also comprises:
Test moment value acquisition module, for obtain described memory device place simultaneously cluster in the test moment value of each node local clock;
Mean value computation module, for the average of the test moment value of node each in computing cluster, and calculates the test moment value of each node and the variance of described average respectively;
Destination node selects module, is positioned at the node of preset range as destination node for selecting variance;
3rd closes rule clock determination module, and the local clock for all destination nodes utilizing selection calculates standard time clock, as the conjunction rule clock of described memory device.
The third aspect, embodiments provides a kind of data storage device, comprising: processor and storer, wherein, stores the operational order that described processor can perform in described storer, performs following steps to make described processor:
Receive data write instruction;
Judge that whether including write once read many WORM in described data write instruction identifies;
When comprising WORM mark in described data write instruction, from described data write instruction, extract Key data to be written, Value data to be written, target preservation duration and write user ID;
Obtain described processor and close the currency of rule clock as write conjunction rule clock;
Utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write to calculate, obtain digital digest;
Set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest;
Described Key data to be written, Value data to be written and described corresponding relation are written in described storer.
In conjunction with the third aspect, in the first possible implementation of the third aspect, in described storer, also store the operational order that described processor can perform, perform following steps to make described processor:
By the key value Key-Value interface data delete instruction of described memory device;
Key data to be deleted are extracted from described data delete instruction;
Judge whether the Key data described to be deleted in described memory device lost efficacy;
If lost efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
From above technical scheme, the method that the embodiment of the present invention provides, according to the WORM mark in data write instruction, determine to need to carry out WORM protection to data, and from data write instruction, extract Key data to be written, Value data to be written, target preserves duration and write user ID, obtain memory device and close the currency of rule clock as write conjunction rule clock, and utilize preset algorithm to described Key data to be written, Value data to be written and write are closed rule clock and are calculated, obtain digital digest, the most described Key data to be written, Value data to be written, and, described Key data to be written and described target preserve duration, the corresponding relation of user ID and digital digest is all written in described memory device.
Like this, for the data be stored in memory device, during target preserves duration, can only read, can not modify or delete, and for the data stored, can be verified by digital digest, determine whether the data stored are tampered, ensure the security of data.Therefore, can make, for supporting that the memory device of key value Key-Value interface can possess WORM characteristic, effective WORM protection can be carried out to the data of write.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, for those of ordinary skills, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of a kind of date storage method that Fig. 1 provides for inventive embodiments;
The schematic flow sheet of the another kind of date storage method that Fig. 2 provides for inventive embodiments;
Fig. 3 is the schematic flow sheet of step S203 in Fig. 2;
The schematic flow sheet of another date storage method that Fig. 4 provides for inventive embodiments;
The schematic flow sheet of another date storage method that Fig. 5 provides for inventive embodiments;
The structural representation of a kind of data storage device that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the another kind of data storage device that Fig. 7 provides for the embodiment of the present invention;
The structural representation of another data storage device that Fig. 8 provides for the embodiment of the present invention;
The structural representation of another data storage device that Fig. 9 provides for the embodiment of the present invention;
The structural representation of a kind of data storage device that Figure 10 provides for the embodiment of the present invention.
Embodiment
Technical scheme in the present invention is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
This date storage method that the embodiment of the present invention provides, can in the memory device such as IP hard disk, and for IP hard disk, it also provides open key value Key-Value semantic interface, and IP hard disk can be made to be linked in Ethernet by this key value Key-Value interface.
The schematic flow sheet of a kind of date storage method that Fig. 1 provides for inventive embodiments.
As shown in Figure 1, the method can comprise:
Step S101: by the key value Key-Value interface data write instruction of described memory device.
Client can be passed through API (Application Programming Interface, application programming interface) interface interchange and have the intelligent hard disc that Key-Value connects, so that carry out data manipulation to intelligent hard disc.For intelligent hard disc, data manipulation generally includes three classes: PUT, GET and DELETE, wherein, PUT is data write instruction, for writing new data in intelligent hard disc, GET is data read command, for reading the data of storage from intelligent hard disc, DELETE is data delete instruction, deletes for the data will stored in intelligent hard disc.
This instruction type to the data manipulation of intelligent hard disc can be determined by api interface dissimilar.
Step S102: judge whether include WORM mark in described data write instruction.
For data write instruction, three parts can be included: Key, Value, Optional Parameters, wherein can carry the mark whether supporting WORM in Optional Parameters, and data need the time value of preserving.Here WORM mark can be the value of certain a data position in Optional Parameters, such as: when a preset data position is 1 in Optional Parameters, represents that WORM is supported in this instruction, otherwise, represent that this instruction does not support WORM.In addition, the time value that data needs are preserved is used to specify the storage time of data in intelligent hard disc in data write instruction.
When judged result is, when comprising WORM mark in described data write instruction, perform step S103, otherwise the data in data command to be written are directly written in intelligent hard disc by process ends.
Step S103: extract Key data to be written, Value data to be written, target preservation duration and write user ID from described data write instruction.
Also user ID is carried in above-mentioned Optional Parameters, be specifically as follows: user ID, the user corresponding to user ID in usual data write instruction, is exactly the authority user of data in these data write instruction, can reads the data after write.
See the above-mentioned description about data write instruction, in this step, directly duration and write user ID can be preserved from data write instruction fetch Key to be written data, Value data to be written, target.
Step S104: the currency obtaining the conjunction rule clock of described memory device closes rule clock as write.
For intelligent hard disc, although be provided with local clock in it, this local clock cannot ensure consistent with extraneous clock.So in embodiments of the present invention, close the clock that rule clock (Compliance Clock) do not refer to intelligent hard disc self, and refer to the absolute clock that intelligent hard disc can be approved, such as: NTP (Network Time Protocol, NTP (Network Time Protocol)) clock or TSA (Time Stamp Authority, trusted timestamp) clock.In addition, when multiple hard disk forms a cluster, in order to make this cluster can unified clock, an absolute clock can approved by nodes all in cluster can also be set with the local clock of each node (hard disk namely in cluster) in cluster, when carrying out the operations such as data batchmove like this in cluster, just can ensure the storage time of data, improve the WORM characteristic of cluster.
Step S105: utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write and calculate, obtain digital digest.
For stored data, directly store if simple, as long as so any one user knows corresponding Key value and Value value, just can operate data.In order to improve the security of stored data; in the disclosed embodiments; MD5, SHA-1, SGA-256 scheduling algorithm can be adopted; conjunction rule clock when writing in conjunction with data is signed to Key data to be written, Value data to be written; due to conjunction rule clock when data write; domestic consumer is difficult to know, so the security of stored data just can be improved by digital digest, especially when needs move data or WORM protective calibration time.
Step S106: set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest.
Step S107: described Key data to be written, Value data to be written and described corresponding relation are written in described memory device.
The method that the embodiment of the present invention provides, according to the WORM mark in data write instruction, determine to need to carry out WORM protection to data, and from data write instruction, extract Key data to be written, Value data to be written, target preserves duration and write user ID, and utilize preset algorithm to described Key data to be written, Value data to be written and write are closed rule clock and are calculated, obtain digital digest, the most described Key data to be written, Value data to be written, and, described Key data to be written and described target preserve duration, the corresponding relation of user ID and digital digest is all written in described memory device.
For the data be stored in memory device, during target preserves duration, can only read, can not modify or delete.Therefore, can make, for supporting that the memory device of key value Key-Value interface can possess WORM characteristic, effective WORM protection can be carried out to the data of write.
According to the characteristic of WORM data, after the data writing is finished, in the storage life of setting, can only read data, and can not modify to data or delete.For this reason, in an embodiment of the present invention, as shown in Figure 2, the method can also comprise the following steps:
Step S201: by the key value Key-Value interface data delete instruction of described memory device.
Step S202: extract Key data to be deleted from described data delete instruction.
Step S203: judge whether the Key data described to be deleted in described memory device lost efficacy;
For the Key data stored in intelligent hard disc and Value data, owing to having formulated the holding time of data when writing, so, in data storage procedure, once receive the deletion action to the Key data stored in intelligent hard disc and Value data, so just need to judge whether data to be deleted lost efficacy, namely judge whether data to be deleted have exceeded corresponding target and preserved duration.Only have the holding time exceed target preserve the data of duration just can be deleted.
In embodiments of the present invention, as shown in Figure 3, this step S203 can comprise the following steps:
Step S2031: obtain the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted and close and advise clock and target preserves duration;
Step S2032: the currency obtaining the conjunction rule clock of described memory device closes rule clock as the reception of described data delete instruction;
Step S2033: close according to described reception and advise clock and write conjunction rule clock, judge whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration;
If exceed described target to preserve duration, carry out step S2034, otherwise, process ends.
Step S2034: determine the Key data failure described to be deleted in described memory device.
When judged result is described Key data failure to be deleted, carry out step S204, otherwise, process ends.
Step S204: by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
Characteristic due to WORM data is write-once, repeatedly read, and in data retention period, can not distort data, so, in embodiments of the present invention, when data are deleted, need to determine the validity of data to be deleted, only have the data of inefficacy just can be deleted by user.
In a particular application, data just can be deleted after only having inefficacy, just for use hard disk user or tenant, but for system manager, conveniently hard disk is managed, after hard disk purview certification, can delete arbitrary data.Correspondingly, after reception data delete instruction, also need to judge the user ID in data delete instruction, when only having the user ID in data delete instruction to be system manager, just can allow to delete any data.
In addition, in data retention period, user can extend the preservation duration of data, extend protection duration operation and above-mentioned embodiment illustrated in fig. 1 in, be equivalent to write new data in a hard disk, again repeat no more.
In data storage procedure, once occur that intelligent hard disc may face the situation of inefficacy, due to the security of stored data will be ensured, need by the Data Migration that stores in intelligent hard disc in new hard disk, such as: be arranged in other intelligent hard disc of same cluster with this intelligent hard disc.For WORM data, in data migration process, need to ensure that data are not tampered.For this reason, as shown in Figure 4, in embodiments of the present invention, described method is further comprising the steps of:
Step S301: determine data to be migrated.
Step S302: digital digest when obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and write.
Step S303: utilize preset algorithm to close rule clock to described Key data to be migrated, Value data to be migrated and said write and calculate, obtain Contemporary Digital summary.
Step S304: judge that whether digital digest when described Contemporary Digital summary writes with described Key data to be migrated is equal.
If equal, carry out step S305, otherwise, terminate.
Step S305: determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
Pass through above-mentioned steps, before carrying out Data Migration, just whether can be tampered data to be migrated as the data side of moving out intelligent hard disc and verify, and after being only verified, just data to be migrated can be sent to target storage device, such as: another intelligent hard disc in cluster.
Correspondingly, when needs are to Data Migration, intelligent hard disc also may as the data side of moving into, and for this reason, as shown in Figure 5, the method can also comprise the following steps:
Step S401: obtain migration data.
Migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration.
Step S402: the currency obtaining the conjunction rule clock of described memory device closes rule clock as the secondary write of described migration data.
Step S403: utilize preset algorithm to close rule clock to described migration Key data, migration Value data and the write of described secondary and calculate, obtain secondary write digital digest.
Step S404: preserve duration, write conjunction rule clock and migration according to described target and close rule clock calculation secondary preservation duration.
Because data saved a period of time before migration, so after migration, target can be preserved duration and deduct Historic preservation duration, as new preservation duration, namely secondary preserves duration.Such as: it is 1 year that the target of data preserves duration, it is 12:00 on October 1st, 2013 that rule clock is closed in the write in the first intelligent hard disc, and it is 12:00 on August 1st, 2014 that rule clock is closed in migration, so visible, and it will be 2 months that secondary preserves duration.
Step S405: set up described migration Key data and secondary and preserve the secondary that duration, user ID and secondary write digital digest and write corresponding relation.
Step S406: described migration Key data, migration Value data and described secondary write corresponding relation are written in described memory device.
Data move into after except preserving duration and needing to calculate separately, other identical with the ablation process of new data, in this not go into detail.
Pass through above-mentioned steps, can ensure after data are moved into, can according to WORM characteristic, process is re-write to data, and in ablation process, fully take into account the continuity of the preservation duration of data, made Data Migration can gentle transition, avoid the problem occurring error in data in data migration process.
In order to Obtaining Accurate also closes rule clock as write to the currency closing rule clock in above-mentioned steps S104, the conjunction first getting memory device is needed to advise clock.In embodiments of the present invention, the method can also comprise the following steps:
11), by the Ethernet interface of described memory device send a NTP message to ntp server, in described NTP message, carry the very first time stamp T1 in the moment that described NTP message is sent out;
12), obtain the response message that described ntp server returns according to described NTP message, in described response message, carry stamp T1 of the described very first time, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
13) the 4th time stamp T 4 that described memory device receives the moment of response message, is obtained;
14), utilize the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculate the mistiming between described ntp server and described memory device;
From alternately above-mentioned, the time delay of NTP message one-period is back and forth: (T4-T1)-(T3-T2), the mistiming so between memory device and ntp server is: [(T2-T1)-(T4-T3)]/2.
15), clock is advised after the mistiming described in the clock delay of described ntp server as described conjunction.
Pass through above-mentioned steps, when intelligent hard disc is as the node of in cluster, rule clock is closed because each node in this cluster obtains in the manner described above, it is that the conjunction rule clock namely obtained is all identical for all nodes with the time of NPT server for reference that the conjunction of each node so just can be made to advise clock.
In addition, when getting the conjunction rule clock of memory device, the method can also comprise the following steps:
The first moment Tc1 of TSA server clock is obtained by the Ethernet interface of described memory device;
Utilize described first moment Tc1 and presupposed information composition data to be signed, and described data to be signed are sent to described TSA server, to make described TSA server, described data to be signed are signed;
Receive the signature result that described TSA server returns, in described signature result, carry described first moment Tc1, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
The public key decryptions of described TSA server is utilized to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Utilize described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculate the mistiming between described TSA server and described memory device;
From alternately above-mentioned, the time delay of TSA message one-period is back and forth: (Tc2-Tc1)-(Ts2-Ts1), and the mistiming so between memory device and ntp server is: [(Ts1-Tc1)-(Tc2-Ts1)]/2.
Clock is advised as described conjunction using after the mistiming described in the clock delay of described TSA server.
Pass through above-mentioned steps, when intelligent hard disc is as the node of in cluster, rule clock is closed because each node in this cluster obtains in the manner described above, it is that the conjunction rule clock namely obtained is all identical for all nodes with the time of NPT server for reference that the conjunction of each node so just can be made to advise clock.
In addition, when getting the conjunction rule clock of memory device, the method can also comprise the following steps:
Obtain the test moment value of each node local clock in the cluster at described memory device place simultaneously;
The average of the test moment value of each node in computing cluster, and calculate the test moment value of each node and the variance of described average respectively;
Variance is selected to be positioned at the node of preset range as destination node;
The local clock of all destination nodes selected is utilized to calculate standard time clock, as the conjunction rule clock of described memory device.
When intelligent hard disc is as the node of in cluster, close rule clock because each node in this cluster obtains in the manner described above, the conjunction of each node rule clock so just can be made to be identical, namely definitely approved by each node.Correspondingly, follow-up carry out Data Migration time, can ensure that the time of each node is consistent.
By the description of above embodiment of the method, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: ROM (read-only memory) (ROM), random access memory (RAM), magnetic disc or CD etc. various can be program code stored medium.
Corresponding with date storage method embodiment provided by the invention, present invention also offers a kind of data storage device.
See Fig. 6, for the structural representation of a kind of data storage device that the embodiment of the present invention provides, this device comprises: write command reception module 11, WORM identify judge module 12, first extraction module 13, rule clock acquisition module 14, first computing module 15, first corresponding relation building module 16 and the first writing module 17 are closed in write.
This write command reception module 11, for the key value Key-Value interface data write instruction by described memory device;
This WORM identifies judge module 12, for judging whether include WORM mark in described data write instruction;
This first extraction module 13, for when comprising WORM mark in described data write instruction, extracts Key data to be written, Value data to be written, target preservation duration and write user ID from described data write instruction;
Rule clock acquisition module 14 is closed in this write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as write;
This first computing module 15, closes rule clock for utilizing preset algorithm to described Key data to be written, Value data to be written and write and calculates, obtain digital digest;
This first corresponding relation building module 16, preserves the corresponding relation of duration, user ID and digital digest for setting up described Key data to be written and described target;
This first writing module 17, for being written to described Key data to be written, Value data to be written and described corresponding relation in described memory device.
This device that the embodiment of the present invention provides, according to the WORM mark in data write instruction, determine to need to carry out WORM protection to data, and from data write instruction, extract Key data to be written, Value data to be written, target preserves duration and write user ID, and utilize preset algorithm to described Key data to be written, Value data to be written and write are closed rule clock and are calculated, obtain digital digest, the most described Key data to be written, Value data to be written, and, described Key data to be written and described target preserve duration, the corresponding relation of user ID and digital digest is all written in described memory device.
For the data be stored in memory device, during target preserves duration, can only read, can not modify or delete.Therefore, can make, for supporting that the memory device of key value Key-Value interface can possess WORM characteristic, effective WORM protection can be carried out to the data of write.
According to the characteristic of WORM data, after the data writing is finished, in the storage life of setting, can only read data, and can not modify to data or delete.For this reason, in an embodiment of the present invention, as shown in Figure 7, this device can also comprise: delete instruction receiver module 21, second extraction module 22, inefficacy judge module 23 and removing module 24.
This delete instruction receiver module 21, for the key value Key-Value interface data delete instruction by described memory device;
This second extraction module 22, for extracting Key data to be deleted and deleting user ID from described data delete instruction;
This inefficacy judge module 23, for judging whether the Key data described to be deleted in described memory device lost efficacy;
In embodiments of the present invention, inefficacy judge module 23 can comprise: the time obtains submodule, rule clock acquisition submodule is closed in reception, duration judges that submodule is determined in submodule and inefficacy, wherein: this time obtains submodule, close advise clock and target preserves duration for obtaining the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted; This reception is closed rule clock and is obtained submodule, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as the reception of described data delete instruction; This duration judges submodule, advising clock and write conjunction rule clock, judging whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration for closing according to described reception; Submodule is determined in this inefficacy, during for judging that when described duration the judged result of submodule preserves duration as exceeding described target, determines the Key data failure described to be deleted in described memory device.
This removing module 24, for when the judged result of described inefficacy judge module was for losing efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
Characteristic due to WORM data is write-once, repeatedly read, and in data retention period, can not distort data, so, in embodiments of the present invention, when data are deleted, need to determine the validity of data to be deleted, only have the data of inefficacy just can be deleted by user.
In a particular application, data just can be deleted after only having inefficacy, just for use hard disk user or tenant, but for system manager, conveniently hard disk is managed, after hard disk purview certification, can delete arbitrary data.Correspondingly, after reception data delete instruction, also need to judge the user ID in data delete instruction, when only having the user ID in data delete instruction to be system manager, just can allow to delete any data.
In addition, in data retention period, user can extend the preservation duration of data, extend protection duration operation and above-mentioned embodiment illustrated in fig. 1 in, be equivalent to write new data in a hard disk, again repeat no more.
In data storage procedure, once occur that intelligent hard disc may face the situation of inefficacy, due to the security of stored data will be ensured, need by the Data Migration that stores in intelligent hard disc in new hard disk, such as: be arranged in other intelligent hard disc of same cluster with this intelligent hard disc.For WORM data, in data migration process, need to ensure that data are not tampered.For this reason, as shown in Figure 8, in embodiments of the present invention, described device also comprises: data determining module 31 to be migrated, data message acquisition module to be migrated 32, second computing module 33, digital digest judge module 34 and transferring module 35.
This data determining module 31 to be migrated, for determining data to be migrated;
This data message acquisition module 32 to be migrated, digital digest during for obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and writing;
This second computing module 33, closes rule clock for utilizing preset algorithm to described Key data to be migrated, Value data to be migrated and said write and calculates, obtain Contemporary Digital summary;
This digital digest judge module 34, during for judging that described Contemporary Digital summary writes with described Key data to be migrated, whether digital digest is equal;
This transferring module 35, for when the judged result of described digital digest judge module is equal, determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
In the embodiment of the present invention, before carrying out Data Migration, just whether can be tampered data to be migrated as the data side of moving out intelligent hard disc and verify, and after being only verified, just data to be migrated can be sent to target storage device, such as: another intelligent hard disc in cluster.
Correspondingly, when needs are to Data Migration, intelligent hard disc also may as the data side of moving into, for this reason, as shown in Figure 9, as shown in Figure 9, this device can also comprise: rule clock acquisition module the 42, the 3rd computing module 43, duration calculation module 44, second corresponding relation building module 45 and the second writing module 46 are closed in the write of migration data acquisition module 41, secondary.
Migration data acquisition module 41, for obtaining migration data, described migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration;
Rule clock acquisition module 42 is closed in secondary write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as the secondary write of described migration data;
3rd computing module 43, closes rule clock for utilizing preset algorithm to described migration Key data, migration Value data and the write of described secondary and calculates, obtain secondary write digital digest;
Duration calculation module 44, closes rule clock calculation secondary preservation duration for preserving duration, write conjunction rule clock and migration according to described target;
Second corresponding relation building module 45, preserves the secondary that duration, user ID and secondary write digital digest write corresponding relation for setting up described migration Key data and secondary;
Second writing module 46, for being written to described migration Key data, migration Value data and described secondary write corresponding relation in described memory device.
When rule clock acquisition module 14 acquisition write conjunction rule clock is closed in above-mentioned write, need the conjunction rule clock first getting memory device.In an embodiment of the invention, this device can also comprise:
Message sending module, sends a NTP message for the Ethernet interface by described memory device to NTP (Network Time Protocol) ntp server, carries the very first time stamp T1 in the moment that described NTP message is sent out in described NTP message;
Response message acquisition module, for obtaining the response message that described ntp server returns according to described NTP message, carry stamp T1 of the described very first time in described response message, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
Timestamp acquisition module, receives the 4th time stamp T 4 in the moment of response message for obtaining described memory device;
Very first time difference computing module, for utilizing the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculates the mistiming between described ntp server and described memory device;
First closes rule clock determining unit, for advising clock using after the mistiming described in the clock delay of described ntp server as described conjunction.
In another embodiment, this device can also comprise:
First moment acquisition module, for obtaining the first moment Tc1 of trusted timestamp TSA server clock by the Ethernet interface of described memory device;
Described data to be signed for utilizing described first moment Tc1 and presupposed information composition data to be signed, and being sent to described TSA server, signing to make described TSA server to described data to be signed by data to be signed processing module;
Signature result receiver module, for receiving the signature result that described TSA server returns, carry described first moment Tc1 in described signature result, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
Deciphering module, for utilizing the public key decryptions of described TSA server to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Second mistiming computing module, for utilizing described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculates the mistiming between described TSA server and described memory device;
Second closes rule clock determination module, for advising clock using after the mistiming described in the clock delay of described TSA server as described conjunction.
In another embodiment, this device can also comprise:
Test moment value acquisition module, for obtain described memory device place simultaneously cluster in the test moment value of each node local clock;
Mean value computation module, for the average of the test moment value of node each in computing cluster, and calculates the test moment value of each node and the variance of described average respectively;
Destination node selects module, is positioned at the node of preset range as destination node for selecting variance;
3rd closes rule clock determination module, and the local clock for all destination nodes utilizing selection calculates standard time clock, as the conjunction rule clock of described memory device
The embodiment of the present invention also provides a kind of data storage device, and as shown in Figure 10, this data storage device comprises: processor 100 and storer 200, and wherein, processor 100 is connected with Ethernet by key value Key-Value interface 300.
Store the operational order that described processor can perform in described storer, perform following steps to make described processor:
Receive data write instruction;
Judge whether include WORM mark in described data write instruction;
When comprising WORM mark in described data write instruction, from described data write instruction, extract Key data to be written, Value data to be written, target preservation duration and write user ID;
Obtain described processor and close the currency of rule clock as write conjunction rule clock;
Utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write to calculate, obtain digital digest;
Set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest;
Described Key data to be written, Value data to be written and described corresponding relation are written in described storer
In an embodiment of the invention, in described storer, also store the operational order that described processor can perform, perform following steps to make described processor:
By the key value Key-Value interface data delete instruction of described memory device;
Key data to be deleted are extracted from described data delete instruction;
Judge whether the Key data described to be deleted in described memory device lost efficacy;
If lost efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
For convenience of description, various unit is divided into describe respectively with function when describing above device.Certainly, the function of each unit can be realized in same or multiple software and/or hardware when implementing of the present invention.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device or system embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Apparatus and system embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The present invention can describe in the general context of computer executable instructions, such as program module.Usually, program module comprises the routine, program, object, assembly, data structure etc. that perform particular task or realize particular abstract data type.Also can put into practice the present invention in a distributed computing environment, in these distributed computing environment, be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.
It should be noted that, in this article, the such as relational terms of " first " and " second " etc. and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
The above is only the specific embodiment of the present invention, those skilled in the art is understood or realizes the present invention.To be apparent to one skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (18)

1. a date storage method, is applied to memory device, it is characterized in that, comprising:
By the key value Key-Value interface data write instruction of described memory device;
Judge that whether including write once read many WORM in described data write instruction identifies;
When comprising WORM mark in described data write instruction, from described data write instruction, extract Key data to be written, Value data to be written, target preservation duration and write user ID;
The currency obtaining the conjunction rule clock of described memory device closes rule clock as write;
Utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write to calculate, obtain digital digest;
Set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest;
Described Key data to be written, Value data to be written and described corresponding relation are written in described memory device.
2. method according to claim 1, is characterized in that, described method also comprises:
By the key value Key-Value interface data delete instruction of described memory device;
Key data to be deleted are extracted from described data delete instruction;
Judge whether the Key data described to be deleted in described memory device lost efficacy;
If lost efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
3. method according to claim 2, is characterized in that, whether the described Key data described to be deleted judged in described memory device lost efficacy, and comprising:
Obtain the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted to close and advise clock and target preserves duration;
The currency obtaining the conjunction rule clock of described memory device closes rule clock as the reception of described data delete instruction;
Close rule clock and said write conjunction rule clock according to described reception, judge whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration;
If exceed described target to preserve duration, determine the Key data failure described to be deleted in described memory device.
4. method according to claim 1, is characterized in that, described method also comprises:
Determine data to be migrated;
Digital digest when obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and write;
Utilize preset algorithm to close rule clock to described Key data to be migrated, Value data to be migrated and said write to calculate, obtain Contemporary Digital summary;
Judge that whether digital digest when described Contemporary Digital summary writes with described Key data to be migrated is equal;
If equal, determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
5. method according to claim 1, is characterized in that, described method also comprises:
Obtain migration data, described migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration;
The currency obtaining the conjunction rule clock of described memory device closes rule clock as the secondary write of described migration data;
Utilize preset algorithm to close rule clock to described migration Key data, migration Value data and the write of described secondary to calculate, obtain secondary write digital digest;
Preserve duration, write conjunction rule clock and migration according to described target and close rule clock calculation secondary preservation duration;
Set up described migration Key data and secondary to preserve the secondary that duration, user ID and secondary write digital digest and write corresponding relation;
Described migration Key data, migration Value data and described secondary write corresponding relation are written in described memory device.
6. method according to claim 1, is characterized in that, described method also comprises:
Send a NTP message by the Ethernet interface of described memory device to NTP (Network Time Protocol) ntp server, in described NTP message, carry the very first time stamp T1 in the moment that described NTP message is sent out;
Obtain the response message that described ntp server returns according to described NTP message, in described response message, carry stamp T1 of the described very first time, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
Obtain the 4th time stamp T 4 that described memory device receives the moment of response message;
Utilize the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculate the mistiming between described ntp server and described memory device;
Using the conjunction rule clock as described memory device after the mistiming described in the clock delay of described ntp server.
7. method according to claim 1, is characterized in that, described method also comprises:
The first moment Tc1 of trusted timestamp TSA server clock is obtained by the Ethernet interface of described memory device;
Utilize described first moment Tc1 and presupposed information composition data to be signed, and described data to be signed are sent to described TSA server, to make described TSA server, described data to be signed are signed;
Receive the signature result that described TSA server returns, in described signature result, carry described first moment Tc1, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
The public key decryptions of described TSA server is utilized to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Utilize described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculate the mistiming between described TSA server and described memory device;
Using the conjunction rule clock as described memory device after the mistiming described in the clock delay of described TSA server.
8. method according to claim 1, is characterized in that, described method also comprises:
Obtain the test moment value of each node local clock in the cluster at described memory device place simultaneously;
The average of the test moment value of each node in computing cluster, and calculate the test moment value of each node and the variance of described average respectively;
Variance is selected to be positioned at the node of preset range as destination node;
The local clock of all destination nodes selected is utilized to calculate standard time clock, as the conjunction rule clock of described memory device.
9. a data storage device, application memory equipment, is characterized in that, comprising:
Write command reception module, for the key value Key-Value interface data write instruction by described memory device;
WORM identifies judge module, for judging that whether including write once read many WORM in described data write instruction identifies;
First extraction module, for when comprising WORM mark in described data write instruction, extracts Key data to be written, Value data to be written, target preservation duration and write user ID from described data write instruction;
Rule clock acquisition module is closed in write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as write;
First computing module, closes rule clock for utilizing preset algorithm to described Key data to be written, Value data to be written and write and calculates, obtain digital digest;
First corresponding relation building module, preserves the corresponding relation of duration, user ID and digital digest for setting up described Key data to be written and described target;
First writing module, for being written to described Key data to be written, Value data to be written and described corresponding relation in described memory device.
10. device according to claim 9, is characterized in that, described device also comprises:
Delete instruction receiver module, for the key value Key-Value interface data delete instruction by described memory device;
Second extraction module, for extracting Key data to be deleted from described data delete instruction;
Inefficacy judge module, for judging whether the Key data described to be deleted in described memory device lost efficacy;
Removing module, for when the judged result of described inefficacy judge module was for losing efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
11. devices according to claim 10, is characterized in that, described inefficacy judge module, comprising:
Time obtains submodule, closes advise clock and target preserves duration for obtaining the write corresponding with described Key data to be deleted according to the corresponding relation of described Key data to be deleted;
Receive and close rule clock acquisition submodule, the currency for the conjunction rule clock obtaining described memory device closes rule clock as the reception of described data delete instruction;
Duration judges submodule, for closing rule clock and said write conjunction rule clock according to described reception, judges whether the time that described Key data to be deleted store in described memory device exceedes described target preservation duration;
Submodule is determined in inefficacy, during for judging that when described duration the judged result of submodule preserves duration as exceeding described target, determines the Key data failure described to be deleted in described memory device.
12. devices according to claim 9, is characterized in that, described device also comprises:
Data determining module to be migrated, for determining data to be migrated;
Data message acquisition module to be migrated, digital digest during for obtaining Key data to be migrated corresponding to described data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock and writing;
Second computing module, closes rule clock for utilizing preset algorithm to described Key data to be migrated, Value data to be migrated and said write and calculates, obtain Contemporary Digital summary;
Digital digest judge module, during for judging that described Contemporary Digital summary writes with described Key data to be migrated, whether digital digest is equal;
Transferring module, for when the judged result of described digital digest judge module is equal, determine that described Key data to be migrated are not tampered, and migration conjunction rule clock when described Key data to be migrated, Value data to be migrated, target preservation duration, write conjunction rule clock, migration and user ID are sent to target storage device.
13. devices according to claim 9, is characterized in that, described device also comprises:
Migration data acquisition module, for obtaining migration data, described migration data comprises: migration Key data, migration Value data, target preserve duration, rule clock is closed in write, rule clock and user ID are closed in migration;
Rule clock acquisition module is closed in secondary write, and the currency for the conjunction rule clock obtaining described memory device closes rule clock as the secondary write of described migration data;
3rd computing module, closes rule clock for utilizing preset algorithm to described migration Key data, migration Value data and the write of described secondary and calculates, obtain secondary write digital digest;
Duration calculation module, closes rule clock calculation secondary preservation duration for preserving duration, write conjunction rule clock and migration according to described target;
Second corresponding relation building module, preserves the secondary that duration, user ID and secondary write digital digest write corresponding relation for setting up described migration Key data and secondary;
Second writing module, for being written to described migration Key data, migration Value data and described secondary write corresponding relation in described memory device.
14. devices according to claim 9, is characterized in that, described device also comprises:
Message sending module, sends a NTP message for the Ethernet interface by described memory device to NTP (Network Time Protocol) ntp server, carries the very first time stamp T1 in the moment that described NTP message is sent out in described NTP message;
Response message acquisition module, for obtaining the response message that described ntp server returns according to described NTP message, carry stamp T1 of the described very first time in described response message, the 3rd time stamp T 3 that the second time stamp T 2 that described ntp server receives the moment of NTP message and described ntp server send the moment of described response message;
Timestamp acquisition module, receives the 4th time stamp T 4 in the moment of response message for obtaining described memory device;
Very first time difference computing module, for utilizing the described very first time to stab T1, the second time stamp T 2, the 3rd time stamp T 3 and the 4th time stamp T 4, calculates the mistiming between described ntp server and described memory device;
First closes rule clock determining unit, for advising clock using after the mistiming described in the clock delay of described ntp server as described conjunction.
15. devices according to claim 9, is characterized in that, described device also comprises:
First moment acquisition module, for obtaining the first moment Tc1 of trusted timestamp TSA server clock by the Ethernet interface of described memory device;
Described data to be signed for utilizing described first moment Tc1 and presupposed information composition data to be signed, and being sent to described TSA server, signing to make described TSA server to described data to be signed by data to be signed processing module;
Signature result receiver module, for receiving the signature result that described TSA server returns, carry described first moment Tc1 in described signature result, the 3rd moment Ts2 when the second moment Ts1 of described TSA server when calculating and described TSA server are encrypted result of calculation;
Deciphering module, for utilizing the public key decryptions of described TSA server to be decrypted described signature result, and the 4th moment Tc2 when obtaining deciphering;
Second mistiming computing module, for utilizing described first moment Tc1, the second moment Ts1, the 3rd moment Ts2 and the 4th moment Tc2, calculates the mistiming between described TSA server and described memory device;
Second closes rule clock determination module, for advising clock using after the mistiming described in the clock delay of described TSA server as described conjunction.
16. devices according to claim 9, is characterized in that, described device also comprises:
Test moment value acquisition module, for obtain described memory device place simultaneously cluster in the test moment value of each node local clock;
Mean value computation module, for the average of the test moment value of node each in computing cluster, and calculates the test moment value of each node and the variance of described average respectively;
Destination node selects module, is positioned at the node of preset range as destination node for selecting variance;
3rd closes rule clock determination module, and the local clock for all destination nodes utilizing selection calculates standard time clock, as the conjunction rule clock of described memory device.
17. 1 kinds of data storage devices, is characterized in that, comprising: processor and storer, wherein, store the operational order that described processor can perform in described storer, perform following steps to make described processor:
Receive data write instruction;
Judge that whether including write once read many WORM in described data write instruction identifies;
When comprising WORM mark in described data write instruction, from described data write instruction, extract Key data to be written, Value data to be written, target preservation duration and write user ID;
Obtain described processor and close the currency of rule clock as write conjunction rule clock;
Utilize preset algorithm to close rule clock to described Key data to be written, Value data to be written and write to calculate, obtain digital digest;
Set up the corresponding relation that described Key data to be written and described target preserve duration, user ID and digital digest;
Described Key data to be written, Value data to be written and described corresponding relation are written in described storer.
18. equipment according to claim 17, is characterized in that, also store the operational order that described processor can perform in described storer, perform following steps to make described processor:
By the key value Key-Value interface data delete instruction of described memory device;
Key data to be deleted are extracted from described data delete instruction;
Judge whether the Key data described to be deleted in described memory device lost efficacy;
If lost efficacy, by described Key data to be deleted, Value data to be deleted, and, delete from described memory device with the corresponding relation of described Key data to be deleted.
CN201410652141.1A 2014-11-17 2014-11-17 Date storage method and device Active CN104461380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410652141.1A CN104461380B (en) 2014-11-17 2014-11-17 Date storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410652141.1A CN104461380B (en) 2014-11-17 2014-11-17 Date storage method and device

Publications (2)

Publication Number Publication Date
CN104461380A true CN104461380A (en) 2015-03-25
CN104461380B CN104461380B (en) 2017-11-21

Family

ID=52907509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410652141.1A Active CN104461380B (en) 2014-11-17 2014-11-17 Date storage method and device

Country Status (1)

Country Link
CN (1) CN104461380B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598480A (en) * 2015-10-14 2017-04-26 三星电子株式会社 Electronic system with interface control mechanism and method of operation thereof
WO2017113960A1 (en) * 2015-12-28 2017-07-06 华为技术有限公司 Data processing method and nvme storage
CN107301018A (en) * 2017-06-15 2017-10-27 郑州云海信息技术有限公司 A kind of WORM technology application processes on cluster-based storage
CN107436726A (en) * 2016-05-26 2017-12-05 华为技术有限公司 Method for writing data, storage control, computing device and storage device
CN108021585A (en) * 2016-10-28 2018-05-11 腾讯科技(深圳)有限公司 Distributed data storage method and device
CN108647248A (en) * 2018-04-16 2018-10-12 新华三技术有限公司成都分公司 WORM state monitors transfer method and device
CN109284621A (en) * 2017-07-19 2019-01-29 阿里巴巴集团控股有限公司 Data protection/restoration methods and device and data storage/guard method
CN111381917A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Data reading and writing method and device
CN111444396A (en) * 2020-03-24 2020-07-24 深圳市中盛瑞达科技有限公司 Big data storage system
CN112911392A (en) * 2021-01-14 2021-06-04 海信视像科技股份有限公司 Audio and video playing control method and display device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120072735A1 (en) * 2010-09-17 2012-03-22 Kabushiki Kaisha Toshiba Storage device, protection method, and electronic device
WO2013188153A1 (en) * 2012-06-13 2013-12-19 Caringo, Inc. Two level addressing in storage clusters
CN103838844A (en) * 2014-03-03 2014-06-04 珠海市君天电子科技有限公司 Method and device for storing and transmitting key value pair data
CN104021049A (en) * 2014-05-16 2014-09-03 华为技术有限公司 Method for unifying data in distributed storage system and Ethernet interface hard disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120072735A1 (en) * 2010-09-17 2012-03-22 Kabushiki Kaisha Toshiba Storage device, protection method, and electronic device
WO2013188153A1 (en) * 2012-06-13 2013-12-19 Caringo, Inc. Two level addressing in storage clusters
CN103838844A (en) * 2014-03-03 2014-06-04 珠海市君天电子科技有限公司 Method and device for storing and transmitting key value pair data
CN104021049A (en) * 2014-05-16 2014-09-03 华为技术有限公司 Method for unifying data in distributed storage system and Ethernet interface hard disk

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598480A (en) * 2015-10-14 2017-04-26 三星电子株式会社 Electronic system with interface control mechanism and method of operation thereof
WO2017113960A1 (en) * 2015-12-28 2017-07-06 华为技术有限公司 Data processing method and nvme storage
US11467975B2 (en) 2015-12-28 2022-10-11 Huawei Technologies Co., Ltd. Data processing method and NVMe storage device
US10705974B2 (en) 2015-12-28 2020-07-07 Huawei Technologies Co., Ltd. Data processing method and NVME storage device
CN107436726B (en) * 2016-05-26 2020-09-08 华为技术有限公司 Data writing method, storage controller, computing device and storage device
CN107436726A (en) * 2016-05-26 2017-12-05 华为技术有限公司 Method for writing data, storage control, computing device and storage device
CN108021585A (en) * 2016-10-28 2018-05-11 腾讯科技(深圳)有限公司 Distributed data storage method and device
CN108021585B (en) * 2016-10-28 2022-01-18 腾讯科技(深圳)有限公司 Distributed data storage method and device
CN107301018A (en) * 2017-06-15 2017-10-27 郑州云海信息技术有限公司 A kind of WORM technology application processes on cluster-based storage
CN109284621A (en) * 2017-07-19 2019-01-29 阿里巴巴集团控股有限公司 Data protection/restoration methods and device and data storage/guard method
CN108647248B (en) * 2018-04-16 2021-03-09 新华三技术有限公司成都分公司 WORM state monitoring transfer method and device
CN108647248A (en) * 2018-04-16 2018-10-12 新华三技术有限公司成都分公司 WORM state monitors transfer method and device
CN111381917A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Data reading and writing method and device
CN111444396A (en) * 2020-03-24 2020-07-24 深圳市中盛瑞达科技有限公司 Big data storage system
CN112911392A (en) * 2021-01-14 2021-06-04 海信视像科技股份有限公司 Audio and video playing control method and display device

Also Published As

Publication number Publication date
CN104461380B (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN104461380A (en) Data storage method and device
TWI706353B (en) Constructing Merkel tree, simple payment verification method and device
US20200210381A1 (en) Optimized content object storage service for large scale content
US20190266128A1 (en) Method and system for verification of deleted data for blockchains
US10331697B2 (en) Synchronization of data between systems
US9229771B2 (en) Cloud bursting and management of cloud-bursted applications
TWI706282B (en) Method and device for concealing transactions written in blockchain, blockchain system, and computer equipment
US11164115B1 (en) Capacity planning and data placement management in multi-cloud computing environment
EP3813296B1 (en) Methods and apparatuses for reading blockchain data
US20170185314A1 (en) Management of physical extents for space efficient storage volumes
US11308223B2 (en) Blockchain-based file handling
CN106951345A (en) A kind of conformance test method and device of magnetic disk of virtual machine data
GB2545055A (en) Point-in-time copy with chain cloning
WO2016202070A1 (en) Method and device for recording log in network system
CN109272324A (en) A kind of business function implementation method, system, equipment and computer storage medium
CN104778123A (en) Method and device for detecting system performance
US20200081480A1 (en) Validation of clock to provide security for time locked data
US10922304B1 (en) Distributed data protection management in multi-cloud computing environment
US20230023053A1 (en) Data loss recovery in a secondary storage controller from a primary storage controller
US11200218B2 (en) Providing consistent data masking using causal ordering
CN112000971B (en) File permission recording method, system and related device
CN105991744A (en) Method and equipment used for synchronizing user application data
CN110008733B (en) Method and device for hiding transaction written into block chain
CN110020547A (en) A kind of data hiding method, device and equipment
US9626425B2 (en) Storage system, cloud storage system, and computer program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220913

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.