CN104461817B - A kind of method and server for detecting key - Google Patents

A kind of method and server for detecting key Download PDF

Info

Publication number
CN104461817B
CN104461817B CN201410696743.7A CN201410696743A CN104461817B CN 104461817 B CN104461817 B CN 104461817B CN 201410696743 A CN201410696743 A CN 201410696743A CN 104461817 B CN104461817 B CN 104461817B
Authority
CN
China
Prior art keywords
key
cryptographic hash
hard disks
server
hash
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.)
Active
Application number
CN201410696743.7A
Other languages
Chinese (zh)
Other versions
CN104461817A (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.)
Huawei Technologies 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 CN201410696743.7A priority Critical patent/CN104461817B/en
Publication of CN104461817A publication Critical patent/CN104461817A/en
Priority to PCT/CN2015/083887 priority patent/WO2016082560A1/en
Application granted granted Critical
Publication of CN104461817B publication Critical patent/CN104461817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

This application provides a kind of method and server for detecting key, for detecting impaired key in IP hard disks, detection efficiency is improved.Methods described is applied to include the storage system of server and multiple IP hard disks, and methods described includes:First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes the mark of subregion to be detected, and the subregion to be detected includes multiple keys;The server receives multiple first cryptographic Hash corresponding with the mark that the first IP hard disks are sent;Multiple second cryptographic Hash corresponding with the mark that other IP hard disks of the server in the multiple IP hard disks are sent, judge whether that each second cryptographic Hash has the first equal cryptographic Hash;When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash, the server determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.

Description

