CN111599425B - Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics - Google Patents
Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics Download PDFInfo
- Publication number
- CN111599425B CN111599425B CN202010344869.3A CN202010344869A CN111599425B CN 111599425 B CN111599425 B CN 111599425B CN 202010344869 A CN202010344869 A CN 202010344869A CN 111599425 B CN111599425 B CN 111599425B
- Authority
- CN
- China
- Prior art keywords
- node
- data
- medical record
- verification
- algorithm
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000012795 verification Methods 0.000 claims abstract description 56
- 238000012545 processing Methods 0.000 claims abstract description 31
- 238000013475 authorization Methods 0.000 claims abstract description 19
- 238000004422 calculation algorithm Methods 0.000 claims description 61
- 238000007726 management method Methods 0.000 claims description 14
- 238000013524 data verification Methods 0.000 claims description 8
- 230000000737 periodic effect Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 7
- 238000011084 recovery Methods 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000004806 packaging method and process Methods 0.000 claims description 3
- 238000005192 partition Methods 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 5
- 238000013461 design Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 238000007418 data mining Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H10/00—ICT specially adapted for the handling or processing of patient-related medical or healthcare data
- G16H10/60—ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting 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
- G06F21/6227—Protecting 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 where protection concerns the structure of data, e.g. records, types, queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing 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/2107—File encryption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing 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/2151—Time stamp
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Public Health (AREA)
- Databases & Information Systems (AREA)
- Primary Health Care (AREA)
- Medical Informatics (AREA)
- Epidemiology (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention discloses a hierarchical electronic medical record storage method and device based on block chain node oriented dynamic, which can read related data through data consensus processing, data synchronization processing and data propagation processing according to a call request sent by a patient; according to the authorization and the secret key sent by the patient, the read related data are sent to the corresponding department doctor; allowing doctors to write and manage data of corresponding medical records according to the patient authorization; feeding back the management operation of the doctor on the medical record to a data pool; the invention ensures the real-time correctness of data reading and the integrity of the node local database through two verification mechanisms, can ensure that the data in the block chain is not tampered, and can trace and leave tamper evidence even if being tampered; in addition, for setting the secret key, the patient can divide the secret key into secret shares and distribute the secret key to friends of the patient or a third party institution for starting the record when the accident happens.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a hierarchical electronic medical record storage method and device based on block chain oriented node dynamics.
Background
The development of electronic medical records has been in progress for nearly sixty years, and hospitals in China begin to electronize medical records for more than twenty years. Compared with the traditional paper medical record, the electronic medical record has the advantages of full content, medical record standard and specification, medical record management quality, simple and convenient storage, contribution to medical record sharing and the like. The electronic medical record and the HIS system complement each other, so that the medical work efficiency can be improved, the medication safety is improved, and the data mining of the electronic medical record is provided. With the rapid development of big data and machine learning, the current electronic medical records are fused with EMR, LIS, PACS and other systems, so that data sharing among the systems is realized, and the information island is broken.
However, the electronic medical record which is applied at present mainly focuses on working efficiency and management standards, the design of the electronic medical record which is newly designed at present only increases discussion and support of latest hot spots such as data sharing, data mining and the like, is still a centralized storage mechanism, is deployed in a hospital, and is completely mastered by a hospital system administrator and is very easy to tamper. However, current authenticity verification of electronic medical records is very difficult, because current tamper-proof verification of electronic medical records mainly includes: the electronic medical record is claimed to have safe anti-intrusion facilities, strict access control and password technology to prevent tampering. None of these claims is technically sufficient to prove that the electronic medical record has not been tampered with. The current method for proving the authenticity of the electronic medical record has defects.
With the rising of blockchain technology in recent years, many students and enterprises start to shift the security hopes of electronic medical records to the blockchain technology, and the situation that the electronic medical records are possibly tampered and cannot be detected by tamper resistance of the blockchain technology is hoped to be solved. At present, a plurality of electronic medical records and electronic evidence-storing systems based on blockchain design exist, but most of the systems and products adopt a PBFT algorithm, so that the systems and products have more or less problems at present, and the requirements of application scenes of the systems can not be solved or adapted. First, the consensus algorithm aspect: some systems adopt own consensus algorithm or newly proposed consensus algorithm, but certain problems always exist, the safety and the practicability of the algorithm are not guaranteed, and the continuity and the integrity are not guaranteed; secondly, in terms of frame design, some frames are not suitable for direct application in existing medical systems, and it is difficult to implement the application. And some systems use the existing consensus protocol algorithm or framework, consider the design and function of the application layer, but lack the adaptation of the consensus algorithm for the situation that the blockchain node may not be on-line. Still other consensus protocols based on the PBFT algorithm do not take into account the situation of network partitioning, are relatively static, and lack the processing of dynamic joining and leaving for nodes. There are also some studies considering the introduction of tokens in medical systems, converting data of medical records into value, mainly considering sharing and trading of data, but considering the lack of tamper resistance of data.
For this reason, a method/apparatus is designed for the deployment field of blockchain-based distributed electronic medical record storage among hospitals, especially for blockchain application methods in environments where a large number of lightweight medical institutions such as clinics, private hospitals, etc. may have offline or maintenance operations, and the problems existing above can be solved at the same time, which becomes an innovative design concept of the current technicians.
Disclosure of Invention
To overcome the defects in the prior art, the invention aims to: the method and the device for storing the hierarchical electronic medical records based on the block chain oriented node dynamics solve the problems that most of node values are not the same due to network reasons, the nodes are possibly offline and the like in the prior art, the PBFT algorithm cannot achieve consensus, and the relatively static PBFT algorithm is difficult to apply to the scene; in addition, although the blockchain can ensure that the data is not tampered, whether the data is correct data or not when the data is taken out cannot be ensured, when the data of the local blockchain is changed, the modification of the data cannot be perceived in real time, then the tampered data is read when the data is read, and the problems of the modification and the like cannot be found in real time by means of the tamper resistance of the blockchain.
In view of the above problems, the invention provides a hierarchical electronic medical record storage method and device based on block chain oriented node dynamics.
In a first aspect, the present invention provides a hierarchical electronic medical record storage method based on blockchain node-oriented dynamics, where the method specifically includes the steps of:
step one: reading related data through data consensus processing, data synchronization processing and data transmission processing according to a calling request sent by a patient;
step two: according to the authorization and the secret key sent by the patient, the related data read in the first step are sent to the corresponding department doctor;
step three: allowing doctors to write and manage data of corresponding medical records according to the patient authorization in the second step;
step four: feeding back the management operation of the doctor on the medical record in the third step to a data pool;
blockchain layering scheme: setting a large hospital with enough calculation power and higher reliability as a main node, setting a private hospital and a sanitation station node with insufficient calculation power and possibly frequent offline and online as an edge node, wherein the edge node only stores block heads, and the main node stores complete data;
the data consensus processing comprises the following specific steps:
step 1.0: all the main nodes write the received medical records with time stamps and convert the medical records into a state ready for broadcasting;
step 1.1: if the node is the main node, x=the merck tree calculated by the node according to the received medical record information in the time period from t to t+m;
step 1.2: if the node is an edge node, x is set to be empty;
step 1.3: the order node sends a message to all the main nodes, and notifies the main nodes of medical records in the time period from the package t to t+m;
step 1.4: the number of stages is less than f+1, and the step 1.6 is continued;
step 1.5: ending the algorithm;
step 1.6: the node broadcasts its own input value (x), and changes to a state ready to receive a proposal;
step 1.7: if the node receives the value (y) broadcast by other nodes for at least n-f times, the node broadcasts a propose (y);
step 1.8: if the node receives a propose (z) at least f times, the node modifies x to z;
step 1.9: the RSA random number generator generates a master node vi of an ith stage, and the master node of each stage is not repeated;
step 1.10: the master node vi broadcasts its value (w);
step 1.11: if the number of times that the node receives the propose (x) is strictly less than n-f, the node modifies x to w;
step 1.12: and adding 1 to the number of stages, and returning to the step 1.4..
1. Preferably, the data synchronization process comprises the following specific steps:
step 2.0: if the node u is disconnected with the network, the algorithm is called, the broadcasting of the medical record block is stopped, the newly added medical record is kept in the local, the system continues to operate in the network partition, and the network is waited for recovery.
Step 2.1: if the node u calls the algorithm in the propagation algorithm or is disconnected with the network at a certain moment, entering step 2;
step 2.2: inquiring the latest state of the block chain through an arbitration system;
step 2.3: and synchronizing the latest correct node judged by the arbitration algorithm, acquiring data by using the reading server, and restarting to execute the algorithm after the synchronization is completed.
Step 2.4: if the synchronization fails, step 2.2 is entered.
2. Preferably, the data propagation process comprises the following specific steps:
step 3.0: when the consensus is not started, the edge node v uploads the medical record to the host node to which the edge node v belongs,
step 3.1: the master node u stores v medical records and medical records broadcast by other master nodes in a local medical record pool;
step 3.2: every time the data consensus process proceeds to step 1.6, broadcasting its own input value (xi), value (x) in data consensus process step 1.6, where xi denotes x at the time of the ith proceeding to data consensus process step 1.6;
step 3.3: selecting medical records with t2 from t to t+m in the ith consensus to calculate a merck tree;
step 3.4: after i times of consensus are completed, medical records uploaded by hospitals in the range of the buffer area are packed, and whether the node with the input value identical to the system consensus value is verified by the blockchain is requested;
step 3.5: packaging medical records uploaded by hospitals in the range of the buffer area, and requesting the nodes with the same input value as the system consensus value for verifying whether the nodes are confirmed by the blockchain;
step 3.6: the requested node verifies the medical record through the Merker tree path, and returns a verification result to the requesting node, wherein the returned result is value (y), and the value (y) contains the medical record which is not confirmed;
step 3.7: in the stage t to t+m, if the medical record is set with a reserved mark, putting a value (y); if the medical record is not provided with the reserved mark, deleting the medical record; when value (y) is not an empty set, the algorithm ends.
Preferably, the electronic medical record storage method further comprises a verification algorithm capable of confirming the integrity and accuracy of the data, wherein the verification algorithm comprises a real-time verification algorithm and a periodic verification algorithm.
3. Preferably, the real-time verification algorithm comprises the following specific steps:
step 5.1: the data verification module receives a medical record Hash value Hash (M) to be verified;
step 5.2: calculating a node proof (leave) required by the need to prove Hash (M);
step 5.3: inputting Hash (M) and a node proof (reaves) required by the certification into a proof algorithm, searching the proof algorithm in a Merkle tree, and returning a verification result;
step 5.4: and sending the verification result to the node requesting verification.
4. Preferably, the periodic checking algorithm means that local blockchain verification is performed at intervals, and each server starts verification from a first block maintained by the server until the latest block is verified; the method comprises the following specific steps:
step 6.1: p is used as an identifier for recording the current block and initialized to 0;
step 6.2: reading out the block head of the p-th block from the database, and judging whether specific data of the block are stored locally or not;
step 6.3: if the specific data of the block are stored, reading all medical records for verification, and if the specific data are not stored, only verifying the block head;
step 6.4: if the verification is successful, the next block is continuously verified, if the verification is failed, the data of the block P is requested to other backup nodes, the block P is recovered, and after the verification is successful, the next block is continuously verified.
Preferably, the electronic medical record storage method further comprises a key recovery management method, and the method comprises the following specific steps:
step 7.1: after the key is generated, the key is segmented into k shares by adopting Shamir threshold secret sharing;
step 7.2: when the password is retrieved, the key can be recovered by providing keys by n shareholders, wherein n is less than or equal to k;
step 7.3: after authorization, the key remains active in a visit session, and after the session is completed, the key is destroyed. Hierarchical electronic medical record storage device based on block chain oriented node developments, its characterized in that: the method specifically comprises the following steps:
the first unit is used for reading related data through data consensus processing, data synchronization processing and data propagation processing according to a calling request sent by a patient;
the second unit is used for transmitting the related data read in the first step to the corresponding department doctor according to the authorization and the secret key transmitted by the patient;
a third unit for allowing the doctor to perform data writing management on the corresponding medical record according to the patient authorization in the second step;
and a fourth unit for feeding back the management operation of the doctor on the medical record in the third step to the data pool.
The invention provides a hierarchical electronic medical record storage method and device based on block chain oriented node dynamics, which can read related data through data consensus processing, data synchronization processing and data propagation processing according to a call request sent by a patient; according to the authorization and the secret key sent by the patient, the read related data are sent to the corresponding department doctor; allowing doctors to write and manage data of corresponding medical records according to the patient authorization; and feeding back the management operation of the doctor on the medical record to the data pool. Finally, the problem that most of node values are the same due to network reasons, the fact that the nodes are possibly offline and the like can be solved; the PBFT algorithm cannot reach consensus, and the relatively static PBFT algorithm is difficult to apply to the scene; in addition, although the blockchain can ensure that the data is not tampered, whether the data is correct data when the data is fetched cannot be ensured; when the data of the local blockchain is changed, the modification of the data cannot be perceived in real time, then the tampered data is read during reading, and the problems of the change and the like cannot be found in real time by means of the tamper resistance of the blockchain.
The invention adopts a layered architecture, divides the hospital into main nodes and edge nodes, wherein the main nodes store specific data, and the edge nodes store block heads; by the method, the threshold of participating in the system is reduced, and the system stability and the reliability of data verification are improved.
The invention designs a new consensus algorithm, a synchronization algorithm and a propagation algorithm, reduces the communication cost while ensuring the consistency, and simultaneously realizes the validity which can not be realized by common algorithms such as PBFT, namely, the consensus value can be realized by assuming that the initial values of all nodes are different.
The invention designs two verification mechanisms, namely real-time verification and periodic verification, aiming at the problem that the blockchain can ensure that the whole data cannot be tampered but can not ensure that the read data is correct, wherein the former is used for verifying the integrity of the read data, and the latter is used for detecting the integrity of a database.
The invention designs a secret key scheme based on threshold secret sharing, and a patient can divide a secret key into secret shares and distribute the secret shares to friends and relatives or third party institutions; so that in some unexpected emergency situations a new key escrow or recovery scheme may be given.
Drawings
FIG. 1 is a flow chart of a hierarchical electronic medical record storage method based on block chain oriented node dynamics.
FIG. 2 is a schematic diagram of a system architecture of a hierarchical electronic medical record storage method based on blockchain node-oriented dynamics.
FIG. 3 is a flow chart of a consensus algorithm in a hierarchical electronic medical record storage method based on blockchain node-oriented dynamics.
Detailed Description
The embodiment of the invention provides a hierarchical electronic medical record storage method and device based on block chain oriented node dynamics, which are used for solving the technical problems that a PBFT algorithm is inaccurate, the information accuracy of a block chain cannot be ensured and the like in the prior art, and the technical scheme provided by the invention has the following overall ideas:
in order to better understand the technical solutions described above, the technical solutions of the embodiments of the present specification are described in detail below through the accompanying drawings and the specific embodiments, and it should be understood that the specific features of the embodiments of the present specification and the specific features of the embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and not limit the technical solutions of the present specification, and the technical features of the embodiments of the present specification may be combined without conflict.
Embodiment one:
fig. 1 is a flow chart of a hierarchical electronic medical record storage method based on blockchain node-oriented dynamics in an embodiment of the invention. As shown in fig. 1, the method includes:
step one: reading related data through data consensus processing, data synchronization processing and data transmission processing according to a calling request sent by a patient;
step two: according to the authorization and the secret key sent by the patient, the related data read in the first step are sent to the corresponding department doctor;
step three: allowing doctors to write and manage data of corresponding medical records according to the patient authorization in the second step;
step four: and feeding back the management operation of the doctor on the medical record in the third step to the data pool.
Blockchain layering scheme: large hospitals with sufficient computing power and higher reliability are set as the primary nodes, and private hospitals, sanitary stations nodes with insufficient computing power and possibly often offline and online are set as the edge nodes. The edge node only stores the block header, while the primary node stores the complete data.
Fig. 3 is a flowchart of the data consensus process, and specific steps include:
step 0: all the main nodes write the received medical records with time stamps and convert the medical records into a state ready for broadcasting;
step 1: if the node is the main node, x=the merck tree calculated by the node according to the received medical record information in the time period from t to t+m; if the node is an edge node, x is set to be empty;
step 2: the order node sends a message to all the main nodes, and notifies the main nodes of medical records in the time period from the package t to t+m;
step 3: the number of stages is less than f+1, and the step 4 is continued; otherwise, the algorithm ends;
step 4: the node broadcasts its own input value (x), and changes to a state ready to receive a proposal;
step 5: if the node receives the value (y) broadcast by other nodes for at least n-f times, the node broadcasts a propose (y);
step 6: if the node receives a propose (z) at least f times, the node modifies x to z;
step 7: the RSA random number generator generates a master node vi of an ith stage, and the master node of each stage is not repeated;
step 8: the master node vi broadcasts its value (w);
step 9: if the number of times that the node receives the propose (x) is strictly less than n-f, the node modifies x to w;
step 10: and (3) adding 1 to the number of stages, and returning to the step (3).
The data synchronization processing comprises the following specific steps:
step 0: if the node u calls the algorithm in the propagation algorithm or is disconnected with the network at a certain moment, entering the step 1;
step 1: if the network is disconnected, broadcasting the medical record block is stopped, the newly added medical record is kept locally, the system continues to operate in the network partition, and waits for the network to recover, otherwise, the step 2 is directly carried out;
step 2: inquiring the latest state of the block chain through an arbitration system;
step 3: synchronizing the latest correct node judged by the arbitration algorithm, acquiring data by using a reading server, and if the synchronization fails, entering a step 2;
step 4: after the synchronization is completed, the algorithm is restarted.
The data transmission processing comprises the following specific steps:
step 0: when consensus is not started, the edge node v uploads the medical records to a master node to which the edge node v belongs, and the master node u stores the medical records of v and medical records broadcasted by other master nodes in a local medical record pool;
step 1: broadcasting value (xi) when proceeding to algorithm step 2;
step 2: selecting medical records with t2 from t to t+m from the i times of consensus to calculate a merck tree, and after the i times of consensus is completed;
step 3: packaging medical records uploaded by hospitals in the range of the buffer area, and requesting the nodes with the same input value as the system consensus value for verifying whether the nodes are confirmed by the blockchain;
step 4: the requested node verifies the medical record through the Merker tree path, and returns a verification result to the requesting node, wherein the returned result is value (y), and the value (y) contains the medical record which is not confirmed;
the electronic medical record storage method further comprises a verification algorithm capable of confirming the integrity and accuracy of the data, wherein the verification algorithm comprises a real-time verification algorithm and a periodic verification algorithm.
In the real-time verification algorithm, the data verification module verifies a certain medical record and returns a verification result. The principle of the data verification module is that the characteristics of the Merkle tree are utilized, and whether a certain node is in the tree or not is quickly inquired according to the Merkle tree, so that whether the medical record is correct or not is judged. The Merkle tree can provide a fast data verification method, which is far faster than traversing and finding verification of all data. The specific operation process of data verification is as follows:
step 1: the data verification module receives a medical record Hash value Hash (M) to be verified;
step 2: calculating a node proof (leave) required by the need to prove Hash (M);
step 3: inputting Hash (M) and a node proof (reaves) required by the certification into a proof algorithm, searching the proof algorithm in a Merkle tree, and returning a verification result;
step 4: and sending the verification result to the node requesting verification.
The periodic verification method is that the system performs local block chain verification at intervals, and the integrity of the data maintained by the local server is ensured. Each server starts validating from the first block maintained by itself until the end of validating to the latest block. The specific process of periodic verification is as follows:
step 1: p is used as an identifier for recording the current block and initialized to 0;
step 2: reading out the block head of the p-th block from the database, and judging whether specific data of the block are stored locally or not;
step 3: if the specific data of the block is stored, all medical records are read for verification. Checking only the block header if no specific data is stored;
step 4: if the verification is successful, the next block is continuously verified, if the verification is failed, the data of the block P is requested to other backup nodes, the block P is recovered, and after the verification is successful, the next block is continuously verified.
The electronic medical record storage method further comprises a key recovery management method, after the patient generates the key, the patient adopts Shamir threshold secret sharing to divide the key into m parts and share the m parts to relatives and friends trusted by the patient or a trusted third party mechanism participating in the system, and when the password is recovered, n (n is less than or equal to m) shareholders provide the key to recover the key. After a visit and authorization to the doctor, the key will be acquired by the medical institution, remain active during a visit session, and destroyed after the session is completed. Considering the possibility of the leakage of the key in the server of the medical institution, a method for updating the key can be adopted, and the system reminds the user to update the key at regular intervals. The user may also choose to update the key autonomously, which may avoid the problem of future medical record leakage. The key is uploaded to the key pool after being encrypted by the user password, and because only the MD5 value of the password is stored in the server, even if an attacker acquires the key from the key pool of the server, the key cannot be decrypted, so that information leakage is avoided.
The invention provides a hierarchical electronic medical record storage method and device based on block chain oriented node dynamics, which can read related data through data consensus processing, data synchronization processing and data propagation processing according to a call request sent by a patient; according to the authorization and the secret key sent by the patient, the read related data are sent to the corresponding department doctor; allowing doctors to write and manage data of corresponding medical records according to the patient authorization; and feeding back the management operation of the doctor on the medical record to the data pool. Finally, under the conditions that even if network reasons exist and the nodes are possibly offline and other factors, the accuracy of data reading can be ensured; through two verification mechanisms, the real-time correctness of data reading and the integrity of a node local database are ensured, the data in the block chain can be prevented from being tampered, trace can be circulated even if the data is altered, and tamper evidence is left; in addition, for setting the secret key, the patient can divide the secret key into secret shares and distribute the secret key to friends of the patient or a third party institution for starting the record when the accident happens.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.
Claims (9)
1. The hierarchical electronic medical record storage method based on block chain oriented node dynamics is characterized by comprising the following steps of: the method comprises the following specific steps:
step one: reading related data through data consensus processing, data synchronization processing and data transmission processing according to a calling request sent by a patient;
step two: according to the authorization and the secret key sent by the patient, the related data read in the first step are sent to the corresponding department doctor;
step three: allowing doctors to write and manage data of corresponding medical records according to the patient authorization in the second step;
step four: feeding back the management operation of the doctor on the medical record in the third step to a data pool;
blockchain layering scheme: setting a large hospital with enough calculation power and higher reliability as a main node, setting a private hospital and a sanitation station node with insufficient calculation power and possibly frequent offline and online as an edge node, wherein the edge node only stores block heads, and the main node stores complete data;
the data consensus processing comprises the following specific steps:
step 1.0: all the main nodes write the received medical records with time stamps and convert the medical records into a state ready for broadcasting;
step 1.1: if the node is the main node, x=the merck tree calculated by the node according to the received medical record information in the time period from t to t+m;
step 1.2: if the node is an edge node, x is set to be empty;
step 1.3: the order node sends a message to all the main nodes, and notifies the main nodes of medical records in the time period from the package t to t+m;
step 1.4: the number of stages is less than f+1, and the step 1.6 is continued;
step 1.5: ending the algorithm;
step 1.6: the node broadcasts its own input value (x), and changes to a state ready to receive a proposal;
step 1.7: if the node receives the value (y) broadcast by other nodes for at least n-f times, the node broadcasts a propose (y);
step 1.8: if the node receives a propose (z) at least f times, the node modifies x to z;
step 1.9: the RSA random number generator generates a master node vi of an ith stage, and the master node of each stage is not repeated;
step 1.10: the master node vi broadcasts its value (w);
step 1.11: if the number of times that the node receives the propose (x) is strictly less than n-f, the node modifies x to w;
step 1.12: and adding 1 to the number of stages, and returning to the step 1.4.
2. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 1, wherein the method is characterized by: the data synchronization processing comprises the following specific steps:
step 2.0: if the node u is disconnected with the network, the algorithm is called, the broadcasting of the medical record block is stopped, the newly added medical record is kept in the local, the system continues to operate in the network partition, and the network is waited for recovery;
step 2.1: if the node u calls the algorithm in the propagation algorithm or is disconnected with the network at a certain moment, entering step 2;
step 2.2: inquiring the latest state of the block chain through an arbitration system;
step 2.3: synchronizing the latest correct node judged by the arbitration algorithm, obtaining data by an application reading server, and restarting to execute the algorithm after synchronization is completed;
step 2.4: if the synchronization fails, step 2.2 is entered.
3. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 1, wherein the method is characterized by: the data transmission processing comprises the following specific steps:
step 3.0: when the consensus is not started, the edge node v uploads the medical record to the host node to which the edge node v belongs,
step 3.1: the master node u stores v medical records and medical records broadcast by other master nodes in a local medical record pool;
step 3.2: every time the data consensus process proceeds to step 1.6, broadcasting its own input value (xi), value (x) in data consensus process step 1.6, where xi denotes x at the time of the ith proceeding to data consensus process step 1.6;
step 3.3: selecting medical records with t2 from t to t+m in the ith consensus to calculate a merck tree;
step 3.4: after i times of consensus are completed, medical records uploaded by hospitals in the range of the buffer area are packed, and whether the node with the input value identical to the system consensus value is verified by the blockchain is requested;
step 3.5: packaging medical records uploaded by hospitals in the range of the buffer area, and requesting the nodes with the same input value as the system consensus value for verifying whether the nodes are confirmed by the blockchain;
step 3.6: the requested node verifies the medical record through the Merker tree path, and returns a verification result to the requesting node, wherein the returned result is value (y), and the value (y) contains the medical record which is not confirmed;
step 3.7: in the stage t to t+m, if the medical record is set with a reserved mark, putting a value (y); if the medical record is not provided with the reserved mark, deleting the medical record; when value (y) is not an empty set, the algorithm ends.
4. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 1, wherein the method is characterized by: the electronic medical record storage method further comprises a verification algorithm capable of confirming the integrity and accuracy of the data, wherein the verification algorithm comprises a real-time verification algorithm and a periodic verification algorithm.
5. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 4, wherein the method is characterized by: the real-time verification algorithm comprises the following specific steps:
step 5.1: the data verification module receives a medical record Hash value Hash (M) to be verified;
step 5.2: calculating a node proof (leave) required by the need to prove Hash (M);
step 5.3: inputting Hash (M) and a node proof (reaves) required by the certification into a proof algorithm, searching the proof algorithm in a Merkle tree, and returning a verification result;
step 5.4: and sending the verification result to the node requesting verification.
6. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 4, wherein the method is characterized by: the periodic checking algorithm means that local block chain verification is carried out at intervals, and each server starts verification from a first block maintained by the server until the verification is finished to the latest block; the method comprises the following specific steps:
step 6.1: p is used as an identifier for recording the current block and initialized to 0;
step 6.2: reading out the block head of the p-th block from the database, and judging whether specific data of the block are stored locally or not;
step 6.3: if the specific data of the block are stored, reading all medical records for verification, and if the specific data are not stored, only verifying the block head;
step 6.4: if the verification is successful, the next block is continuously verified, if the verification is failed, the data of the block P is requested to other backup nodes, the block P is recovered, and after the verification is successful, the next block is continuously verified.
7. The hierarchical electronic medical record storage method based on blockchain-oriented node dynamics according to claim 1, wherein the method is characterized by: the electronic medical record storage method also comprises a key recovery management method, and the specific method comprises the following steps:
step 7.1: after the key is generated, the key is fragmented into k shares by adopting Shamir threshold secret sharing,
step 7.2: when the password is retrieved, the key can be recovered by providing keys by n shareholders, wherein n is less than or equal to k;
step 7.3: after authorization, the key remains active in a visit session, and after the session is completed, the key is destroyed.
8. The steps of implementing the method of any one of claims 1-7 based on a hierarchical electronic medical record storage device for blockchain node oriented dynamics, characterized by the specific steps of:
the first unit is used for reading related data through data consensus processing, data synchronization processing and data propagation processing according to a calling request sent by a patient;
the second unit is used for transmitting the related data read in the first step to the corresponding department doctor according to the authorization and the secret key transmitted by the patient;
a third unit for allowing the doctor to perform data writing management on the corresponding medical record according to the patient authorization in the second step;
and a fourth unit for feeding back the management operation of the doctor on the medical record in the third step to the data pool.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010344869.3A CN111599425B (en) | 2020-04-27 | 2020-04-27 | Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010344869.3A CN111599425B (en) | 2020-04-27 | 2020-04-27 | Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111599425A CN111599425A (en) | 2020-08-28 |
CN111599425B true CN111599425B (en) | 2023-12-05 |
Family
ID=72192077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010344869.3A Active CN111599425B (en) | 2020-04-27 | 2020-04-27 | Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111599425B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112037873B (en) * | 2020-08-31 | 2022-09-13 | 合肥工业大学 | Single-point optimization method based on cluster selection and consensus mechanism |
CN113965572B (en) * | 2021-11-02 | 2024-05-14 | 上海佰贝网络工程技术有限公司 | Block distribution method, system, computer equipment and computer readable storage medium of block chain |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3534287A1 (en) * | 2018-02-28 | 2019-09-04 | Siemens Healthcare GmbH | Inserting a further data block into a first ledger |
CN110289060A (en) * | 2019-06-20 | 2019-09-27 | 福州数据技术研究院有限公司 | A kind of personal medical data storage method under the chain based on random Merkle tree |
CN110299195A (en) * | 2019-06-11 | 2019-10-01 | 中国矿业大学 | The electronic health record shared system and application method with secret protection based on alliance's chain |
CN110634544A (en) * | 2019-09-19 | 2019-12-31 | 腾讯科技(深圳)有限公司 | Medical record data processing method and device based on block chain, storage medium and equipment |
CN110851867A (en) * | 2019-11-12 | 2020-02-28 | 北京芯际科技有限公司 | Medical data sharing method based on block chain |
CN110910977A (en) * | 2019-11-12 | 2020-03-24 | 南京工业大学 | Medical data safe storage method integrated with block chain technology |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA3033385A1 (en) * | 2016-08-23 | 2018-03-01 | BBM Health LLC | Blockchain-based mechanisms for secure health information resource exchange |
US11488713B2 (en) * | 2017-08-15 | 2022-11-01 | Computer Technology Associates, Inc. | Disease specific ontology-guided rule engine and machine learning for enhanced critical care decision support |
US20190147137A1 (en) * | 2017-11-14 | 2019-05-16 | Robert Gergely | System, Method, and Apparatus for Universally Accessible Personal Medical Records |
-
2020
- 2020-04-27 CN CN202010344869.3A patent/CN111599425B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3534287A1 (en) * | 2018-02-28 | 2019-09-04 | Siemens Healthcare GmbH | Inserting a further data block into a first ledger |
CN110299195A (en) * | 2019-06-11 | 2019-10-01 | 中国矿业大学 | The electronic health record shared system and application method with secret protection based on alliance's chain |
CN110289060A (en) * | 2019-06-20 | 2019-09-27 | 福州数据技术研究院有限公司 | A kind of personal medical data storage method under the chain based on random Merkle tree |
CN110634544A (en) * | 2019-09-19 | 2019-12-31 | 腾讯科技(深圳)有限公司 | Medical record data processing method and device based on block chain, storage medium and equipment |
CN110851867A (en) * | 2019-11-12 | 2020-02-28 | 北京芯际科技有限公司 | Medical data sharing method based on block chain |
CN110910977A (en) * | 2019-11-12 | 2020-03-24 | 南京工业大学 | Medical data safe storage method integrated with block chain technology |
Non-Patent Citations (5)
Title |
---|
"A Design of Blockchain-Based Architecture for the Security of Electronic Health Record (EHR) Systems";G.Yang等;《2018 IEEE International Conference on Cloud Computing Technology and Science (CloudCom)》;IEEE;20181227;第2018年卷;第261–265页 * |
"Multi-tier Blockchain Framework for IoT-EHRs Systems";Shaimaa Badr等;《Procedia Computer Science》;20181231;第141卷;第159-166页 * |
"基于区块链的电子健康病历系统性能与安全性研究";杨俊;《中国优秀硕士学位论文全文数据库医药卫生科技辑》;20200215;第2020年卷(第02期);第E053-189页 * |
基于区块链网络的医疗记录安全储存访问方案;徐健等;《计算机应用》;20190131;第39卷(第05期);第260-266页 * |
第73-75页."密钥管理技术".《计算机网络安全导论》.东南大学出版社,2007,(第2版),第73-75页. * |
Also Published As
Publication number | Publication date |
---|---|
CN111599425A (en) | 2020-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111681003B (en) | Resource cross-chain transfer method and device, computer equipment and storage medium | |
US11184394B1 (en) | Methods, systems, and devices for encrypted electronic storage and confidential network transfer of private data through a trustless distributed ledger technology system | |
CN112910840B (en) | Medical data storage and sharing method and system based on alliance blockchain | |
EP3580905B1 (en) | Consortium blockchain network with verified blockchain and consensus protocols | |
CN109002725B (en) | Data processing system based on block chain | |
US8411863B2 (en) | Full volume encryption in a clustered environment | |
WO2021135757A1 (en) | Method and apparatus for executing transaction correctness verification | |
TWI729880B (en) | Shared blockchain data storage based on error correction coding in trusted execution environments | |
EP1057095B1 (en) | System for reviewing a document having a log of the reviewer activities | |
WO2021135857A1 (en) | Method and device for updating trusted node information | |
CN111599425B (en) | Hierarchical electronic medical record storage method and device based on block chain oriented node dynamics | |
CN111160913B (en) | Block chain account balance deposit certificate and recovery method and device | |
EP3673640B1 (en) | Processing data elements stored in blockchain networks | |
CN102419809B (en) | Safe, efficient and universal method for proving original value of electronic document | |
CN110635913B (en) | Electronic prescription verification method and device | |
WO2018222202A1 (en) | Digital composition hashing | |
US20180337772A1 (en) | High integrity logs for distributed software services | |
US20220083511A1 (en) | Synchronizing content | |
CN115114305B (en) | Lock management method, device, equipment and storage medium for distributed database | |
US11025412B2 (en) | Synchronizing content | |
US11101995B1 (en) | Secure video content transmission over a computer network | |
CN114329528A (en) | File data management method and system based on block chain | |
CN113764060A (en) | Medical data management system based on double block chains and patient authorized medical record sharing method | |
CN110912892B (en) | Certificate management method and device, electronic equipment and storage medium | |
US12019788B2 (en) | Method and system for registering digital documents |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |