CN111198862A - File storage method and device based on block chain, terminal equipment and medium - Google Patents

File storage method and device based on block chain, terminal equipment and medium Download PDF

Info

Publication number
CN111198862A
CN111198862A CN201811377132.0A CN201811377132A CN111198862A CN 111198862 A CN111198862 A CN 111198862A CN 201811377132 A CN201811377132 A CN 201811377132A CN 111198862 A CN111198862 A CN 111198862A
Authority
CN
China
Prior art keywords
file
stored
urls
management platform
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811377132.0A
Other languages
Chinese (zh)
Inventor
秦俊锋
闫茂华
侯姗姗
孙宁宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811377132.0A priority Critical patent/CN111198862A/en
Publication of CN111198862A publication Critical patent/CN111198862A/en
Pending legal-status Critical Current

Links

Images

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/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a file storage method, a device, terminal equipment and a medium based on a block chain, which belong to the technical field of detection, wherein the method comprises the steps that a user terminal sends safety information and a file to be stored to a management platform, and the management platform is triggered to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining a URLS for downloading the file to be stored, and writing the security information, the URLS and a hash value of the file to be stored into a block chain to obtain a transaction order number; and receiving the transaction order number returned by the management platform. Therefore, the file is stored through the cloud storage platform, the physical level security of the file is improved, the file is verified through the hash value stored in the block chain, the file anti-tampering discrimination technology is realized, and the possibility that the reliability of the file is reduced because the file is tampered without authorization verification is reduced.

Description

