CN109194702B - Medical data recording method, system, computer device and storage medium - Google Patents

Medical data recording method, system, computer device and storage medium Download PDF

Info

Publication number
CN109194702B
CN109194702B CN201810561627.2A CN201810561627A CN109194702B CN 109194702 B CN109194702 B CN 109194702B CN 201810561627 A CN201810561627 A CN 201810561627A CN 109194702 B CN109194702 B CN 109194702B
Authority
CN
China
Prior art keywords
block
nodes
node
network
medical data
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
Application number
CN201810561627.2A
Other languages
Chinese (zh)
Other versions
CN109194702A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810561627.2A priority Critical patent/CN109194702B/en
Priority to PCT/CN2018/103934 priority patent/WO2019232946A1/en
Publication of CN109194702A publication Critical patent/CN109194702A/en
Application granted granted Critical
Publication of CN109194702B publication Critical patent/CN109194702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The present invention relates to the field of data processing technologies, and in particular, to a medical data recording method, system, computer device, and storage medium. The bone medical data recording method includes: the blockchain system establishes a P2P network at the network layer, setting any computer in the medical institution as a node in the P2P network. And the block chain system packages a consensus mechanism at a consensus layer, screens out a preset number of nodes through the consensus mechanism, and the screened nodes obtain alternate accounting rights according to a preset time schedule. After the nodes obtain the alternate accounting rights, new data blocks are established, medical data information is recorded in the new data blocks, and the new data blocks are linked to the previous data blocks through the chain structure of the block chain system to form a new block chain. The invention realizes medical digitization, transparence and convenience by using the distributed account book technology and decentralization of the block chain technology, and better serves individuals and medical related institutions.

Description

