CN112347521A - Medical data management method and system based on medical block chain - Google Patents

Medical data management method and system based on medical block chain Download PDF

Info

Publication number
CN112347521A
CN112347521A CN202011255383.9A CN202011255383A CN112347521A CN 112347521 A CN112347521 A CN 112347521A CN 202011255383 A CN202011255383 A CN 202011255383A CN 112347521 A CN112347521 A CN 112347521A
Authority
CN
China
Prior art keywords
data
medical
block chain
nodes
transaction
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.)
Withdrawn
Application number
CN202011255383.9A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202011255383.9A priority Critical patent/CN112347521A/en
Publication of CN112347521A publication Critical patent/CN112347521A/en
Withdrawn 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/20ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the management or administration of healthcare resources or facilities, e.g. managing hospital staff or surgery rooms

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Biomedical Technology (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention relates to the technical field of a block chain, and discloses a medical data management method based on a medical block chain, which comprises the following steps: calculating the performance and reliability of all nodes in the block chain, and dividing the nodes into full nodes and light nodes according to the performance and reliability of the block chain nodes; grouping blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data; storing the medical data by using the medical block chain; performing integrity check on medical data stored in the block chain by using a data integrity check method based on the block chain; and circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain. The invention also provides a medical data management system based on the medical block chain. The invention realizes the management of the block chain data.

Description

Medical data management method and system based on medical block chain
Technical Field
The invention relates to the technical field of blockchains, in particular to a medical data management method and system based on a medical blockchain.
Background
The development of science and technology has promoted social progress, thus leading to a technical revolution, and the block chain gradually walks into the visual field of people. The block chain technology has been greatly successful in the aspects of realizing data sharing, data tracing and the like because of the characteristics of decentralization, safety, reliability, non-tampering and the like, and has become a new trusted data carrier. The medical industry data has the problems of data disorder and more effective data privacy protection, and the application of the block chain technology in the medical industry is still in the initial stage, so how to process the medical industry data by using the block chain becomes a hot topic in the current research field.
Although the traditional block chain overcomes the traditional single-point attack problem, the safety is ensured by a mechanism that a whole person participates in the whole person verification, and the high redundancy storage of data follows; on the basis of ensuring the data safety and integrity, the problems of resource waste and the like caused by repeated storage are brought.
In view of the above, how to efficiently manage medical data while ensuring the security of the medical data is a problem to be solved by those skilled in the art.
Disclosure of Invention
Optimizing the blockchain by using a blockchain storage capacity optimization algorithm, and improving a data storage structure of the blockchain, so that medical data are stored by using the improved blockchain; and the circulation of medical data is carried out by using a data transaction algorithm based on the blockchain, so that the medical data management based on the medical blockchain is realized.
In order to achieve the above object, the present invention provides a medical data management method based on a medical block chain, including:
calculating the performance and reliability of all nodes in the block chain, and dividing the nodes into full nodes and light nodes according to the performance and reliability of the block chain nodes;
grouping blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data;
storing the medical data by using the medical block chain;
performing integrity check on medical data stored in the block chain by using a data integrity check method based on the block chain;
and circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain.
Optionally, the dividing the node into a full node and a light node according to the performance and reliability of the blockchain node includes:
1) in a time period T, calculating the performance index of each node in the block chain according to the hardware storage capacity of the node, the input and output rates of a magnetic disk and the size of a memory:
F(k)=W1×Sk+W2×n×Ck+W3×Dk+W4×Mk
Figure BDA0002772959690000021
wherein:
f (k) represents the performance index of the kth block chain node;
Skthe storage capacity of a hard disk in the kth block chain node is represented;
n represents the number of cores of the CPU in the kth block chain node, CkIs the processing frequency of the CPU;
Dkthe output and output rate of the disk;
Mkthe size of the memory in the kth block chain node;
Wiweight representing the ith performance impact index, in one embodiment of the invention, the invention will W1Set to 0.5, W2Set to 0.2, W3Set to 0.15, W4Set to 0.15;
2) setting initial reliability of blockchain node to be R0Setting the initial reliability of the blockchain node to R0And verifying the reliability of the node in a time period T, wherein T is the time period for calculating the performance index of the blockchain node: :
Figure BDA0002772959690000022
wherein:
t0is the initial time for the kth block link point to join the block chain;
tnowis the current time;
j is a reliability parameter, and if the number of j is continuously increased, the data stored by the node always has errors in authenticity, so that the reliability value of the node with multiple verification errors is reduced more than the value with the first error;
r (k) is the reliability of the kth block chain node at the current moment;
3) the performance and the reliability of the block chain nodes are integrated, the block chain node points are evaluated, and the evaluation indexes of the block chain are as follows:
C(k)=F(k)+R(k)
sequencing all nodes in the block chain from high to low according to the value of C (k) periodically, selecting a plurality of nodes in the front row as all nodes to store all data, and selecting the rest subsequent nodes as light nodes;
the whole nodes are responsible for storing data on the whole block chain and play an important role in data traceability operation of the packet storage block chain, and the light nodes are storage nodes except the whole nodes and can store data in different proportions according to different evaluation indexes.
Optionally, the grouping the tiles in the blockchain by using a full-node and light-node based tile grouping policy includes:
grouping the whole block chain by taking 6 blocks as a group, wherein the blocks in the same group keep the same number of data copies; if the number of all the block chain nodes in the block chain is M, the number of all the nodes is [ M/6], the number of the light nodes is M- [ M/6], and therefore the number of the data copies required to be stored in the ith group of blocks is:
Figure BDA0002772959690000031
wherein:
i is 1,2,3, …, n/6, where n represents the number of groups of the current block in the block chain;
when the block continuously rises along with the height, the number of the data copies required to be stored by the light node is gradually reduced, and then the number of the released data copies needs to be obtained, wherein the number of the data copies required to be released by the light node is as follows:
Figure BDA0002772959690000032
the light node releases the transaction information of the block, and the head information of the block is still kept.
Optionally, the procedure of storing the medical data by using the medical block chain is as follows:
1) a user sends a registration request to a medical block chain, the medical block chain calls a user identity management contract after receiving the request, the contract records an account address of the user, a unique user identification DU-ID is distributed to the medical block chain according to the account address submitted by the user, and a corresponding attribute set S is distributed according to identity priority;
2) selecting a keyword set KW from medical data F by a block chain, carrying out Hash operation on the medical data F to obtain h (H) (F), carrying out signature sign (h) on the Hash value, then selecting a key K from a key space, and encrypting the medical data F, the signature sign (h) and a timestamp T by using an AES (advanced encryption standard) algorithm to obtain a ciphertext C; the medical data F is in the form of DocJSON, including a number, version number, time, and signature; the medical data keyword set comprises the type of medical data, for example, the medical data is medical information data of medical staff or medical information data of patients, and all information of the medical data;
3) the block chain uploads the ciphertext C to a full node for storage, broadcasts a timestamp T in the Ethengfang, and records a hash value h of the ciphertext position obtained from the full nodec(ii) a The block chain selects the same key K and AES algorithm to hash value hcEncrypting to obtain CTL;
4) calling an authority control contract, finding out an access strategy P corresponding to the medical data F, and encrypting the secret key K by using the public parameter PK and the access strategy P to obtain the CTK; the block chain randomly selects a key K1 again from the key space, and encrypts the CTL and the CTK by using the AES algorithm to obtain a ciphertext CT;
5) embedding all the ciphertexts into the transaction, and recording the id of the transaction and the key K1 into a storage contract after the transaction is authenticated; the blockchain generates a key Index from the key set KW and the master key MK and stores the Index in the search contract.
Optionally, the performing integrity check on the data in the block chain by using the data integrity check method based on the block chain includes:
1) the light node uses a secure hash function to perform hash operation on the medical data to obtain a hash value of the medical data, and the hash value is recorded as a hash;
2) the light node digitally signs the hash value to obtain a digital signature dsign; adding the hash value hash, the digital signature dsign, the timestamp of the occurrence of the transaction and the data owner into a data source structure as additional information by using a decentralized timestamp technology, and finally mapping the data source structure to an intelligent contract instead of the medical data hash value hash;
3) the user stores the medical data into the local server and retains metadata information in the data source structure so as to facilitate real-time data integrity verification;
4) when a user needs to perform integrity verification service, a hash value hash0 of data stored in a local server is calculated firstly, then hash calculation is performed according to reserved timestamp information timestamp0 to finally obtain a new hash value hash1, and finally a private key of the user is used for digitally signing the hash value hash1 to obtain a new digital signature dsign 0;
5) interacting the full node and the intelligent contract for data integrity, and searching a corresponding data hash value hash stored in a block chain in a data source structure in the intelligent contract by using a digital signature dsign 0;
6) comparing the two hash values with a hash0 to verify the integrity of the data; if the two values are the same, the source data successfully completes data integrity verification, which indicates that the data is not tampered, otherwise, the source data is tampered or damaged.
Optionally, the circulation of the medical data by using the data transaction algorithm based on the blockchain includes:
1) a user initiates a data transaction request, when the whole node acquires corresponding transaction information, the change of the stored data assets caused by the transaction is judged, whether the digital signature of the transaction and the asset change is valid or not is verified, if the digital signature is valid, the verification is successful, and the next step is carried out; otherwise, directly returning to failure and stopping verification;
2) all nodes check the transaction T' which is the same as the transaction id but has a Status attribute value of AplyTrad from the node, and if the check is successful, the next step is carried out; otherwise, directly returning to failure and stopping verification;
3) judging whether the data assets of the transaction record are the same as the transaction assets of the T', if so, indicating that the data owner has not tampered the data amount without authorization, and then, successfully verifying, and carrying out the next step; otherwise, directly returning to failure and stopping verification; judging whether the data volume of the data asset change is the same as the data volume of the current transaction record, and if so, carrying out the next step; otherwise, directly returning to failure and stopping verification;
4) when the digital signature is successfully verified, transaction information M is generatedtWherein t represents the time of data transaction;
5) at time t +1, the blockchain starts to generate consensus, i.e. all consensus nodes receive the transaction message MtIf the agreement passes, at the moment of t +2, if the data owner agrees to carry out the transaction, the data owner issues a message of agreeing to the transaction, adds own data assets in the transaction, modifies the data assets of both parties at the moment, attaches own digital signatures, and shows that the data owner is responsible for the transaction; if the data owner refuses to carry out the transaction at the moment of t +2, the transaction is not needed, a new transaction is generated, the refused mark is attached, and the own digital signature is attached to indicate that the transaction is responsible for the transaction.
In addition, to achieve the above object, the present invention further provides a medical data management system based on a medical block chain, the system including:
medical data acquisition means for acquiring medical data;
the medical data storage device is used for grouping the blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data, and storing the medical data by using the medical block chain; meanwhile, integrity check is carried out on the medical data stored in the block chain by using a data integrity check method based on the block chain;
and the medical data transaction device is used for circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, which stores thereon medical data management program instructions, which are executable by one or more processors to implement the steps of the implementation method of medical data management based on medical zone block chains as described above.
Compared with the prior art, the invention provides a medical data management method based on a medical block chain, which has the following advantages:
firstly, aiming at the problem of high redundancy storage of data in the traditional block chain, the invention calculates the performance index of each node in the block chain by considering the hardware storage capacity of the block chain node, the input and output rates of a magnetic disk and the size of a memory, and sets the initial reliability of the block chain node as R0And verifying the reliability of the node within a certain time:
Figure BDA0002772959690000061
wherein: t is t0Is the initial time for the kth block link point to join the block chain; t is tnowIs the current time; j is a reliability parameter, the number of j is notIf the data is added, the data stored in the node is always wrong, and the reliability value of the node with multiple verification errors is reduced more than that of the node with the first verification error; evaluating the block chain link points by integrating the performance and reliability of the block chain node, wherein the evaluation indexes of the block chain are as follows:
C(k)=F(k)+R(k)
according to the method, all nodes in a block chain are periodically sorted from high to low according to the value of C (k), and the more high the evaluation index is, the more reliable the data stored by the nodes is, so that a plurality of nodes in the front row are selected as all nodes to store all data, and the rest subsequent nodes are light nodes; the whole nodes store the complete block chain, so that all data in the block chain can be traced, the light nodes store partial data with different proportions according to the evaluation indexes of the light nodes, and the higher the evaluation index of the light node is, the higher the proportion of the stored data is. When the data written in the block chain reaches a certain threshold value, the traditional block chain generates a new block chain because the generated block length is higher than the original block length, therefore, the invention adopts the standard of releasing the saved copy number to the minimum copy number required to be stored when the block height is very large, therefore, when the block continuously rises along with the height, the strategy that the copy number required to be stored is gradually reduced is adopted, block branching is avoided when the data is written, wherein the block chain information stored by a whole node is unchanged, mainly the transaction information of the block is released by a light node, for example, the invention uses 6 blocks as a group to group the whole block chain, and the same data copy number is reserved by the blocks of the same group; if the number of all the block chain nodes in the block chain is M, the number of all the nodes is [ M/6], the number of the light nodes is M- [ M/6], and therefore the number of the data copies required to be stored in the ith group of blocks is:
Figure BDA0002772959690000062
wherein: i is 1,2,3, …, n/6, where n represents the number of groups of the current block in the block chain; therefore, as the block continuously rises with the height, the number of data copies required to be stored by the light node is gradually reduced, and then the number of released data copies needs to be obtained, where the number of data copies required to be released by the light node is:
Figure BDA0002772959690000063
the transaction information of the block is released by the light node, the header information of the block is still reserved, and the number of the data copies stored by the light node in the block chain is reduced along with the increase of the height of the block, so that the data storage cost of the block chain is effectively reduced, the data storage capacity in the block chain is increased, and the effective storage of the medical data is realized.
The invention also provides a data integrity checking method based on a block chain, which is characterized in that a hash value of data is embedded into a transaction record, a decentralized timestamp technology is utilized to add the hash value hash, a digital signature dsign, a timestamp of transaction occurrence and a data owner as additional information into a data source structure, the data source structure is mapped into an intelligent contract instead of a medical data hash value hash, when a user needs to perform integrity verification service, the hash value hash0 of the data stored in a local server is firstly calculated, then hash calculation is performed according to the reserved timestamp information timestamp0, finally a new hash value hash1 is obtained, finally a private key of the user is utilized to perform digital signature on the value hash1 to obtain a new digital signature dsign0, and the digital signature dsign0 is utilized to search the corresponding hash value hash stored in the block chain in the data source structure in the intelligent contract, comparing the two hash values with a hash0 to verify the integrity of the data; if the two values are the same, the source data successfully completes data integrity verification, which indicates that the data is not tampered, otherwise, the source data is tampered or damaged. This is because an attacker of the block chain must try to extend the branch chain faster than other nodes in the network in order for the nodes in the network to accept the modified block, making it the longest chain. Since resources in the entire network are mainly concentrated in the longest chain, it is difficult to branch chains beyond the longest chain, which is sufficient to guarantee the integrity of data in the block chain. Once the block is validated, the time stamp of the transaction cannot be changed. The timestamp-based data verification algorithm of the present invention may therefore help to prove that data exists at a certain point in time, and has not been altered since the certain point in time, ensuring the integrity of the stored medical data.
Drawings
Fig. 1 is a schematic flowchart of a medical data management method based on a medical block chain according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a medical data management system based on a medical block chain according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Optimizing the blockchain by using a blockchain storage capacity optimization algorithm, and improving a data storage structure of the blockchain, so that medical data are stored by using the improved blockchain; and the circulation of medical data is carried out by using a data transaction algorithm based on the blockchain, so that the medical data management based on the medical blockchain is realized. Fig. 1 is a schematic diagram illustrating a medical data management method based on a medical block chain according to an embodiment of the present invention.
In this embodiment, the medical data management method based on the medical block chain includes:
and S1, calculating the performance and reliability of all nodes in the blockchain, and dividing the nodes into full nodes and light nodes according to the performance and reliability of the blockchain nodes.
Firstly, the reliability of all nodes in a block chain is calculated, and the reliability of the block chain link points is calculated by the following steps:
1) in a time period T, calculating the performance index of each node in the block chain according to the hardware storage capacity of the node, the input and output rates of a magnetic disk and the size of a memory:
F(k)=W1×Sk+W2×n×Ck+W3×Dk+W4×Mk
Figure BDA0002772959690000081
wherein:
f (k) represents the performance index of the kth block chain node;
Skthe storage capacity of a hard disk in the kth block chain node is represented;
n represents the number of cores of the CPU in the kth block chain node, CkIs the processing frequency of the CPU;
Dkthe output and output rate of the disk;
Mkthe size of the memory in the kth block chain node;
Wiweight representing the ith performance impact index, in one embodiment of the invention, the invention will W1Set to 0.5, W2Set to 0.2, W3Set to 0.15, W4Set to 0.15;
2) setting initial reliability of blockchain node to be R0Setting the initial reliability of the blockchain node to R0And verifying the reliability of the node in a time period T, wherein T is the time period for calculating the performance index of the blockchain node:
Figure BDA0002772959690000082
wherein:
t0is the initial time for the kth block link point to join the block chain;
tnowis the current time;
j is a reliability parameter, and if the number of j is continuously increased, the data stored by the node always has errors in authenticity, so that the reliability value of the node with multiple verification errors is reduced more than the value with the first error;
r (k) is the reliability of the kth block chain node at the current moment;
3) the performance and the reliability of the block chain nodes are integrated, the block chain node points are evaluated, and the evaluation indexes of the block chain are as follows:
C(k)=F(k)+R(k)
according to the method, all nodes in a block chain are periodically sequenced from high to low according to the value of C (k), a plurality of nodes in the front row are selected as all nodes to store all data, and the rest subsequent nodes are light nodes; the whole nodes are responsible for storing data on the whole block chain and play an important role in data traceability operation of the packet storage block chain, and the light nodes are storage nodes except the whole nodes and can store data in different proportions according to different evaluation indexes.
And S2, grouping the blocks in the block chain by using a block grouping strategy based on the whole nodes and the light nodes to obtain a medical block chain suitable for medical data.
Further, according to the divided whole nodes and light nodes of the block chain, the invention carries out grouping processing on the blocks in the block chain by using a block grouping strategy based on the whole nodes and the light nodes;
in one embodiment of the present invention, the whole blockchain is grouped by grouping 6 blocks, and the blocks of the same group keep the same number of data copies; if the number of all the block chain nodes in the block chain is M, the number of all the nodes is [ M/6], the number of the light nodes is M- [ M/6], and therefore the number of the data copies required to be stored in the ith group of blocks is:
Figure BDA0002772959690000091
wherein:
i is 1,2,3, …, n/6, where n represents the number of groups of the current block in the block chain;
therefore, as the block continuously rises with the height, the number of data copies required to be stored by the light node is gradually reduced, and then the number of released data copies needs to be obtained, where the number of data copies required to be released by the light node is:
Figure BDA0002772959690000092
the light node releases the transaction information of the block, and the head information of the block is still kept.
And S3, storing the medical data by using the medical block chain.
Further, the invention stores medical data by using a medical block chain, and the storage process of the medical data is as follows:
1) a user sends a registration request to a medical block chain, the medical block chain calls a user identity management contract after receiving the request, the contract records an account address of the user, a unique user identification DU-ID is distributed to the medical block chain according to the account address submitted by the user, and a corresponding attribute set S is distributed according to identity priority;
2) selecting a keyword set KW from medical data F by a block chain, carrying out Hash operation on the medical data F to obtain h (H) (F), carrying out signature sign (h) on the Hash value, then selecting a key K from a key space, and encrypting the medical data F, the signature sign (h) and a timestamp T by using an AES (advanced encryption standard) algorithm to obtain a ciphertext C; the medical data F is in the form of DocJSON, including a number, version number, time, and signature; the medical data keyword set comprises the type of medical data, for example, the medical data is medical information data of medical staff or medical information data of patients, and all information of the medical data;
3) the block chain uploads the ciphertext C to a full node for storage, broadcasts a timestamp T in the Ethengfang, and records a hash value h of the ciphertext position obtained from the full nodec(ii) a The block chain selects the same key K and AES algorithm to hash value hcEncrypting to obtain CTL;
4) calling an authority control contract, finding out an access strategy P corresponding to the medical data F, and encrypting the secret key K by using the public parameter PK and the access strategy P to obtain the CTK; the block chain randomly selects a key K1 again from the key space, and encrypts the CTL and the CTK by using the AES algorithm to obtain a ciphertext CT;
5) embedding all the ciphertexts into the transaction, and recording the id of the transaction and the key K1 into a storage contract after the transaction is authenticated; the blockchain generates a key Index from the key set KW and the master key MK and stores the Index in the search contract.
And S4, performing integrity check on the medical data stored in the blockchain by using a data integrity check method based on the blockchain.
Further, the invention utilizes a block chain-based data integrity verification method to perform integrity verification on medical data stored in a block chain, and the block chain-based data integrity verification method comprises the following steps:
1) the light node uses a secure hash function to perform hash operation on the medical data to obtain a hash value of the medical data, and the hash value is recorded as a hash;
2) the light node digitally signs the hash value to obtain a digital signature dsign; adding the hash value hash, the digital signature dsign, the timestamp of the occurrence of the transaction and the data owner into a data source structure as additional information by using a decentralized timestamp technology, and finally mapping the data source structure to an intelligent contract instead of the medical data hash value hash;
3) the user stores the medical data into the local server and retains metadata information in the data source structure so as to facilitate real-time data integrity verification;
4) when a user needs to perform integrity verification service, a hash value hash0 of data stored in a local server is calculated firstly, then hash calculation is performed according to reserved timestamp information timestamp0 to finally obtain a new hash value hash1, and finally a private key of the user is used for digitally signing the hash value hash1 to obtain a new digital signature dsign 0;
5) interacting the full node and the intelligent contract for data integrity, and searching a corresponding data hash value hash stored in a block chain in a data source structure in the intelligent contract by using a digital signature dsign 0;
6) comparing the two hash values with a hash0 to verify the integrity of the data; if the two values are the same, the source data successfully completes data integrity verification, which indicates that the data is not tampered, otherwise, the source data is tampered or damaged.
And S5, circulating the medical data by using a data transaction algorithm based on the blockchain, and realizing medical data management based on the medical blockchain.
Further, the invention utilizes a data transaction algorithm based on a block chain to circulate the medical data, and the data transaction algorithm based on the block chain comprises the following steps:
1) a user initiates a data transaction request, when the whole node acquires corresponding transaction information, the change of the stored data assets caused by the transaction is judged, whether the digital signature of the transaction and the asset change is valid or not is verified, if the digital signature is valid, the verification is successful, and the next step is carried out; otherwise, directly returning to failure and stopping verification;
2) all nodes check the transaction T' which is the same as the transaction id but has a Status attribute value of AplyTrad from the node, and if the check is successful, the next step is carried out; otherwise, directly returning to failure and stopping verification;
3) judging whether the data assets of the transaction record are the same as the transaction assets of the T', if so, indicating that the data owner has not tampered the data amount without authorization, and then, successfully verifying, and carrying out the next step; otherwise, directly returning to failure and stopping verification; judging whether the data volume of the data asset change is the same as the data volume of the current transaction record, and if so, carrying out the next step; otherwise, directly returning to failure and stopping verification;
4) when the digital signature is successfully verified, transaction information M is generatedtWherein t represents the time of data transaction;
5) at time t +1, the blockchain starts to generate consensus, i.e. all consensus nodes receive the transaction message MtIf the agreement passes, at the moment of t +2, if the data owner agrees to carry out the transaction, the data owner issues a message of agreeing to the transaction and carries out the transactionThe data assets of the user are added, the data assets of the user and the user are modified at the moment, and the digital signature of the user and the user is attached to the data assets, so that the user is responsible for the transaction; if the data owner refuses to carry out the transaction at the moment of t +2, the transaction is not needed, a new transaction is generated, the refused mark is attached, and the own digital signature is attached to indicate that the transaction is responsible for the transaction.
The following describes embodiments of the present invention through an algorithmic experiment and tests of the inventive treatment method. The hardware test environment of the algorithm of the invention is as follows: the experimental development environment is a PC with Intel (R) core (TM) i5-3470SCPU @2.90GHz2.89GHz and 8GB memory, 20 nodes are established by using flash, each node is a windows10 system with the memory of 1G and the size of a hard disk of 256GB, and a block chain system is built by using python, the flash and Request. The comparison method is a Mysql-based medical data management method and a traditional block chain-based medical data management method.
In the algorithm experiment, 5T medical data are collected, the method and the comparison method are respectively used for data storage, and the retrieval time of the data is used as an evaluation index of the data management method.
According to the experimental result, the data retrieval time of the medical data management method based on Mysql is 0.21s, the data retrieval time of the medical data management method based on the traditional block chain is 0.23s, and the data retrieval time of the medical data management method based on the Mysql is 0.18 s.
The invention also provides a medical data management system based on the medical block chain. Fig. 2 is a schematic diagram illustrating an internal structure of a medical data management system based on a medical block chain according to an embodiment of the present invention.
In the present embodiment, the medical data management system 1 based on the medical block chain at least includes a medical data acquisition device 11, a medical data storage device 12, a medical data transaction device 13, a communication bus 14, and a network interface 15.
The medical data acquisition device 11 may be a PC (Personal Computer), a terminal device such as a smart phone, a tablet Computer, or a mobile Computer, or may be a server.
The medical data storage device 12 includes at least one type of readable storage medium including flash memory, hard disks, multi-media cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, and the like. The medical data storage 12 may in some embodiments be an internal storage unit of the medical blockchain based medical data management system 1, e.g. a hard disk of the medical blockchain based medical data management system 1. The medical data storage device 12 may also be an external storage device of the medical data management system 1 based on the medical block chain in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, provided on the medical data management system 1 based on the medical block chain. Further, the medical data storage 12 may also include both an internal storage unit and an external storage device of the medical data management system 1 based on the medical block chain. The medical data storage device 12 can be used not only to store application software installed in the medical data management system 1 based on the medical block chain and various types of data, but also to temporarily store data that has been output or is to be output.
The medical data transaction device 13 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip for running program codes stored in the medical data storage device 12 or Processing data, such as medical data management program instructions.
The communication bus 14 is used to enable connection communication between these components.
The network interface 15 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the system 1 and other electronic devices.
Optionally, the system 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the medical data management system 1 based on the medical blockchain and for displaying a visualized user interface.
Fig. 2 only shows the medical data management system 1 with the components 11-15 and based on a medical blockchain, it will be understood by a person skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the medical blockchain based medical data management system 1 and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
In the embodiment of the device 1 shown in fig. 2, medical data storage means 12 stores therein medical data management program instructions; the procedure of executing the medical data management program command stored in the medical data storage device 12 by the medical data transaction device 13 is the same as the implementation method of the medical data management method based on the medical block chain, and is not described here.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium having stored thereon medical data management program instructions executable by one or more processors to implement the following:
calculating the performance and reliability of all nodes in the block chain, and dividing the nodes into full nodes and light nodes according to the performance and reliability of the block chain nodes;
grouping blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data;
storing the medical data by using the medical block chain;
performing integrity check on medical data stored in the block chain by using a data integrity check method based on the block chain;
and circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A medical data management method based on a medical blockchain, the method comprising:
calculating the performance and reliability of all nodes in the block chain, and dividing the nodes into full nodes and light nodes according to the performance and reliability of the block chain nodes;
grouping blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data;
storing the medical data by using the medical block chain;
performing integrity check on medical data stored in the block chain by using a data integrity check method based on the block chain;
and circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain.
2. The method for medical data management based on medical blockchain according to claim 1, wherein the dividing of the nodes into full nodes and light nodes according to the performance and reliability of the blockchain nodes comprises:
1) in a time period T, calculating the performance index of each node in the block chain according to the hardware storage capacity of the node, the input and output rates of a magnetic disk and the size of a memory:
F(k)=W1×Sk+W2×n×Ck+W3×Dk+W4×Mk
Figure FDA0002772959680000011
wherein:
f (k) represents the performance index of the kth block chain node;
Skthe storage capacity of a hard disk in the kth block chain node is represented;
n represents the number of cores of the CPU in the kth blockchain node,Ckis the processing frequency of the CPU;
Dkthe output and output rate of the disk;
Mkthe size of the memory in the kth block chain node;
Wia weight representing the ith performance impact indicator;
2) setting initial reliability of blockchain node to be R0And verifying the reliability of the node in a time period T, wherein T is the time period for calculating the performance index of the blockchain node:
Figure FDA0002772959680000012
wherein:
t0is the initial time for the kth block link point to join the block chain;
tnowis the current time;
j is a reliability parameter, and if the number of j is continuously increased, the data stored by the node always has errors in authenticity, so that the reliability value of the node with multiple verification errors is reduced more than the value with the first error;
r (k) is the reliability of the kth block chain node at the current moment;
3) the performance and the reliability of the block chain nodes are integrated, the block chain node points are evaluated, and the evaluation indexes of the block chain are as follows:
C(k)=F(k)+R(k)
sequencing all nodes in the block chain from high to low according to the value of C (k) periodically, selecting a plurality of nodes in the front row as all nodes to store all data, and selecting the rest subsequent nodes as light nodes;
the whole nodes are responsible for storing data on the whole block chain and play an important role in data traceability operation of the packet storage block chain, and the light nodes are storage nodes except the whole nodes and can store data in different proportions according to different evaluation indexes.
3. The medical data management method based on medical blockchain according to claim 2, wherein the grouping of the blocks in the blockchain by using the block grouping policy based on the full nodes and the light nodes comprises:
grouping the whole block chain by taking 6 blocks as a group, wherein the blocks in the same group keep the same number of data copies; if the number of all the block chain nodes in the block chain is M, the number of all the nodes is [ M/6], the number of the light nodes is M- [ M/6], and therefore the number of the data copies required to be stored in the ith group of blocks is:
Figure FDA0002772959680000021
wherein:
1,2, 3., n/6, where n represents the number of groups of the current block in the block chain;
when the block continuously rises along with the height, the number of the data copies required to be stored by the light node is gradually reduced, and then the number of the released data copies needs to be obtained, wherein the number of the data copies required to be released by the light node is as follows:
Figure FDA0002772959680000022
the light node releases the transaction information of the block, and the head information of the block is still kept.
4. The medical data management method based on the medical blockchain according to claim 3, wherein the procedure of storing the medical data by using the medical blockchain is as follows:
1) a user sends a registration request to a medical block chain, the medical block chain calls a user identity management contract after receiving the request, the contract records an account address of the user, a unique user identification DU-ID is distributed to the medical block chain according to the account address submitted by the user, and a corresponding attribute set S is distributed according to identity priority;
2) selecting a keyword set KW from medical data F by a block chain, carrying out Hash operation on the medical data F to obtain h (H) (F), carrying out signature sign (h) on the Hash value, then selecting a key K from a key space, and encrypting the medical data F, the signature sign (h) and a timestamp T by using an AES (advanced encryption standard) algorithm to obtain a ciphertext C; the medical data F is in the form of DocJSON, including a number, version number, time, and signature;
3) the block chain uploads the ciphertext C to a full node for storage, broadcasts a timestamp T in the Ethengfang, and records a hash value h of the ciphertext position obtained from the full nodec(ii) a The block chain selects the same key K and AES algorithm to hash value hcEncrypting to obtain CTL;
4) calling an authority control contract, finding out an access strategy P corresponding to the medical data F, and encrypting the secret key K by using the public parameter PK and the access strategy P to obtain the CTK; the block chain randomly selects a key K1 again from the key space, and encrypts the CTL and the CTK by using the AES algorithm to obtain a ciphertext CT;
5) embedding all the ciphertexts into the transaction, and recording the id of the transaction and the key K1 into a storage contract after the transaction is authenticated; the blockchain generates a key Index from the key set KW and the master key MK and stores the Index in the search contract.
5. The method for medical data management based on medical blockchain according to claim 4, wherein the integrity checking of the data in the blockchain by using the data integrity checking method based on blockchain comprises:
1) the light node uses a secure hash function to perform hash operation on the medical data to obtain a hash value of the medical data, and the hash value is recorded as a hash;
2) the light node digitally signs the hash value to obtain a digital signature dsign; adding the hash value hash, the digital signature dsign, the timestamp of the occurrence of the transaction and the data owner into a data source structure as additional information by using a decentralized timestamp technology, and finally mapping the data source structure to an intelligent contract instead of the medical data hash value hash;
3) the user stores the medical data into the local server and retains metadata information in the data source structure so as to facilitate real-time data integrity verification;
4) when a user needs to perform integrity verification service, a hash value hash0 of data stored in a local server is calculated firstly, then hash calculation is performed according to reserved timestamp information timestamp0 to finally obtain a new hash value hash1, and finally a private key of the user is used for digitally signing the hash value hash1 to obtain a new digital signature dsign 0;
5) interacting the full node and the intelligent contract for data integrity, and searching a corresponding data hash value hash stored in a block chain in a data source structure in the intelligent contract by using a digital signature dsign 0;
6) comparing the two hash values with a hash0 to verify the integrity of the data; if the two values are the same, the source data successfully completes data integrity verification, which indicates that the data is not tampered, otherwise, the source data is tampered or damaged.
6. The method for medical data management based on medical blockchain according to claim 5, wherein the circulation of the medical data by using the blockchain-based data transaction algorithm comprises:
1) a user initiates a data transaction request, when the whole node acquires corresponding transaction information, the change of the stored data assets caused by the transaction is judged, whether the digital signature of the transaction and the asset change is valid or not is verified, if the digital signature is valid, the verification is successful, and the next step is carried out; otherwise, directly returning to failure and stopping verification;
2) the whole node inquires a transaction T' which has the same id as the transaction but has a Status attribute value of AplyTrad from the node, and if the inquiry is successful, the next step is carried out; otherwise, directly returning to failure and stopping verification;
3) judging whether the data assets of the transaction record are the same as the transaction assets of the T', if so, indicating that the data owner has not tampered the data amount without authorization, and then, successfully verifying, and carrying out the next step; otherwise, directly returning to failure and stopping verification; judging whether the data volume of the data asset change is the same as the data volume of the current transaction record, and if so, carrying out the next step; otherwise, directly returning to failure and stopping verification;
4) when the digital signature is successfully verified, transaction information M is generatedtWherein t represents the time of data transaction;
5) at time t +1, the blockchain starts to generate consensus, i.e. all consensus nodes receive the transaction message MtIf the agreement passes, at the moment of t +2, if the data owner agrees to carry out the transaction, the data owner issues a message of agreeing to the transaction, adds own data assets in the transaction, modifies the data assets of both parties at the moment, attaches own digital signatures, and shows that the data owner is responsible for the transaction; if the data owner refuses to carry out the transaction at the moment of t +2, the transaction is not needed, a new transaction is generated, the refused mark is attached, and the own digital signature is attached to indicate that the transaction is responsible for the transaction.
7. A medical data management system based on a medical blockchain, the system comprising:
medical data acquisition means for acquiring medical data;
the medical data storage device is used for grouping the blocks in the block chain by using a block grouping strategy based on the full nodes and the light nodes to obtain a medical block chain suitable for medical data, and storing the medical data by using the medical block chain; meanwhile, integrity check is carried out on the medical data stored in the block chain by using a data integrity check method based on the block chain;
and the medical data transaction device is used for circulating the medical data by using a data transaction algorithm based on the blockchain, so as to realize medical data management based on the medical blockchain.
8. A computer readable storage medium having stored thereon medical data management program instructions executable by one or more processors to perform the steps of a method of implementing medical blockchain based medical data management as claimed in any one of claims 1 to 6.
CN202011255383.9A 2020-11-11 2020-11-11 Medical data management method and system based on medical block chain Withdrawn CN112347521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011255383.9A CN112347521A (en) 2020-11-11 2020-11-11 Medical data management method and system based on medical block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011255383.9A CN112347521A (en) 2020-11-11 2020-11-11 Medical data management method and system based on medical block chain