File storage method and device based on block chain, terminal equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for storing a file based on a block chain, a terminal device, and a medium.
Background
With the development of internet technology, the channels for storing files are increasing. Such as local storage (e.g., usb disk, hard disk, etc.), File Transfer Protocol (FTP) server, cloud storage (e.g., Baidu cloud disk, ari cloud disk, Tencent cloud disk, etc.), and block chain.
However, the local storage method requires a usb disk and a hard disk to be carried around, which may cause a loss risk. The FTP server stores data that may be deleted and lost. In the cloud storage mode, the risk of cloud storage platform failure and data loss exists, and the data security cannot be guaranteed. The blockchain is based on a distributed storage technology, data can be prevented from being tampered, but the content format and the size of the blockchain are limited. Since the blockchain can store data only in the form of a string, it is difficult to write large files such as multimedia data.
In summary, the conventional file storage methods all have security problems, and are difficult to perform tamper-proof protection and file verification.
Disclosure of Invention
The embodiment of the application provides a block chain-based file storage method, a block chain-based file storage device, a terminal device and a medium, which are used for improving the safety of data storage and achieving anti-tampering protection of files when the files, especially large files such as multimedia data, are stored.
In one aspect, a block chain-based file storage system is provided, which includes a user terminal, a management platform, a cloud storage platform, and a block chain, wherein,
the user terminal is used for sending the safety information and the file to be stored to the management platform and receiving the transaction order number returned by the management platform;
the management platform is used for uploading the file to be stored to the cloud storage platform, acquiring the URLS, writing the safety information, the URLS and the hash value of the file to be stored into the block chain, and acquiring a transaction order number;
block chains: the system comprises a management platform, a safety information processing platform and a URLS (universal public warning system) which are used for generating a transaction order number according to the received safety information, the URLS and the Hash value and returning the transaction order number to the management platform;
the cloud storage platform: and the URLS is used for receiving the file to be stored uploaded by the management platform and returning the URLS used for downloading the file to be stored to the management platform.
In one aspect, a block chain-based file storage method is provided, including:
the user terminal sends the security information and the file to be stored to the management platform, and triggers the management platform to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining URLS used for downloading the file to be stored, writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and obtaining a transaction order number;
and receiving the transaction order number returned by the management platform.
Preferably, the method further comprises the following steps:
sending an information query message containing a transaction order number to the blockchain;
receiving order information returned by the block chain, wherein the order information at least comprises a hash value and a URLS of a file;
and downloading the file to be verified according to the URLS contained in the order information, and verifying the file to be verified according to the Hash value to obtain a file verification result.
Preferably, the downloading the file to be verified according to the URLS included in the order information, and verifying the file to be verified according to the hash value to obtain the file verification result includes:
sequentially executing the following steps aiming at each acquired URLS until the file verification is determined to be successful: and downloading the file to be verified according to the URLS, determining a second hash value of the file to be verified, judging whether the hash value is consistent with the second hash value or not, if so, stopping a file verification process, and obtaining a file verification result representing that the file is verified successfully, otherwise, judging that the file to be verified corresponding to the URLS is tampered.
Preferably, the method further comprises the following steps:
according to the file uploading record obtained by the management platform, submitting a file verification instruction containing identification information to the management platform, triggering the management platform to obtain a corresponding transaction order number according to the identification information contained in the file verification instruction and performing file verification according to the transaction order number;
receiving a file verification result returned by the management platform;
the identification information is generated based on a timestamp and safety information of file uploading and is used for uniquely identifying a file uploading record at one time, and the identification information is stored in association with a transaction order number.
Preferably, the file to be stored is a file subjected to encryption and compression processing;
the order information at least includes: security information, hash values, URLS, timestamps, and remark information;
the security information includes at least: certificate type and security level, and certificate number;
the cloud storage platform comprises one or more cloud storage channels.
In one aspect, a block chain-based file storage apparatus is provided, including:
the sending unit is used for sending the safety information and the file to be stored to the management platform and triggering the management platform to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining URLS used for downloading the file to be stored, writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and obtaining a transaction order number;
and the receiving unit is used for receiving the transaction order number returned by the management platform.
Preferably, the receiving unit is further configured to:
sending an information query message containing a transaction order number to the blockchain;
receiving order information returned by the block chain, wherein the order information at least comprises a hash value and a URLS of a file;
and downloading the file to be verified according to the URLS contained in the order information, and verifying the file to be verified according to the Hash value to obtain a file verification result.
Preferably, when the file to be verified is downloaded according to the URLS included in the order information and verified according to the hash value to obtain the file verification result, the receiving unit is further configured to:
sequentially executing the following steps aiming at each acquired URLS until the file verification is determined to be successful: and downloading the file to be verified according to the URLS, determining a second hash value of the file to be verified, judging whether the hash value is consistent with the second hash value or not, if so, stopping a file verification process, and obtaining a file verification result representing that the file is verified successfully, otherwise, judging that the file to be verified corresponding to the URLS is tampered.
Preferably, the receiving unit is further configured to:
according to the file uploading record obtained by the management platform, submitting a file verification instruction containing identification information to the management platform, triggering the management platform to obtain a corresponding transaction order number according to the identification information contained in the file verification instruction and performing file verification according to the transaction order number;
receiving a file verification result returned by the management platform;
the identification information is generated based on a timestamp and safety information of file uploading and is used for uniquely identifying a file uploading record at one time, and the identification information is stored in association with a transaction order number.
Preferably, the file to be stored is a file subjected to encryption and compression processing;
the order information at least includes: security information, hash values, URLS, timestamps, and remark information;
the security information includes at least: certificate type and security level, and certificate number;
the cloud storage platform comprises one or more cloud storage channels.
In one aspect, a terminal device is provided, which includes at least one processing unit and at least one storage unit, where the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes any of the above steps of the block chain-based file storage method.
In one aspect, a computer readable medium is provided, which stores a computer program executable by a terminal device, and when the program is run on the terminal device, the program causes the terminal device to perform the steps of any of the above block chain based file storage methods.
In a method, an apparatus, a terminal device, and a medium for storing a file based on a block chain provided in an embodiment of the present application, a user terminal sends security information and a file to be stored to a management platform, and triggers the management platform to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining URLS used for downloading the file to be stored, writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and obtaining a transaction order number; and receiving the transaction order number returned by the management platform. Therefore, the file is stored through the cloud storage platform, the physical level security of the file is improved, the file is verified through the hash value stored in the block chain, the file anti-tampering discrimination technology is realized, and the possibility that the reliability of the file is reduced because the file is tampered without authorization verification is reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1a is a schematic diagram of a file storage system according to the present application;
FIG. 1b is a block chain data structure provided herein;
FIG. 1c is a block chain write diagram according to the present application;
fig. 2 is a flowchart illustrating an implementation of a block chain-based file storage method according to an embodiment of the present disclosure;
fig. 3 is a first flowchart of an implementation of a file verification method according to an embodiment of the present disclosure;
FIG. 4 is a second flowchart of a file verification method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a file storage device based on a block chain according to an embodiment of the present disclosure.
Detailed Description
In order to improve the security of data storage and achieve tamper-resistant protection of a file when the file is stored, embodiments of the present application provide a block chain-based file storage method, apparatus, terminal device, and medium.
FIG. 1a is a schematic diagram of a file storage system. The file storage system comprises a user terminal 100, a management platform 101, a cloud storage platform 102 and a block chain 103.
The user terminal 100: the device, which can install various applications and display entities provided in the installed applications, may be mobile or fixed. For example, a mobile phone, a tablet computer, a vehicle-mounted device, a Personal Digital Assistant (PDA), or other electronic devices capable of implementing the above functions.
The management platform 101: a server or a server cluster or a cloud computing center consisting of a plurality of servers.
The cloud storage platform 102: the method comprises a plurality of storage channels, for example, a cloud storage channel 1 is a Baidu cloud disk, a cloud storage channel 2 is an Ali cloud disk, and a cloud storage channel 3 is an Tencent cloud disk.
Block chain 103: the distributed account book is a chained data structure formed by combining data blocks in a sequential connection mode according to a time sequence, and is cryptographically guaranteed to be not falsifiable and counterfeitable.
The management platform 101 receives security information and a file to be stored sent by the user terminal 100, performs authentication according to the security information, and after the authentication is determined to be passed, uploads the file to be stored to the cloud storage platform 102, so as to obtain 1 or more Uniform Resource Locators (URLs), i.e., URLs, returned by the cloud storage platform 102. The management platform 102 performs hash calculation on the file to be stored to obtain a hash value, and writes the security information, the URLS, and the hash value into the block chain 103 to obtain the transaction order number. The management platform 101 returns the transaction order number to the user terminal 100. The user terminal 100 acquires order information including URLS and a hash value from the blockchain 103 through the transaction order number, downloads a file according to the URLS, and performs file verification on the downloaded file according to the hash value, thereby determining whether the file is tampered.
In the embodiment of the application, the file storage system utilizes the advantage of decentralized of the block chain technology to realize the tamper-proof and verification technology of the large file and other files which can not be directly written into the block chain.
The safety information at least comprises certificate types, safety levels, certificate numbers and the like.
The order information at least includes: security information, URLS, hash values, timestamps, and remark information. The Hash value may be a Secure Hash Algorithm (SHA) 256 signature, a SHA1 signature, a SHA128 signature, and so on. The block chain stores the security information, the URLS, the hash value, the timestamp, the remark information and the like according to a set data structure body. Referring to fig. 1b, a block chain data structure is shown, the data structure includes: field, type, length, and remark. The fields include: type, license number, timestamp, URLS, SHA256 signature, and remark information; the types corresponding to the fields are as follows in sequence: int, string, string, data, string, string; the length corresponding to each field is as follows: 1,18, 13, 300, 64, 100. The remark information of each field is as follows in sequence: type represents the certificate type and security level; the certificate number is the ID number; the precision of the time stamp is in millisecond level; the URLS usually comprises 1-3 URLs, the number of the URLs corresponds to the type, and different URLs are divided by semicolons; carrying out SHA256 encrypted signature on the large file, wherein the repeat probability of SHA256 signatures of different files is close to 0; the remark information is other information that the user wishes to add.
FIG. 1c is a block chain write diagram. When the block chain determines that a new write request is received, a new block is added on the basis of the created block to write the security information, the URLS and the hash value and generate a transaction order number. The transaction order number is typically a hash value obtained by a hash operation.
The block chain-based file storage method in the embodiment of the application is mainly applied to scenes with high requirements on file storage and tamper resistance. For example, the graduation certificate, the college entrance examination answer sheet, the material evidence audio/video and the like are uploaded to the cloud to be subjected to a tamper-proof scene. Furthermore, before the file is uploaded, the file can be encrypted and compressed, so that the reading right control of the file is realized.
Referring to fig. 2, a flowchart of an implementation of a block chain-based file storage method provided in the present application is shown. The specific implementation flow of the method is as follows:
step 200: and the user terminal sends the safety information and the file to be stored to the management platform.
Specifically, the user terminal encrypts and compresses the file to be stored, and submits the encrypted and compressed file to be stored and the security information to the management platform. The security information includes certificate type and security level, and certificate number, etc.
Step 201: and the management platform audits the received safety information.
Wherein users typically register and log in via secure information. And the management platform verifies and authenticates the identity of the user through the safety information.
Step 202: and the management platform determines that the verification is passed, uploads the file to be stored to the cloud storage platform, and obtains the URLS for downloading the file.
The cloud storage platform comprises a plurality of storage channels, and the cloud storage channels refer to file systems which can upload files, relatively safely store the files and return the files URLS. Such as Baidu Yun Dian, Ali Yun Dian, and Tencent Yun Dian.
In practical application, the management platform can be in butt joint with different cloud storage channels according to practical requirements. The management platform can select the level and the number of the cloud storage channels according to the security level of the files to be stored, and the files to be stored are stored in one or more cloud storage channels, so that the information security is improved. Thus, one or more URLS are obtained.
Step 203: and the management platform performs hash operation on the file to be stored to obtain a hash value, and writes the security information, the URLS and the hash value into the block chain.
Step 204: and the block chain generates a transaction order number according to the written safety information, the URLS and the hash value, and returns the transaction order number to the management platform.
Specifically, when step 204 is executed, the blockchain stores the security information, the URLS, and the hash value according to the data structure shown in fig. 1 b. Referring to FIG. 1b, the data structure includes: field, type, length, and remark. The fields include: type, license number, timestamp, URLS, hash value (e.g., SHA256 signature), and remark information, the type corresponding to each field is: int, string, string, data, string, string; the length corresponding to each field is as follows: 1,18, 13, 300, 64, 100. The remark information of each field is as follows in sequence: type represents the certificate type and security level; the certificate number is the ID number; the precision of the time stamp is in millisecond level; the URLS usually comprises 1-3 URLs, the number of the URLs corresponds to the type, and different URLs are divided by semicolons; carrying out SHA256 encrypted signature on the large file, wherein the repeat probability of SHA256 signatures of different files is close to 0; the remark information is other information that the user wishes to add.
Step 205: and the management platform returns the received transaction order number to the user terminal.
Specifically, the management platform returns the received transaction order number to the user terminal.
Further, the management platform acquires a timestamp of the file to be stored uploaded to the cloud storage platform, and determines identification information corresponding to the file to be stored according to the certificate type, the security level, the certificate number and the timestamp. And the management platform stores the transaction order number and the identification information in a local association manner.
Wherein the identification information is used for inquiring the transaction order number. Alternatively, the transaction order number may be a hash value obtained by a hash operation.
Therefore, the file to be stored can be stored in the cloud storage platform, and the URLS and the hash value of the file to be stored are written into the block chain, so that the file can be downloaded and verified in the subsequent steps according to the URLS and the hash value stored in the block chain. The problem that files are difficult to store in a block chain is solved.
Fig. 3 is a first flowchart of an implementation of a file verification method according to the present application. The user terminal performs file verification on the cloud-stored file through the transaction order number, and the specific implementation flow of the method is as follows:
step 300: the user terminal sends an information query message containing the transaction order number to the blockchain.
Step 301: and the user terminal receives the order information which is returned by the block chain and contains the URLS and the hash value.
Wherein, the order information includes: security information, URLS, hash values, timestamps, and remark information.
Step 302: and the user terminal downloads the file to be verified according to the URLS, and performs file verification on the file to be verified according to the Hash value to obtain a verification result.
Specifically, the verification result includes the URLS and whether the verification of the file downloaded corresponding to the URLS is successful, so that a user can respectively determine whether the file stored corresponding to each cloud storage channel is tampered, and further download the file which is not tampered according to the verification result.
When judging whether the file to be verified downloaded corresponding to the URLS is successfully verified, the following modes can be adopted:
the first mode is as follows: if the number of the URLS is only one, downloading a file to be verified according to the URLS, carrying out Hash operation on the file to be verified to obtain a second Hash value, judging whether the Hash value is consistent with the second Hash value, if so, judging that the file corresponding to the URLS is verified successfully, and otherwise, judging that the file corresponding to the URLS is verified unsuccessfully.
The second way is: if the number of the URLS is multiple, whether a second hash value of the file to be verified corresponding to each URLS is consistent with the hash value or not is sequentially judged, if yes, the file corresponding to the URLS is judged to be successfully verified, file verification is stopped, otherwise, the file corresponding to the URLS is judged to be failed, and file verification is conducted on the file to be verified corresponding to the next URLS.
The third mode is as follows: and respectively judging whether the second hash value of the file to be verified corresponding to each URLS is consistent with the hash value, if so, judging that the file corresponding to the URLS is verified successfully, and otherwise, judging that the file corresponding to the URLS is verified unsuccessfully. In this way, it can be determined whether the file to be verified corresponding to each URLS is tampered.
In the embodiment of the application, if the file successfully verified exists, the file successfully verified is obtained, otherwise, the file to be verified is determined to be tampered.
In this way, redundant backup storage is respectively carried out on the files through the plurality of cloud storage channels, the different cloud storage channels have own safety mechanisms, the possibility of tampering is low, and even if all the cloud storage channels are tampered, judgment can be carried out according to a hash value verification mode, so that the file storage safety is improved, and the file tamper-proof identification technology is realized.
Fig. 4 is a flowchart illustrating a second implementation of the file verification method according to the present application. The method comprises the following specific implementation flows that a management platform carries out file verification on a file stored in the cloud through a transaction order number according to an instruction of a user terminal:
step 400: and the user terminal submits a file verification instruction containing the identification information to the management platform according to the file uploading record.
The management platform generates identification information based on the timestamp and the safety information of file uploading so as to uniquely identify the uploading record of each file. And the management platform stores the identification information of the file and the transaction order number of the file in a correlation manner.
Therefore, the user can issue a file verification instruction to the management platform by clicking a verification function corresponding to the uploading record and the like according to the uploading record of the file displayed on the management platform.
Step 401: the management platform acquires the identification information contained in the file verification instruction and acquires a transaction order number corresponding to the identification information.
Step 402: the management platform sends an information query message containing a transaction order number to the blockchain and receives order information containing URLS and hash values returned by the blockchain.
Step 403: and the management platform downloads the file to be verified according to the URLS, and performs file verification on the file to be verified according to the hash value to obtain a verification result.
Specifically, when step 403 is executed, refer to the specific steps in step 302 of the above embodiment.
Step 404: and the management platform returns the verification result to the user terminal.
In the embodiment of the application, when the file is checked, the user terminal can directly obtain the URLS and the hash value stored in the block chain according to the transaction order number, check the file downloaded through the URLS according to the hash value, also can obtain the transaction order number through the identification information recorded by the uploading of the management platform, and further obtain the check result returned by the management platform according to the transaction order number.
In the embodiment of the application, a cloud storage technology is combined with a block chain technology, files (such as multimedia data and files) are stored for multiple times through multiple cloud storage channels, URLS (unified content locator) of file storage and hash values of the files are written into a data structure body of a block chain, and the files stored in the cloud are verified through the hash values. Therefore, the physical level security of the file is improved through the multi-cloud storage channels of different levels, the file is verified through the hash value stored in the block chain, the file tamper-proof discrimination technology is realized, and the possibility that the reliability of the file is reduced because the file is tampered without authorization verification is reduced.
In an embodiment of the present application, an electronic device includes: one or more processors; and
one or more computer-readable media having stored thereon a program for blockchain based file storage, wherein the program, when executed by one or more processors, performs the steps in the above embodiments.
In an embodiment of the present application, one or more computer-readable media having stored thereon a program for blockchain based file storage, where the program, when executed by one or more processors, causes a communication device to perform the steps in the above embodiments.
Based on the same inventive concept, the embodiment of the present application further provides a block chain-based file storage device, and because the principle of solving the problem of the device and the apparatus is similar to that of a block chain-based file storage method, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 5, a schematic structural diagram of a file storage device based on a block chain according to an embodiment of the present application includes:
a sending unit 50, configured to send the security information and the file to be stored to the management platform, and trigger the management platform to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining URLS used for downloading the file to be stored, writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and obtaining a transaction order number;
and the receiving unit 51 is used for receiving the transaction order number returned by the management platform.
Preferably, the receiving unit 51 is further configured to:
sending an information query message containing a transaction order number to the blockchain;
receiving order information returned by the block chain, wherein the order information at least comprises a hash value and a URLS of a file;
and downloading the file to be verified according to the URLS contained in the order information, and verifying the file to be verified according to the Hash value to obtain a file verification result.
Preferably, when downloading the file to be verified according to the URLS included in the order information, and verifying the file to be verified according to the hash value to obtain the file verification result, the receiving unit 51 is further configured to:
sequentially executing the following steps aiming at each acquired URLS until the file verification is determined to be successful: and downloading the file to be verified according to the URLS, determining a second hash value of the file to be verified, judging whether the hash value is consistent with the second hash value or not, if so, stopping a file verification process, and obtaining a file verification result representing that the file is verified successfully, otherwise, judging that the file to be verified corresponding to the URLS is tampered.
Preferably, the receiving unit 51 is further configured to:
according to the file uploading record obtained by the management platform, submitting a file verification instruction containing identification information to the management platform, triggering the management platform to obtain a corresponding transaction order number according to the identification information contained in the file verification instruction and performing file verification according to the transaction order number;
receiving a file verification result returned by the management platform;
the identification information is generated based on a timestamp and safety information of file uploading and is used for uniquely identifying a file uploading record at one time, and the identification information is stored in association with a transaction order number.
Preferably, the file to be stored is a file subjected to encryption and compression processing;
the order information at least includes: security information, hash values, URLS, timestamps, and remark information;
the security information includes at least: certificate type and security level, and certificate number;
the cloud storage platform comprises one or more cloud storage channels.
In a method, an apparatus, a terminal device, and a medium for storing a file based on a block chain provided in an embodiment of the present application, a user terminal sends security information and a file to be stored to a management platform, and triggers the management platform to execute the following steps: uploading a file to be stored to a cloud storage platform, obtaining URLS used for downloading the file to be stored, writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and obtaining a transaction order number; and receiving the transaction order number returned by the management platform. Therefore, the file is stored through the cloud storage platform, the physical level security of the file is improved, the file is verified through the hash value stored in the block chain, the file anti-tampering discrimination technology is realized, and the possibility that the reliability of the file is reduced because the file is tampered without authorization verification is reduced.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same one or more pieces of software or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A file storage system based on a block chain is characterized by comprising a user terminal, a management platform, a cloud storage platform and the block chain, wherein,
the user terminal is used for sending safety information and a file to be stored to the management platform and receiving a transaction order number returned by the management platform;
the management platform is used for uploading the file to be stored to the cloud storage platform, acquiring a Uniform Resource Locator (URLS), writing the safety information, the URLS and the hash value of the file to be stored into a block chain, and acquiring a transaction order number;
block chains: the system is used for generating a transaction order number according to the received security information, the URLS and the hash value and returning the transaction order number to the management platform;
the cloud storage platform: the file downloading system is used for receiving the file to be stored uploaded by the management platform and returning URLS used for downloading the file to be stored to the management platform.
2. A file storage method based on a block chain is characterized by comprising the following steps:
the user terminal sends safety information and a file to be stored to a management platform, and the management platform is triggered to execute the following steps: uploading the file to be stored to a cloud storage platform, obtaining a Uniform Resource Locator (URLS) for downloading the file to be stored, and writing the safety information, the URLS and the hash value of the file to be stored into a block chain to obtain a transaction order number;
and receiving a transaction order number returned by the management platform.
3. The method of claim 2, further comprising:
sending an information query message containing a transaction order number to the blockchain;
receiving order information returned by the block chain, wherein the order information at least comprises a hash value and a URLS of a file;
and downloading a file to be verified according to the URLS contained in the order information, and verifying the file to be verified according to the hash value to obtain a file verification result.
4. The method as claimed in claim 3, wherein downloading the file to be verified according to the URLS included in the order information, and verifying the file to be verified according to the hash value to obtain a file verification result, comprises:
sequentially executing the following steps aiming at each acquired URLS until the file verification is determined to be successful: and downloading the file to be verified according to the URLS, determining a second hash value of the file to be verified, judging whether the hash value is consistent with the second hash value or not, if so, stopping a file verification process, and obtaining a file verification result representing that the file is verified successfully, otherwise, judging that the file to be verified corresponding to the URLS is tampered.
5. The method of any of claims 2-4, further comprising:
submitting a file verification instruction containing identification information to the management platform according to the file uploading record acquired by the management platform, triggering the management platform to acquire a corresponding transaction order number according to the identification information contained in the file verification instruction and performing file verification according to the transaction order number;
receiving a file verification result returned by the management platform;
the identification information is generated based on a timestamp and safety information of file uploading and is used for uniquely identifying a file uploading record at one time, and the identification information is stored in association with the transaction order number.
6. The method according to any one of claims 2 to 4, wherein the file to be stored is a file subjected to encryption compression processing;
the order information at least comprises: security information, hash values, URLS, timestamps, and remark information;
the security information includes at least: certificate type and security level, and certificate number;
the cloud storage platform comprises one or more cloud storage channels.
7. A blockchain-based file storage device, comprising:
the sending unit is used for sending the security information and the file to be stored to the management platform and triggering the management platform to execute the following steps: uploading the file to be stored to a cloud storage platform, obtaining a Uniform Resource Locator (URLS) for downloading the file to be stored, and writing the safety information, the URLS and the hash value of the file to be stored into a block chain to obtain a transaction order number;
and the receiving unit is used for receiving the transaction order number returned by the management platform.
8. A terminal device, characterized in that it comprises at least one processing unit and at least one memory unit, wherein said memory unit stores a computer program which, when executed by said processing unit, causes said processing unit to carry out the steps of the method according to any one of claims 2-6.
9. A computer-readable medium, in which a computer program is stored which is executable by a terminal device, and which, when run on the terminal device, causes the terminal device to carry out the steps of the method according to any one of claims 2 to 6.
CN201811377132.0A 2018-11-19 2018-11-19 File storage method and device based on block chain, terminal equipment and medium Pending CN111198862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811377132.0A CN111198862A (en) 2018-11-19 2018-11-19 File storage method and device based on block chain, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811377132.0A CN111198862A (en) 2018-11-19 2018-11-19 File storage method and device based on block chain, terminal equipment and medium