Medical data recording method, system, computer device and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a medical data recording method, system, computer device, and storage medium.
Background
Body and medical data are very important private information for individuals in modern society, such as unique "body code" like fingerprint or iris. Therefore, it is very important to strictly keep secret information such as medical records, identity characteristics, etc. of individuals, but traditional centralized databases, even file cabinets, etc. may cause personal health data to be leaked to the network due to network misoperation, hacking, etc., so that the security of medical information of many people is threatened. Meanwhile, the intelligent medical equipment can be used for digital medical record, and cannot provide latest and reliable patient information for hospitals and doctors in time in emergency.
Therefore, the traditional digital medical data has the problems that after the medical data is leaked, the information is threatened safely, and doctors or hospitals cannot obtain the latest and most reliable information of patients.
Disclosure of Invention
In view of the above, there is a need to provide a medical data recording method, system, computer device and storage medium for solving the problems of information security and information acquisition timeliness existing in the conventional digital medical data.
A medical data recording method comprising the steps of:
the blockchain system establishes a P2P network at a network layer, and any computer in a medical institution applying for recording medical data information is set as a node in the P2P network;
the block chain system packages a consensus mechanism on a consensus layer, a preset number of nodes are screened out through the consensus mechanism, the screened nodes obtain alternate accounting rights according to a preset time schedule, and the accounting is a process of recording medical data information;
and after the node obtains the alternate accounting right, receiving the medical data information sent by the consensus mechanism, establishing a new data block, recording the medical data information into the new data block, and linking the new data block to a previous data block through a chain structure of the block chain system to form a new block chain.
In one embodiment, each node in the P2P network interacts with each other through a flat topology.
In one embodiment, the common identification mechanism adopts a DPoS common identification mechanism, and the DPoS common identification mechanism is used for selecting a preset number of nodes;
the nodes in the P2P network register on the blockchain system and accept the votes of other nodes, the consensus mechanism records the votes of the nodes after receiving the votes of all the nodes, and the nodes with the highest votes and the preset number obtain the alternate accounting right;
the screened nodes obtain alternate billing rights according to the preset timetable, and the consensus mechanism sends the medical data information to the screened nodes in turn according to the preset timetable.
In one embodiment, after the nodes obtain the alternate accounting right, the medical data information is recorded into the new data block by adopting the following steps, and a new block chain is formed:
after the node obtains the medical data information, establishing the new data block, wherein the new data block comprises a block head and a block body, the block head records a Merkle root of a previous block, a Merkle root of a current block and a timestamp, the block body records the medical data information, and the timestamp is the time when the new data block is established;
the node calculates the obtained medical data information through a hash function of a Merkle root to generate a unique Merkle root, and records the unique Merkle root in the Merkle root of the current block of the block head;
the node encrypts the medical data information through an asymmetric encryption algorithm and records the medical data information into the block body;
the node links the current block to the previous block through a chain structure, and records the Merkle root of the previous block, so as to form a new block chain.
In one embodiment, the node links the new data block to a previous data block, forming a new block chain, broadcasting, by the node generating the data chunk, a verification message to other nodes in the P2P network, the other nodes in the P2P network data verifying the new data chunk, and notifying the consensus mechanism of the verification result, wherein when all the verification results received by the consensus mechanism are valid, all nodes in the P2P network are considered to recognize that the new data chunk is linked in the chunk chain, and when all verification results received by the consensus mechanism are invalid, the new data block is considered to be invalid, the new data block is removed from the block chain, and the medical data information corresponding to the new data block is sent to the next node for acquiring alternate accounting rights for accounting.
In one embodiment, the node acquiring the alternate accounting right broadcasts the verification message to the adjacent nodes one by one when broadcasting the verification message to other nodes in the P2P network, wherein the verification message is the data information of the block header of the new data block;
after receiving the verification message transmitted by the adjacent node, any node verifies the validity of the data structure and the grammar specification of the new data block, continuously broadcasts the verification message to the adjacent node when the verification is valid, and does not perform the operation of forwarding the verification message when the verification message is invalid;
the nodes broadcasted in the P2P network refer to a preset number of nodes screened by the consensus mechanism, and unscreened nodes are not authorized to verify the new data block, so as to reduce the time and labor cost required for block creation and validation.
A medical data recording system comprising the following units:
establishing a P2P network unit, wherein the P2P network unit is used for establishing a P2P network in a network layer by a blockchain system, and any computer in a medical institution applying for recording medical data information is set as a node in the P2P network;
the screening node unit is used for encapsulating a consensus mechanism on a consensus layer by a block chain system, screening nodes with a preset number through the consensus mechanism, and acquiring alternate accounting rights of the screened nodes according to a preset time schedule, wherein the accounting is a process of recording medical data information;
and the node accounting unit is used for receiving the medical data information sent by the consensus mechanism after the node obtains the alternate accounting right, establishing a new data block, recording the medical data information into the new data block, and linking the new data block to a previous data block through a chain structure of the block chain system to form a new block chain.
In one embodiment, the method further comprises the verification broadcasting unit: and after the node links the new data block to a previous data block to form a new block chain, the node generating the data block broadcasts a verification message to other nodes in the P2P network, the other nodes in the P2P network perform data verification on the new data block and notify the consensus mechanism of the verification result, when all the verification results received by the consensus mechanism are valid, all the nodes in the P2P network consider that the new data block is linked in the block chain, and when all the verification results received by the consensus mechanism are invalid, the new data block is considered invalid, the new data block is removed from the block chain, and the medical data information corresponding to the new data block is sent to a next node obtaining a rotation right for accounting.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the medical data recording method described above.
A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the medical data recording method described above.
The medical data recording method, the medical data recording device, the computer equipment and the storage medium comprise a blockchain system, wherein a P2P network is established in a network layer, and any computer applying for recording medical data information in a medical institution is set as a node in the P2P network; the block chain system packages a consensus mechanism on a consensus layer, screens out a preset number of nodes through the consensus mechanism, and the screened nodes obtain alternate accounting rights according to a preset time schedule and account for the process of recording medical data information; after the nodes obtain the alternate accounting right, the nodes receive the medical data information sent by the consensus mechanism, establish a new data block, record the medical data information into the new data block, and link the new data block to the previous data block through the chain structure of the block chain system to form a new block chain. The technical scheme utilizes the distributed account book technology of the block chain technology, achieves centralization, can dynamically adjust medical data information by each computer in the network, realizes medical digitization, transparence and convenience, and better serves individuals and medical related institutions.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a flow chart of a medical data recording method in one embodiment of the invention;
FIG. 2 is a flowchart of the steps of screening nodes according to the present invention;
FIG. 3 is a flowchart of the node accounting steps of the present invention;
FIG. 4 is a block diagram of a data block according to the present invention;
FIG. 5 is a flow chart of the data broadcast verification step of the present invention;
FIG. 6 is a block diagram of a medical data recording system in accordance with one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Fig. 1 is a flowchart of a medical data recording method according to an embodiment of the present invention, and as shown in fig. 1, a medical data recording method includes the steps of:
step S1, establishing a P2P network: the blockchain system establishes a P2P network at the network layer, and any computer in the medical institution applying for recording medical data information is set as a node in the P2P network.
The blockchain system is a system based on a blockchain technology, also called a distributed ledger technology, and is an internet database technology. The method is characterized by decentralization, openness and transparency, and each person can participate in maintaining database records. The block chain system mainly comprises a network layer, a consensus layer and a data layer. The blockchain system is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes in the blockchain system. The block chain for storing data is a chain data structure formed by combining data blocks in a sequential connection mode according to time sequence, and is a distributed account book which is guaranteed in a cryptographic mode and cannot be tampered and forged. Therefore, the distributed recording and the distributed storage of the data information can be realized by adopting the block chain technology in the step, the distributed recording is that the data can be collectively recorded by any computer in the medical institution as a node instead of being recorded by a centralized institution, and the distributed storage is that the data can be stored in all nodes participating in the recording instead of being centrally stored in the nodes of the centralized institution.
In the step, a networking mode of a P2P network is adopted to realize decentralized network layer of the blockchain system, any computer which wants to apply for recording medical data information in a plurality of medical institutions is used as a node to form the P2P network, and each node is interacted through a flat topological structure. In this step, computers in the medical institution that have the ability to build the server and participate in accounting are all nodes. By the networking mode, the nodes are all in the same position, no centralized hierarchical structure exists, and the nodes can participate in the processes of verifying information and transmitting information equally.
Step S2, screening nodes: the block chain system packages a consensus mechanism on a consensus layer, a preset number of nodes are screened out through the consensus mechanism, and the screened-out nodes obtain alternate accounting rights according to a preset time schedule, and account is carried out in the process of recording medical data information.
The consensus mechanism is the core technology of the blockchain, and the consensus mechanism determines which node in the P2P network to perform accounting, and the accounting determination mode affects the security and reliability of the whole blockchain system. The consensus mechanism in the step screens out the medical institutions with the preset number of the first 101, and the medical data information to be recorded can be obtained by edge calculation. The top 101 medical institutions screened receive alternate billing rights according to a schedule such as 10 seconds to 30 seconds.
Step S3, node accounting: after the nodes obtain the alternate accounting right, the nodes receive the medical data information sent by the consensus mechanism, establish a new data block, record the medical data information into the new data block, and link the new data block to the previous data block through the chain structure of the block chain system to form a new block chain.
The data layer of the block chain system is packaged with the chain structure of the bottom data block, the related asymmetric public and private key data encryption algorithm, the time stamp and the like, which are the data structure of the bottom layer in the whole block chain system. After acquiring the alternate accounting right, a certain node receives medical data information including hospitalization records, prescriptions, pictures and the like, establishes a new data block, and stores the new data block into a chain structure to serve as data layer information of a block chain system.
In this embodiment, a blockchain system is established based on a P2P network, a network layer of the blockchain system is decentralized, a data layer of the blockchain system stores medical data information, and a consensus layer of the blockchain system verifies data consensus, so that the medical data information is dynamically adjusted, medical digitization, transparency and convenience are realized, and individuals and medical related institutions are better served.
In one embodiment, each node in the P2P network interacts with each other through a flat topology.
The P2P network is a Peer-to-Peer computer network, a distributed application architecture that distributes tasks and workloads among peers (peers), and the participants of the network, i.e., nodes, share a portion of their own hardware resources, including processing power, storage power, network connectivity, printers, etc., which provide services and content over the network and are directly accessible to other peers without going through intermediate entities. The participants in this P2P network are both providers and acquirers of resources, services and content. The flat topology structure is a secondary network structure that nodes provided by the traditional three-layer network structure are directly connected to a service provider, and completely meets the interaction requirement of the P2P network.
In the embodiment of the invention, the computers of medical institutions are in the peer-to-peer status in the P2P network environment, each computer has the same function without master-slave division, one computer can be used as a server to set shared resources for other computers in the network and can also be used as a workstation, and the whole P2P network has no special workstation, thereby realizing the purpose of decentralization.
In one embodiment, as shown in fig. 2, step S2, the screening node includes the following steps:
step S201, a DPoS consensus mechanism is adopted: the common-identification mechanism adopts a DPoS common-identification mechanism which is used for selecting nodes with preset number.
The DPoS consensus mechanism (share proof of authority mechanism) has the principle that each person holding a bit share votes, thereby generating a 101-bit representation, i.e. 101 nodes, which are exactly equal in their rights to each other. When the DPoS consensus mechanism works specifically, a small group of nodes are selected irregularly through different strategies, and the selected small group of nodes are used for creating, verifying, signing and monitoring a new block, so that time and computational cost consumed by block creation and confirmation are greatly reduced. In the step, computers of 101 medical institutions are screened out as nodes with preset number by adopting a DPoS consensus mechanism.
Step S202, voting screening nodes: the nodes in the P2P network register on the blockchain system and accept the votes of other nodes, the consensus mechanism records the votes of the nodes after receiving the votes of all the nodes, and the node with the highest votes and the preset number obtains the alternate accounting right.
When a node is registered, namely a public key is registered on the blockchain system, then the consensus mechanism of the blockchain system assigns the registered node with a 32-bit identifier, and the identifier serves as a unique code of the node. After the registration is completed, the node can vote for other nodes and can also receive the votes of other nodes. And recording the number of votes of each node through a consensus mechanism, arranging the number of votes from high to low, and arranging the number of votes in the first 101 nodes to obtain the alternate accounting right.
Step S203, accounting is carried out in turn: the screened nodes obtain alternate billing rights according to a preset time schedule, and a consensus mechanism sends medical data information to the screened nodes in turn according to the preset time schedule.
The preset schedule may be to sequentially transmit medical data information to 101 nodes in a time period of 10 seconds, 20 seconds, or 30 seconds. And when the time period of the new data block exceeds 10 seconds, 20 seconds or 30 seconds from the establishment to the whole network broadcasting, the node for acquiring the alternate accounting right is considered to miss the right for recording the new data block, and the common identification mechanism sends the medical data information to the next node for acquiring the alternate accounting right to replace the completion of accounting.
In the embodiment, the nodes in the P2P network are screened, distributed and supervised by the DPoS consensus mechanism, so that the time and the labor cost required by block creation and confirmation can be greatly reduced.
In one embodiment, as shown in fig. 3, the node accounting step S3 includes the following steps:
step S301, establishing a new data block: after the nodes acquire the medical data information, a new data block is established, the new data block comprises a block head and a block body, the block head records the Merkle root of the previous block, the Merkle root of the current block and the timestamp, the block body records the medical data information, and the timestamp is the time when the new data block is established.
As shown in fig. 4, each data chunk includes a chunk header and a chunk body, where the chunk header includes a Merkle root of a previous chunk, a Merkle root of a current chunk, a timestamp, a hash value of the Merkle root, and medical data information recorded in the chunk body.
Step S302, recording the Merkle root of the current block: and the node calculates the obtained medical data information through a hash function of the Merkle root to generate a unique Merkle root which is recorded in the Merkle root of the current block of the block head.
The Merkle tree is an important component of the block chain system, and the function of the Merkle tree is to organize the medical data information which is already operated as the hash value according to a binary tree structure. The generation process of the Merkle tree is as follows: and (4) performing hash function calculation on medical data information groups, putting back a new hash value, taking out 2 data again for operation, and recursing until a unique Merkle root is left. The method has the advantages of the Merkle tree, namely good expansibility, and can generate the Merkle tree no matter what the medical data information is. And the time complexity of the searching algorithm is very low, and the Merkle root is easy to be searched from the bottom layer source tracing to determine whether the bookkeeping exists or is legal, so that the resource occupation during the operation is greatly reduced. In the step, by applying a generation rule of the Merkle tree, a unique Merkle root is calculated and generated through a hash function and recorded in the Merkle root of the current block of the block head, and the unique Merkle root is used as the unique identifier of the current block.
Step S303, recording area block: the nodes encrypt the medical data information through an asymmetric encryption algorithm and record the medical data information into the zone block.
The asymmetric encryption algorithm in this step may employ the following algorithm:
(1) selecting two different large prime numbers p and q;
(2) calculating the product n ═ pq and Φ (n) ═ p-1 (q-1) of large prime numbers;
(3) selecting a random integer e greater than 1 and less than Φ (n) such that the greatest common divisor gcd (e, Φ (n)) > 1;
(4) calculating d such that d × e becomes 1mod Φ (n) (i.e., d × e mod Φ (n) becomes 1);
(5) for each key k (n, p, q, d, e), an encryption transformation is defined as ek (x) xe mod n, and a decryption transformation is defined as dk (x) yd mod n;
(6) p, q is destroyed, and { e, n } is used as a public key and { d, n } is used as a private key, wherein the public key is used for encryption and the private key is used for decryption.
In the step, the nodes adopt public keys of { e, n }, the medical data information is encrypted and then recorded into the block, and the safety and reliability of the data are guaranteed.
Step S304, forming a new blockchain: the node for obtaining the accounting right links the current block to the previous block through the chain structure, and records the Merkle root of the previous block, so as to form a new block chain.
In this step, the current block is linked to the existing block chain, the medical data information is permanently stored, and unless more than 51% of nodes in the block chain system can be controlled simultaneously, the modification of the database on a single node is invalid, so that the stability and reliability of the medical data information in the whole block chain are extremely high.
In this embodiment, the Merkle root of the current block is generated by calculating the hash function of the medical data information, the asymmetric encryption algorithm of the medical data information is recorded into the block body to form a new data block, and the new data block is linked into the block chain, so that the purpose that each node can perform accounting is achieved, the right obtained by each node is the same, a decentralized accounting mode is adopted, and the stability and the safety of the medical data information on the block chain are ensured.
In one embodiment, as shown in fig. 1, after the node links the new data block to the previous data block to form a new blockchain, the method further includes step S4, where the data broadcast verification:
and broadcasting a verification message to other nodes in the P2P network by the node generating the data block, performing data verification on the new data block by the other nodes in the P2P network, and informing a consensus mechanism of the verification result, wherein when all verification results received by the consensus mechanism are valid, all nodes in the P2P network consider that the new data block is authorized to be linked in a block chain, and when all verification results received by the consensus mechanism are invalid, the new data block is considered invalid and removed from the block chain, and medical data information corresponding to the new data block is sent to the next node obtaining alternate accounting right for accounting.
The verification message in this step is a message of a generated new data block, and after receiving the message, other nodes verify the data of the new data block through a Merkle root, where a specific verification process is as shown in fig. 5, and the steps are as follows:
step S401, broadcasting one by one: the node that obtains the alternate accounting right broadcasts the verification message, which is the data information of the block header of the new data block, to the adjacent nodes one by one when broadcasting the verification message to other nodes in the P2P network.
Because the nodes adopt the networking mode of the P2P network, the verification messages can be propagated among the nodes in a mode of broadcasting to the adjacent nodes one by one based on the P2P network.
Step S402, verifying the validity by the node: and after receiving the verification message transmitted by the adjacent node, any node verifies the validity of the data structure and the grammar specification of the new data block, continuously broadcasts the verification message to the adjacent node when the verification is valid, and does not perform the operation of forwarding the verification message when the verification message is invalid.
In this step, when the node verifies the new data block, the node does not need to store all block chain data, but only needs to store the block head of the Merkle root including the current block in the new data block to be verified, and finds the Merkle root of the new data block through bottom tracing to verify whether the data exists or is valid. In the specific verification, whether the data structure and the syntax specification of the Merkle root of the current block conform to the unique Merkle root of one Merkle tree is determined.
In this step, the nodes broadcasted in the P2P network refer to a preset number of nodes screened by the consensus mechanism, that is, 101 screened nodes that obtain alternate accounting rights, and the unscreened nodes are not authorized to verify a new data block, so as to reduce the time and labor cost required for block creation and confirmation.
In this embodiment, by adding the data broadcast verification step, each newly generated data block is linked to the block chain after being approved by other nodes in the P2P network, so that all nodes have fair accounting and supervision rights, and the security and reliability of all data blocks in the block chain are further ensured.
In one embodiment, a medical data recording system is proposed, as shown in fig. 6, comprising the following units:
establishing a P2P network unit, wherein the P2P network unit is used for establishing a P2P network in a network layer by a blockchain system, and any computer in a medical institution applying for recording medical data information is set as a node in the P2P network;
the screening node unit is used for encapsulating a consensus mechanism on a consensus layer by a block chain system, screening out nodes with a preset number through the consensus mechanism, and acquiring alternate accounting rights according to a preset time schedule by the screened nodes, wherein the accounting is a process of recording medical data information;
and the node accounting unit is used for receiving the medical data information sent by the consensus mechanism after the node obtains the alternate accounting right, establishing a new data block, recording the medical data information into the new data block, and linking the new data block to the previous data block through the chain structure of the block chain system to form a new block chain.
In one embodiment, further comprising the verification broadcasting unit: and the node is used for linking the new data block to the previous data block to form a new block chain, the node generating the data block broadcasts a verification message to other nodes in the P2P network, the other nodes in the P2P network perform data verification on the new data block and inform a consensus mechanism of the verification results, when all the verification results received by the consensus mechanism are valid, all the nodes in the P2P network consider that the new data block is linked in the block chain, and when all the verification results received by the consensus mechanism are invalid, the new data block is considered invalid and removed from the block chain, and the medical data information corresponding to the new data block is sent to the next node which obtains the alternate accounting right for accounting.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to perform the following steps when executing the computer-readable instructions: the blockchain system establishes a P2P network at the network layer, and any computer in the medical institution applying for recording medical data information is set as a node in the P2P network. The block chain system packages a consensus mechanism on a consensus layer, a preset number of nodes are screened out through the consensus mechanism, and the screened-out nodes obtain alternate accounting rights according to a preset time schedule, and account is carried out in the process of recording medical data information. After the nodes obtain the alternate accounting right, the nodes receive the medical data information sent by the consensus mechanism, establish a new data block, record the medical data information into the new data block, and link the new data block to the previous data block through the chain structure of the block chain system to form a new block chain.
In one embodiment, a storage medium is provided that stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: the blockchain system establishes a P2P network at the network layer, and any computer in the medical institution applying for recording medical data information is set as a node in the P2P network. The block chain system packages a consensus mechanism on a consensus layer, a preset number of nodes are screened out through the consensus mechanism, and the screened-out nodes obtain alternate accounting rights according to a preset time schedule, and account is carried out in the process of recording medical data information. After the nodes obtain the alternate accounting right, the nodes receive the medical data information sent by the consensus mechanism, establish a new data block, record the medical data information into the new data block, and link the new data block to the previous data block through the chain structure of the block chain system to form a new block chain.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A medical data recording method, comprising the steps of:
the blockchain system establishes a P2P network at a network layer, and any computer in a medical institution applying for recording medical data information is set as a node in the P2P network;
the block chain system packages a consensus mechanism on a consensus layer, a preset number of nodes are screened out through the consensus mechanism, the screened nodes obtain alternate accounting rights according to a preset time schedule, and the accounting is a process of recording medical data information;
after the nodes obtain the alternate accounting right, the nodes receive the medical data information sent by the consensus mechanism and establish a new data block, wherein the new data block comprises a block head and a block body;
the block head records a Merkle root of a previous block, a Merkle root of a current block and a timestamp, the block body records the medical data information, and the timestamp is the time when the new data block is established;
the node calculates the obtained medical data information through a hash function of a Merkle root to generate a unique Merkle root, and records the unique Merkle root in the Merkle root of the current block of the block head;
the node encrypts the medical data information through an asymmetric encryption algorithm and records the medical data information into the block body;
the node links the current block to the previous block through the chain structure of the block chain system to form a new block chain, and records the Merkle root of the previous block.
2. The medical data recording method according to claim 1, wherein each node in the P2P network interacts with each other through a flat topology.
3. The medical data recording method according to claim 1, wherein the consensus mechanism employs a DPoS consensus mechanism, the DPoS consensus mechanism being configured to select a preset number of nodes;
the nodes in the P2P network register on the blockchain system and accept the votes of other nodes, the consensus mechanism records the votes of the nodes after receiving the votes of all the nodes, and the nodes with the highest votes and the preset number obtain the alternate accounting right;
the screened nodes obtain alternate billing rights according to the preset timetable, and the consensus mechanism sends the medical data information to the screened nodes in turn according to the preset timetable.
4. The medical data recording method according to claim 1, wherein said node links said new data block to a previous data block, forming a new block chain, broadcasting, by the node generating the data chunk, a verification message to other nodes in the P2P network, the other nodes in the P2P network data verifying the new data chunk, and notifying the consensus mechanism of the verification result, wherein when all the verification results received by the consensus mechanism are valid, all nodes in the P2P network are considered to recognize that the new data chunk is linked in the chunk chain, and when all verification results received by the consensus mechanism are invalid, the new data block is considered to be invalid, the new data block is removed from the block chain, and the medical data information corresponding to the new data block is sent to the next node for acquiring alternate accounting rights for accounting.
5. The medical data recording method according to claim 4, wherein the node acquiring alternate accounting rights broadcasts the verification message to the adjacent nodes one by one when broadcasting the verification message to other nodes in the P2P network, wherein the verification message is the data information of the block header of the new data block;
after receiving the verification message transmitted by the adjacent node, any node verifies the validity of the data structure and the grammar specification of the new data block, continuously broadcasts the verification message to the adjacent node when the verification is valid, and does not perform the operation of forwarding the verification message when the verification message is invalid;
the nodes broadcasted in the P2P network refer to a preset number of nodes screened by the consensus mechanism, and unscreened nodes are not authorized to verify the new data block, so as to reduce the time and labor cost required for block creation and validation.
6. A medical data recording system, characterized by comprising the following units:
establishing a P2P network unit, establishing a P2P network at the network layer of the blockchain system, and setting any computer in a medical institution applying for recording medical data information as a node in the P2P network;
the screening node unit is used for encapsulating a consensus mechanism on a consensus layer by a block chain system, screening nodes with a preset number through the consensus mechanism, and acquiring alternate accounting rights of the screened nodes according to a preset time schedule, wherein the accounting is a process of recording medical data information;
the node accounting unit is used for receiving the medical data information sent by the consensus mechanism and establishing a new data block after the node obtains the alternate accounting right, wherein the new data block comprises a block head and a block body; the block head records a Merkle root of a previous block, a Merkle root of a current block and a timestamp, the block body records the medical data information, and the timestamp is the time when the new data block is established; the node calculates the obtained medical data information through a hash function of a Merkle root to generate a unique Merkle root, and records the unique Merkle root in the Merkle root of the current block of the block head; the node encrypts the medical data information through an asymmetric encryption algorithm and records the medical data information into the block body; the node links the current block to the previous block through the chain structure of the block chain system to form a new block chain, and records the Merkle root of the previous block.
7. The medical data recording system according to claim 6, further comprising a verification broadcasting unit: and after the node links the new data block to a previous data block to form a new block chain, the node generating the data block broadcasts a verification message to other nodes in the P2P network, the other nodes in the P2P network perform data verification on the new data block and notify the consensus mechanism of the verification result, when all the verification results received by the consensus mechanism are valid, all the nodes in the P2P network consider that the new data block is linked in the block chain, and when all the verification results received by the consensus mechanism are invalid, the new data block is considered invalid, the new data block is removed from the block chain, and the medical data information corresponding to the new data block is sent to the next node obtaining the rotation right for billing.
8. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to carry out the steps of the medical data recording method according to any one of claims 1 to 5.
9. A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the medical data recording method of any one of claims 1 to 5.
CN201810561627.2A 2018-06-04 2018-06-04 Medical data recording method, system, computer device and storage medium Active CN109194702B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810561627.2A CN109194702B (en) 2018-06-04 2018-06-04 Medical data recording method, system, computer device and storage medium
PCT/CN2018/103934 WO2019232946A1 (en) 2018-06-04 2018-09-04 Method for recording medical data, system, computer apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810561627.2A CN109194702B (en) 2018-06-04 2018-06-04 Medical data recording method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN109194702A CN109194702A (en) 2019-01-11
CN109194702B true CN109194702B (en) 2021-06-29

