WO2020147563A1 - 一种基于区块链的业务文件存储方法及装置 - Google Patents

一种基于区块链的业务文件存储方法及装置 Download PDF

Info

Publication number
WO2020147563A1
WO2020147563A1 PCT/CN2019/129744 CN2019129744W WO2020147563A1 WO 2020147563 A1 WO2020147563 A1 WO 2020147563A1 CN 2019129744 W CN2019129744 W CN 2019129744W WO 2020147563 A1 WO2020147563 A1 WO 2020147563A1
Authority
WO
WIPO (PCT)
Prior art keywords
service file
business
file
preset
compressed
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.)
Ceased
Application number
PCT/CN2019/129744
Other languages
English (en)
French (fr)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2020147563A1 publication Critical patent/WO2020147563A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Definitions

  • This application relates to the field of computer technology, and in particular to a blockchain-based business file storage method and device, a blockchain-based business file query method and device, a computing device and a computer-readable storage medium.
  • Blockchain technology is a new type of decentralized protocol that can safely store relevant data. Information cannot be forged and tampered with, and has strong historical traceability.
  • the transaction and information data access authentication on the blockchain is determined by the block All nodes on the chain are completed together, and the innovating consensus algorithm guarantees its consistency; among them, the blockchain includes public chains, private chains and consortium chains. Therefore, many users are currently accustomed to storing important business documents on the blockchain. When needed, multiple users can query and use the business documents from the blockchain. So how to ensure the fast and safe transmission of business documents to the blockchain is Problems to be solved at present.
  • the embodiments of the present application provide a blockchain-based business file storage method and device, a blockchain-based business file query method and device, a computing device, and a computer-readable storage medium. Solve the technical defects existing in the prior art.
  • an embodiment of this specification discloses a blockchain-based business file storage method, including:
  • each business document corresponds to a business identifier
  • the compressed service file and the hash value are stored in an information storage node of a business alliance chain, where the information storage node corresponds to a blockchain node of the business alliance chain.
  • the business document includes an electronic insurance policy of an insurance institution.
  • the method further includes:
  • the compressed service file is encrypted based on the preset encryption key to form an encrypted service file.
  • performing a hash operation on the compressed service file and generating a hash value corresponding to the compressed service file includes:
  • storing the compressed service file and the hash value in an information storage node of the service alliance chain includes:
  • the encrypted business file and the hash value are stored in an information storage node of the business alliance chain.
  • the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm or LZ4 compression algorithm.
  • the preset encryption key includes an encryption key generated according to a preset symmetric encryption key.
  • an embodiment of this specification discloses a blockchain-based business document query method, including:
  • the business document includes an electronic insurance policy of an insurance institution.
  • the compressed service file is an encrypted service file formed after encryption
  • the encrypted service file is decrypted by using a preset decryption key to form a decrypted service file.
  • decompressing the compressed service file based on a preset decompression algorithm to form a decompressed service file includes:
  • the preset decompression algorithm includes a symmetric decompression algorithm determined according to a preset compression algorithm, where the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm, or LZ4 Compression algorithm.
  • the preset decryption key includes a symmetric decryption key determined according to the preset encryption key.
  • one or more embodiments of this specification disclose a blockchain-based business file storage device, including:
  • the obtaining module is configured to obtain at least one business document, where each business document corresponds to a business identifier
  • the compression module is configured to compress the at least one service file based on a preset compression algorithm to form a compressed service file
  • a hash module configured to perform a hash operation on the compressed service file and generate a hash value corresponding to the compressed service file
  • the storage module is configured to store the compressed service file and the hash value in an information storage node of a business alliance chain, where the information storage node corresponds to a blockchain node of the business alliance chain.
  • the business document includes an electronic insurance policy of an insurance institution.
  • the device further includes:
  • the encryption module is configured to encrypt the compressed service file based on a preset encryption key to form an encrypted service file.
  • the hash module is further configured to:
  • the storage module is further configured to:
  • the encrypted business file and the hash value are stored in an information storage node of the business alliance chain.
  • the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm or LZ4 compression algorithm.
  • the preset encryption key includes an encryption key generated according to a preset symmetric encryption key.
  • an embodiment of this specification discloses a blockchain-based business document query device, including:
  • the receiving module is configured to receive at least one service file query request, wherein the query request carries a hash value and at least one service identifier;
  • the download module is configured to find and download the corresponding compressed service file at any information storage node of the business alliance chain based on the hash value, wherein the information storage node corresponds to the blockchain node of the business alliance chain ;
  • the decompression module is configured to decompress the compressed service file based on a preset decompression algorithm to form a decompressed service file;
  • the query module is configured to query at least one service file corresponding to the decompressed service file based on the at least one service identifier.
  • the business document includes an electronic insurance policy of an insurance institution.
  • the device further includes:
  • the decryption module is configured to use a preset decryption key to decrypt the encrypted service file to form a decrypted service file when the compressed service file is an encrypted service file formed after encryption.
  • the decompression module is further configured to:
  • the preset decompression algorithm includes a symmetric decompression algorithm determined according to a preset compression algorithm, where the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm, or LZ4 Compression algorithm.
  • the preset decryption key includes a symmetric decryption key determined according to the preset encryption key.
  • an embodiment of this specification discloses a computing device, including a memory, a processor, and computer instructions stored on the memory and running on the processor.
  • the processor executes the instructions as described above. The steps of the blockchain-based business file storage method or the blockchain-based business file query method.
  • an embodiment of this specification discloses a computer-readable storage medium, which stores computer instructions that, when executed by a processor, implement the above-mentioned blockchain-based business file storage method or the district-based The steps of the blockchain business file query method.
  • This specification provides a blockchain-based business document storage method and device, a blockchain-based business document query method and device, a computing device and a computer-readable storage medium, wherein the block-based The business file storage method of the chain includes acquiring at least one business file, compressing the at least one business file based on a preset compression algorithm to form a compressed business file; performing a hash operation on the compressed business file, and generating the compressed business The hash value corresponding to the file; storing the compressed service file and the hash value in an information storage node of the business alliance chain.
  • FIG. 1 is a schematic structural diagram of a computing device provided by one or more embodiments of this specification
  • FIG. 2 is a flowchart of a method for storing business files based on blockchain according to one or more embodiments of this specification;
  • FIG. 3 is a schematic diagram of an electronic insurance policy compressed on the chain in a blockchain-based business file storage method provided by one or more embodiments of this specification;
  • FIG. 5 is a flowchart of a blockchain-based business document storage method and a blockchain-based business document query method using business documents as electronic insurance policies according to one or more embodiments of this specification;
  • FIG. 6 is a schematic diagram of interaction between a blockchain-based business document storage method and a blockchain-based business document query method that uses business documents as electronic insurance policies according to one or more embodiments of this specification;
  • FIG. 7 is a schematic structural diagram of a business file storage device based on blockchain provided by one or more embodiments of this specification.
  • Fig. 8 is a schematic structural diagram of a block chain-based business document query device provided by one or more embodiments of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
  • word "if” as used herein can be interpreted as "when” or “when” or “in response to a determination”.
  • Blockchain The essence is an open source distributed ledger. It is the core technology of Bitcoin and other virtual currencies. It can efficiently record transactions between buyers and sellers and ensure that these records are verifiable and permanently preserved. It has the characteristics of decentralization, disintermediation, information transparency, inability to tamper with, and security; including public chains, private chains and alliance chains.
  • Electronic insurance policy An electronic insurance policy issued by an insurance company with the electronic signature of the insurance company with the help of digital signature software and corporate digital certificates following the PKI system.
  • Compression algorithm The algorithm for data compression, which is often called signal coding in the electronics and communication fields, includes two steps: compression and restoration, that is, decompression (or decoding and encoding).
  • Fig. 1 is a structural block diagram of a computing device 100 according to an embodiment of the present specification.
  • the components of the computing device 100 include but are not limited to a memory 110 and a processor 120.
  • the processor 120 and the memory 110 are connected through a bus 130, and the database 150 is used to store data.
  • the computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160.
  • networks include public switched telephone network (PSTN), local area network (LAN), wide area network (WAN), personal area network (PAN), or a combination of communication networks such as the Internet.
  • the access device 140 may include one or more of any type of wired or wireless network interface (for example, a network interface card (NIC)), such as IEEE802.11 wireless local area network (WLAN) wireless interface, global interconnection for microwave access ( Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, cellular network interface, Bluetooth interface, near field communication (NFC) interface, etc.
  • NIC network interface card
  • the aforementioned components of the computing device 100 and other components not shown in FIG. 1 may also be connected to each other, for example, via a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 1 is only for the purpose of example, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
  • the computing device 100 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (for example, tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (for example, smart phones). ), wearable computing devices (for example, smart watches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs.
  • the computing device 100 may also be a mobile or stationary server.
  • FIG. 2 shows a schematic flowchart of a method for storing business files based on a blockchain according to an embodiment of the present specification, including step 202 to step 208.
  • Step 202 Obtain at least one business document, where each business document corresponds to a business identifier.
  • the business document includes, but is not limited to, an electronic insurance policy of an insurance institution; the business identifier is unique identification information corresponding to each business document, such as unique identification information composed of special characters or special symbols.
  • Step 204 Compress the at least one service file based on a preset compression algorithm to form a compressed service file.
  • the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm or LZ4 compression algorithm.
  • the Snappy lossless compression algorithm is a compression algorithm with relatively good speed and compression ratio
  • the JDK GZIP compression algorithm is a slow algorithm with a high compression ratio, and the compressed data is suitable for long-term use;
  • the JDK deflate compression algorithm is another algorithm in the JDK.
  • the difference between it and the JDK GZIP compression algorithm is that the compression level of the algorithm can be specified, so that the compression time and the output file size can be balanced;
  • the compression speed of the LZ4 compression algorithm is the fastest.
  • one of the aforementioned compression algorithms can be used to compress the service file, or other better compression algorithms in the prior art can be used to compress the service file, which is not limited in this specification.
  • the compressed business file becomes a compressed business file, reducing the total number of bytes of the business file, enabling the compressed business file to be transmitted faster through a slower Internet connection, and reducing the disk space occupied by the business file.
  • the business file can also be encrypted.
  • the method further includes:
  • the compressed service file is encrypted based on the preset encryption key to form an encrypted service file.
  • the preset encryption key includes, but is not limited to, an encryption key generated according to a preset symmetric encryption key.
  • the compressed file can be encrypted by using an encryption method in the prior art to form an encrypted service file, which is not limited in this specification.
  • Step 206 Perform a hash operation on the compressed service file, and generate a hash value corresponding to the compressed service file.
  • a hash operation is used to convert the compressed service file into a fixed-length character string, that is, a hash value. Through the hash operation of the service compressed file, the subsequent verification of the service file can be realized, which improves the security of the service compressed file.
  • Step 208 Store the compressed service file and the hash value in an information storage node of a business alliance chain, where the information storage node corresponds to a blockchain node of the business alliance chain.
  • an encrypted service file is formed.
  • the encrypted business file and the hash value are stored in an information storage node of the business alliance chain.
  • the frequency of block generation can be kept within 2 seconds.
  • compress the electronic insurance policy into a compressed file within 10M, and then the compressed file
  • the consortium chain includes insurance companies, regulatory agencies, and Ants wait.
  • the blockchain-based business file storage method includes acquiring at least one business file, compressing the at least one business file based on a preset compression algorithm to form a compressed business file; Performing a hash operation on the compressed service file, and generating a hash value corresponding to the compressed service file; storing the compressed service file and the hash value in an information storage node of the business alliance chain.
  • FIG. 4 shows a schematic flowchart of a method for querying a business document based on a blockchain according to an embodiment of the present specification, including steps 402 to 408.
  • Step 402 Receive at least one service file query request, where the query request carries a hash value and at least one service identifier.
  • the business documents include, but are not limited to, electronic insurance policies of insurance institutions.
  • Each service file query request carries a hash value and a service identifier, where the service identifier is unique identification information corresponding to the service file, such as a unique identifier composed of special characters or a combination of special symbols information.
  • Step 404 Search and download the corresponding compressed service file at any information storage node of the business alliance chain based on the hash value, where the information storage node corresponds to the blockchain node of the business alliance chain.
  • the compressed service files stored on each blockchain node of the business alliance chain are the same. Therefore, based on the hash value, any information storage node of the business alliance chain can search for and download the corresponding compressed service file.
  • Step 406 Decompress the compressed service file based on a preset decompression algorithm to form a decompressed service file.
  • the preset decompression algorithm includes but is not limited to a symmetric decompression algorithm determined according to a preset compression algorithm, where the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm or LZ4 compression algorithm.
  • Step 408 Query at least one corresponding service file in the decompressed service file based on the at least one service identifier.
  • the compressed service file is an encrypted compressed file, after searching and downloading the corresponding compressed service file, it also includes:
  • the compressed service file is an encrypted service file formed after encryption
  • the encrypted service file is decrypted by using a preset decryption key to form a decrypted service file.
  • the preset decryption key includes a symmetric decryption key determined according to the preset encryption key.
  • the encryption, decryption, compression and decompression in the blockchain-based business file storage method and the blockchain-based business file query method can all adopt methods in the prior art, and only Encryption, decryption, compression and decompression of business files are sufficient, and this application does not make any limitation on this.
  • decompressing the compressed service file based on a preset decompression algorithm to form a decompressed service file is:
  • the blockchain-based business document query method includes receiving at least one business document query request, wherein the query request carries a hash value and at least one business identifier;
  • the hash value searches for and downloads the corresponding compressed service file at any information storage node of the business alliance chain, where the information storage node corresponds to the blockchain node of the business alliance chain; pairing based on a preset decompression algorithm Decompress the compressed service file to form a decompressed service file; query at least one corresponding service file in the decompressed service file based on the at least one service identifier.
  • Step 502 to step 520 the blockchain-based business document storage method and the blockchain-based business document query method are described in detail, including Step 502 to step 520.
  • Step 502 When storing the electronic insurance policy, obtain at least one electronic insurance policy, where each electronic insurance policy corresponds to an insurance policy identifier.
  • Step 504 Compress the at least one electronic insurance policy based on a preset compression algorithm to form a compressed file.
  • Step 506 Encrypt the compressed file based on the private key to form an encrypted file.
  • Step 508 Perform a hash operation on the encrypted file, and generate a hash value corresponding to the encrypted file.
  • Step 510 Upload the encrypted file and the hash value to the blockchain node closest to the alliance chain.
  • Step 512 Receive an electronic insurance policy query request, where the query request carries a hash value and a service identifier.
  • Step 514 When inquiring about the electronic insurance policy, search and download the corresponding encrypted file on any blockchain node of the alliance chain based on the hash value.
  • Step 516 Decrypt the encrypted file based on the public key to obtain a decrypted compressed file.
  • Step 518 Decompress the decrypted compressed file based on the preset decompression algorithm to form a decompressed electronic insurance policy.
  • Step 520 Query the electronic insurance policy based on the service identifier.
  • the problem of efficiency and storage of small files on the blockchain is solved by compression, and the success rate of block generation in the alliance chain is improved.
  • the electronic insurance policy is stored using the immutability and trust mechanism of the blockchain. , To prevent unilateral tampering, to ensure the settlement of claims and regulatory audits after the accident, and to use encryption and decryption methods to ensure that the content of the electronic insurance policy can only be viewed by the organization holding the public key, ensuring user privacy.
  • a business file storage device based on blockchain including:
  • the obtaining module 702 is configured to obtain at least one service file, where each service file corresponds to a service identifier
  • the compression module 704 is configured to compress the at least one service file based on a preset compression algorithm to form a compressed service file
  • the hash module 706 is configured to perform a hash operation on the compressed service file and generate a hash value corresponding to the compressed service file;
  • the storage module 708 is configured to store the compressed service file and the hash value in an information storage node of a business alliance chain, where the information storage node corresponds to a blockchain node of the business alliance chain.
  • the business document includes an electronic insurance policy of an insurance institution.
  • the device further includes:
  • the encryption module is configured to encrypt the compressed service file based on a preset encryption key to form an encrypted service file.
  • the hash module 706 is further configured to: perform a hash operation on the encrypted service file, and generate a hash value corresponding to the encrypted service file.
  • the storage module 708 is further configured to:
  • the encrypted business file and the hash value are stored in an information storage node of the business alliance chain.
  • the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm or LZ4 compression algorithm.
  • the preset encryption key includes an encryption key generated according to a preset symmetric encryption key.
  • the blockchain-based business document storage device solves the problem of the on-chain efficiency and storage space of business documents stored on the blockchain by compressing business documents, and uses the block
  • the non-tampering and trust mechanism of the chain saves business documents, prevents unilateral tampering, and ensures the information security of business documents.
  • compressed business documents can be encrypted to protect the private information of business documents.
  • an embodiment of this specification discloses a blockchain-based business document query device, including:
  • the receiving module 802 is configured to receive at least one service file query request, where the query request carries a hash value and at least one service identifier;
  • the download module 804 is configured to search and download the corresponding compressed service file at any information storage node of the business alliance chain based on the hash value, wherein the information storage node corresponds to the blockchain of the business alliance chain node;
  • the decompression module 806 is configured to decompress the compressed service file based on a preset decompression algorithm to form a decompressed service file;
  • the query module 808 is configured to query at least one corresponding service file in the decompressed service file based on the at least one service identifier.
  • the business document includes an electronic insurance policy of an insurance institution.
  • the device further includes:
  • the decryption module is configured to use a preset decryption key to decrypt the encrypted service file to form a decrypted service file when the compressed service file is an encrypted service file formed after encryption.
  • the decompression module 806 is further configured to:
  • the preset decompression algorithm includes a symmetric decompression algorithm determined according to a preset compression algorithm, where the preset compression algorithm includes Snappy lossless compression algorithm, JDK GZIP compression algorithm, JDK deflate compression algorithm, or LZ4 Compression algorithm.
  • the preset decryption key includes a symmetric decryption key determined according to the preset encryption key.
  • the blockchain-based business document query device downloads compressed and encrypted business documents from any blockchain node of the business alliance chain through a hash value, and then decrypts it through a public key After compressing the business file and decompressing the compressed business file, the business file can be finally obtained by using the unique business identifier, which greatly guarantees the privacy and security of the business file.
  • the foregoing is a schematic scheme of a block chain-based business file storage device and a block chain-based business file query device of this embodiment.
  • the technical solutions of the blockchain-based business document storage device and the blockchain-based business document query device are the same as the above-mentioned blockchain-based business document storage method and blockchain-based business document query method
  • the technical solutions belong to the same concept.
  • details that are not described in detail in the technical solutions of the blockchain-based business document storage device and the blockchain-based business document query device please refer to the above-mentioned blockchain-based business document storage method and Description of the technical solution of the business document query method based on the blockchain.
  • An embodiment of the present specification discloses a computing device, including a memory, a processor, and computer instructions stored on the memory and capable of running on the processor.
  • the processor executes the instructions based on the blockchain as described above.
  • the steps of the business file storage method or the blockchain-based business file query method are described above.
  • the foregoing is a schematic solution of a computing device of this embodiment. It should be noted that the technical solution of the computing device belongs to the same concept as the above-mentioned blockchain-based business file storage method or blockchain-based business file query method. The technical solution of the computing device does not describe the details in detail. For the content, please refer to the description of the technical solution of the above-mentioned blockchain-based business file storage method or the blockchain-based business file query method.
  • An embodiment of the present application also provides a computer-readable storage medium that stores computer instructions that, when executed by a processor, implement the blockchain-based business file storage method or the blockchain-based business file as described above The steps of the query method.
  • the computer instructions include computer program codes, and the computer program codes may be in the form of source code, object code, executable files, or some intermediate forms.
  • the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals and software distribution media, etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Fuzzy Systems (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于区块链的业务文件存储方法及装置,其中,所述基于区块链的业务文件存储方法包括获取至少一个业务文件,其中,每个业务文件对应一个业务标识(202);基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件(204);对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值(206);将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点(208)。

Description

一种基于区块链的业务文件存储方法及装置 技术领域
本申请涉及计算机技术领域,特别涉及一种基于区块链的业务文件存储方法及装置、一种基于区块链的业务文件查询方法及装置、一种计算设备及计算机可读存储介质。
背景技术
区块链技术是一种新型去中心化协议,能够安全存储相关的数据,信息不可伪造和篡改,且有较强的历史回溯性,区块链上的交易和信息数据存取认证由区块链上的所有节点共同完成,不断创新的共识算法保证其一致性;其中,所述区块链又包括公有链、私有链和联盟链。因此当前有很多用户习惯将重要的业务文件等存储到区块链,在需要的时候可以实现多用户从区块链查询使用该业务文件,那么如何保证业务文件的快速安全传输至区块链是目前待解决的问题。
发明内容
有鉴于此,本申请实施例提供了一种基于区块链的业务文件存储方法及装置、一种基于区块链的业务文件查询方法及装置、一种计算设备及计算机可读存储介质,以解决现有技术中存在的技术缺陷。
第一方面,本说明书一实施例公开了一种基于区块链的业务文件存储方法,包括:
获取至少一个业务文件,其中,每个业务文件对应一个业务标识;
基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;
对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;
将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
可选地,所述业务文件包括保险机构的电子保单。
可选地,形成压缩业务文件之后,对所述压缩业务文件进行哈希运算之前,还包括:
基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
可选地,对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值包括:
对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
可选地,将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点包括:
将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
可选地,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设加密密钥包括根据预设的对称加密密钥生成的加密密钥。
第二方面,本说明书一实施例公开了一种基于区块链的业务文件查询方法,包括:
接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;
基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;
基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;
基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
可选地,所述业务文件包括保险机构的电子保单。
可选地,查找并下载对应的压缩业务文件之后,还包括:
在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
可选地,基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件包括:
基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
可选地,所述预设解压缩算法包括根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
第三方面,本说明书一个或多个实施例公开了一种基于区块链的业务文件存储装置,包括:
获取模块,被配置为获取至少一个业务文件,其中,每个业务文件对应一个业务标识;
压缩模块,被配置为基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;
哈希模块,被配置为对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;
存储模块,被配置为将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
可选地,所述业务文件包括保险机构的电子保单。
可选地,所述装置还包括:
加密模块,被配置为基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
可选地,所述哈希模块,进一步被配置为:
对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
可选地,所述存储模块,进一步被配置为:
将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
可选地,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设加密密钥包括根据预设的对称加密密钥生成的加密密钥。
第四方面,本说明书一实施例公开了一种基于区块链的业务文件查询装置,包括:
接收模块,被配置为接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;
下载模块,被配置为基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;
解压缩模块,被配置为基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;
查询模块,被配置为基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
可选地,所述业务文件包括保险机构的电子保单。
可选地,所述装置还包括:
解密模块,被配置为在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
可选地,所述解压缩模块,进一步被配置为:
基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
可选地,所述预设解压缩算法包括根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
第五方面,本说明书一实施例公开了一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现如上所述基于区块链的业务文件存储方法或所述基于区块链的业务文件查询方法的步骤。
第六方面,本说明书一实施例公开了一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现如上所述基于区块链的业务文件存储方法或所述基于区块链的业务文件查询方法的步骤。
本说明书提供的一种基于区块链的业务文件存储方法及装置、一种基于区块链的业务文件查询方法及装置、一种计算设备及计算机可读存储介质,其中,所述基于区块链的业务文件存储方法包括获取至少一个业务文件,基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。通过将业务文件压缩的方式解决业务文件存储至区块链的上链效率和存储空间问题,并且利用区块链的不可篡改和信任机制保存业务文件,防止单方面篡改,保证业务文件的信息安全。
附图说明
图1是本说明书一个或多个实施例提供的一种计算设备的结构示意图;
图2是本说明书一个或多个实施例提供的一种基于区块链的业务文件存储方法的流程图;
图3是本说明书一个或多个实施例提供的一种基于区块链的业务文件存储方法中对电子保单压缩后上链的示意图;
图4是本说明书一个或多个实施例提供的一种基于区块链的业务文件查询方法的流程图;
图5是本说明书一个或多个实施例提供的以业务文件为电子保单的一种基于区块链的业务文件存储方法和基于区块链的业务文件查询方法的流程图;
图6是本说明书一个或多个实施例提供的以业务文件为电子保单的一种基于区块链的业务文件存储方法和基于区块链的业务文件查询方法的交互示意图;
图7是本说明书一个或多个实施例提供的一种基于区块链的业务文件存储装置的结构示意图;
图8是本说明书一个或多个实施例提供的一种基于区块链的业务文件查询装置的结构示意图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区 分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
首先,对本发明一个或多个实施例涉及的名词术语进行解释。
区块链:本质是一种开源分布式账本,它是比特币和其他虚拟货币的核心技术,能高效记录买卖双方的交易,并保证这些记录是可查证且永久保存的。具有去中心化、去中介化、信息透明、无法篡改和安全等特点;包括公有链、私有链和联盟链。
联盟链:由某个群体内部指定多个预选的节点为记账人,每个块的生成由所有的预选节点共同决定,其他任何公司和组织可以通过该区块链开放的API进行限定访问。
电子保单:保险公司借助遵循PKI体系的数字签名软件和企业数字证书为客户签发的具有保险公司电子签名的电子化保单。
压缩算法:数据压缩的算法,在电子与通信领域也常被称为信号编码,包括压缩和还原即解压缩(或解码和编码)两个步骤。
在本说明书中,提供了一种基于区块链的业务文件存储方法及装置、一种基于区块链的业务文件查询方法及装置、一种计算设备及计算机可读存储介质,在下面的实施例中逐一进行详细说明。
图1是示出了根据本说明书一实施例的计算设备100的结构框图。该计算设备100的部件包括但不限于存储器110和处理器120。处理器120与存储器110通过总线130相连接,数据库150用于保存数据。
计算设备100还包括接入设备140,接入设备140使得计算设备100能够经由一个或多个网络160通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备140可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。
在本说明书的一个实施例中,计算设备100的上述部件以及图1中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图1所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增 添或替换其他部件。
计算设备100可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备100还可以是移动式或静止式的服务器。
其中,处理器120可以执行图2所示方法中的步骤。图2示出了根据本说明书一实施例的基于区块链的业务文件存储方法的示意性流程图,包括步骤202至步骤208。
步骤202:获取至少一个业务文件,其中,每个业务文件对应一个业务标识。
其中,所述业务文件包括但不限于保险机构的电子保单;所述业务标识为每个业务文件对应的唯一标识信息,例如由特殊字符或特殊符号等组成的唯一标识信息。
步骤204:基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件。
其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
所述Snappy无损压缩算法是一种速度与压缩比都相对较优的压缩算法;
所述JDK GZIP压缩算法是一个压缩比高的慢速算法,压缩后的数据适合长期使用;
所述JDK deflate压缩算法是JDK中的又一个算法。它与JDK GZIP压缩算法的不同之处在于,可以指定算法的压缩级别,这样可以在压缩时间和输出文件大小上进行平衡;
所述LZ4压缩算法的压缩速度最快。
实际使用中,可以使用上述压缩算法中的其中一种对所述业务文件进行压缩,也可以采用现有技术中其他较好的压缩算法实现对业务文件的压缩,本说明书对此不作限定。
压缩后的业务文件变为压缩业务文件,减小了业务文件的字节总数,使压缩业务文件可以通过较慢的互联网连接实现更快传输,还可以减少业务文件的磁盘占用空间。
此外,为了保证业务文件中的信息安全,还可以对所述业务文件进行加密。
本说明书一个或多个实施例中,基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件之后,还包括:
基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
其中,所述预设加密密钥包括但不限于根据预设的对称加密密钥生成的加密密钥。
实际使用中,可以采用现有技术中的加密方式对所述压缩文件进行加密,形成加密业务文件,本说明书对此不作任何限定。
步骤206:对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值。
采用哈希运算将所述压缩业务文件转换成一个固定长度的字符串,即哈希值。通过对所述业务压缩文件的哈希运算可以实现后续对业务文件的校验,提高了业务压缩文件的安全性。
步骤208:将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,即将所述压缩业务文件和所述哈希值上传存储至业务联盟链的距离最近的区块链节点上,然后基于业务联盟链的共识算法实现每个区块链节点上存储的压缩业务文件和哈希值一致。
本说明书一个或多个实施例中,若在对所述压缩文件进行哈希运算之前,基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
那么对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值则是:
对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点则是:
将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
参见图3,以所述业务文件为保险机构的电子保单为例,对业务文件的压缩、存储至联盟链进行说明。
该联盟链的区块链节点的上限为10M的时候,出块频率可以保持在2秒以内,在 获取电子保单之后,将所述电子保单压缩为10M以内的压缩文件,然后再对该压缩文件进行哈希运算后,将该压缩文件和对应的哈希值上传存储至该联盟链,就可以保证联盟链的出块频率在2秒以内,其中,所述联盟链包括保险公司、监管机构以及蚂蚁等。
本说明书一个或多个实施例中,所述基于区块链的业务文件存储方法包括获取至少一个业务文件,基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。通过将业务文件压缩的方式解决业务文件存储至区块链的上链效率和存储空间问题,并且利用区块链的不可篡改和信任机制保存业务文件,防止单方面篡改,保证业务文件的信息安全,此外还可以对压缩业务文件进行加密,保护了业务文件的隐私信息。
所述处理器120可以执行图4所示方法中的步骤。图4示出了根据本说明书一实施例的基于区块链的业务文件查询方法的示意性流程图,包括步骤402至步骤408。
步骤402:接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识。
其中,所述业务文件包括但不限于保险机构的电子保单。
每个所述业务文件查询请求中均携带有一个哈希值和一个业务标识,其中,所述业务标识为所述业务文件对应的唯一的标识信息,例如由特殊字符或者特殊符号组合的唯一标识信息。
步骤404:基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
所述业务联盟链的每一个区块链节点上存储的压缩业务文件均相同,因此可以基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件。
步骤406:基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件。
其中,所述预设解压缩算法包括但不限于根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
该四种压缩算法的具体解释可以参见上述实施例,在此不做赘述。
步骤408:基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
若所述压缩业务文件为加密压缩文件,那么在查找并下载对应的压缩业务文件之后,还包括:
在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
其中,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
实际应用中,所述基于区块链的业务文件存储方法与所述基于区块链的业务文件查询方法中的加密、解密以及压缩与解压缩,均可以采用现有技术中的方法,只需实现业务文件的加密、解密以及压缩与解压缩即可,本申请对此不作任何限定。
那么在所述压缩业务文件为加密压缩文件的情况下,基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件则是:
基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
最后,基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。若存在多个业务标识,则可以查询解压业务文件中每个业务标识对应的业务文件。
本说明书一个或多个实施例中,所述基于区块链的业务文件查询方法包括接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。通过哈希值从任一业务联盟链的区块链节点上下载压缩加密的业务文件,然后通过公钥解密压缩业务文件,再解压缩该压缩业务文件后,利用唯一业务标识才能最终获得业务文件,极大程度的保证了业务文件的隐私安全。
参见图5、图6,以所述业务文件为保险机构的电子保单为例,对所述基于区块链的业务文件存储方法和所述基于区块链的业务文件查询方法进行详细说明,包括步骤502至步骤520。
步骤502:在对电子保单进行存储时,获取至少一个电子保单,其中,每个电子保 单对应一个保单标识。
步骤504:基于预设压缩算法对所述至少一个电子保单进行压缩,形成压缩文件。
步骤506:基于私钥对所述压缩文件进行加密,形成加密文件。
步骤508:对所述加密文件进行哈希运算,并生成所述加密文件对应的哈希值。
步骤510:将所述加密文件和所述哈希值上链至联盟链距离最近的区块链节点上。
步骤512:接收电子保单查询请求,其中,所述查询请求中携带有哈希值和业务标识。
步骤514:在对电子保单进行查询时,基于所述哈希值在联盟链的任一个区块链节点上查找并下载对应的加密文件。
步骤516:基于公钥对所述加密文件进行解密,得到解密后的压缩文件。
步骤518:基于预设解压缩算法对解密后的压缩文件进行解压缩,形成解压后的电子保单。
步骤520:基于所述业务标识查询电子保单。
本说明书一个或多个实施例中,通过压缩的方式解决了区块链块小文件上链效率和存储问题,提高联盟链出块成功率,利用区块链的不可篡改和信任机制保存电子保单,防止单方面篡改,保证了出险后的理赔和监管审计,并且利用加解密的方式保证电子保单的内容只有持有公钥的机构组织才能查看,保证用户隐私安全。
参见图7,本说明书一个或多个实施例公开了一种基于区块链的业务文件存储装置,包括:
获取模块702,被配置为获取至少一个业务文件,其中,每个业务文件对应一个业务标识;
压缩模块704,被配置为基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;
哈希模块706,被配置为对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;
存储模块708,被配置为将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
可选地,所述业务文件包括保险机构的电子保单。
可选地,所述装置还包括:
加密模块,被配置为基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
可选地,所述哈希模块706,进一步被配置为:对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
可选地,所述存储模块708,进一步被配置为:
将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
可选地,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设加密密钥包括根据预设的对称加密密钥生成的加密密钥。
本说明书一个或多个实施例中,所述基于区块链的业务文件存储装置,通过将业务文件压缩的方式解决业务文件存储至区块链的上链效率和存储空间问题,并且利用区块链的不可篡改和信任机制保存业务文件,防止单方面篡改,保证业务文件的信息安全,此外还可以对压缩业务文件进行加密,保护了业务文件的隐私信息。
参见图8,本说明书一实施例公开了一种基于区块链的业务文件查询装置,包括:
接收模块802,被配置为接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;
下载模块804,被配置为基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;
解压缩模块806,被配置为基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;
查询模块808,被配置为基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
可选地,所述业务文件包括保险机构的电子保单。
可选地,所述装置还包括:
解密模块,被配置为在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
可选地,所述解压缩模块806,进一步被配置为:
基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
可选地,所述预设解压缩算法包括根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
可选地,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
本说明书一个或多个实施例中,所述基于区块链的业务文件查询装置,通过哈希值从任一业务联盟链的区块链节点上下载压缩加密的业务文件,然后通过公钥解密压缩业务文件,再解压缩该压缩业务文件后,利用唯一业务标识才能最终获得业务文件,极大程度的保证了业务文件的隐私安全。
上述为本实施例的一种基于区块链的业务文件存储装置和一种基于区块链的业务文件查询装置的示意性方案。需要说明的是,该基于区块链的业务文件存储装置和基于区块链的业务文件查询装置的技术方案与上述的基于区块链的业务文件存储方法和基于区块链的业务文件查询方法的技术方案属于同一构思,基于区块链的业务文件存储装置和基于区块链的业务文件查询装置的技术方案未详细描述的细节内容,均可以参见上述基于区块链的业务文件存储方法和基于区块链的业务文件查询方法的技术方案的描述。
本说明书一实施例公开了一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现如上所述基于区块链的业务文件存储方法或所述基于区块链的业务文件查询方法的步骤。
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的基于区块链的业务文件存储方法或基于区块链的业务文件查询方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述基于区块链的业务文件存储方法或基于区块链的业务文件查询方法的技术方案的描述。
本申请一实施例还提供一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现如前所述基于区块链的业务文件存储方法或基于区块链的业务文件查询方法的步骤。
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的基于区块链的业务文件存储方法或基于区块链的业务文件查询方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述基于区块链的业务文件存储方法或基于区块链的业务文件查询方法的技术方案的描述。
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
以上公开的本申请优选实施例只是用于帮助阐述本申请。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本申请的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本申请。本申请仅受权利要求书及其全部范围和等效物的限制。

Claims (28)

  1. 一种基于区块链的业务文件存储方法,其特征在于,包括:
    获取至少一个业务文件,其中,每个业务文件对应一个业务标识;
    基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;
    对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;
    将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
  2. 根据权利要求1所述的方法,其特征在于,所述业务文件包括保险机构的电子保单。
  3. 根据权利要求1或2任一所述的方法,其特征在于,形成压缩业务文件之后,对所述压缩业务文件进行哈希运算之前,还包括:
    基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
  4. 根据权利要求3所述的方法,其特征在于,对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值包括:
    对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
  5. 根据权利要求4所述的方法,其特征在于,将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点包括:
    将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
  6. 根据权利要求1或2任一所述的方法,其特征在于,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
  7. 根据权利要求3所述的方法,其特征在于,所述预设加密密钥包括根据预设的对称加密密钥生成的加密密钥。
  8. 一种基于区块链的业务文件查询方法,其特征在于,包括:
    接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;
    基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;
    基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;
    基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
  9. 根据权利要求8所述的方法,其特征在于,所述业务文件包括保险机构的电子保单。
  10. 根据权利要求8或9任一所述的方法,其特征在于,查找并下载对应的压缩业务文件之后,还包括:
    在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
  11. 根据权利要求10所述的方法,其特征在于,基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件包括:
    基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
  12. 根据权利要求11所述的方法,其特征在于,所述预设解压缩算法包括根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
  13. 根据权利要求10所述的方法,其特征在于,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
  14. 一种基于区块链的业务文件存储装置,其特征在于,包括:
    获取模块,被配置为获取至少一个业务文件,其中,每个业务文件对应一个业务标识;
    压缩模块,被配置为基于预设压缩算法对所述至少一个业务文件进行压缩,形成压缩业务文件;
    哈希模块,被配置为对所述压缩业务文件进行哈希运算,并生成所述压缩业务文件对应的哈希值;
    存储模块,被配置为将所述压缩业务文件和所述哈希值存储至业务联盟链的一个信息存储节点,其中,所述信息存储节点对应于所述业务联盟链的区块链节点。
  15. 根据权利要求14所述的装置,其特征在于,所述业务文件包括保险机构的电子保单。
  16. 根据权利要求14或15任一所述的装置,其特征在于,所述装置还包括:
    加密模块,被配置为基于预设加密密钥对所述压缩业务文件进行加密,形成加密业务文件。
  17. 根据权利要求16所述的装置,其特征在于,所述哈希模块,进一步被配置为:
    对所述加密业务文件进行哈希运算,并生成所述加密业务文件对应的哈希值。
  18. 根据权利要求17所述的装置,其特征在于,所述存储模块,进一步被配置为:
    将所述加密业务文件和所述哈希值存储至业务联盟链的一个信息存储节点。
  19. 根据权利要求14或15任一所述的装置,其特征在于,所述预设压缩算法包括 Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
  20. 根据权利要求16所述的装置,其特征在于,所述预设加密密钥包括根据预设的对称加密密钥生成的加密密钥。
  21. 一种基于区块链的业务文件查询装置,其特征在于,包括:
    接收模块,被配置为接收至少一个业务文件查询请求,其中,所述查询请求中携带有哈希值和至少一个业务标识;
    下载模块,被配置为基于所述哈希值在业务联盟链的任一个信息存储节点查找并下载对应的压缩业务文件,其中,所述信息存储节点对应于所述业务联盟链的区块链节点;
    解压缩模块,被配置为基于预设解压缩算法对所述压缩业务文件进行解压缩,形成解压业务文件;
    查询模块,被配置为基于所述至少一个业务标识查询所述解压业务文件中对应的至少一个业务文件。
  22. 根据权利要求21所述的装置,其特征在于,所述业务文件包括保险机构的电子保单。
  23. 根据权利要求21或22任一所述的装置,其特征在于,所述装置还包括:
    解密模块,被配置为在所述压缩业务文件为加密后形成的加密业务文件的情况下,采用预设解密密钥对所述加密业务文件进行解密,形成解密业务文件。
  24. 根据权利要求23所述的装置,其特征在于,所述解压缩模块,进一步被配置为:
    基于预设解压缩算法对所述解密业务文件进行解压缩,形成解压业务文件。
  25. 根据权利要求24所述的装置,其特征在于,所述预设解压缩算法包括根据预设压缩算法确定的对称的解压缩算法,其中,所述预设压缩算法包括Snappy无损压缩算法、JDK GZIP压缩算法、JDK deflate压缩算法或LZ4压缩算法。
  26. 根据权利要求23所述的装置,其特征在于,所述预设解密密钥包括根据预设加密密钥确定的对称的解密密钥。
  27. 一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,其特征在于,所述处理器执行所述指令时实现权利要求1-13任意一项所述方法的步骤。
  28. 一种计算机可读存储介质,其存储有计算机指令,其特征在于,该指令被处理器执行时实现权利要求1-13任意一项所述方法的步骤。
PCT/CN2019/129744 2019-01-18 2019-12-30 一种基于区块链的业务文件存储方法及装置 Ceased WO2020147563A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910048808.XA CN110032581A (zh) 2019-01-18 2019-01-18 一种基于区块链的业务文件存储方法及装置
CN201910048808.X 2019-01-18

Publications (1)

Publication Number Publication Date
WO2020147563A1 true WO2020147563A1 (zh) 2020-07-23

Family

ID=67235576

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/129744 Ceased WO2020147563A1 (zh) 2019-01-18 2019-12-30 一种基于区块链的业务文件存储方法及装置

Country Status (3)

Country Link
CN (1) CN110032581A (zh)
TW (1) TW202029690A (zh)
WO (1) WO2020147563A1 (zh)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032581A (zh) * 2019-01-18 2019-07-19 阿里巴巴集团控股有限公司 一种基于区块链的业务文件存储方法及装置
CN110457929B (zh) * 2019-08-16 2021-01-19 重庆华医康道科技有限公司 异构his大数据实时加解密压缩上链的共享方法及系统
CN110543510B (zh) * 2019-09-05 2024-04-09 腾讯科技(深圳)有限公司 票据数据处理方法、装置、存储介质和计算机设备
JP7641593B2 (ja) * 2019-10-18 2025-03-07 ティービーシーエーソフト,インコーポレイテッド 資格証明書検証用検証要件文書
CN111984615B (zh) * 2020-08-04 2024-05-28 中国人民银行数字货币研究所 一种共享文件的方法、装置及系统
CN111984613B (zh) * 2020-08-04 2023-06-16 中国人民银行数字货币研究所 一种共享文件的方法、装置和系统
WO2022028486A1 (zh) 2020-08-04 2022-02-10 中国人民银行数字货币研究所 共享文件的方法、装置和系统
CN111984614B (zh) * 2020-08-04 2023-05-26 中国人民银行数字货币研究所 一种共享文件的方法、装置和系统
CN114221950A (zh) * 2020-09-03 2022-03-22 华为技术有限公司 上传配置文件的方法、下载配置文件的方法及装置
CN112118087A (zh) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 跨链合约压缩加密系统和方法
CN111931219B (zh) * 2020-09-22 2021-04-23 支付宝(杭州)信息技术有限公司 数据存储方法及装置、数据查询方法及装置
CN112445769B (zh) * 2020-11-24 2024-06-25 杭州趣链科技有限公司 基于区块链的链上存储方法、装置、终端设备及介质
CN112560093B (zh) * 2020-12-17 2023-03-14 杭州趣链科技有限公司 基于区块链的档案管理方法、装置、设备及存储介质
CN113190618A (zh) * 2021-04-28 2021-07-30 宁夏中小在线资信服务有限公司 一种基于区块链技术的企业政务服务数据的存储方法
CN113468583A (zh) * 2021-07-26 2021-10-01 华链时代(北京)科技有限公司 一种基于区块链的加密数据处理方法、装置及电子设备
CN113590636A (zh) * 2021-09-29 2021-11-02 昆山炫生活信息技术股份有限公司 一种基于区块链的在线交易系统和方法
CN113986820B (zh) * 2021-09-30 2025-05-23 山东云海国创云计算装备产业创新中心有限公司 一种lz4格式文件转换为gzip格式文件的方法
CN114006619B (zh) * 2021-09-30 2025-07-15 山东云海国创云计算装备产业创新中心有限公司 一种gzip格式文件转换为lz4格式文件的方法
CN116707537B (zh) * 2022-02-28 2026-02-03 华为云计算技术有限公司 一种文件压缩方法及装置
CN115374422B (zh) * 2022-10-26 2022-12-23 四川蜀天信息技术有限公司 一种基于区块链的防泄密的电子签名验证方法
CN117112699A (zh) * 2023-09-19 2023-11-24 浙江万马新能源有限公司 一种基于区块链技术的充电桩关键数据存储方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207981A (zh) * 2011-07-13 2011-10-05 华为软件技术有限公司 管理文件的方法和系统
US20180152297A1 (en) * 2016-11-01 2018-05-31 Netcomm Inc. System and Method For Digitally Signing Documents Using Biometric Data in a Blockchain or PKI
CN108829749A (zh) * 2018-05-24 2018-11-16 深圳前海益链网络科技有限公司 一种基于区块链的对象关联封装存储方法
CN108875422A (zh) * 2018-05-07 2018-11-23 南京快文信息科技有限公司 基于区块链的脑电波数据存储方法及系统
CN108959416A (zh) * 2018-06-08 2018-12-07 浙江数秦科技有限公司 一种基于区块链的网页数据自动取证与存证方法
CN109992563A (zh) * 2019-01-18 2019-07-09 阿里巴巴集团控股有限公司 一种基于区块链的业务文件存储方法及装置
CN110032581A (zh) * 2019-01-18 2019-07-19 阿里巴巴集团控股有限公司 一种基于区块链的业务文件存储方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713495B (zh) * 2017-01-20 2018-04-06 北京海泰方圆科技股份有限公司 Ip地理位置的上传方法及访问方法、装置及访问系统
CN107423426B (zh) * 2017-08-02 2020-06-02 众安信息技术服务有限公司 一种区块链块数据的数据归档方法及电子设备
CN107728941B (zh) * 2017-09-28 2019-09-24 中国银行股份有限公司 一种区块链数据压缩方法及系统
CN109189853B (zh) * 2018-08-08 2021-05-28 众安信息技术服务有限公司 一种区块链之间数据同步方法与装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207981A (zh) * 2011-07-13 2011-10-05 华为软件技术有限公司 管理文件的方法和系统
US20180152297A1 (en) * 2016-11-01 2018-05-31 Netcomm Inc. System and Method For Digitally Signing Documents Using Biometric Data in a Blockchain or PKI
CN108875422A (zh) * 2018-05-07 2018-11-23 南京快文信息科技有限公司 基于区块链的脑电波数据存储方法及系统
CN108829749A (zh) * 2018-05-24 2018-11-16 深圳前海益链网络科技有限公司 一种基于区块链的对象关联封装存储方法
CN108959416A (zh) * 2018-06-08 2018-12-07 浙江数秦科技有限公司 一种基于区块链的网页数据自动取证与存证方法
CN109992563A (zh) * 2019-01-18 2019-07-09 阿里巴巴集团控股有限公司 一种基于区块链的业务文件存储方法及装置
CN110032581A (zh) * 2019-01-18 2019-07-19 阿里巴巴集团控股有限公司 一种基于区块链的业务文件存储方法及装置

Also Published As

Publication number Publication date
CN110032581A (zh) 2019-07-19
TW202029690A (zh) 2020-08-01

Similar Documents

Publication Publication Date Title
WO2020147563A1 (zh) 一种基于区块链的业务文件存储方法及装置
JP7831943B2 (ja) ブロックチェーン上に格納されたデータへのアクセスを可能にするコンピュータにより実施されるシステム及び方法
CN109992563A (zh) 一种基于区块链的业务文件存储方法及装置
CN110349056A (zh) 基于区块链的业务处理系统以及方法
WO2021084857A1 (en) Blockchain transaction control based on private key management
US10984115B2 (en) System for triple format preserving encryption
US12537690B2 (en) Data protection on distributed data storage (DDS) protection networks
WO2024060630A1 (zh) 数据传输管理的方法、数据处理的方法和装置
WO2022028484A1 (zh) 共享文件的方法、装置及系统
CN116028484A (zh) 数字资产管理方法及相关产品
WO2024216792A1 (zh) 网络通信方法、装置、计算机设备和存储介质
JP7773637B2 (ja) 符号化/復号システム及び方法
CN118786645A (zh) 用于在计算机网络中使用基于密码术的存储应用来促进去中心化应用中的安全区块链操作的系统和方法
CN115495757A (zh) 一种文件处理方法和装置
CN115659378A (zh) 案件记录信息的存证方法及相关设备
CN116136844A (zh) 实体标识信息的生成方法、装置、介质及电子设备
CN111984616B (zh) 一种更新共享文件的方法、装置和系统
CN114840739B (zh) 信息检索方法、装置、电子设备及存储介质
CN107729345B (zh) 网站数据处理方法、装置、网站数据处理平台及存储介质
US12015717B2 (en) System for processing offline digital resource transfers using a hardware device based cryptographic application
CN109657481B (zh) 数据管理方法及装置
CN116436703A (zh) 基于智能电网的财务隐私数据管理方法及其系统
CN115982114A (zh) 文件处理方法、装置、计算机设备及计算机程序产品
CN114357064A (zh) 时间域验证方法及装置
HK1251062B (zh) 网站数据处理方法、装置、网站数据处理平台及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19910560

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19910560

Country of ref document: EP

Kind code of ref document: A1