Publications (1)

Publication Number Publication Date
CN111198862A true CN111198862A (en) 2020-05-26

Family

ID=70746727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811377132.0A Pending CN111198862A (en) 2018-11-19 2018-11-19 File storage method and device based on block chain, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN111198862A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445769A (en) * 2020-11-24 2021-03-05 杭州趣链科技有限公司 Block chain-based on-chain storage method and device, terminal equipment and medium
CN114244856A (en) * 2020-09-09 2022-03-25 中国联合网络通信集团有限公司 Block chain based network storage method, device and system and operator platform
CN115239339A (en) * 2022-08-03 2022-10-25 浙江省金融综合服务平台管理有限公司 Account transaction information verification method based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360156A (en) * 2017-07-10 2017-11-17 广东工业大学 P2P network method for cloud storage based on block chain under a kind of big data environment
CN108076148A (en) * 2017-12-15 2018-05-25 成都链网络科技有限公司 Storage system based on block chain
CN108111585A (en) * 2017-12-15 2018-06-01 成都链网络科技有限公司 Distributed storage method based on block chain
CN108540459A (en) * 2018-03-22 2018-09-14 北京京东尚科信息技术有限公司 Data storage method, device, system, electronic equipment and computer-readable medium
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium
CN108681943A (en) * 2018-05-18 2018-10-19 百度在线网络技术(北京)有限公司 A kind of data processing method, device, equipment and the storage medium of block chain network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360156A (en) * 2017-07-10 2017-11-17 广东工业大学 P2P network method for cloud storage based on block chain under a kind of big data environment
CN108076148A (en) * 2017-12-15 2018-05-25 成都链网络科技有限公司 Storage system based on block chain
CN108111585A (en) * 2017-12-15 2018-06-01 成都链网络科技有限公司 Distributed storage method based on block chain
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium
CN108540459A (en) * 2018-03-22 2018-09-14 北京京东尚科信息技术有限公司 Data storage method, device, system, electronic equipment and computer-readable medium
CN108681943A (en) * 2018-05-18 2018-10-19 百度在线网络技术(北京)有限公司 A kind of data processing method, device, equipment and the storage medium of block chain network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244856A (en) * 2020-09-09 2022-03-25 中国联合网络通信集团有限公司 Block chain based network storage method, device and system and operator platform
CN114244856B (en) * 2020-09-09 2024-05-10 中国联合网络通信集团有限公司 Block chain-based network storage method, device and system and operator platform
CN112445769A (en) * 2020-11-24 2021-03-05 杭州趣链科技有限公司 Block chain-based on-chain storage method and device, terminal equipment and medium
WO2022110405A1 (en) * 2020-11-24 2022-06-02 杭州趣链科技有限公司 Blockchain-based on-chain storage method and apparatus, terminal device, and medium
CN115239339A (en) * 2022-08-03 2022-10-25 浙江省金融综合服务平台管理有限公司 Account transaction information verification method based on block chain
CN115239339B (en) * 2022-08-03 2023-02-14 浙江省金融综合服务平台管理有限公司 Account transaction information verification method based on block chain

