Disclosure of Invention
The invention aims to provide a block chain-based medical image data decentralized management method and system, and solves the technical problems that in the prior art, data safety needs to be improved and system cost needs to be reduced.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a medical image data decentralized management method based on a block chain at least comprises the following steps based on the existing open source software component and the block chain technology:
uploading medical image data of all data terminals, storing the medical image data as an interplanetary file system (IPFS) file, taking a hash value of the medical image data, and simultaneously encrypting a link list file in the IPFS by adopting a public key of all data terminals;
the data right of use contract adopts the private key of all ends of the said data to decipher the link list file encrypted in the above-mentioned step according to the intellectual contract, send data user end public key information and pay the token to the said data right of use contract at the data user end, when requesting to obtain the said medical image data, the said data right of use contract adopts the public key of user to decipher the link list file and send to the said data user end after encrypting again, produce the block chain storing the said hash address at the same time;
and the data using end executes decryption operation on the data using end through a data using end private key to obtain a linked list file, and indexes the linked list file to the interplanetary file system to obtain actual medical image data.
Wherein, the consensus mechanism adopted by the block chain is PoW, PoS or DPoS.
The invention also provides a block chain-based medical image data decentralized management system, which at least comprises a plurality of data all terminals, a plurality of data using terminals and a plurality of data use right contract terminals for linking the data all terminals and the data using terminals;
uploading medical image data of all data terminals, storing the medical image data as an interplanetary file system (IPFS) file, taking a hash value of the medical image data, and simultaneously encrypting a link list file in the IPFS by adopting a public key of all data terminals;
the data right of use contract adopts the private key of all ends of the said data to decipher the link list file encrypted in the above-mentioned step according to the intellectual contract, send data user end public key information and pay the token to the said data right of use contract at the data user end, when requesting to obtain the said medical image data, the said data right of use contract adopts the public key of user to decipher the link list file and send to the said data user end after encrypting again, produce the block chain storing the said hash address at the same time;
and the data using end executes decryption operation on the data using end through a data using end private key to obtain a linked list file, and indexes the linked list file to the interplanetary file system to obtain actual medical image data.
The invention also discloses a block chain-based medical image data decentralized management system, which comprises a network, a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the steps of the method are realized when the processor executes the computer program.
The invention also discloses a computer-readable storage medium, in which a computer program is stored, characterized in that the computer program realizes the steps of the method when being executed by a processor.
The invention has the following beneficial effects: the invention provides a decentralization method different from local PACS and cloud PACS which are conventionally used by hospitals, which can enable hospitals to jointly establish and maintain a decentralization distributed PACS and ensure the safety problem of distributed storage of data among hospitals through a block chain. And can coordinate the load among hospitals and the assignment of authority and responsibility of data interaction between the hospitals and the third-party image centers and the third parties, such as scientific research, insurance and the like, through tokens. Finally, a safe, distributed and self-organizing PACS system which is commonly maintained by all users of the system including the hospital is formed, and compared with the traditional local area network PACS and the centralized cloud PACS, the block chain-based PACS management method has the following advantages:
1. the system has no central service provider, so that the running transparency of the system can be improved;
2. the propagation path of the data can be accurately tracked through the block chain;
3. the multi-place distributed storage is beneficial to long-term storage of data;
4. the centralized network bandwidth and storage requirement is not needed, so that the overall cost of the system can be greatly reduced;
5. the single-point performance bottleneck does not exist, and the overall efficiency of the system can be greatly improved;
6. the history of the data content and propagation paths is guaranteed by the blockchain to be not tampered with.
Detailed Description
The block chain based medical image data decentralized management method and system establish a decentralized PACS system which is commonly maintained by a plurality of hospitals, can linearly expand the capacity with cost, is safer and is supervised through the block chain and the distributed file system, the decentralized problem enables the bandwidth bottleneck and the safety problem of a single-point network to be solved, the use of the block chain technology ensures the control of the ownership and the access right of data in the system, and the unlimited right of a certain party to all data can not be generated.
The technical solution of the present invention is further described below with reference to the following embodiments and the accompanying drawings.
The invention provides a medical image data decentralized management method based on a block chain, which is based on the existing open source software component and the block chain technology and at least comprises the following steps:
uploading medical image data of all data terminals, storing the medical image data as an interplanetary file system (IPFS) file, taking a hash value of the medical image data, and simultaneously encrypting a link list file in the IPFS by adopting a public key of all data terminals;
the data right of use contract adopts the private key of all ends of the said data to decipher the link list file encrypted in the above-mentioned step according to the intellectual contract, send data user end public key information and pay the token to the said data right of use contract at the data user end, when requesting to obtain the said medical image data, the said data right of use contract adopts the public key of user to decipher the link list file and send to the said data user end after encrypting again, produce the block chain storing the said hash address at the same time;
and the data using end executes decryption operation on the data using end through a data using end private key to obtain a linked list file, and indexes the linked list file to the interplanetary file system to obtain actual medical image data. Wherein, the consensus mechanism adopted by the block chain is PoW, PoS or DPoS.
The method is implemented based on the existing open source software component, wherein the key points are as follows:
1. according to the storage principle of the IPFS, a large File (>256kB) is represented by a Link List (Link List), each Link in the List points to a File block smaller than 256kB, so that the large File can be represented by an object containing a small data volume, medical image data is often large, and the efficiency of directly encrypting and decrypting the image data is low, so that the Link Link List File corresponding to the image File is encrypted instead of directly encrypting the image File. Therefore, when reading the file stored in the IPFS, the Link list file corresponding to the file needs to be decrypted first to obtain the fragmented Link information of the actual file.
2. The method of the invention can lead the prior PACS system to be adaptive to IPFS storage, the prior PACS can use conventional local storage or cloud storage to store image data, such as excellent and mature open source PACS components like dcm4chee, and the like, and the adaptation work is achieved by providing an abstract storage model interface and corresponding to the realization of different storage systems.
3. The access security and traceability of data are ensured by a blockchain and an intelligent contract, the access authority of the data for transaction between different users is allowed, a hash address of image data which is expected to be used by a data user in an IPFS is stored in the blockchain (the specific characteristics and technical principles of the related blockchain can refer to the content of the prior art), a link list of corresponding data can be found in the IPFS according to the hash address, as shown in figure 1, the link list of the IPFS is encrypted by a public key of a data owner, so that the user directly takes the encrypted link list, and the actual link list can be obtained after decryption so as to obtain the data from the IPFS. Therefore, in the present invention, based on the concept of the smart contract (the smart contract is the content of the prior art, and will not be described herein), the private key of the data owner is needed to decrypt the encrypted linked list during execution, and the decryption result is returned to the user for obtaining the actual image data from the IPFS for use.
In the scheme of the invention, the corresponding blockchain needs to store the hash value representing the data to be traded, all the end public keys representing the identities of both parties to be traded and the user end public key to be output in an intelligent contract, so that the hash value, the all the end public keys representing the identities of both parties to be traded and the user end public key do not need to be stored in the blockchain, and the size of the blockchain is reduced.
The invention also discloses a block chain-based medical image data decentralized management system, which at least comprises a plurality of data all terminals, a plurality of data using terminals and a plurality of data use right contract terminals for linking the data all terminals and the data using terminals;
uploading medical image data of all data terminals, storing the medical image data as an interplanetary file system (IPFS) file, taking a hash value of the medical image data, and simultaneously encrypting a link list file in the IPFS by adopting a public key of all data terminals;
the data right of use contract adopts the private key of all ends of the said data to decipher the link list file encrypted in the above-mentioned step according to the intellectual contract, send data user end public key information and pay the token to the said data right of use contract at the data user end, when requesting to obtain the said medical image data, the said data right of use contract adopts the public key of user to decipher the link list file and send to the said data user end after encrypting again, produce the block chain storing the said hash address at the same time;
and the data using end executes decryption operation on the data using end through a data using end private key to obtain a linked list file, and indexes the linked list file to the interplanetary file system to obtain actual medical image data.
The system correspondingly executes the process of the method, and thus, the description is omitted.
The invention also discloses a block chain-based medical image data decentralized management system, which comprises a network, a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the steps of the method are realized when the processor executes the computer program. In this embodiment, the processor may be a hardware component such as a Central Processing Unit (CPU), the memory may be a hard disk, a memory, a plug-in hard disk, a smart memory card, a storage device such as a secure digital card flash memory, and the like, and the computer program includes a computer program code, a source code format, an object code, an executable file or some intermediate format, and the like.
The invention also discloses a computer-readable storage medium, in which a computer program is stored, characterized in that the computer program realizes the steps of the method when being executed by a processor. The program can be realized by using Go, JavaScript, Python, C + +, Java and other languages, and can also be realized by combining every two programs.
In summary, the present invention utilizes a distributed storage scheme of P2P such as IPFS to manage medical image data; the ownership, access right, transaction safety and incentive member co-maintenance system operation of the medical image data are ensured by using a block chain, an intelligent contract and an encrypted IPFS system; the encrypted object is a linked list stored by the IPFS, not the original data; the contract generates a linked list encrypted with the public key of the data consumer so that only the consumer can decrypt it, not the unencrypted linked list.
In addition, although the present invention may employ a scheme of directly encrypting original data, since image data is often large, the use efficiency of data is much lower. It is also feasible that the smart contract directly generates the decrypted original link list, but it is more difficult to ensure the security of the original data circulation compared with the method of re-encrypting with the public key of the user in the present scheme.
Therefore, the decentralized method is different from the local PACS and the cloud PACS which are conventionally used by hospitals, a decentralized distributed PACS can be jointly established and maintained among the hospitals, the safety problem of distributed storage of data among the hospitals is guaranteed through a block chain, the load among the hospitals can be coordinated through tokens, and the responsibility distribution of data interaction between the hospitals and third-party image centers and third parties, such as scientific research, insurance and the like, can be carried out. Ultimately resulting in a secure, distributed, ad hoc PACS system that is maintained by all users of the system, including hospitals.
Compared with the traditional local area network PACS and the centralized cloud PACS, the PACS management method based on the block chain has the following advantages: the system has no central service provider, so that the running transparency of the system can be improved; the propagation path of the data can be accurately tracked through the block chain; the multi-place distributed storage is beneficial to long-term storage of data; the centralized network bandwidth and storage requirement is not needed, so that the overall cost of the system can be greatly reduced; the single-point performance bottleneck does not exist, and the overall efficiency of the system can be greatly improved; the history of the data content and propagation paths is guaranteed by the blockchain to be not tampered with. The block chain consensus mechanism can flexibly select different consensus mechanisms such as PoW, PoS, DPoS and the like according to specific requirements, and can realize the same block chain PACS system.
The sequence of the above embodiments is only for convenience of description and does not represent the advantages and disadvantages of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.