A kind of method and server for detecting key
Technical field
The present invention relates to electronic technology field, more particularly to a kind of method and server for detecting key.
Background technology
Agreement (the English interconnected between network:Internet Protocol;Referred to as:IP) hard disk is to be carried by IP agreement For the hard disk of physical communication.It has abandoned traditional serial connection (English:Serial Attached SCSI;Referred to as:SAS)/ Serial Advanced Technology Attachment (English:Serial Advanced Technology Attachment;Referred to as:SATA) interface, makes The connection obtained between main frame and hard disk is simpler, the almost limitation without distance.
IP hard disks are to carry out data storage with the structure of Key-Value, i.e. key-value pair.Wherein Key is key, typically one Individual character string, and Value is the corresponding value of key, also referred to as data or data content, Key-Value data abbreviation KV data.It is logical The offset and key Key of normal Value storage address are stored in index area together, and the corresponding value Value of Key are then stored in Data field.When needing data, the server of distributed system is conducted interviews using Key, index area is traveled through, according to Key indexes To offset, so as to have access to the corresponding Value of Key.Generally, in order to improve one in data reliability, distributed system Key can be stored in multiple IP hard disks, that is, stores multiple copies.In other words, the Key of a subregion is stored in multiple IP hard disks On, and may preserve the Key of multiple subregions on an IP hard disk.If some Key is damaged due to the bad track of IP hard disks, that Distributed system possibly can not have access to the corresponding Value stored in this IP hard disk.
Existing way is that the server in distributed system obtains what is stored on the corresponding multiple IP hard disks of a subregion The whole Key of this subregion copy, wherein, subregion is logically divided by the logic unit in distributed system.But one Individual Key copy data is typically sized to million grades, even up to 10,000,000 grades sometimes, so transmitting multiple Key copies can take very Multi net voting resource, and transmission speed is very slow.After the copy for receiving each IP hard disks transmission, server is contrasted.If same There are a copy and other copies different in the multiple copies of individual Key correspondences, then it is assumed that IP hard disks of the Key in this different copy In be damaged.The Key of damage is detected by such mode, transmission speed is slow, and detection efficiency is low.
The content of the invention
The invention provides a kind of method and server for detecting key, for detecting impaired key in IP hard disks, improve Detection efficiency.
The application first aspect provides a kind of method for detecting key, and methods described is applied in storage system, described to deposit Storage system includes server and multiple IP hard disks, including:
First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes The mark of subregion to be detected, the subregion to be detected includes multiple keys;
The server receives multiple first cryptographic Hash corresponding with the mark that the first IP hard disks are sent;
It is corresponding multiple with the mark that other IP hard disks of the server in the multiple IP hard disks are sent Second cryptographic Hash, judges whether that each second cryptographic Hash has the first equal cryptographic Hash;
It is described when the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash Server determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.
With reference in a first aspect, in the first possible implementation of first aspect, methods described also includes:
The server sends the target cryptographic Hash to other described IP hard disks;
Receive the corresponding key of the target cryptographic Hash that other described IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
With reference to the first possible implementation of first aspect or first aspect, second in first aspect is possible In implementation, the multiple IP hard disks are the corresponding IP hard disks of the subregion to be detected.
The application second aspect provides a kind of method for generating cryptographic Hash, and applied to IP hard disks, the IP hard disks include Multiple keys, methods described includes:
Hash operation is carried out to each key in multiple keys, the corresponding cryptographic Hash of each key is obtained;
The detection instruction that the reception server is sent, the detection instruction includes the mark of subregion to be detected, described to be detected Subregion includes the multiple key;
Multiple cryptographic Hash corresponding with the mark are sent to the server.
With reference to second aspect, in the first possible implementation of second aspect, methods described also includes:
Preserve the corresponding relation between each key and cryptographic Hash;
The first cryptographic Hash that the server is sent is received, first cryptographic Hash is its in the cryptographic Hash of the preservation In one;
According to the corresponding relation and first cryptographic Hash, it is determined that with the first key corresponding to first cryptographic Hash;
First key is obtained, and first key is sent to the server.
With reference to the first possible implementation of second aspect, in second of possible implementation of second aspect, Methods described also includes:The second key that the server is sent is received, and stores and does not include in second key, the multiple key Second key.
The application third aspect provides a kind of server, including:
Communication interface, detection instruction is sent for the first IP hard disks into multiple IP hard disks, and the detection instruction includes The mark of subregion to be detected, the subregion to be detected includes multiple keys;And the first IP hard disks are sending with the mark pair Multiple first cryptographic Hash answered;
Processor, for the corresponding multiple with the mark of other IP hard disks transmission in the multiple IP hard disks Second cryptographic Hash, judges whether that each second cryptographic Hash has the first equal cryptographic Hash;When the multiple second cryptographic Hash In target cryptographic Hash when being not comprised in the multiple first cryptographic Hash, determine to store in the first IP hard disks with it is described The corresponding key of target cryptographic Hash is damaged.
With reference to the third aspect, in the first possible implementation of the third aspect, the communication interface is additionally operable to:
The target cryptographic Hash is sent to other described IP hard disks;
Receive the corresponding key of the target cryptographic Hash that other described IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
With reference to the first possible implementation of the third aspect or the third aspect, second in the third aspect is possible In implementation, the multiple IP hard disks are the corresponding IP hard disks of the subregion to be detected.
The application fourth aspect provides a kind of IP hard disks, including:
Memory cell, for storing multiple keys;
Processor, for carrying out Hash operation to each key in multiple keys, obtains the corresponding cryptographic Hash of each key;
Interface, the detection instruction sent for the reception server, the detection instruction includes the mark of subregion to be detected, institute Stating subregion to be detected includes the multiple key;And send multiple cryptographic Hash corresponding with the mark to the server.
With reference to fourth aspect, in the first possible implementation of fourth aspect, the memory cell is additionally operable to protect Deposit the corresponding relation between each key and cryptographic Hash;
The interface is additionally operable to receive the first cryptographic Hash that the server is sent, and first cryptographic Hash is the preservation Cryptographic Hash in one of them;
The processor is additionally operable to according to the corresponding relation and first cryptographic Hash, it is determined that with first cryptographic Hash The first corresponding key;And obtain first key;
The interface is additionally operable to send first key to the server.
With reference to the first possible implementation of fourth aspect, in second of possible implementation of fourth aspect, The interface is additionally operable to receive the second key that the server is sent;
The memory cell is additionally operable to not include second key in storage second key, the multiple key.
The one or more technical schemes provided in the embodiment of the present invention, have at least the following technical effects or advantages:
First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes The mark of subregion to be detected, the subregion to be detected includes multiple keys;The server receives what the first IP hard disks were sent Multiple first cryptographic Hash corresponding with the mark;Other IP hard disks of the server in the multiple IP hard disks are sent Multiple second cryptographic Hash corresponding with the mark, judge whether that each second cryptographic Hash has the first equal Hash Value;When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash, the service Device determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.So, in present invention implementation In example, when target cryptographic Hash is not included in the first cryptographic Hash, it is possible to determine the first Hash stored in the first IP hard disks It is worth corresponding key to be damaged.Also, cryptographic Hash with key in itself compared with, data volume is small, thus efficiency of transmission than transmission key sheet Body is faster.So, improve the detection efficiency that key is damaged in IP hard disks.
Brief description of the drawings
Fig. 1 is the method flow diagram of detection key in the embodiment of the present invention;
Fig. 2 is the method flow diagram of generation cryptographic Hash in the embodiment of the present invention;
Fig. 3 is the structural representation of server in the embodiment of the present invention;
Fig. 4 is the structural representation of IP hard disks in the embodiment of the present invention.
Embodiment
The invention provides a kind of method and server for detecting key, for detecting impaired key in IP hard disks, improve Detection efficiency.
Technical scheme in the embodiment of the present invention is the method bag for detecting key in the above-mentioned technical problem of solution, the present invention Include following content:
First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes The mark of subregion to be detected, the subregion to be detected includes multiple keys;The server receives what the first IP hard disks were sent Multiple first cryptographic Hash corresponding with the mark;Other IP hard disks of the server in the multiple IP hard disks are sent Multiple second cryptographic Hash corresponding with the mark, judge whether that each second cryptographic Hash has the first equal Hash Value;When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash, the service Device determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.So, in present invention implementation In example, when target cryptographic Hash is not included in the first cryptographic Hash, it is possible to determine the first Hash stored in the first IP hard disks It is worth corresponding key to be damaged.Also, cryptographic Hash with key in itself compared with, data volume is small, thus efficiency of transmission than transmission key sheet Body is faster.So, improve the detection efficiency that key is damaged in IP hard disks.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, represents there may be three kinds of passes System, for example, A and/or B, can be represented:Individualism A, while there is A and B, these three situations of individualism B.In addition, herein Middle character "/", it is a kind of relation of "or" to typically represent forward-backward correlation object.
Embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
The application first aspect provides a kind of method for detecting key, refer to Fig. 1, including:
S101:First IP hard disk of the server into the multiple IP hard disks sends detection instruction.
S102:The server receives multiple first Hash corresponding with the mark that the first IP hard disks are sent Value.
S103:It is corresponding with the mark that other IP hard disks of the server in the multiple IP hard disks are sent Multiple second cryptographic Hash, judge whether that each second cryptographic Hash has the first equal cryptographic Hash.
S104:When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash When, the server determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.
For the technical scheme of the clear explanation embodiment of the present invention, one is carried out to storage system first and is introduced.Storage system Including server and multiple IP hard disks, multiple IP hard disks are connected with server.IP hard disks provide store function, and be stored with key Key, And the corresponding data Value of key.Server is managed to multiple IP hard disks, for example by user input storage system key and Data are write in wherein one or more IP hard disks, or the key and data in IP hard disks are deleted according to user's request, repaiied Change and update.The control of user and upper layer application to IP hard disks is managed, and is realized by server.
In the technical field belonging to the application, Key, referred to as key, also referred to as major key;Value is the corresponding value of key, simultaneously Alternatively referred to as data, data content.In described below, key or Key refer to identical, value, and data and data content are referred both to Value。
Specifically, within the storage system, a subregion includes multiple keys, and each key can be stored in multiple IP hard disks In, such as 3, i.e., a complete key is stored in the 1st IP hard disk, the complete key of storage portion in 2 IP hard disks, the Also a complete key is stored in 3 IP hard disks.And multiple IP hard disks that each key in same subregion is stored are The multiple IP hard disks of identical.And can store the key of one or more subregions on an IP hard disk.
Safeguard there is a record sheet in storage system.Record has multiple IP hard disks corresponding to a subregion in record sheet.Lift For example, IP address, index, port numbering that can be by recording IP hard disks in record sheet etc. record corresponding multiple IP Hard disk.The application those skilled in the art can be selected according to actual needs, and the application is not particularly limited.
Therefore, before S101, to detect whether subregion to be detected is damaged in the key of the first IP hard-disc storages, inquiry note Record table be assured that multiple IP hard disks corresponding with subregion to be detected specially which.And the first IP hard disks are that multiple IP are hard One in disk.
In S101 detection instruction is sent to the first IP hard disks.Due to multiple subregions that may be stored with each IP hard disks Key and data, so, in embodiments of the present invention, detection instruction includes the mark of subregion to be detected.According to mark, the first IP Hard disk can determine multiple keys included by subregion to be detected.
Next, mark of the first IP hard disks in detection instruction, determines to be detected point from the cryptographic Hash of storage Corresponding multiple first cryptographic Hash in area.Then multiple first cryptographic Hash are returned into server.And then in S102, server is received Multiple first cryptographic Hash sent to the first IP hard disks.
Next, performing the corresponding with mark of other IP hard disks transmission of S103, i.e. server in multiple IP hard disks Multiple second cryptographic Hash, judge whether that each second cryptographic Hash has the first equal cryptographic Hash.
Then, S104 is performed:When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple During one cryptographic Hash, the server determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged It is bad.
Specifically, either multiple first cryptographic Hash or multiple second cryptographic Hash, are all that IP hard disks pass through to storage Key carries out what is obtained after Hash operation.Also, because each key stored on IP hard disks is different, therefore, carry out Hash The cryptographic Hash obtained after computing is also just different.When the key in IP hard disks is not damaged, corresponding cryptographic Hash will be obtained;And work as IP There is bad track in hard disk, and key just in this bad track when, then these keys being in bad track will be unable to read, and then also Hash operation can not be carried out to the key of damage and obtain cryptographic Hash.
And multiple keys of the subregion to be detected stored in multiple IP hard disks are identicals, so, when multiple second cryptographic Hash In target cryptographic Hash when being not comprised in multiple first cryptographic Hash, show the corresponding key of target cryptographic Hash in other IP hard disks In it is normal, and be damaged in the first IP hard disks.
As an example it is assumed that subregion to be detected be subregion 1, correspondence 3 IP hard disks, respectively IP hard disks A, IP hard disks B and IP disk Cs.Subregion 1 includes 10 keys, respectively Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10.In S101, any one of server into IP hard disk A, IP hard disk B and IP disk Cs sends detection instruction, it is assumed that It is IP hard disks A.Detection instruction includes the mark of subregion 1.IP hard disks A is received after detection instruction, according to the mark of subregion 1, will Corresponding multiple first cryptographic Hash of multiple keys return to servers in subregion 1.For convenience of explanation, it is assumed that it is many that IP hard disks A is returned Individual first cryptographic Hash is:
Hash_treeA_Key1 (10), hash_treeA_Key3 (53), hash_treeA_Key4 (24), hash_ TreeA_Key5 (1), hash_treeA_Key6 (36), hash_treeA_Key7 (12), hash_treeA_Key8 (2), Hash_treeA_Key9 (52), hash_treeA_Key10 (3).
Simultaneously, it is assumed that IP hard disks B send multiple second cryptographic Hash be respectively:
Hash_treeB_Key1 (10), hash_treeB_Key2 (6), hash_treeB_Key3 (53), hash_ TreeB_Key4 (24), hash_treeB_Key5 (1), hash_treeB_Key6 (36), hash_treeB_Key7 (12), Hash_treeB_Key8 (2), hash_treeB_Key9 (52), hash_treeB_Key10 (3).
IP disk Cs send multiple second cryptographic Hash be respectively:
Hash_treeC_Key1 (10), hash_treeC_Key2 (6), hash_treeC_Key3 (53), hash_ TreeC_Key4 (24), hash_treeC_Key5 (1), hash_treeC_Key7 (12), hash_treeC_Key8 (2), Hash_treeC_Key9 (52), hash_treeC_Key10 (3).
Wherein, hash_treeA_Key1 (10) represents the first cryptographic Hash for the corresponding Key1 that IP hard disks A is returned, Key1's Cryptographic Hash is specially 10.Other cryptographic Hash represent that meaning is similar, just no longer repeat one by one here.
Next, it is judged that whether each second cryptographic Hash has the first equal cryptographic Hash.First, IP hard disks B and IP In multiple second cryptographic Hash that disk C is sent, target cryptographic Hash is defined as hash_treeB_Key1 (10) and hash_ TreeC_Key1 (10), in multiple first cryptographic Hash, hash_treeA_Key1 (10) and hash_treeB_Key1 (10) and Hash_treeC_Key1 (10) is equal, so, Key1 is not damaged in the first IP hard disks.And in multiple first cryptographic Hash, mesh When mark cryptographic Hash is hash_treeB_Key2 (6) and hash_treeC_Key2 (6), but in the absence of the first equal cryptographic Hash, So determining that the Key2 stored in the first IP hard disks is damaged.Simultaneously, it can be seen that Key3, Key4, Key5, Key6, Key7, Key8, Key9 and Key10 are included in multiple first cryptographic Hash in the first equal cryptographic Hash of corresponding multiple second cryptographic Hash In, so above-mentioned 9 keys are not also damaged.
Same method, when IP disk Cs are as the first IP hard disks, that is, when judging whether to have key damage in IP disk Cs, also may be used To determine that Key6 is damaged.Detailed process is just no longer repeated one by one here.
It can be seen from foregoing description in embodiments of the present invention, multiple second cryptographic Hash and multiple first Hash are passed through Whether value is equal it may determine that whether the key in the first IP hard disks is damaged, it is no longer necessary to by all keys of network transmission Hold, only transmit the cryptographic Hash that size of data is Kbyte grades.Therefore compared with prior art, detection efficiency is improved.
Further, after S104, in order to repair the key damaged in the first IP hard disks, in addition to:
The server sends the target cryptographic Hash to other described IP hard disks;
Receive the corresponding key of the target cryptographic Hash that other described IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
Specifically, after detecting that the corresponding key of target cryptographic Hash is damaged, the first IP of user's access is hard for convenience The corresponding data of key are damaged in disk, in embodiments of the present invention, it will repair the key damaged.First, it is impaired in order to repair Key, server sends target cryptographic Hash to other IP hard disks.During implementing, server can be only hard to other IP An IP hard disk in disk sends target cryptographic Hash, can also be into every other IP hard disks, and the corresponding key of target cryptographic Hash is not The IP hard disks of damage send target cryptographic Hash, and this application is not limited.
One or more of other IP hard disks are received after target cryptographic Hash, are closed according to the correspondence being stored in IP hard disks System, determines the corresponding key of target cryptographic Hash, obtains the copy of key, is subsequently sent to server.Key is sent to by server again In one IP hard disks, so that the key that IP Hard Disk Repairs are damaged.
Above-mentioned example is continued to use to illustrate.After it is determined that the Key2 in IP hard disks A is damaged, server is obtained from IP hard disks B Key2 copy is taken, is subsequently sent in IP hard disks A.IP hard disks A stores Key2, so as to repair Key2.
The application second aspect provides a kind of method for generating cryptographic Hash, as shown in Fig. 2 including:
S201:Hash operation is carried out to each key in multiple keys, the corresponding cryptographic Hash of each key is obtained.
S202:The detection instruction that the reception server is sent.
S203:Multiple cryptographic Hash corresponding with the mark are sent to the server.
First, in embodiments of the present invention, multiple keys that the subregion to be detected that is stored with IP hard disks includes.In addition, also depositing Contain the corresponding key of other subregions.In S201, IP hard disks carry out Hash operation to each key in multiple keys, obtain each key Corresponding cryptographic Hash.Wherein, the process of Hash operation, principle and calculation with Hash operation in the prior art are carried out to each key Method is similar, therefore just repeats no more here.
Because multiple keys are different, so, the cryptographic Hash of acquisition is also just different.Therefore, cryptographic Hash and sign The key stored in IP hard disks is one-to-one.When the key in IP hard disks is not damaged, corresponding cryptographic Hash will be obtained;Work as IP There is bad track in hard disk, and when having key just in this bad track, then these keys being in bad track will be unable to read, Jin Erye Can not just Hash operation be carried out to the key of damage and obtain cryptographic Hash.
Certainly, carry out Hash operation except treating multiple keys that sense partitions include, IP hard disks can also to storage its He carries out Hash operation by key, and then obtains the corresponding cryptographic Hash of other keys, and this application is not particularly limited.
In S202, the detection instruction that IP hard disks the reception server sends and come.Include to be detected point in detection instruction The mark in area, according to the mark in detection instruction, IP hard disks can determine the targeted subregion of instruction to be detected, and be stored in Multiple keys of subregion to be detected in IP hard disks.
Next, IP hard disks send multiple cryptographic Hash corresponding with mark to server.
Optionally, in embodiments of the present invention, in addition to:
Preserve the corresponding relation between each key and cryptographic Hash;
The first cryptographic Hash that the server is sent is received, first cryptographic Hash is its in the cryptographic Hash of the preservation In one;
According to the corresponding relation and first cryptographic Hash, it is determined that with the first key corresponding to first cryptographic Hash;
First key is obtained, and first key is sent to the server.
Specifically, IP hard disks determine each key corresponding cryptographic Hash in multiple cryptographic Hash for convenience, and IP hard disks exist Obtain after the corresponding cryptographic Hash of each key, further can preserve each key and the corresponding relation of cryptographic Hash.
The first key damage in other one or more IP hard disks is found when server, and the IP in the embodiment of the present invention is hard When first key of disk is not damaged, IP hard disks are likely to be received the first cryptographic Hash of server transmission.IP hard disks are according to corresponding relation Determine the first key corresponding to the first cryptographic Hash.Specifically, the first cryptographic Hash is multiple cryptographic Hash for preserving in IP hard disks In one.IP hard disks are received after the first cryptographic Hash, are searched in the corresponding relation of preservation.Found in corresponding relation The corresponding relation of first cryptographic Hash, so that it is determined that the first key corresponding to the first cryptographic Hash.
Then, IP hard disks obtain the first key, and send the first key to server, so that other one or more IP hard disks are repaiied Multiple first key.
Optionally, in embodiments of the present invention, in addition to:
The second key that the server is sent is received, and stores and does not include described the in second key, the multiple key Two keys.
In addition, when the second key in the IP hard disks that server finds in the embodiment of the present invention is damaged, can also be from second The second key is obtained in other not impaired IP hard disks of key and the IP hard disks into the embodiment of the present invention are sent.Specifically, Two keys are not included in multiple keys, and the second key is damaged in IP hard disks.Because IP hard disks are when carrying out Hash operation, it is impossible to Hash operation is carried out to the second key, therefore, corresponding second cryptographic Hash of the second key is not also just included in the cryptographic Hash of preservation.
IP hard disks are received after the second key of server transmission, the second key are stored, so as to repair the second key of damage.Enter One step, subsequent operation for convenience, IP hard disks still can carry out Hash operation to the second key, obtain the corresponding Hash of the second key Value.
The application third aspect provides a kind of server, as shown in figure 3, including:
Communication interface 101, detection instruction, the detection instruction bag are sent for the first IP hard disks into multiple IP hard disks The mark of subregion to be detected is included, the subregion to be detected includes multiple keys;And the first IP hard disks are sending with the mark Corresponding multiple first cryptographic Hash;
Processor 102, for the corresponding with the mark of other IP hard disks transmission in the multiple IP hard disks Multiple second cryptographic Hash, judge whether that each second cryptographic Hash has the first equal cryptographic Hash;When the multiple second Kazakhstan When target cryptographic Hash in uncommon value is not comprised in the multiple first cryptographic Hash, determine to store in the first IP hard disks with The corresponding key of the target cryptographic Hash is damaged.
Optionally, communication interface 101 is additionally operable to:
The target cryptographic Hash is sent to other described IP hard disks;
Receive the corresponding key of the target cryptographic Hash that other described IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
In embodiments of the present invention, multiple IP hard disks are the corresponding IP hard disks of subregion to be detected.
Wherein, in figure 3, bus architecture (being represented with bus 100), bus 100 can include any number of interconnection Bus and bridge, bus 100 is by depositing that the one or more processors including being represented by processor 102 and memory 103 are represented The various circuits of reservoir are linked together.Bus 100 can also by ancillary equipment, voltage-stablizer and management circuit etc. it Various other circuits of class are linked together, and these are all it is known in the art, therefore, no longer being carried out further to it herein Description.EBI 104 provides interface between bus 100 and communication interface 101.Communication interface 101 can connect including reception There is provided the unit for being communicated over a transmission medium with various other devices for mouth and transmission interface or transceiver interface.
Processor 102 is responsible for bus 100 and common processing, and memory 103 can be used to store processor 102 perform operation when used data.
The various change mode and instantiation of detection key implementation procedure described in previous embodiment are equally applicable to this The server of embodiment, by the foregoing detailed description to detecting key implementation procedure, those skilled in the art can clearly know The implementation of server in road the present embodiment, thus it is succinct for specification, it will not be described in detail herein.
The application fourth aspect provides a kind of IP hard disks, as shown in figure 4, including:
Memory cell 201, for storing multiple keys;
Processor 202, for carrying out Hash operation to each key in multiple keys, obtains the corresponding Hash of each key Value;
Interface 203, the detection instruction sent for the reception server, the detection instruction includes the mark of subregion to be detected Know, the subregion to be detected includes the multiple key;And send multiple cryptographic Hash corresponding with the mark to the server.
Optionally, memory cell 201 is additionally operable to preserve the corresponding relation between each key and cryptographic Hash;
Interface 203 is additionally operable to receive the first cryptographic Hash that the server is sent, and first cryptographic Hash is the preservation Cryptographic Hash in one of them;
Processor 202 is additionally operable to according to the corresponding relation and first cryptographic Hash, it is determined that with first cryptographic Hash The first corresponding key;And obtain first key;
Interface 203 is additionally operable to send first key to the server.
Optionally, interface 203 is additionally operable to receive the second key that the server is sent;
Memory cell 201 is additionally operable to not include second key in storage second key, the multiple key.
During implementing, memory cell 201 includes the internal memory and disk in IP hard disks.In the embodiment of the present invention Multiple keys, are stored in internal memory or disk.The application those of skill in the art can be configured according to actual needs, this Shen Specific limitation is not made please.
Wherein, in Fig. 4, bus architecture (being represented with bus 200), bus 200 can include any number of interconnection Bus and bridge, bus 200 by one represented including the one or more processors that are represented by processor 202, interface 203 or Multiple interfaces, memory cell 201 are linked together.Bus 200 can also be by such as ancillary equipment, voltage-stablizer and power management electricity Various other circuits on road or the like are linked together, and these are all it is known in the art, therefore, no longer being carried out herein to it Further describe.
During implementing, interface 203 is specially Ethernet interface, and IP hard disks and clothes are realized by Ethernet protocol Business device, other external equipments, network apply interaction data.
Processor 202 is responsible for bus 200 and common processing, and memory cell 201 also be used to store processor 202 perform operation when used data.
The various change mode and instantiation of generation cryptographic Hash process described in previous embodiment are equally applicable to this The IP hard disks of embodiment, by the foregoing detailed description to generating cryptographic Hash implementation procedure, those skilled in the art can understand The implementation for knowing IP hard disks in the present embodiment, so succinct for specification, will not be described in detail herein.
The one or more technical schemes provided in the embodiment of the present invention, have at least the following technical effects or advantages:
First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes The mark of subregion to be detected, the subregion to be detected includes multiple keys;The server receives what the first IP hard disks were sent Multiple first cryptographic Hash corresponding with the mark;Other IP hard disks of the server in the multiple IP hard disks are sent Multiple second cryptographic Hash corresponding with the mark, judge whether that each second cryptographic Hash has the first equal Hash Value;When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash, the service Device determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged.So, in present invention implementation In example, when target cryptographic Hash is not included in the first cryptographic Hash, it is possible to determine the first Hash stored in the first IP hard disks It is worth corresponding key to be damaged.Also, cryptographic Hash with key in itself compared with, data volume is small, thus efficiency of transmission than transmission key sheet Body is faster.So, improve the detection efficiency that key is damaged in IP hard disks.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code The shape for the computer program product that usable storage medium is implemented on (including but is not limited to magnetic disk storage and optical memory etc.) Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (4)

