Medical record data processing method, device, storage medium and equipment based on blockchain
The blockchain-based method addresses security issues in medical record data transfer by authenticating users and securing data storage, ensuring secure and accurate medical record exchange.
Patent Information
- Application Number
- CN201910887495.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-19
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2039-11-20
AI Technical Summary
The security and integrity of medical record data are compromised during transfer between healthcare institutions due to the risk of tampering and lack of assurance in data accuracy.
A blockchain-based medical record data processing method that verifies user identity through authorization information, ensuring that only authorized users can access and transfer medical records, using a consensus mechanism to secure data storage and prevent tampering.
Ensures secure and accurate transfer of medical records by verifying user identity and preventing unauthorized access or tampering, thereby maintaining data integrity and confidentiality.
Smart Images

Figure CN110634544B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a medical record data processing method, apparatus, computer-readable storage medium, and computer equipment based on blockchain. Background Art
[0002] With the development of network technology, products such as electronic medical records have emerged. Electronic medical records are digital medical records that are stored, managed, transmitted and reproduced by electronic devices to replace handwritten paper medical records.
[0003] In traditional solutions, medical institutions will manage the electronic medical records of patients in a unified manner, store and update electronic medical records, so that when the user is treated in the future, the user's historical electronic medical records can be obtained to achieve diagnosis and treatment. However, when the user needs to go to other hospitals for treatment, the user needs to bring the historical medical record data to the doctor of the hospital for auxiliary diagnosis. Since the user needs to go through multiple data transfers in the process of obtaining his or her own historical medical record data, it is difficult to ensure that the user's medical record data has not been tampered with, and the accuracy of the medical record data cannot be guaranteed, resulting in low security problems in the process of medical record data transfer. Summary of the invention
[0004] Based on this, it is necessary to address the technical problem of low security in the circulation of medical record data and provide a blockchain-based medical record data processing method, apparatus, computer-readable storage medium and computer equipment that can ensure the security of medical record data during the circulation process.
[0005] A medical record data processing method based on blockchain, comprising:
[0006] Receiving a medical record data reading request from a reading terminal, wherein the medical record data reading request carries user authorization information and a reading content tag;
[0007] According to the user authorization information, searching the blockchain for user registration data corresponding to the user authorization information to verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism;
[0008] When the verification is passed, the medical record data of the authorized user is searched from the blockchain, and the target medical record data corresponding to the read content tag is extracted from the medical record data;
[0009] Feedback the target medical record data to the reading terminal.
[0010] A medical record data processing device based on blockchain, the device comprising:
[0011] A read request receiving module, used to receive a medical record data read request from a reading terminal, wherein the medical record data read request carries user authorization information and a read content tag;
[0012] A user identity authentication module, used to search the blockchain for user registration data corresponding to the user authorization information according to the user authorization information, and verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism;
[0013] A medical record data search module, used to search the medical record data of the authorized user from the blockchain when the verification is passed, and extract the target medical record data corresponding to the read content tag from the medical record data;
[0014] The medical record data feedback module is used to feed back the target medical record data to the reading terminal.
[0015] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0016] Receiving a medical record data reading request from a reading terminal, wherein the medical record data reading request carries user authorization information and a reading content tag;
[0017] According to the user authorization information, searching the blockchain for user registration data corresponding to the user authorization information to verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism;
[0018] When the verification is passed, the medical record data of the authorized user is searched from the blockchain, and the target medical record data corresponding to the read content tag is extracted from the medical record data;
[0019] Feedback the target medical record data to the reading terminal.
[0020] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0021] Receiving a medical record data reading request from a reading terminal, wherein the medical record data reading request carries user authorization information and a reading content tag;
[0022] According to the user authorization information, searching the blockchain for user registration data corresponding to the user authorization information to verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism;
[0023] When the verification is passed, the medical record data of the authorized user is searched from the blockchain, and the target medical record data corresponding to the read content tag is extracted from the medical record data;
[0024] Feedback the target medical record data to the reading terminal.
[0025] The above-mentioned blockchain-based medical record data processing method, device, computer-readable storage medium and computer equipment verify the user identity information through user authorization information to ensure that the user's medical record data can only be provided under the premise of user authorization. Based on the blockchain that stores each user's user registration data and medical record data at each node through a consensus mechanism, it effectively prevents the occurrence of data tampering and ensures the security of data storage. Through the read content tag carried by the medical record data read request, the target medical record data corresponding to the read content tag is searched and fed back to the reading terminal, thereby realizing targeted reading of medical record data, preventing the medical record data from being tampered with, and preventing the medical record data from being leaked without user authorization, thereby realizing the safe circulation of medical record data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is an application environment diagram of a medical record data processing method based on blockchain in one embodiment;
[0027] Figure 2 1. A flowchart of a method for processing medical record data based on blockchain in one embodiment;
[0028] Figure 3 A schematic diagram of a flow chart of steps for verifying a user's identity in one embodiment;
[0029] Figure 4 A flowchart showing the steps of a process for writing medical record data in one embodiment;
[0030] Figure 5 A flowchart of the steps of storing the medical record data to be written into the blockchain and performing consensus processing in one embodiment;
[0031] Figure 6 This is an application environment diagram of a medical record data processing method based on blockchain in another embodiment;
[0032] Figure 7 It is a flowchart of a method for processing medical record data based on blockchain in another embodiment;
[0033] Figure 8 It is a structural block diagram of a medical record data processing device based on blockchain in one embodiment;
[0034] Fig. 9 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] Figure 1 FIG. 1 is an application environment diagram of a medical record data processing method based on blockchain in one embodiment. Figure 1 , the medical record data processing method based on blockchain is applied to the medical record data processing system. The medical record data processing system includes a medical record data sharing system 100 and a terminal 104. The medical record data sharing system 100 includes multiple nodes 102, and the terminal 104 is connected to the node 102 through a network. The medical record data sharing system 100 refers to a system for sharing medical record data between nodes. The server of each medical institution is a node in the medical record data sharing system. Each node 102 pre-stores the user registration data and medical record data of each user based on a consensus mechanism. In order to ensure the security of the medical record data sharing system, a node authentication server can also be set in the medical record data sharing system. The node authentication server reviews the industry-related qualifications of each medical institution to ensure the legitimacy of the qualifications of the nodes joining the medical record data sharing system. For example, when a user goes to different hospitals for disease diagnosis and treatment, he may have done relevant examinations in the previous hospital, such as CT or gastroscopy, etc. With the authorization of the user, the doctor can directly obtain the user's medical record data from the medical record data sharing system 100, including the examination results of the user's examination, and the user does not need to undergo another examination. The doctor can also make a corresponding diagnosis based on the examination results on the medical record information combined with other user health information. The terminal 104 can be a reading terminal for requesting to read medical record data or a writing terminal for requesting to write medical record data.
[0037] Taking the terminal where the doctor is located as the reading terminal 104 and the server of the hospital where the doctor is located as the node 102 as an example, the node 102 receives the medical record data reading request from the reading terminal 104, extracts the medical record data reading request carrying the user authorization information and the read content tag, and then searches the blockchain of the node 102 for the user registration data corresponding to the user authorization information according to the user authorization information, verifies the user identity, and when the verification is passed, searches the medical record data of the authorized user from the blockchain, and extracts the target medical record data corresponding to the read content tag from the medical record data, and finally feeds back the target medical record data to the reading terminal 104. Among them, the node 102 can be each client in the medical record data sharing system, such as the server of each hospital. The server can be implemented with an independent server or a server cluster composed of multiple servers. The reading terminal can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a tablet computer, a laptop computer, etc.
[0038] like Figure 2 As shown, in one embodiment, a method for processing medical record data based on blockchain is provided. This embodiment mainly applies this method to the above Figure 1 The blockchain-based medical record data processing method specifically includes steps S202 to S208.
[0039] S202, receiving a medical record data reading request from a reading terminal, where the medical record data reading request carries user authorization information and a reading content tag.
[0040] The reading terminal refers to a client terminal used in a medical institution to read medical record data from a blockchain node and realize information exchange, such as a computer in a hospital or pharmacy. With the authorization of the patient, the patient's medical record data can be obtained from the node of the medical record data sharing system through the reading terminal, and the patient's medical record data can be uploaded to the node of the medical record data sharing system through the writing terminal. Through the medical record data sharing system, the medical record data can be safely circulated between various medical institutions in the medical record data sharing system. In an embodiment, the reading terminal and the writing terminal can be the same terminal, which acts as a writing terminal when writing data and as a reading terminal when reading data. A medical record data reading request refers to a request sent by a doctor to a node storing the patient's medical record data based on the patient's medical condition. In an embodiment, before sending a medical record data reading request, it is necessary to obtain user authorization information from the patient. For example, the user authorization information can be a combination of one or more of the user's ID number, social security account number, medical insurance account number, mobile phone number, verification code, and the user's biometric information such as fingerprints, face, iris, etc. It can be plain text or encrypted plain text.
[0041] In one embodiment, the reading terminal can send an authorization request to the user terminal where the user is located, and obtain the user authorization information through the authorization verification message input by the user terminal. For example, after receiving the authorization request, the user terminal displays it to the user through the user interaction interface, and can simultaneously display the two options of "authorization" and "rejection" to the user. If the patient selects the "rejection" option, the rejection message is fed back to the reading terminal. After receiving the rejection message, the user terminal will no longer perform the subsequent process of sending a medical record data acquisition request to the node; if the user selects the "authorization" option, the user authorization information is further obtained, such as the user's fingerprint, ID number, etc. After receiving the user authorization information, the reading terminal sends a medical record data acquisition request to the node. For example, the user performs fingerprint recognition on the fingerprint device of Hospital A, or performs face recognition through the face recognition device of Hospital A to obtain the user authorization information.
[0042] In another embodiment, the doctor of the department where the user is visiting can obtain the user's registration information through the reading terminal, and extract the data corresponding to the preset user authorization information type from the registration information. For example, the preset user authorization information type is the user's medical insurance account number. The doctor of the department where the user is visiting can obtain the user's medical insurance account number through the user's registration information in the department where the user is visiting on the same day. The doctor can select the type of medical record data to be obtained according to the user's medical condition, and the reading terminal generates a read content tag according to the selected medical record data type. The read content tag refers to the data tag of the medical record data that needs to be read from the blockchain in the medical record data sharing system. The read content tag can include department category, diagnosis information, test results, prescription information, etc., among which the department category can be further subdivided. The major categories of departments can include internal medicine, surgery, obstetrics and gynecology, pediatrics, ENT, dermatology, etc., and internal medicine can be divided into respiratory medicine, gastroenterology, neurology, cardiovascular medicine, nephrology, hematology, immunology, endocrinology, etc.
[0043] In one embodiment, the user is a pregnant woman, and the prenatal checkup was previously conducted in the obstetrics and gynecology department of hospital A. Under the authorization of the pregnant woman, the obstetrician and gynecologist of hospital A uploaded each prenatal checkup data of the pregnant woman to the blockchain of the medical record data sharing system for storage. One day, the pregnant woman suddenly felt unwell in a city far away from hospital A. Considering the physical condition of the pregnant woman, it is not suitable to travel long distances, so she went to the obstetrics and gynecology department of hospital B to register for treatment. Since both hospital A and hospital B belong to one of the authorized nodes of the medical record data sharing system, the nodes share medical record data through a consensus mechanism. The doctor of hospital B extracts the ID number from the registration information of pregnant woman B through the reading terminal, uses the ID number as the user authorization information, selects the obstetrics and gynecology department as the reading content label, generates a medical record data acquisition request based on the user authorization information and the reading content label, and sends it to the node to obtain the prenatal checkup medical record data of the pregnant woman in the obstetrics and gynecology department of each hospital. For the node, the specific processing process is: receiving the medical record data reading request from the reading terminal, and extracting the medical record data reading request carrying the user authorization information and the reading content label.
[0044] S204, according to the user authorization information, searching the blockchain for user registration data corresponding to the user authorization information, and verifying the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism.
[0045] Each node in the medical record data sharing system stores the same blockchain, which is composed of multiple blocks. The node receives the medical record data uploaded by the write terminal and writes the user's medical record data into a new block. The consensus mechanism refers to the node where the blockchain is located, according to the node identifiers of other nodes in the medical record data sharing system, sending the newly generated blocks to other nodes in the medical record data sharing system where it is located, and other nodes verify the newly generated blocks, and after completing the verification, add the newly generated blocks to the blockchain stored in it, so as to realize the storage of medical record data in each node. The user registration data and medical record data of the user are stored in the blockchain. The user registration data is unique in the entire medical record data sharing system, and the user registration data of any two different users are not the same. In one embodiment, the user registration data and the user authorization information are matching data. When the node extracts the user authorization information from the medical record data reading request, the user registration data matching the user authorization information is searched from the blockchain. When the search result is that there is user registration data matching the user authorization information, the user identity authentication is passed.
[0046] In another embodiment, the user registration data may be a first eigenvalue that is processed by a set eigenvalue algorithm for eigenvalue calculation. The reading terminal may obtain a second eigenvalue after performing eigenvalue calculation on the user authorization information using the same eigenvalue algorithm, and send the second eigenvalue to the node through a medical record data reading request. When the node finds the first eigenvalue that is the same as the second eigenvalue in the blockchain, the user identity verification is passed. In an embodiment, the eigenvalue algorithm may be a calculation method that transforms an input of any length into an output of a certain length through a hash algorithm. The hash algorithm may be an MD5 (Message-digest Algorithm 5) algorithm and a SHA (Secure Hash Standard) algorithm, etc., without specific limitation.
[0047] In one embodiment, Figure 3 As shown, according to the user authorization information, searching the blockchain for user registration data corresponding to the user authorization information and verifying the user identity includes steps S302 to S304.
[0048] S302, searching for a target blockchain corresponding to the user authorization information from multiple blockchains.
[0049] S304, traverse each block in the target blockchain, and when user registration data matching the user identity identifier in the user authorization information is found, confirm that the user identity authentication is passed.
[0050] The node may include one blockchain or multiple blockchains, and different blockchains may be used to store different data. First, according to the blockchain attributes, the target blockchain with the attribute of user registration data is found from multiple blockchains. The blockchain is composed of multiple blocks. By traversing each block in the target blockchain, the user identity in the user authorization information is searched and matched with the user registration. When the user registration data matching the user identity is found, the user identity authentication is confirmed to be passed. When the user registration data matching the user identity is not found in the target blockchain, the user medical record data that does not exist is fed back to the reading terminal. By verifying the user identity, the privacy of the user's medical record data is ensured. Only when the user has completed the user registration process, the authorization node feeds back the medical record data to the reading terminal when receiving the user's verification information.
[0051] S206, when the verification is passed, the medical record data of the authorized user is searched from the blockchain, and the target medical record data corresponding to the read content tag is extracted from the medical record data.
[0052] The blockchain is composed of multiple blocks, each of which stores medical record data. The process of searching for medical record data includes: searching for a target block storing user medical record data from the blockchain, and extracting target medical record data corresponding to the read content tag from the target block. In an embodiment, user registration information and medical record data can be written into different blockchains, or written into the same block or different blocks of the same blockchain, which is not limited here.
[0053] In a specific embodiment, the user registration information and the medical record data are written in the same block. In the process of verifying the user identity, the block where the user registration information is located is the target block. According to the basic information of the user carried in the medical record data, the medical record data of the user basic information terminal and the user identification as the authorized user is searched from the target block, and then according to the read content tag, the target medical record data corresponding to the read content tag is extracted from the medical record data. Specifically, according to the category in the read content tag, the target medical record data corresponding to the department category can be extracted from the medical record data.
[0054] S208, feeding back the target medical record data to the reading terminal.
[0055] The target medical record data may include the user's diagnosis information, test results, and prescription information, such as the diagnosis data of the last visit, CT scan results, medication status, etc. The node finds the target medical record data corresponding to the medical record data reading request from the blockchain, and feeds the medical record data back to the reading terminal.
[0056] The above-mentioned blockchain-based medical record data processing method verifies the user identity information through the user authorization information to ensure that the user's medical record data can only be provided under the premise of user authorization. Based on the blockchain that stores the user registration data and medical record data of each user at each node through a consensus mechanism, it effectively prevents the data from being tampered with and ensures the security of data storage. Through the read content tag carried by the medical record data read request, the target medical record data corresponding to the read content tag is searched and fed back to the reading terminal, thereby realizing targeted reading of the medical record data, preventing the medical record data from being tampered with and preventing the medical record data from being leaked without the user's authorization, thereby realizing the safe circulation of medical record data.
[0057] Each node in the medical record data sharing system can receive the medical record data uploaded by the doctor through the writing terminal during normal operation, and maintain the shared data in the medical record data sharing system based on the received medical record information. The writing terminal can also be a reading terminal. In order to ensure the information intercommunication in the medical record data sharing system, there can be an information connection between each node in the medical record data sharing system, and the nodes can transmit information through the above information connection. For example, when any node in the medical record data sharing system receives the medical record data, the other nodes in the medical record data sharing system obtain the medical record data according to the consensus algorithm, and store the medical record data as the data in the shared data, so that the data stored on all nodes in the medical record data sharing system are consistent. For each node in the medical record data sharing system, there is a node identifier corresponding to it, and each node in the medical record data sharing system can store the node identifiers of other nodes in the medical record data sharing system, so that the generated blocks can be broadcast to other nodes in the medical record data sharing system according to the node identifiers of other nodes in the future. A node identifier list can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. The node identifier may be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node.
[0058] In one embodiment, Figure 4 As shown, before receiving the medical record data reading request from the reading terminal, a medical record data writing process is also included, specifically including steps S402 to S406.
[0059] S402, receiving a medical record data storage request from a writing terminal, where the medical record data storage request carries an identity authentication identifier and medical record data to be written.
[0060] An identity authentication identifier refers to a data identifier used for identity authentication or identity registration. When a user stores medical records in a medical records data sharing system for the first time, user identity registration is required. When a user has completed user identity registration and needs to store medical records in a medical records data sharing system, the user's registration information is stored in the blockchain, and user identity information verification is required.
[0061] S404: Authorize and authenticate the user's identity based on the identity authentication identifier.
[0062] In one embodiment, authorization authentication of the user identity according to the identity authentication identifier includes: searching for a target block matching the identity authentication identifier from the blockchain according to the identity authentication identifier, and determining whether authorization authentication is passed according to the search result of the target block.
[0063] The target block that matches the identity authentication identifier may refer to a block used to store user registration data. In one embodiment, the user authentication identifier may be a hash value obtained by encrypting the user information, and each block in the blockchain also stores a hash value corresponding to the user information, which facilitates the verification of the user identity information.
[0064] In one of the embodiments, when the search result shows that the target block exists, it is confirmed that the authorization authentication is passed.
[0065] When the user has completed the user information registration, the target block matching the identity authentication identifier can be found from the blockchain according to the identity authentication identifier, thereby obtaining the result of authorization authentication. The purpose of verifying the user's identity is to ensure that the medical record data is uploaded with the user's authorization, thereby ensuring the authenticity of the medical record data at the source of the upload.
[0066] In another embodiment, when the search result shows that the target block does not exist, the shared block in the blockchain is used as the target block. The user registration data corresponding to the identity authentication identifier is obtained. The user registration data is written into the shared block, and when the writing is successful, it is confirmed that the authorization authentication is passed.
[0067] Specifically, when a user uses the medical record data sharing system for the first time, the user's registration data is not stored in the system. At this time, the user needs to register the identity according to the identity authentication identifier. The node can feedback the user registration data acquisition request to the writing terminal and receive the user registration data fed back by the terminal. The user registration data can include the user's basic information. The node can extract the user's ID number or medical insurance account number as user verification information; or it can also assign a registration account to the user, use the registration account as the user's user verification information, and return the registration account to the input terminal, so that the user can realize user identity authentication based on the registration account in the future, and then write and read medical record data in the medical record data sharing system. A shared block refers to a block in which any node can write user registration data, write user registration data to the target block, and perform consensus processing on the target block among the nodes in the medical record data sharing system. It prevents criminals from uploading medical records to the medical record data sharing system at will, causing the phenomenon of paralysis due to data overload.
[0068] S406, when the authorization authentication is passed, the medical record data to be written is stored in the blockchain and consensus processing is performed.
[0069] In one embodiment, Figure 5 As shown, the medical record data to be written is stored in the blockchain, and consensus processing specifically includes steps S502 to S508.
[0070] S502, when the authorization authentication is passed, determine the target block corresponding to the user identity in the blockchain.
[0071] S504, extracting the key corresponding to the user identity, encrypting the medical record data to be written according to the key, and generating a medical record block.
[0072] S506, based on the target block and the medical record block, write the medical record block into the blockchain through block hash processing.
[0073] S508, based on the consensus mechanism, the medical record block is processed by consensus in each authorized node of the blockchain.
[0074] In order to ensure the security of the medical record data stored in the medical record data sharing system and prevent everyone from reading the medical record data and causing the leakage of medical information involved in the medical record data, the medical record data sharing system stores the user registration data corresponding to each user who has registered in the medical record data sharing system. The user registration data and user verification information may include a key pair, and when a medical record data storage request is received, the medical record data to be written is encrypted and stored based on the key indicated by the medical record data write request, thereby ensuring the authenticity of the medical record data to be stored. The key pair includes a public key and a private key, and each user's private key is unique and different. The public key is public and stored in the medical record data sharing system; the private key is kept by the user and is only known to the user. The public key and private key are asymmetric keys. Files encrypted with a public key can be decrypted with a private key, and files encrypted with a private key can also be decrypted with a public key. In an embodiment, the medical record data to be written is encrypted by extracting the public key corresponding to the user identity identifier to obtain the block body of the medical record block, and the block hash processing is performed according to the hash value of the previous block. Specifically, the block includes a block header and a block body. The current block takes the previous block as the parent block. The block header of the current block stores the input information characteristic value of the current block, the block header characteristic value of the parent block, the version number, the timestamp, etc., and the block body stores the input information.
[0075] In one embodiment, the hash value of the target block is obtained, an update block carrying the hash value and the medical record block is generated, and the update block is added to the target block to obtain a blockchain carrying the medical record block. Through block hashing, the block data stored in the current block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.
[0076] In one embodiment, the writing process of the medical record data to be written is the same as the writing process of the user registration data. The writing process includes: using the user registration data or the medical record data to be written as the input data, verifying the input information, storing the input information in the memory pool after the verification is completed, and updating the hash tree used to record the input information; then, updating the update timestamp to the time when the input information is received, and trying different random numbers, and calculating the eigenvalue multiple times, so that the calculated eigenvalue can satisfy the following formula:
[0077] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x)) <TARGET
[0078] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits. When the random number that satisfies the above formula is calculated, the input data can be stored accordingly, the block header and block body are generated, and the current block is obtained. Subsequently, the node where the blockchain is located sends the newly generated blocks to other nodes in the medical record data sharing system where it is located according to the node identification of other nodes in the medical record data sharing system, and other nodes verify the newly generated blocks, and after completing the verification, the newly generated blocks are added to the blockchain stored there, completing the writing of the input data.
[0079] In one embodiment, Figure 6 As shown, taking the secure transfer process of medical record data as an example, the blockchain-based medical record data processing method in this application is explained.
[0080] After the user sees a doctor at Hospital A, Hospital A uploads the user's medical record data to the blockchain of the medical record data sharing system for evidence storage after obtaining the user's authorization. The authorization methods include: before uploading the data to the blockchain, the user performs fingerprint recognition on the fingerprint device of Hospital A, and the authorization is completed when the recognition is passed; or, the user performs face recognition through the face recognition device of Hospital A, and the authorization is completed when the recognition is passed; or, the user scans the authorization QR code in the corresponding medical management system through the terminal, and the authorization is completed when the user clicks to confirm.
[0081] When a user sees a doctor at Hospital B, the user can authorize the doctor at Hospital B. After obtaining the user's authorization, the doctor can view the user's medical record information through the reading terminal of the medical management system. Specifically, the doctor initiates an authorization request to obtain the user's medical record information from the user in the medical management system. The user can authorize the doctor through the above authorization method. After obtaining the user's authorization, the doctor will send a query request carrying the authorization information, including the user's identity information, fingerprint information, or face information, to the blockchain, so that the medical record information can be obtained from the blockchain.
[0082] In one embodiment, Figure 7 As shown, a most specific embodiment is used to illustrate the medical record data processing method based on blockchain in this application. The method includes the following steps S702 to S732.
[0083] S702, the node receives a medical record data storage request from a write terminal, and extracts the identity authentication identifier and the medical record data to be written carried in the medical record data storage request.
[0084] S704, according to the identity authentication identifier, searching the blockchain for a target block that matches the identity authentication identifier.
[0085] S706: When the search result shows that the target block exists, confirm that the authorization authentication is passed.
[0086] S708: When the search result shows that the target block does not exist, the shared block in the blockchain is used as the target block.
[0087] S710, obtaining user registration data corresponding to the identity authentication identifier.
[0088] S712, write the user registration data into the shared block, and when the writing is successful, confirm that the authorization authentication is passed.
[0089] S714, determining the target block corresponding to the user identity in the blockchain.
[0090] S716, extract the key corresponding to the user identity, encrypt the medical record data to be written according to the key, and generate a medical record block.
[0091] S718, obtain the hash value of the target block, and generate an update block carrying the hash value and the medical record block.
[0092] S720, adding the update block to the target block to obtain a blockchain carrying the medical record block.
[0093] S722, based on the consensus mechanism, the medical record block is processed by consensus in each authorized node of the blockchain.
[0094] S724, receiving a medical record data reading request from a reading terminal, the medical record data reading request carrying user authorization information and a reading content tag.
[0095] S726, searching for a target blockchain corresponding to the user authorization information from multiple blockchains.
[0096] S728, traverse each block in the target blockchain, and when user registration data matching the user identity identifier in the user authorization information is found, confirm that the user identity authentication is passed.
[0097] S730, searching the authorized user's medical record data from the blockchain, and extracting the target medical record data corresponding to the read content tag from the medical record data.
[0098] S732, feeding back the target medical record data to the reading terminal.
[0099] Figure 7 FIG. 1 is a flowchart of a method for processing medical record data based on blockchain in one embodiment. It should be understood that although Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0100] like Figure 8 As shown, in one embodiment, a medical record data processing device 800 based on blockchain is provided, which includes a read request receiving module 802, a user identity authentication module 804, a medical record data search module 806 and a medical record data feedback module 808.
[0101] The read request receiving module 802 is used to receive a medical record data read request from a reading terminal, where the medical record data read request carries user authorization information and a read content tag;
[0102] The user identity authentication module 804 is used to search the user registration data corresponding to the user authorization information from the blockchain according to the user authorization information, and verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on the consensus mechanism;
[0103] The medical record data search module 806 is used to search the medical record data of the authorized user from the blockchain when the verification is passed, and extract the target medical record data corresponding to the read content tag from the medical record data;
[0104] The medical record data feedback module 808 is used to feed back the target medical record data to the reading terminal.
[0105] In one of the embodiments, the user identity authentication module 804 also includes a search and matching unit, which is used to search for a target blockchain corresponding to the user authorization information from multiple blockchains; traverse each block in the target blockchain, and when user registration data matching the user identity identifier in the user authorization information is found, confirm that the user identity authentication is passed.
[0106] In one of the embodiments, the blockchain-based medical record data processing device 800 also includes a medical record data writing module, which is used to receive a medical record data storage request from a writing terminal, the medical record data storage request carries an identity authentication identifier and medical record data to be written; based on the identity authentication identifier, the user identity is authorized and authenticated; when the authorization authentication is passed, the medical record data to be written is stored in the blockchain, and consensus processing is performed.
[0107] In one of the embodiments, the medical record data writing module includes an authorization authentication unit, which is used to search for a target block matching the identity authentication identifier from the blockchain based on the identity authentication identifier; when the search result shows that the target block exists, it is confirmed that the authorization authentication is passed.
[0108] In one of the embodiments, the authorization authentication unit is also used to use the shared block in the blockchain as the target block when the search result shows that the target block does not exist; obtain the user registration data corresponding to the identity authentication identifier; write the user registration data into the shared block, and when the writing is successful, confirm that the authorization authentication is passed.
[0109] In one of the embodiments, the medical record data writing module includes a medical record block generation unit, which is used to determine the target block corresponding to the user identity in the blockchain when the authorization authentication is passed; extract the key corresponding to the user identity, and encrypt the medical record data to be written according to the key to generate a medical record block; write the medical record block into the blockchain through block hashing according to the target block and the medical record block; and based on the consensus mechanism, perform consensus processing on the medical record block at each authorized node of the blockchain.
[0110] In one of the embodiments, the medical record block generation unit is also used to obtain a hash value of a target block, generate an update block carrying the hash value and the medical record block; and add the update block to the target block to obtain a blockchain carrying the medical record block.
[0111] The above-mentioned blockchain-based medical record data processing device verifies the user identity information through the user authorization information to ensure that the user's medical record data can only be provided under the premise of user authorization. Based on the blockchain that stores the user registration data and medical record data of each user at each node through a consensus mechanism, it effectively prevents the data from being tampered with and ensures the security of data storage. Through the read content tag carried by the medical record data read request, the target medical record data corresponding to the read content tag is searched and fed back to the reading terminal, thereby realizing targeted reading of the medical record data, preventing the medical record data from being tampered with, and preventing the medical record data from being leaked without the user's authorization, thereby realizing the safe circulation of medical record data.
[0112] Fig. 9 The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1 Node 102 in Fig. 9 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement a medical record data processing method based on blockchain. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute a medical record data processing method based on blockchain. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0113] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In one embodiment, the medical record data processing device based on blockchain provided by the present application can be implemented in the form of a computer program, which can be used in Fig. 9 The computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules that constitute the medical record data processing device based on blockchain, for example, Figure 8The read request receiving module 802, the user identity authentication module 804, the medical record data search module 806 and the medical record data feedback module 808 are shown. The computer program composed of each program module enables the processor to execute the steps of the medical record data processing method based on blockchain in each embodiment of the present application described in this specification.
[0115] For example, Fig. 9 The computer device shown can be Figure 8 The read request receiving module 802 in the blockchain-based medical record data processing device shown executes to receive the medical record data read request of the reading terminal, and the medical record data read request carries the user authorization information and the read content tag; the computer device can execute through the user identity authentication module 804 to search the user registration data corresponding to the user authorization information from the blockchain according to the user authorization information, and verify the user identity; the computer device can execute through the medical record data search module 806 to search the medical record data of the authorized user from the blockchain when the verification is passed, and extract the target medical record data corresponding to the read content tag from the medical record data; the computer device can execute through the medical record data feedback module 808 to feedback the target medical record data to the reading terminal.
[0116] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the medical record data processing method based on blockchain. The steps of the medical record data processing method based on blockchain here may be the steps of the medical record data processing method based on blockchain in each of the above embodiments.
[0117] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the medical record data processing method based on blockchain. The steps of the medical record data processing method based on blockchain here can be the steps of the medical record data processing method based on blockchain in each of the above embodiments.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0119] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. It should be noted that in the specific implementation of the present application, data related to medical record data, etc., all need to be obtained through user authorization (i.e., with user consent). In other words, when the above embodiments of the present application are applied to specific products or technologies, the methods and related functions provided by the embodiments of the present application are operated with the permission or consent of the user (the functions provided by the embodiments of the present application can be actively opened by the user), and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0120] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A medical record data processing method based on blockchain, comprising: Receiving a medical record data reading request from a reading terminal, wherein the medical record data reading request carries user authorization information and a reading content tag; According to the user authorization information, the user registration data corresponding to the user authorization information is searched from the blockchain to verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism; the medical record data is stored in the blockchain by the writing terminal when the user authorization information is obtained; When the verification is passed, the medical record data of the authorized user is searched from the blockchain, and the target medical record data corresponding to the read content tag is extracted from the medical record data; Feedback the target medical record data to the reading terminal; The method for the reading terminal or the writing terminal to obtain the user authorization information includes: the reading terminal or the writing terminal sends an authorization request to the user terminal, and after receiving the authorization request, the user terminal displays an authorization option and a rejection option for the authorization request to the user through a user interaction interface. If the user selects the authorization option, the user authorization information is obtained in any one of the following ways: The user performs fingerprint recognition on the hospital's fingerprint device. Once the recognition is passed, the authorization is completed and the user authorization information is obtained; The user uses the hospital's face recognition device to perform face recognition. Once the recognition is passed, the authorization is completed and the user authorization information is obtained; The user scans the authorization QR code in the corresponding medical management system through the terminal. When the user clicks confirm, the authorization is completed and the user authorization information is obtained.
2. The method according to claim 1, characterized in that: The step of searching the blockchain for user registration data corresponding to the user authorization information according to the user authorization information to verify the user identity includes: Searching for a target blockchain corresponding to the user authorization information from multiple blockchains; Traversing each block in the target blockchain, when finding user registration data that matches the user identity identifier in the user authorization information, confirming that the user identity authentication is successful.
3. The method according to claim 1, characterized in that: Before receiving the medical record data reading request from the reading terminal, the method further includes: Receive a medical record data storage request from a writing terminal, wherein the medical record data storage request carries an identity authentication identifier and medical record data to be written; Authorizing and authenticating the user's identity according to the identity authentication identifier; When the authorization authentication is passed, the medical record data to be written will be stored in the blockchain and consensus processing will be carried out.
4. The method according to claim 3, characterized in that: The authorization and authentication of the user identity according to the identity authentication identifier includes: According to the identity authentication identifier, searching the blockchain for a target block that matches the identity authentication identifier; When the search result shows that the target block exists, it is confirmed that the authorization authentication is passed.
5. The method according to claim 4, characterized in that: After searching the blockchain for a target block matching the identity authentication identifier according to the identity authentication identifier, the method further includes: When the search result shows that the target block does not exist, the shared block in the blockchain is used as the target block; Obtaining user registration data corresponding to the identity authentication identifier; The user registration data is written into the shared block, and when the writing is successful, it is confirmed that the authorization authentication is passed.
6. The method according to claim 3, characterized in that: When the authorization authentication is passed, the medical record data to be written is stored in the blockchain, and consensus processing is performed, including: When the authorization authentication is passed, determining the target block corresponding to the user identity in the blockchain; Extracting the key corresponding to the user identity, encrypting the medical record data to be written according to the key, and generating a medical record block; According to the target block and the medical record block, the medical record block is written into the blockchain through block hash processing; Based on the consensus mechanism, the medical record block is processed by consensus at each authorized node of the blockchain.
7. The method according to claim 6, characterized in that: The step of writing the medical record block into the blockchain by block hashing according to the target block and the medical record block comprises: Obtaining a hash value of the target block, and generating an update block carrying the hash value and the medical record block; The update block is added to the target block to obtain a blockchain carrying the medical record block.
8. A medical record data processing device based on blockchain, characterized in that: The device comprises: A read request receiving module, used to receive a medical record data read request from a reading terminal, wherein the medical record data read request carries user authorization information and a read content tag; A user identity authentication module is used to search the blockchain for user registration data corresponding to the user authorization information according to the user authorization information, and verify the user identity, wherein each node of the blockchain pre-stores the user registration data and medical record data of each user based on a consensus mechanism; the medical record data is stored in the blockchain by the writing terminal when the user authorization information is obtained; A medical record data search module, used to search the medical record data of the authorized user from the blockchain when the verification is passed, and extract the target medical record data corresponding to the read content tag from the medical record data; A medical record data feedback module, used for feeding back the target medical record data to the reading terminal; The method for the reading terminal or the writing terminal to obtain the user authorization information includes: the reading terminal or the writing terminal sends an authorization request to the user terminal, and after receiving the authorization request, the user terminal displays an authorization option and a rejection option for the authorization request to the user through a user interaction interface. If the user selects the authorization option, the user authorization information is obtained in any one of the following ways: The user performs fingerprint recognition on the hospital's fingerprint device. Once the recognition is passed, the authorization is completed and the user authorization information is obtained; The user uses the hospital's face recognition device to perform face recognition. Once the recognition is passed, the authorization is completed and the user authorization information is obtained; The user scans the authorization QR code in the corresponding medical management system through the terminal. When the user clicks confirm, the authorization is completed and the user authorization information is obtained.
9. The device according to claim 8, characterized in that The user identity authentication module also includes a matching search unit; The search and matching unit is used to search for a target blockchain corresponding to the user authorization information from multiple blockchains; traverse each block in the target blockchain, and when user registration data matching the user identity identifier in the user authorization information is found, confirm that the user identity authentication is passed.
10. The device according to claim 8, characterized in that The blockchain-based medical record data processing device also includes a medical record data writing module; The medical record data writing module is used to receive a medical record data storage request from a writing terminal, wherein the medical record data storage request carries an identity authentication identifier and the medical record data to be written; according to the identity authentication identifier, the user identity is authorized and authenticated; when the authorization authentication is passed, the medical record data to be written is stored in the blockchain and consensus processing is performed.
11. The device according to claim 10, characterized in that The medical record data writing module includes an authorization authentication unit; The authorization authentication unit is used to search for a target block matching the identity authentication identifier from the blockchain according to the identity authentication identifier; when the search result shows that the target block exists, confirming that the authorization authentication is passed.
12. The device according to claim 11, characterized in that The authorization authentication unit is also used to, when the search result shows that the target block does not exist, use the shared block in the blockchain as the target block; obtain the user registration data corresponding to the identity authentication identifier; write the user registration data into the shared block, and when the writing is successful, confirm that the authorization authentication is passed.
13. The device according to claim 10, characterized in that The medical record data writing module includes a medical record block generation unit; The medical record block generation unit is used to determine the target block corresponding to the user identity in the blockchain when the authorization authentication is passed; extract the key corresponding to the user identity, encrypt the medical record data to be written according to the key, and generate a medical record block; According to the target block and the medical record block, the medical record block is written into the blockchain through block hash processing; Based on the consensus mechanism, the medical record block is processed by consensus at each authorized node of the blockchain.
14. The device according to claim 13, characterized in that The medical record block generation unit is also used to obtain the hash value of the target block, generate an update block carrying the hash value and the medical record block; add the update block to the target block to obtain a blockchain carrying the medical record block.
15. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