Similar Documents

Publication Publication Date Title
CN110826111B (en) Test supervision method, device, equipment and storage medium
CN110113167B (en) Information protection method and system of intelligent terminal and readable storage medium
KR101740256B1 (en) Apparatus for mobile app integrity assurance and method thereof
US20180249190A1 (en) Method and apparatus for cloud storage and cloud download of multimedia data
CN110879903A (en) Evidence storage method, evidence verification method, evidence storage device, evidence verification device, evidence storage equipment and evidence verification medium
CN111241569B (en) Information processing method, device and equipment
US11088828B2 (en) Blockchain-based data evidence storage method and apparatus
CN112565393B (en) File uploading method, downloading method, device, computer equipment and storage medium
CN111198862A (en) File storage method and device based on block chain, terminal equipment and medium
CN104199654A (en) Open platform calling method and device
CN114282193A (en) Application authorization method, device, equipment and storage medium
CN111585995A (en) Method and device for transmitting and processing safety wind control information, computer equipment and storage medium
CN108256351B (en) File processing method and device, storage medium and terminal
CN117579338A (en) Method for processing streaming media file and related equipment
CN110826034B (en) File signature method and device, electronic equipment and readable storage medium
CN114979109B (en) Behavior track detection method, behavior track detection device, computer equipment and storage medium
CN111475778A (en) Music data processing method and device based on block chain
CN115935414A (en) Block chain based data verification method and device, electronic equipment and storage medium
CN111079155A (en) Data processing method and device, electronic equipment and computer storage medium
CN115495770A (en) Block chain based overdue contract processing method and device, equipment and medium
CN109271811B (en) Group signature-based electronic material evidence tamper-proof storage method
CN111460436B (en) Unstructured data operation method and system based on blockchain
CN114462998A (en) Log tamper-proofing method, system and storage medium
CN111597577B (en) Function menu loading method, function menu loading device and terminal equipment
CN108259490B (en) Client verification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination