Data storage and management method and system based on cloud storage service deviceTechnical field
The present invention relates to technical field of data storage, and in particular to a kind of data storage management based on cloud storage service deviceMethod and system.
Background technique
In recent years, block chain technology obtains extensive concern and development.Block chain technology, also known as " distributed account book skillArt " is that a kind of decentralization, collective safeguard that the technical solution of distributed account book, essence are by multiple nodes with mostly realThe distributed data base system that body participates in.Not a kind of single technology of block chain, the result such as point of multiple technologies integrationTo spot net, encryption technology, common recognition mechanism etc., using the technical maintenance of block chain one it is reliable, be difficult to tamper with, can reduceRisks of trust simultaneously can be effectively reduced numerous maintenance costs for participating in cooperation.
Cloud storage is the primary extension of cloud computing concept, and similar with cloud computing, cloud storage refers to through cluster application, gridA large amount of different types of storage equipment in network are gathered association by virtualization software by technology or distributed file systemIt is common that the function of data storage and business access is externally provided with work, it is the management and use to virtualized memory resource.MeshPreceding widely applied cloud storage system is typical centralized system, i.e., builds software platform by corresponding Internet company, matchesIt sets a large amount of server and virtualization software comes many multiple storage devices and the bridge of storage demand, this center in communication networkThe cloud storage service of change is easily achieved and promotes, but in cloud storage, to during the modification of file inevitably repeatedlyThe cryptographic Hash of calculation document entirety come guarantee block chain structure can not tamper, ultimately caused the waste of manpower, caused to transportRow higher cost.
Summary of the invention
To solve the deficiencies in the prior art, the data storage based on cloud storage service device that the embodiment of the invention provides a kind ofManagement method and system.
In order to achieve the above objectives, the present invention adopts the following technical scheme that:
In a first aspect, the data storage and management method provided in an embodiment of the present invention based on cloud storage service device includes followingStep:
In response to user's broadcast in the data upload requests of block chain network, the data that user uploads are received;
According to the block head of the data and common recognition algorithm, whether legal the data are judged, if so, saving the numberAccording to;
Using symmetric encipherment algorithm, the data are encrypted, generate the hash value of the data;
The data are sent to cloud storage service device and receive the storage address of the data of Cloud Server return;
Using hash algorithm, the hash value of the storage address is obtained and by the hash value of the data and storage groundThe hash value of location is inserted into the account book of the data, is updated to the account book and will be fed back this more to each calculate nodeNew information.
Further, before receiving the data that user uploads, the method also includes:
For the data be arranged block head, wherein the block head include the corresponding calculate node information of the data,Hash value, timestamp and the random number of Merkle tree root, the hash value of a upper data block, subsequent data chunk.
Second aspect, the data storage management system provided in an embodiment of the present invention based on cloud storage service device include:
Receiving module, for receiving the data of user's upload;
Judgment module judges whether the data are legal for the block head and common recognition algorithm according to the data, ifIt is then to save the data;
Encrypting module generates the hash value of the data for encrypting to the data;
Sending module, for the data are sent to cloud storage service device and receive Cloud Server return the dataStorage address;
Update module obtains the hash value of the storage address and by the Hash of the data for utilizing hash algorithmThe hash value of value and the storage address is inserted into the account book of the data, is updated to the account book and will be to each calculatingThis more new information of node feeding back.
Further, the system further include:
Setup module, for block head to be arranged for the data, wherein the block head includes the corresponding meter of the dataHash value, timestamp and the random number of operator node information, Merkle tree root, the hash value of a upper data block, subsequent data chunk.
Data storage and management method and system provided in an embodiment of the present invention based on cloud storage service device has with followingBeneficial effect:
It crosses and upper transmitting file is audited and managed using the calculate node in block chain, according to common recognition machine while file uploadsMore new block chain account book is made, realizes and whether maliciously being repaired for upper transmitting file is judged according to the format of file to before file storageChange, reduces the number and cost of labor of the cryptographic Hash of calculation document entirety.
Detailed description of the invention
Fig. 1 is that the process of the data storage and management method provided in an embodiment of the present invention based on cloud storage service device is illustratedFigure;
Fig. 2 is the structural representation of the data storage management system provided in an embodiment of the present invention based on cloud storage service deviceFigure.
Specific embodiment
Specific introduce is made to the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, the data storage and management method provided in an embodiment of the present invention based on cloud storage service device includes:
S101 receives the data that user uploads in response to user's broadcast in the data upload requests of block chain network;
S102 judges whether data are legal according to the block head of data and common recognition algorithm, if so, saving data;
S103 encrypts data using symmetric encipherment algorithm, generates the hash value of data;
S104 sends data to cloud storage service device and receives the storage address of the data of Cloud Server return.
S105 obtains the hash value of the storage address and by the hash value of the data and described using hash algorithmThe hash value of storage address is inserted into the account book of the data, is updated and will be fed back to each calculate node to the account bookThis more new information.
Optionally, before receiving the data that user uploads, the method also includes:
For the data be arranged block head, wherein the block head include the corresponding calculate node information of the data,Hash value, timestamp and the random number of Merkle tree root, the hash value of a upper data block, subsequent data chunk.
Wherein, hash value is responsible for indicating adjacent block address;Merkle tree root is the Merkle tree construction in data blockThe storage position of tree root hash value;Play the role of anti-tamper anti-counterfeiting with the uniqueness of hash value;Calculate node information is mainIt is responsible for account book, inspection of documents and the rights management work of storing data block;Timestamp is the last account book renewal time.
As shown in Fig. 2, the data storage management system provided in an embodiment of the present invention based on cloud storage service device includes connecingReceive module, judgment module, encrypting module and sending module, in which:
Receiving module, for receiving the data of user's upload;
Judgment module judges whether the data are legal for the block head and common recognition algorithm according to the data, ifIt is then to save the data;
Encrypting module generates the hash value of the data for encrypting to the data;
Sending module, for the data are sent to cloud storage service device and receive Cloud Server return the dataStorage address;
Update module obtains the hash value of the storage address and by the Hash of the data for utilizing hash algorithmThe hash value of value and the storage address is inserted into the account book of the data, is updated to the account book and will be to each calculatingThis more new information of node feeding back.
Optionally, the system further include:
Setup module, for block head to be arranged for the data, wherein the block head includes the corresponding meter of the dataHash value, timestamp and the random number of operator node information, Merkle tree root, the hash value of a upper data block, subsequent data chunk.
Data storage and management method and system provided in an embodiment of the present invention based on cloud storage service device is used by receivingThe data that family uploads judge whether data are legal according to the block head of data and common recognition algorithm, if so, saving data and benefitWith symmetric encipherment algorithm, data are encrypted, generate the hash value of data, send data to cloud storage service device and are receivedThe storage address for the data that Cloud Server returns obtains the hash value of storage address and the Hash by data using hash algorithmIn the account book of the hash value of value and storage address insertion data, the account book is updated and will be fed back to each calculate nodeWhether this more new information realizes before storing to file according to the upper transmitting file of the format of file judgement by malicious modification, subtractsThe number and cost of labor of the cryptographic Hash of calculation document entirety are lacked.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodimentPoint, reference can be made to the related descriptions of other embodiments.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,Improve etc., it should be included within the scope of the claims of this application.