1. a kind of method for detecting key, it is characterised in that methods described is applied in storage system, the storage system includes clothes Being safeguarded in business device and multiple IP hard disks, the storage system has record in a record sheet, the record sheet to have a subregion institute right The multiple IP hard disks answered, the IP hard disks provide store function, and be stored with key Key, and the corresponding data Value of key, including:
Inquire about the record sheet and determine multiple IP hard disks corresponding with subregion to be detected;
First IP hard disk of the server into the multiple IP hard disks sends detection instruction, and the detection instruction includes to be checked The mark of subregion is surveyed, the subregion to be detected includes multiple keys;Mark of the first IP hard disks in detection instruction, from depositing Corresponding multiple first cryptographic Hash of subregion to be detected are determined in the cryptographic Hash of storage;The multiple first cryptographic Hash is, the IP Hard disk carries out what is obtained after Hash operation by the key to the partitioned storage to be detected;
The server receives multiple first cryptographic Hash corresponding with the mark that the first IP hard disks are sent;
Other IP hard disks in the multiple IP hard disks of the server are sending with the mark corresponding multiple second Cryptographic Hash, judges whether that each second cryptographic Hash has the first equal cryptographic Hash;The multiple second cryptographic Hash is, described Other IP hard disks carry out what is obtained after Hash operation by the key to the partitioned storage to be detected;
When the target cryptographic Hash in the multiple second cryptographic Hash is not comprised in the multiple first cryptographic Hash, the service Device determines that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged;
The server sends the target cryptographic Hash to one or more of other IP hard disks IP hard disks;
Receive the corresponding key of the target cryptographic Hash that one or more of other IP hard disks IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
2. a kind of method for generating cryptographic Hash, it is characterised in that applied to IP hard disks, the IP hard disks include multiple keys, described Method includes:
Hash operation is carried out to each key in multiple keys, the corresponding cryptographic Hash of each key is obtained;
The detection instruction that the reception server is sent, the detection instruction includes the mark of subregion to be detected, the subregion to be detected Including the multiple key;
Multiple cryptographic Hash corresponding with the mark are sent to the server;The multiple cryptographic Hash respectively with it is described to be detected The multiple key that subregion includes is corresponded;
Preserve the corresponding relation between each key and cryptographic Hash;
The first cryptographic Hash that the server is sent is received, first cryptographic Hash is wherein one in the cryptographic Hash of the preservation It is individual;
According to the corresponding relation and first cryptographic Hash, it is determined that with the first key corresponding to first cryptographic Hash;
First key is obtained, and first key is sent to the server;
The server sends first key to other hard disks, the first key described in other described IP hard-disc storages, it is described other IP hard disks are before first key is stored, not comprising first key.
3. a kind of server, it is characterised in that including:
Communication interface, detection instruction is sent for the first IP hard disks into multiple IP hard disks, and the detection instruction includes to be checked The mark of subregion is surveyed, the subregion to be detected includes multiple keys;And it is sending with the mark pair to receive the first IP hard disks Multiple first cryptographic Hash answered;Mark of the first IP hard disks in detection instruction, is determined from the cryptographic Hash of storage Corresponding multiple first cryptographic Hash of subregion to be detected;The multiple first cryptographic Hash is that the IP hard disks pass through to described to be checked The key for surveying partitioned storage carries out what is obtained after Hash operation;
Processor, multiple IP hard disks corresponding with subregion to be detected are determined for inquiring about record sheet;And for according to described many Multiple second cryptographic Hash corresponding with the mark that other IP hard disks in individual IP hard disks are sent, judge whether that each second breathes out There is the first equal cryptographic Hash in uncommon value;When the target cryptographic Hash in the multiple second cryptographic Hash be not comprised in it is described many During individual first cryptographic Hash, determine that the key corresponding with the target cryptographic Hash stored in the first IP hard disks is damaged;It is described Multiple second cryptographic Hash are that other described IP hard disks carry out obtaining after Hash operation by the key to the partitioned storage to be detected 's;
Record has multiple IP hard disks corresponding to a subregion in the record sheet, and the IP hard disks provide store function, storage There are key Key, and the corresponding data Value of key;
The communication interface is additionally operable to:
The target cryptographic Hash is sent to other described IP hard disks;
Receive the corresponding key of the target cryptographic Hash that other described IP hard disks are sent;
The key is sent to the first IP hard disks, so that key described in the first IP Hard Disk Repairs.
4. a kind of IP hard disks, it is characterised in that including:
Memory cell, for storing multiple keys;
Processor, for carrying out Hash operation to each key in multiple keys, obtains the corresponding cryptographic Hash of each key;
Interface, the detection instruction sent for the reception server, the detection instruction includes the mark of subregion to be detected, described to treat Sense partitions include the multiple key;And send multiple cryptographic Hash corresponding with the mark to the server;It is the multiple The multiple key that cryptographic Hash includes with the subregion to be detected respectively corresponds the memory cell and is additionally operable to preserve described Each corresponding relation between key and cryptographic Hash;
The interface is additionally operable to receive the first cryptographic Hash that the server is sent, and first cryptographic Hash is the Kazakhstan of the preservation Wish one of them in value;
The processor is additionally operable to according to the corresponding relation and first cryptographic Hash, it is determined that right with first cryptographic Hash institute The first key answered;And obtain first key;
The interface is additionally operable to send first key to the server;It is hard to other that the server sends first key Disk, the first key described in other described IP hard-disc storages, other described IP hard disks are before first key is stored, not comprising described First key.
CN201410696743.7A 2014-11-26 2014-11-26 A kind of method and server for detecting key Active CN104461817B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410696743.7A CN104461817B (en) 2014-11-26 2014-11-26 A kind of method and server for detecting key
PCT/CN2015/083887 WO2016082560A1 (en) 2014-11-26 2015-07-13 Method and server for testing keys

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410696743.7A CN104461817B (en) 2014-11-26 2014-11-26 A kind of method and server for detecting key