Publications (1)

Publication Number Publication Date
CN112347521A true CN112347521A (en) 2021-02-09

Family

ID=74363444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011255383.9A Withdrawn CN112347521A (en) 2020-11-11 2020-11-11 Medical data management method and system based on medical block chain

Country Status (1)

Country Link
CN (1) CN112347521A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032803A (en) * 2021-03-22 2021-06-25 翰雅(深圳)网络信息科技有限公司 Method for safely storing and reading data
CN113592688A (en) * 2021-07-30 2021-11-02 工银科技有限公司 Diagnosis and treatment information processing method and device based on block chain and electronic equipment
CN113609216A (en) * 2021-07-08 2021-11-05 中南民族大学 Block chain-based product quality diagnosis method, device, equipment and storage medium
CN113779612A (en) * 2021-09-30 2021-12-10 国网湖南省电力有限公司 Data sharing method and system based on block chain and hidden strategy attribute encryption
CN114244523A (en) * 2021-12-09 2022-03-25 东软集团股份有限公司 Data processing method, device and adapter
US20220150073A1 (en) * 2020-11-09 2022-05-12 International Business Machines Corporation Blockchain based verifiabilty of user status
CN116108497A (en) * 2023-04-17 2023-05-12 武汉盛博汇信息技术有限公司 Medical data lightweight cloud storage method and device based on identity anonymity
CN116453654A (en) * 2023-06-16 2023-07-18 北京四海汇智科技有限公司 Digital nutrition management method and system for endocrine patients
CN117436111A (en) * 2023-12-20 2024-01-23 国网浙江省电力有限公司金华供电公司 Block chain-based method and system for managing all-data encryption protection carbon asset

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12010244B2 (en) * 2020-11-09 2024-06-11 International Business Machines Corporation Blockchain based verifiability of user status
US20220150073A1 (en) * 2020-11-09 2022-05-12 International Business Machines Corporation Blockchain based verifiabilty of user status
CN113032803A (en) * 2021-03-22 2021-06-25 翰雅(深圳)网络信息科技有限公司 Method for safely storing and reading data
CN113609216A (en) * 2021-07-08 2021-11-05 中南民族大学 Block chain-based product quality diagnosis method, device, equipment and storage medium
CN113592688A (en) * 2021-07-30 2021-11-02 工银科技有限公司 Diagnosis and treatment information processing method and device based on block chain and electronic equipment
CN113779612A (en) * 2021-09-30 2021-12-10 国网湖南省电力有限公司 Data sharing method and system based on block chain and hidden strategy attribute encryption
CN114244523A (en) * 2021-12-09 2022-03-25 东软集团股份有限公司 Data processing method, device and adapter
CN116108497A (en) * 2023-04-17 2023-05-12 武汉盛博汇信息技术有限公司 Medical data lightweight cloud storage method and device based on identity anonymity
CN116108497B (en) * 2023-04-17 2023-06-23 武汉盛博汇信息技术有限公司 Medical data lightweight cloud storage method and device based on identity anonymity
CN116453654A (en) * 2023-06-16 2023-07-18 北京四海汇智科技有限公司 Digital nutrition management method and system for endocrine patients
CN116453654B (en) * 2023-06-16 2023-09-22 北京四海汇智科技有限公司 Digital nutrition management method and system for endocrine patients
CN117436111A (en) * 2023-12-20 2024-01-23 国网浙江省电力有限公司金华供电公司 Block chain-based method and system for managing all-data encryption protection carbon asset
CN117436111B (en) * 2023-12-20 2024-04-12 国网浙江省电力有限公司金华供电公司 Block chain-based method and system for managing all-data encryption protection carbon asset