Family

ID=64948567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810561627.2A Active CN109194702B (en) 2018-06-04 2018-06-04 Medical data recording method, system, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN109194702B (en)
WO (1) WO2019232946A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109841274A (en) * 2019-01-18 2019-06-04 中国人民解放军连勤保障部队第九〇九医院 A kind of blood administration method based on block 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
CN110891050B (en) * 2019-10-24 2021-12-14 中国科学技术大学 Full-chain atomic-level active safe routing method
CN111128322A (en) * 2019-12-06 2020-05-08 北京先通康桥医药科技有限公司 Block chain-based medical data processing method, server and system
CN111241069B (en) * 2020-01-19 2023-10-20 上海墨珩网络科技有限公司 Block chain-based data flattening method and system
CN111625594A (en) * 2020-04-22 2020-09-04 东南大学 Countless health data bank carrier method based on block chain technology
CN111741067B (en) * 2020-05-20 2022-08-12 广州市格利网络技术有限公司 Block chain-based tableware circulation information management method and device and block chain system
CN112258304A (en) * 2020-09-01 2021-01-22 网络通信与安全紫金山实验室 Consensus accounting method, identification tracing method and system, and computer storage medium
CN114139184B (en) * 2021-12-01 2022-05-31 医贝云服(杭州)科技有限公司 Medical data processing method and device based on near-end processing technology
CN116257873A (en) * 2022-09-09 2023-06-13 广州堃盛医疗用品有限公司 Medical data storage method and device based on blockchain, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354994A (en) * 2016-08-22 2017-01-25 布比(北京)网络技术有限公司 Method and system for processing medical data
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN107122477A (en) * 2017-05-02 2017-09-01 成都中远信电子科技有限公司 A kind of block chain storage system
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850536B (en) * 2016-11-30 2020-01-07 北京瑞卓喜投科技发展有限公司 Block chain consensus method and system
CN107424066B (en) * 2017-07-19 2020-11-10 武汉凤链科技有限公司 Method and system for establishing consensus mechanism based on value quantity

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354994A (en) * 2016-08-22 2017-01-25 布比(北京)网络技术有限公司 Method and system for processing medical data
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN107122477A (en) * 2017-05-02 2017-09-01 成都中远信电子科技有限公司 A kind of block chain storage system
CN107341660A (en) * 2017-05-27 2017-11-10 唐盛(北京)物联技术有限公司 A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism

