Medical data management system based on block chain
Technical Field
The invention relates to the field of medical data management, in particular to a medical data management system based on a block chain.
Background
Medical institutions always face the problem that data cannot be safely shared across platforms, on one hand, data are scattered, different medical institutions and different information systems form data islands, and uniform views centering on residents are difficult to achieve. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and is widely applied, such as management of medical data;
the existing medical data management system has the problems that data are found, but the data quality is poor, the data quality is not well controlled, and the medical data is not reasonably stored and the storage redundancy of a block chain storage node is reduced.
Disclosure of Invention
The invention aims to provide a medical data management system based on a block chain; the method is used for solving the problems that the existing medical data management system does not screen the medical data, so that the data is found, but the data quality is poor, and the medical data is not reasonably stored and the storage redundancy of the block chain storage nodes is reduced; the medical data are collected and analyzed in combination with the treatment duration and the treatment cost of the medical data to obtain node storage values, and the medical data are screened through the node storage values, so that the medical data with higher data quality are selected and stored; acquiring and analyzing information of the block chain storage nodes, calculating an coincidence value of the block chain storage nodes by combining the residual memory amount, the rated memory amount and the storage distance of the block chain storage nodes, and reasonably selecting the block chain storage nodes for storage through the coincidence value; deleting and compressing the data distributed by the nodes through the management values, thereby reducing the storage redundancy of the block chain storage nodes;
the purpose of the invention can be realized by the following technical scheme: a medical data management system based on a block chain comprises a medical data acquisition module, a data encryption module, a node distribution module, a server, a node acquisition module and a block chain link point module;
the medical data acquisition module is used for acquiring medical data information of a hospital and screening the medical data information, and the specific screening steps are as follows:
the method comprises the following steps: acquiring medical data of a patient, and marking the medical data of the patient as Rj, j =1, … …, n;
step two: setting known disease names to correspond to a preset value, matching the disease names in the medical data with the known disease names, and obtaining the corresponding preset value and marking the preset value as Y after the matching is successfulRj(ii) a When the matching is unsuccessful, directly marking the medical data as node storage data;
step three: calculating the time difference between the treatment starting time and the treatment ending time of the patient in the medical data to obtain the treatment duration of the patient and marking the treatment duration as TRj;
Step four: the treatment cost of a patient in medical data is acquired and labeled as MRj;
Step five: the preset values, the treatment duration and the treatment cost in the medical data are dequantized, and then the numerical values are obtained by using a formula JRj=YRj×d1+TRj×d2+MRjXd 3 obtaining node storage values J for medical dataRj(ii) a Wherein d1, d2 and d3 are all preset proportionality coefficients;
step six: when the node storage value is larger than the set threshold value, marking the medical data as node storage data;
step seven: the medical data acquisition module sends the node storage data to the data encryption module;
the data encryption module is used for encrypting the node storage data and sending the encrypted node storage data to the node distribution module; the node distribution module is used for receiving the encrypted node storage data and performing uplink distribution processing on the node storage data, and the specific processing steps are as follows:
s1: chaining the encrypted node storage data, and marking the chained and encrypted node storage data as node distribution data;
s2: acquiring node information of a block chain storage node, and marking the block chain storage node as Ci, i =1, … …, n;
s3: the remaining amount of memory for the blockchain storage node is labeled F1Ci(ii) a The nominal memory size of the blockchain storage node is F2Ci;
S4: obtaining the position of the storage node of the block chain and calculating the distance difference between the position of the storage node and the position of the node distribution data to obtain the storage space of the storage node of the block chain and marking the storage space as GCi(ii) a The position of the node distribution data is the hospital position generated by the medical data;
s5: the residual memory amount, the rated memory amount and the storage space of the block chain storage node are dequantized, and then the numerical values are obtained by using a formula WCi=F1Ci×d4+F2Ci×d5+(1/GCi) Obtaining the matching value W of the storage node of the block chain by the x d6Ci;
S6: selecting the block chain storage node with the maximum matching value as a selected block chain storage node of the data distributed by the node; the node distribution module sends the number of the selected block chain storage node and the node distribution data to the block chain node module, binds the number of the selected block chain storage node and the node distribution data and generates a query chain number, and then sends the query chain number to the server for storage;
the block chain node module is used for receiving the number of the selected block chain storage node and node distribution data, then sending the node distribution data to the block chain storage node corresponding to the selected block chain storage node number for storage, and simultaneously recording the storage time of the node distribution data;
the block chain link point module comprises a plurality of block chain storage nodes, and the block chain storage nodes are used for storing medical data;
the node acquisition module is used for acquiring node information of the block chain storage node and sending the node information to the node distribution module for storage; the node information comprises the position of the block chain storage node, the residual memory amount and the rated memory amount.
Preferably, the medical data includes patient basic information, patient name, treatment start time, treatment end time, treatment cost, medical order, hospital name and location generated by the medical data, and the patient basic information includes patient name, age, sex, identification number and contact number.
Preferably, the system further comprises a registration login module, wherein the registration login module is used for submitting registration information for registration by the user and sending the registration information with successful registration to the server, and the registration information comprises the name, the identification number and the mobile phone number of the user.
Preferably, the system further comprises a data management module; the data management module is used for managing node distribution data with node storage values in the block chain storage nodes, and the specific management steps are as follows:
SS 1: acquiring the total query times of node distribution data and corresponding query time, and marking the node distribution data as Rm, wherein m belongs to j; calculating the storage time of the node distribution data and the current system time to obtain a storage duration H1Rm;
SS 2: the total number of queries for the node to assign data is labeled H2Rm;
SS 3: screening the query time corresponding to the node distribution data, selecting the query time closest to the current time of the system, calculating the time difference between the query time and the current time of the system to obtain a query interval duration, and marking the query interval duration as H3Rm(ii) a Marking the node storage value of the node allocation data as JRm;
SS 4: dequantizing the storage time length, the total query times, the query interval time length and the node storage value of the node distribution data, and then taking the numerical values;
SS 5: using formula KRm=(1/H1Rm)×d7+H2Rm×d8+JRm×d9-H3RmObtaining management value K of node distribution data by x d10Rm(ii) a Wherein d7, d8, d9 and d10 are all preset proportionality coefficients;
SS 6: when the management value is smaller than a set threshold value, marking the node distribution data as data to be managed, and simultaneously generating a node data management instruction; the data management module sends the node data management instruction to a mobile phone terminal of a patient corresponding to the node distribution data;
SS 7: when a patient sends a deletion instruction to the data management module through the mobile phone terminal, the data management module deletes the data to be managed from the corresponding block chain storage node after receiving the deletion instruction; when a patient sends a compression instruction to the data management module through the mobile phone terminal, the data management module compresses and stores the data to be managed from the corresponding block chain storage node after receiving the compression instruction.
Preferably, the system further includes a query module, where the query module is configured to query the node allocation data in the blockchain storage node, and the specific query step is:
SSS 1: the inquirer inputs the inquiry chain number to the inquiry module through the mobile phone terminal, and the inquiry module receives the inquiry chain number and sends the inquiry chain number to the server;
SSS 2: after receiving the inquiry chain number, the server matches the inquiry chain number stored in the server, and the server acquires node distribution data corresponding to the inquiry chain number through a block chain node module;
SSS 3: the server acquires the mobile phone number of the patient in the node distribution data and sends an inquiry request instruction to the mobile phone number, and when the patient sends an agreement instruction to the server through the mobile phone terminal; the server decrypts the node distribution data and sends the node distribution data to the query module, meanwhile, the total query times of the node distribution data are increased once, and the decrypted time is marked as the query time corresponding to the node distribution data;
SSS 4: and the query module receives the decrypted node distribution data and sends the node distribution data to the mobile phone terminal of the querier.
The invention has the beneficial effects that:
(1) the medical data acquisition module acquires and screens medical data information of a hospital, matches a disease name in medical data with a known disease name, acquires a corresponding preset value after matching is successful, and directly marks the medical data as node storage data when matching is unsuccessful; calculating the time difference between the treatment starting time and the treatment ending time of the patient in the medical data to obtain the treatment duration of the patient, obtaining the treatment cost of the patient in the medical data, and obtaining a node storage value of the medical data by using a formula; when the node storage value is larger than the set threshold value, marking the medical data as node storage data; the medical data acquisition module sends the node storage data to the data encryption module, and the data encryption module encrypts the node storage data and sends the encrypted node storage data to the node distribution module; the medical data are collected and analyzed in combination with the treatment duration and the treatment cost of the medical data to obtain node storage values, and the medical data are screened through the node storage values, so that the medical data with higher data quality are selected for storage, and the phenomenon that the data are found but the data quality is poor is avoided;
(2) the node distribution module carries out chain distribution processing on encrypted node storage data, carries out chain distribution on the encrypted node storage data, dequantizes the residual memory amount, the rated memory amount and the storage space of the block chain storage node, and then obtains the numerical value of the residual memory amount, the rated memory amount and the storage space of the block chain storage node by using a formula; selecting the block chain storage node with the maximum matching value as a selected block chain storage node of the data distributed by the node; the node distribution module sends the number of the selected block chain storage node and the node distribution data to the block chain link point module, the block chain link point module is used for receiving the number of the selected block chain storage node and the node distribution data, and then the node distribution data are sent to the block chain storage node corresponding to the selected block chain storage node number for storage; acquiring and analyzing information of the block chain storage nodes, calculating an coincidence value of the block chain storage nodes by combining the residual memory amount, the rated memory amount and the storage distance of the block chain storage nodes, and reasonably selecting the block chain storage nodes for storage through the coincidence value;
(3) the data management module manages node distribution data with node storage values in a block chain storage node, acquires the total query times of the node distribution data and corresponding query time, calculates the storage time of the node distribution data and the current system time to acquire storage duration, dequantizes the storage duration, the total query times, the query interval duration and the node storage values of the node distribution data, and then takes the numerical values of the dequantization duration, the query interval duration and the node storage values; acquiring a management value of the node distribution data by using a formula; when the management value is smaller than a set threshold value, marking the node distribution data as data to be managed, and simultaneously generating a node data management instruction; the data management module sends the node data management instruction to a mobile phone terminal of a patient corresponding to the node distribution data; when a patient sends a deletion instruction to the data management module through the mobile phone terminal, the data management module deletes the data to be managed from the corresponding block chain storage node after receiving the deletion instruction; when a patient sends a compression instruction to a data management module through a mobile phone terminal, the data management module compresses and stores the data to be managed from the corresponding block chain storage node after receiving the compression instruction; the node distribution data are analyzed, the management value is obtained by combining the storage time length, the total query times, the query interval time length and the node storage value of the node distribution data through calculation, and the node distribution data are deleted and compressed and stored through the management value, so that the storage redundancy of the block chain storage node is reduced.
Drawings
The invention will be further described with reference to the accompanying drawings.
Fig. 1 is a functional block diagram of a blockchain-based medical data management system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention is a medical data management system based on a block chain, including a medical data acquisition module, a data encryption module, a node distribution module, a server, a node acquisition module, a block chain node module, a registration and login module, a data management module, and an inquiry module;
the medical data acquisition module is used for acquiring and screening medical data information of a hospital, the medical data comprises patient basic information, a sicken name, treatment starting time, treatment ending time, treatment cost, medical advice and a hospital name and position generated by the medical data, and the patient basic information comprises the name, age, sex, identification number and contact telephone of a patient; the specific screening steps are as follows:
the method comprises the following steps: acquiring medical data of a patient, and marking the medical data of the patient as Rj, j =1, … …, n;
step two: setting known disease names to correspond to a preset value, matching the disease names in the medical data with the known disease names, and obtaining the corresponding preset value and marking the preset value as Y after the matching is successfulRj(ii) a When the matching is unsuccessful, directly marking the medical data as node storage data;
step three: calculating the time difference between the treatment starting time and the treatment ending time of the patient in the medical data to obtain the treatment duration of the patient and marking the treatment duration as TRj;
Step four: the treatment cost of a patient in medical data is acquired and labeled as MRj;
Step five: the preset value, the treatment duration and the treatment cost in the medical data are dequantized, and then the numerical values are taken and utilizedFormula JRj=YRj×d1+TRj×d2+MRjXd 3 obtaining node storage values J for medical dataRj(ii) a Wherein d1, d2 and d3 are all preset proportionality coefficients;
step six: when the node storage value is larger than the set threshold value, marking the medical data as node storage data;
step seven: the medical data acquisition module sends the node storage data to the data encryption module;
the data encryption module is used for encrypting the node storage data and sending the encrypted node storage data to the node distribution module; the node distribution module is used for receiving the encrypted node storage data and performing uplink distribution processing on the node storage data, and the specific processing steps are as follows:
s1: chaining the encrypted node storage data, and marking the chained and encrypted node storage data as node distribution data;
s2: acquiring node information of a block chain storage node, and marking the block chain storage node as Ci, i =1, … …, n;
s3: the remaining amount of memory for the blockchain storage node is labeled F1Ci(ii) a The nominal memory size of the blockchain storage node is F2Ci;
S4: obtaining the position of the storage node of the block chain and calculating the distance difference between the position of the storage node and the position of the node distribution data to obtain the storage space of the storage node of the block chain and marking the storage space as GCi(ii) a The position of the node distribution data is the hospital position generated by the medical data;
s5: the residual memory amount, the rated memory amount and the storage space of the block chain storage node are dequantized, and then the numerical values are obtained by using a formula WCi=F1Ci×d4+F2Ci×d5+(1/GCi) Obtaining the matching value W of the storage node of the block chain by the x d6Ci(ii) a d4, d5 and d6 are all preset proportionality coefficients;
s6: selecting the block chain storage node with the maximum matching value as a selected block chain storage node of the data distributed by the node; the node distribution module sends the number of the selected block chain storage node and the node distribution data to the block chain node module, binds the number of the selected block chain storage node and the node distribution data and generates a query chain number, and then sends the query chain number to the server for storage;
the block chain node module is used for receiving the number of the selected block chain storage node and node distribution data, then sending the node distribution data to the block chain storage node corresponding to the selected block chain storage node number for storage, and simultaneously recording the storage time of the node distribution data;
the block chain link point module comprises a plurality of block chain storage nodes, and the block chain storage nodes are used for storing medical data;
the node acquisition module is used for acquiring node information of the block chain storage nodes and sending the node information to the node distribution module for storage; the node information comprises the position of a block chain storage node, the residual memory amount and the rated memory amount;
the registration login module is used for submitting registration information to register by a user and sending the registration information which is successfully registered to the server, wherein the registration information comprises the name, the identity card number and the mobile phone number of the user;
the data management module is used for managing node distribution data with node storage values in the block chain storage nodes, and the specific management steps are as follows:
SS 1: acquiring the total query times of node distribution data and corresponding query time, and marking the node distribution data as Rm, wherein m belongs to j; calculating the storage time of the node distribution data and the current system time to obtain a storage duration H1Rm;
SS 2: the total number of queries for the node to assign data is labeled H2Rm;
SS 3: screening the query time corresponding to the node distribution data, selecting the query time closest to the current time of the system, calculating the time difference between the query time and the current time of the system to obtain a query interval duration, and marking the query interval duration as H3Rm(ii) a Marking the node storage value of the node allocation data as JRm;
SS 4: dequantizing the storage time length, the total query times, the query interval time length and the node storage value of the node distribution data, and then taking the numerical values;
SS 5: using formula KRm=(1/H1Rm)×d7+H2Rm×d8+JRm×d9-H3RmObtaining management value K of node distribution data by x d10Rm(ii) a Wherein d7, d8, d9 and d10 are all preset proportionality coefficients;
SS 6: when the management value is smaller than a set threshold value, marking the node distribution data as data to be managed, and simultaneously generating a node data management instruction; the data management module sends the node data management instruction to a mobile phone terminal of a patient corresponding to the node distribution data;
SS 7: when a patient sends a deletion instruction to the data management module through the mobile phone terminal, the data management module deletes the data to be managed from the corresponding block chain storage node after receiving the deletion instruction; when a patient sends a compression instruction to a data management module through a mobile phone terminal, the data management module compresses and stores the data to be managed from the corresponding block chain storage node after receiving the compression instruction;
the query module is used for querying node distribution data in the block chain storage node, and the specific query steps are as follows:
SSS 1: the inquirer inputs the inquiry chain number to the inquiry module through the mobile phone terminal, and the inquiry module receives the inquiry chain number and sends the inquiry chain number to the server;
SSS 2: after receiving the inquiry chain number, the server matches the inquiry chain number stored in the server, and the server acquires node distribution data corresponding to the inquiry chain number through a block chain node module;
SSS 3: the server acquires the mobile phone number of the patient in the node distribution data and sends an inquiry request instruction to the mobile phone number, and when the patient sends an agreement instruction to the server through the mobile phone terminal; the server decrypts the node distribution data and sends the node distribution data to the query module, meanwhile, the total query times of the node distribution data are increased once, and the decrypted time is marked as the query time corresponding to the node distribution data;
SSS 4: and the query module receives the decrypted node distribution data and sends the node distribution data to the mobile phone terminal of the querier.
The working principle of the invention is as follows: the medical data acquisition module acquires and screens medical data information of a hospital, matches a disease name in the medical data with a known disease name, acquires a corresponding preset value after successful matching, and directly marks the medical data as node storage data when unsuccessful matching is performed;
calculating the time difference between the treatment start time and the treatment end time of the patient in the medical data to obtain the treatment duration of the patient, obtaining the treatment cost of the patient in the medical data, and utilizing a formula JRj=YRj×d1+TRj×d2+MRjXd 3 obtaining node storage values J for medical dataRj(ii) a When the node storage value is larger than the set threshold value, marking the medical data as node storage data; the medical data acquisition module sends the node storage data to the data encryption module; the data encryption module is used for encrypting the node storage data and sending the encrypted node storage data to the node distribution module; the medical data are collected and analyzed in combination with the treatment duration and the treatment cost of the medical data to obtain node storage values, and the medical data are screened through the node storage values, so that the medical data with higher data quality are selected for storage, and the phenomenon that the data are found but the data quality is poor is avoided; the node distribution module is used for receiving the encrypted node storage data and carrying out uplink distribution processing on the node storage data, carrying out uplink on the encrypted node storage data, carrying out dequantization on the residual memory amount, the rated memory amount and the storage space of the block chain storage node, then taking the numerical value of the dequantization, and utilizing a formula WCi=F1Ci×d4+F2Ci×d5+(1/GCi) Obtaining the matching value W of the storage node of the block chain by the x d6Ci(ii) a Selecting the block chain storage node with the maximum matching value as a selected block chain storage node of the data distributed by the node; the node distribution module sends the number of the selected block chain storage node and the node distribution data to the block chain link point module, and the block chain link point module is used for receiving the block chain storage in the selectionThe serial number of the storage node and the node distribution data are sent to the block chain storage node corresponding to the selected block chain storage node for storage; acquiring and analyzing information of the block chain storage nodes, calculating an coincidence value of the block chain storage nodes by combining the residual memory amount, the rated memory amount and the storage distance of the block chain storage nodes, and reasonably selecting the block chain storage nodes for storage through the coincidence value; the data management module is used for managing node distribution data with node storage values in the block chain storage nodes, acquiring the total query times of the node distribution data and corresponding query time, calculating the storage time of the node distribution data and the current system time to acquire storage duration, dequantizing the storage duration, the total query times, the query interval duration and the node storage values of the node distribution data, and then taking the numerical values of the dequantization duration, the query interval duration and the node storage values; using formula KRm=(1/H1Rm)×d7+H2Rm×d8+JRm×d9-H3RmObtaining management value K of node distribution data by x d10Rm(ii) a When the management value is smaller than a set threshold value, marking the node distribution data as data to be managed, and simultaneously generating a node data management instruction; the data management module sends the node data management instruction to a mobile phone terminal of a patient corresponding to the node distribution data; when a patient sends a deletion instruction to the data management module through the mobile phone terminal, the data management module deletes the data to be managed from the corresponding block chain storage node after receiving the deletion instruction; when a patient sends a compression instruction to a data management module through a mobile phone terminal, the data management module compresses and stores the data to be managed from the corresponding block chain storage node after receiving the compression instruction; the node distribution data are analyzed, the management value is obtained by combining the storage time length, the total query times, the query interval time length and the node storage value of the node distribution data through calculation, and the node distribution data are deleted and compressed and stored through the management value, so that the storage redundancy of the block chain storage node is reduced.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.