Similar Documents

Publication Publication Date Title
CN112347521A (en) Medical data management method and system based on medical block chain
KR102627000B1 (en) Script-based blockchain interaction
CN108111314B (en) Method and equipment for generating and verifying digital certificate
CN109862041A (en) A kind of digital identification authentication method, unit, system and storage medium
CN109257334B (en) Block chain-based data uplink system, method and storage medium
CN109951489A (en) A kind of digital identification authentication method, unit, system and storage medium
JP2020511059A (en) Information authentication method and system
US20190141048A1 (en) Blockchain identification system
CN106101113B (en) A kind of cloud computing data security annotation management method and system
CN110782251B (en) Method for automatically deploying blockchain network based on intelligent contracts
CN111163182A (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN106603561B (en) Block level encryption method and more granularity deduplication methods in a kind of cloud storage
CN108009445B (en) Semi-centralized trusted data management system
KR20180089670A (en) Method for generating and verifying an digital signature or message authentication code based on a block chain that does not require key management
CN112347508A (en) Block chain data sharing encryption and decryption method and system
CN110286849B (en) Data processing method and device of data storage system
CN108880820B (en) Code management method and device
JP2019028805A5 (en)
CN115270193B (en) Data file secure sharing method and device based on block chain and collaborative synchronization
CN111859431A (en) Electronic file signature method and device, electronic equipment and storage medium
CN113902384A (en) Tracing method and system based on RFID and intelligent contract
CN115150090A (en) CA certificate management method based on block chain and related product
CN116777397A (en) Electronic bill management method, device, terminal and storage medium based on block chain
CN114547701A (en) Block chain-based tamper-proof identification chip information trusted storage system
CN112069529B (en) Block chain-based volume management method and device, computer and storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210209