Also Published As

Publication number Publication date
WO2019232946A1 (en) 2019-12-12
CN109194702A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN109194702B (en) Medical data recording method, system, computer device and storage medium
CN108600227B (en) Medical data sharing method and device based on block chain
CN111986755B (en) Data sharing system based on blockchain and attribute-based encryption
US20210089676A1 (en) Methods and systems for secure data exchange
Chatterjee et al. An effective ECC‐based user access control scheme with attribute‐based encryption for wireless sensor networks
Asokan et al. Key agreement in ad hoc networks
CN101569132B (en) Systems and methods for distributing and securing data
CN110046521A (en) Decentralization method for secret protection
CN107579979A (en) The sharing query method of electronic health record based on block chain technology
TW202403575A (en) Computer-implemented method of generating a threshold vault
Wang et al. Distributed security architecture based on blockchain for connected health: Architecture, challenges, and approaches
CN110266482A (en) A kind of asymmetric group key agreement method based on block chain
CN110059503A (en) The retrospective leakage-preventing method of social information
CN110191153A (en) Social communication method based on block chain
Xiang et al. Decentralized authentication and access control protocol for blockchain-based e-health systems
He et al. ROAchain: Securing route origin authorization with blockchain for inter-domain routing
Naresh et al. Blockchain‐based patient centric health care communication system
Khan et al. An anonymous and provably secure biometric-based authentication scheme using chaotic maps for accessing medical drop box data
CN112382376A (en) Medical instrument management tracing system based on block chain
Lin et al. Secure Internet of medical Things (IoMT) based on ECMQV-MAC authentication protocol and EKMC-SCP blockchain networking
Mittal et al. A novel two-level secure access control approach for blockchain platform in healthcare
Saxena et al. A Lightweight and Efficient Scheme for e-Health Care System using Blockchain Technology
De Oliveira et al. Red Alert: break-glass protocol to access encrypted medical records in the cloud
Yuan et al. A PUF-based lightweight broadcast authentication protocol for multi-server systems using blockchain
Farzana et al. Symmetric key-based patient controlled secured electronic health record management protocol

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