Publications (2)

Publication Number Publication Date
CN104461817A CN104461817A (en) 2015-03-25
CN104461817B true CN104461817B (en) 2017-08-11

Family

ID=52907912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410696743.7A Active CN104461817B (en) 2014-11-26 2014-11-26 A kind of method and server for detecting key

Country Status (2)

Country Link
CN (1) CN104461817B (en)
WO (1) WO2016082560A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461817B (en) * 2014-11-26 2017-08-11 华为技术有限公司 A kind of method and server for detecting key

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
CN102591970A (en) * 2011-12-31 2012-07-18 北京奇虎科技有限公司 Distributed key-value query method and query engine system
CN102780763A (en) * 2012-06-29 2012-11-14 华中科技大学 Distributed home subscriber server (HSS) data storage method and distributed HSS data extraction method
CN102821138A (en) * 2012-07-09 2012-12-12 广州鼎鼎信息科技有限公司 Metadata distributed storage method applicable to cloud storage system
CN103973810A (en) * 2014-05-22 2014-08-06 华为技术有限公司 Data processing method and device based on IP disk
CN104050250A (en) * 2011-12-31 2014-09-17 北京奇虎科技有限公司 Distributed key-value query method and query engine system
CN104123102A (en) * 2014-07-25 2014-10-29 华为技术有限公司 IP hard disk and data processing method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995745B (en) * 2014-05-22 2017-09-05 华为技术有限公司 A kind of IP hard disks task executing method and IP hard disks
CN104077239B (en) * 2014-06-24 2017-04-26 华为技术有限公司 IP hard disk, and memory system and data operation method thereof
CN104461817B (en) * 2014-11-26 2017-08-11 华为技术有限公司 A kind of method and server for detecting key

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
CN102591970A (en) * 2011-12-31 2012-07-18 北京奇虎科技有限公司 Distributed key-value query method and query engine system
CN104050250A (en) * 2011-12-31 2014-09-17 北京奇虎科技有限公司 Distributed key-value query method and query engine system
CN102780763A (en) * 2012-06-29 2012-11-14 华中科技大学 Distributed home subscriber server (HSS) data storage method and distributed HSS data extraction method
CN102821138A (en) * 2012-07-09 2012-12-12 广州鼎鼎信息科技有限公司 Metadata distributed storage method applicable to cloud storage system
CN103973810A (en) * 2014-05-22 2014-08-06 华为技术有限公司 Data processing method and device based on IP disk
CN104123102A (en) * 2014-07-25 2014-10-29 华为技术有限公司 IP hard disk and data processing method thereof

