Summary of the invention
In view of the above-mentioned problems, the present invention provides medical data acquisition and management system based on block chain.
The purpose of the present invention is realized using following technical scheme:
Provide medical data acquisition and management system based on block chain, comprising: user account management module, for connecingApplication information transmitted by user is received, generates the account and password of user, and feed back to user;Block chain memory module, is used forMemory block chain, block chain include multiple memory nodes of communication connection;Wireless sensor network module, for acquiring suffererMedical data, and will be in memory node corresponding in medical data storage to block chain;Access authority distribution module is used for basisThe application information of user is user distribution to the access authority of the memory node in block chain;Data management module is used for rootIt, will medical data corresponding with the identification information in block chain according to the identification information for receiving the memory node that user is inputtedIt recalls.
Preferably, the user account management module generates the account of user specifically for receiving the application information of userAnd password, and stored the account of user and password by the way of mapping table, and feed back to user.
Preferably, the data management module, specifically for according to the identification for receiving the memory node that user is inputtedInformation is recalled medical data corresponding with the identification information in block chain by transparent mathematical algorithm.
The invention has the benefit that present system, which has, initiates inquiry, obtains sufferer medical treatment record and consult de-The functions such as quick medical data, the circulation for promoting medical big data is shared, is conducive to the interoperability for promoting medical big data multi-party.
Specific embodiment
The invention will be further described with the following Examples.
Referring to Fig. 1, medical data acquisition and management system based on block chain are present embodiments provided, comprising: user's accountNumber management module 1 generates the account and password of user, and feed back to user for receiving application information transmitted by user;AreaBlock chain memory module 2, is used for memory block chain, and block chain includes multiple memory nodes of communication connection;Wireless sensor networkModule 3, for acquiring the medical data of sufferer, and will be in memory node corresponding in medical data storage to block chain;AccessAuthority distribution module 4 is user distribution to the access right of the memory node in block chain for the application information according to userLimit;Data management module receives the identification information for the memory node that user is inputted for basis, will be with this in block chainThe corresponding medical data of identification information recalls.
Preferably, each memory node further include: the identification information of itself, medical data storage section connected to itThe identification information and cryptographic Hash, timestamp of point.
Preferably, the user account management module 1 generates the account of user specifically for receiving the application information of userNumber and password, and the account of user and password are stored by the way of mapping table, and feed back to user.
Preferably, the data management module, specifically for according to the identification for receiving the memory node that user is inputtedInformation is recalled medical data corresponding with the identification information in block chain by transparent mathematical algorithm.
The system of the above embodiment of the present invention design with initiating to inquire, see a doctor to record and consult to desensitize and cure by acquisition suffererThe functions such as data are treated, the circulation for promoting medical big data is shared, is conducive to the interoperability for promoting medical big data multi-party.
In one embodiment, wireless sensor network module 3 includes single aggregation node, four relay nodes and multipleSensor node, the aggregation node are deployed in the center in the monitoring region of setting, and four relay nodes are set to monitoringDifferent location in region, and four relay nodes are identical as the distance between aggregation node, the multiple sensor node is pressedAccording to the facts border monitoring needs are deployed in the monitoring region;M virtual grid region of region division will be monitored, and makes each relayingNode is in different virtual grid regions;When netinit, in the virtual grid region where relay node in selectionAfter node as cluster head, and a sensor node is chosen as cluster from each virtual grid region not comprising relay nodeCluster is added apart from nearest cluster head in head, each sensor node selection;Sensor node is responsible for acquiring medical data, and by acquisitionMedical data is sent to corresponding cluster head, and the received medical data of cluster head institute of non-relay nodes is eventually sent in one of themAfter node;Received medical data single-hop is sent to aggregation node, convergence section by relay node and aggregation node direct communicationPoint converges received medical data and is sent to block chain memory module 2.
In a kind of mode that can be realized, a biography is chosen from each virtual grid region not comprising relay nodeSensor node is as cluster head, comprising:
(1) position of centre of gravity in virtual grid region is calculated:
In formula, VeIndicate that the position of centre of gravity of virtual grid region e, x (b) indicate b-th of biography in the virtual grid region eThe x of sensor node position is to coordinate, and y (b) is the y of b-th of sensor node position to coordinate, and z (b) is instituteThe z of b-th of sensor node position is stated to coordinate, wherein using aggregation node as coordinate origin, neFor the virtual gridThe sensor node number that region e has;
(2) weight of each sensor node in virtual grid region is calculated, and the sensor node for choosing maximum weight is madeFor the cluster head in the virtual grid region;The calculation formula of the weight are as follows:
In formula, ReaFor the weight of b-th of sensor node in the e of virtual grid region,For b-th of sensorNode and position of centre of gravity VeDistance,For a-th of sensor node and position of centre of gravity V in the e of virtual grid regioneAway fromFrom;Wb,oIt is b-th of sensor node at a distance from aggregation node, Wa,oIt is saved for a-th of sensor node and convergenceThe distance of point, neFor sensor node number in the e of virtual grid region, h1、h2For the weight coefficient of setting.
The present embodiment proposes the calculation formula of each sensor node weight in virtual grid region, in the calculation formula,There is the sensor node closer apart from place virtual grid regional barycenter position and aggregation node bigger probability to serve as thisThe cluster head in virtual grid region.The present embodiment from each virtual grid region the maximum sensor node of select probability as clusterOn the one hand head can guarantee that cluster head is evenly distributed in as far as possible in entire monitoring region, on the other hand be able to ascend sub-clustering resultGlobal optimum's performance, save cluster head collect and transmission medical data energy consumption, improve cluster head carry out medical data collectingThe stability of work.
In one embodiment, the relay node is removable, if the cluster head collection with relay node direct communication is combined into Q,Relay node periodically carries out energy monitoring to the cluster head in set Q, according to the following formula the energy potential of the cluster head in set of computations QPower:
In formula, FdFor the energy force of the cluster head d in set Q, GdFor the current remaining of cluster head d, GdpIt is d pairs of cluster headAnswer the current remaining of p-th of sensor node in cluster, mdThe sensor node quantity in cluster, C are corresponded to for cluster head ddFor cluster headThe communication distance of d, GlFor the current remaining of first of cluster head in set Q, COFor the communication distance of relay node;
If aggregation node is in cluster head of the energy force greater than 0, selection there are the cluster head that energy force is greater than 0 in set QCeiling capacity force, secondary big energy force sensor node as destination node, if the coordinate of two destination nodes is distinguishedFor (x1,y1,z1)、(x2,y2,z2), then relay node is to pointThe mobile mobile setting in direction distance;Wherein the mobile total distance of relay node is no more than preset apart from the upper limit.
Not only need to receive and forward the medical data in its cluster close to the cluster head of relay node, it is also necessary to relay forwarding itsThe medical data of his cluster head, therefore relative to other cluster heads, need to consume more energy, so wireless sensor network is inEnergy volution is easy to produce after near nodal.
Based on this problem, it is removable that relay node is arranged in the present embodiment, and innovatively defines the calculating of energy forceFormula keeps relay node biggish to energy force when the energy force of the present embodiment cluster head near relay node is greater than 0The distance of the mobile setting in the datum mark direction that cluster head determines, thus promote the lower cluster head of energy due to the relaying section after movementPoint undertakes the task of relay forwarding too far and no longer.The present embodiment is beneficial to balance the energy of each cluster head, and it is existing to reduce Energy volutionAs, and then effectively extend network lifetime, improve the stability of medical data collecting.
In one embodiment, communication distance threshold value is periodically arranged in the cluster head of non-relay nodes, when the cluster of non-relay nodesWhen head is less than set communication distance threshold value to the distance apart from nearest relay node, directly by received medical numberAccording to being sent to this apart from nearest relay node;When the cluster head of non-relay nodes is more than to the distance apart from nearest relay nodeWhen set communication distance threshold value, closer to selection one in remaining cluster head apart from nearest relay node recentlyBe used as next-hop node, received medical data is sent to the next-hop node;
The setting formula of the communication distance threshold value are as follows:
In formula, CiIt (t) is communication distance threshold value of the cluster head i in t-th of cycle set,It is adjustable most for cluster head iBig communication distance,For the adjustable minimal communications distance of cluster head i, GiFor the current remaining of cluster head i, Gi0For cluster head iPrimary power, GminFor preset minimum energy value, δ is preset regulatory factor, and the value range of δ is [0.6,0.8].
In the present embodiment, communication distance threshold value is arranged in the cluster head of non-relay nodes, by its with apart from nearest relay nodeDistance and the communication distance threshold value be compared, to select suitable route-pattern to send medical data according to comparison resultTo this apart from nearest relay node, be conducive to optimally to save energy from cluster head to relay node transmission medical data atThis.Wherein, the present embodiment sets the formula of distance threshold according to the current remaining of cluster head, calculated by the formulaDistance threshold adjusts the routing mode of cluster head, advantageously reduces the rate of cluster head energy consumption, avoids cluster head rapid failure, haveThe duty cycle of cluster head is extended to effect, and then improves the reliability of medical data transmission on the whole.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than the present invention is protectedThe limitation of range is protected, although explaining in detail referring to preferred embodiment to the present invention, those skilled in the art are answeredWork as understanding, it can be with modification or equivalent replacement of the technical solution of the present invention are made, without departing from the reality of technical solution of the present inventionMatter and range.