Also Published As

Publication number Publication date
CN104461817A (en) 2015-03-25
WO2016082560A1 (en) 2016-06-02

Similar Documents

Publication Publication Date Title
US10540323B2 (en) Managing I/O operations in a storage network
US11138095B2 (en) Identity propagation through application layers using contextual mapping and planted values
CN104182508B (en) A kind of data processing method and data processing equipment
US9298732B2 (en) Searching cloud-based distributed storage resources using a set of expendable probes
US20190268138A1 (en) Meta block chain
US10474632B2 (en) Segmented hashing for secure data modification
EP2932692B1 (en) Compatibly extending offload token size
US10936191B1 (en) Access control for a computing system
CN111222176B (en) Block chain-based cloud storage possession proving method, system and medium
CN104346365A (en) Device and method for determining specific service associated logs
CN108027713A (en) Data de-duplication for solid state drive controller
US10725767B2 (en) Systems and methods for reinforced update package authenticity
CN111858146B (en) Method, apparatus and computer program product for recovering data
CN109597903A (en) Image file processing apparatus and method, document storage system and storage medium
CN108182366A (en) A kind of method, apparatus and equipment of the file for measuring virtual machine
CN104461817B (en) A kind of method and server for detecting key
CN111368347A (en) Safe storage method based on cloud platform
US20210133048A1 (en) System and Method for Weight Based Data Protection
CN105516134A (en) Authentication method and system for system integration
US20210081430A1 (en) System and method for managing a role-based blockchain network
CN107085681B (en) Robust computing device identification framework
WO2021124784A1 (en) Trail recording system and data verification method
CN107395772A (en) The management method and management system of a kind of duplicate data
CN105678155B (en) A kind of method and device of information storage and verification
KR102416337B1 (en) Device, method, system and computer readable storage medium for managing blockchain

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