Medical data interaction method, electronic device and storage medium
Through blockchain technology and smart contracts, permission management and encryption and decryption processing are carried out in medical data interaction, solving the problem of privacy protection in medical data interaction, and realizing data security and compliance interaction.
Patent Information
- Application Number
- CN202410416858.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-04-08
AI Technical Summary
How to ensure that medical data is protected in compliance and accurately during the interaction process to prevent the leakage of privacy information.
Using blockchain technology, medical data interaction between blockchain nodes is performed through smart contracts and encryption and decryption units, and data security and compliance are ensured using encryption and decryption algorithms and digital certificates. The blockchain user role is divided into doctors. , patients, supervisors and data service users, conduct data access and authorization management based on the authority of the role.
It realizes the security, compliance and accurate interaction of medical data, ensures the protection of patient privacy information and prevents unnecessary impact.
Smart Images

Figure CN118170849B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology applications, and in particular to a medical data interaction method, electronic equipment and storage medium. Background Art
[0002] In some application scenarios, users such as doctors and third-party organizations need to obtain some medical data about data of interest, such as patient's physical characteristics. However, since such data of interest involves private information, if there is data that does not meet the privacy protection regulations or such private data is leaked maliciously, it will have unnecessary impact on the owner of the data of interest. Therefore, how to ensure the safe circulation of such data is a problem worth exploring. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is:
[0004] According to a first aspect of the present invention, a medical data interaction method is provided, wherein an application scenario of the method includes at least a first end, m second ends, and a third end, wherein the first end, the second end, and the third end are all nodes on a blockchain, wherein the first end is connected to corresponding n first users in communication, and the i-th second end is connected to corresponding f(i) second users in communication; i ranges from 1 to m, and m is the number of second ends; the third end is connected to corresponding at least one third user in communication; the second end is an institution providing medical data, the first user is a user who owns the medical data, the second user is a user who requires medical data, and the third user is a supervisory user; the method comprises the following steps:
[0005] S100, in response to receiving a medical data request index, determining the role type of the requesting user corresponding to the received medical data request index, if the role type of the requesting user belongs to a role type with data request authority; executing S200; the medical data request index includes at least: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the user from whom data is requested, the ID of the data provider, and the data type of the requested data.
[0006] S200: If the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, the medical data request index is sent.
[0007] S300, in response to receiving the authorization information of the medical data request index, judging the role type of the authorized user corresponding to the received authorization information, if the role type of the authorized user belongs to the role type with authorization authority, and the ID of the authorized user is consistent with the ID of the user whose data in the medical data request index is requested, sending the authorization information; the authorization information includes at least: the corresponding medical data request index, authorization status, authorization occurrence time and authorization expiration time.
[0008] S400, in response to receiving the medical data access request information, judging the role type of the requesting user corresponding to the received medical data access request information, if the role type of the requesting user belongs to the role type with data access authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, executing S500; the medical data access request information at least includes: the corresponding medical data request index and the data query condition;
[0009] S500: If the authorization status and authorization expiration time of the authorization information of the medical data request index are both valid states indicating that the data requested by the current data requesting user is in a retrieval state, the medical data retrieval request information is sent.
[0010] S600, in response to receiving medical data evidence information, judging the role type of the evidence user corresponding to the received medical data evidence information, if the role type of the evidence user belongs to the role type with data providing authority, and the ID of the evidence user is consistent with the ID of the data providing terminal in the medical data request index, sending the medical data evidence information; the medical data evidence information at least includes: the corresponding medical data request index and the encrypted data access information, the data access information at least includes the storage address of the request data, the hash value of the request data plaintext and the symmetric key for encrypting the request data plaintext; the encrypted data access information includes first encrypted data access information and second encrypted data access information, the first encrypted data access information is obtained by encrypting the data access information using the public key of the corresponding data requester, and the second encrypted data access information is obtained by encrypting the data access information using the public key of the corresponding supervisory user. According to a second aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method of the first aspect of the present invention.
[0011] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the first aspect of the present invention.
[0012] The present invention has at least the following beneficial effects:
[0013] The medical data interaction method provided by the embodiment of the present invention, when receiving a medical data request index, judges the role type of the requesting user corresponding to the received medical data request index, if the role type of the requesting user is a role type with data request authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the index, the medical data request index is sent; when receiving authorization information of the medical data request index, judges the role type of the authorized user corresponding to the received authorization information, if the role type of the authorized user is a role type with authorization authority, and the ID of the authorized user is consistent with the ID of the data requested user in the index, the authorization information is sent; when receiving medical data retrieval request information, judges the role type of the requesting user corresponding to the received medical data retrieval request information, if the role type of the requesting user is a role type with data retrieval authority, and the ID of the requesting user is consistent with the ID of the data requested user in the index, the authorization information is sent. When the ID is consistent with the ID of the data requesting user in the index, the medical data access request information is sent; when the medical data evidence information is received, the role type of the evidence user corresponding to the received medical data evidence information is judged. If the role type of the evidence user belongs to the role type with data providing authority, and the ID of the evidence user is consistent with the ID of the data providing end in the index, the medical data evidence information is sent; wherein the medical data request index at least includes: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the data requested user, the ID of the data providing end and the data type of the requested data; the authorization information at least includes: the corresponding medical data request index, the authorization status, the authorization occurrence time and the authorization expiration time; the medical data access request information at least includes: the corresponding medical data request index and the data query conditions; the medical data evidence information at least includes: the corresponding medical data request index and the encrypted data access information. In this way, it can ensure that the interaction of medical data is compliant and accurate.
[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flowchart of a medical data interaction method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0019] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0020] An embodiment of the present invention provides a medical data interaction method, wherein an application scenario of the method includes at least a first end, m second ends, and a third end, wherein the first end, the second end, and the third end are all nodes on a blockchain, the first end is communicatively connected with corresponding n first users, the i-th second end is communicatively connected with corresponding f(i) second users; the value of i ranges from 1 to m, and m is the number of second ends; the third end is communicatively connected with at least one corresponding third user; the second end is an institution that provides medical data, the first user is a user who owns the medical data, the second user is a user who requires medical data, and the third user is a supervisory user.
[0021] Among them, encryption and decryption units are set on the nodes corresponding to the first end, the second end and the third end and private keys are deployed, and smart contracts are deployed on the blockchain network.
[0022] In an embodiment of the present invention, the encryption and decryption algorithm used by the encryption and decryption unit may be one or more of the following encryption and decryption algorithms: DES (Data Encryption Standard) data encryption standard algorithm, symmetric encryption AES, asymmetric encryption ECC, message digest MD5 or digital signature DSA. Preferably, the encryption and decryption algorithm used may be asymmetric encryption.
[0023] Those skilled in the art know that medical data may be all medical data generated in a hospital, including, for example, historical diagnosed disease types, number of treatments for similar diseases, attending physicians and hospitals visited, etc. Specifically, it may be electronic medical records, diagnostic and treatment plans, medical records, examination results data, medical consumption and expenses, etc.
[0024] In an embodiment of the present invention, the first user may be a patient, the second user may be a doctor, and the third user may be a user with regulatory authority, for example, including the National Health Commission, the Big Data Bureau, the Food and Drug Administration, etc. The first end may be a health center, the second end may be a medical institution, and the third end may be a regulatory center.
[0025] In an embodiment of the present invention, the second end can serve as both a data provider and a data demander. For example, if a user of a second end is a user who requires medical data, then the second end is the data demander, and the other requested second ends serve as data providers.
[0026] In an embodiment of the present invention, the first end to the third end are organized in a decentralized form of blockchain, and the interaction of medical data is achieved with the help of blockchain smart contracts and account book index data.
[0027] Furthermore, in the embodiment of the present invention, a custom attribute user_org_type is added to the user certificate on the blockchain, which means the type of user role. Users are divided according to organizations. User roles in the same organization have the same attribute values and the same permissions. User roles in the blockchain can be divided into doctor users, patient users, supervisor users, and data service users, and their organizations are divided in the following ways:
[0028] Health Center: Patient role management. All patient personal businesses interact with the blockchain through the blockchain node of the health center. The patient user-side certificate uniformly has the attribute HealthOrg: patientcenter. When the business is executed in the smart contract, the role attribute value is judged. The business can continue only after the contract transaction execution conditions are met. Using this attribute value, the authorized transaction in the smart contract can be limited to be called by patient users from the health center organization. For example, if a patient authorizes a doctor to access his or her electronic medical records and examination records, only users of the health center organization of the health chain can initiate a smart contract transaction for authorized access.
[0029] Medical institutions: Doctor role management. During medical diagnosis and treatment, doctors need to access patients' medical records and past examination records. Some medical data exists in other hospitals. Doctor user certificates uniformly have the attribute HealthOrg:hospital. When a doctor initiates a transaction for a request for authorization, the smart contract needs to confirm that the caller is a registered doctor from a certain hospital. Only when the caller's certificate is verified and the caller's identity is a doctor role in a hospital organization that has joined the health chain, the smart contract transaction will continue to execute.
[0030] Supervision Center: Supervision role management, monitoring and analysis of data flow compliance of blockchain business, whether the medical records of patients reviewed by doctors have changed during the review process, whether the medical records match the patients, whether the data is complete, and whether the data in circulation complies with laws and regulations. The user certificates of the supervision center uniformly have the attribute HealthOrg:supervision. The supervision role calls the smart contract transaction to query the supervision data and set the supervision rules. The smart contract verifies the identity of the caller. After confirming that the caller's organizational attribute is the supervision center, the transaction continues to execute.
[0031] Data service: The role of data provider provides data services such as data access, self-query, and data statistics to external users through the health chain. The data service will load the calculation target data, provide it to the data user through the data security channel, and store the data usage record in the health chain. The data provider user certificate uniformly has the attribute HealthOrg:dataservice. The data provider role calls the smart contract transaction to store the data usage record. The smart contract verifies the identity of the caller. After confirming that it is the data provider, the transaction continues to execute.
[0032] There are four types of user roles in the blockchain: doctor user, patient user, supervisor user, and data service user. The custom role attributes in their blockchain certificates are HealthOrg:hospital, HealthOrg:patientcenter, HealthOrg:supervision, and HealthOrg:dataservice. The smart contract transactions for accessing medical data services mainly include doctor requesting authorization ObtainPermission, patient authorization GrantPermission, doctor requesting access to patient data MedicalDataReq, data provider depositing and accessing data DepositMedicalData, supervisor auditing and recording SupervisionAudit, and supervisor publishing data flow rules DepositAuditResult. Among them, the initiator of the doctor requesting authorization and the doctor requesting access to patient data transactions must be a doctor user, and the user type attribute value in the certificate is HealthOrg:hospital. The initiator of the patient authorization transaction must be a patient user, and the user type attribute value in the certificate is HealthOrg:patientcenter. The initiator of the supervisor auditing and recording and supervisor publishing data flow rules transactions must be a supervisor user, and the user type attribute value in the certificate is HealthOrg:supervision. The initiator of the evidence access data record must be the data provider, and the user type attribute value in the certificate is HealthOrg:dataservice. When executing a transaction, the smart contract verifies whether the user role type of the transaction submitter's certificate matches. If they are consistent, the transaction continues to execute; otherwise, the transaction execution is terminated.
[0033] Furthermore, the medical data interaction method provided by the embodiment of the present invention may include: Figure 1 Steps shown:
[0034] S100, in response to receiving a medical data request index, determining the role type of the requesting user corresponding to the received medical data request index, if the role type of the requesting user is a role type with data request authority, executing S200; the medical data request index includes at least: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the user from whom data is requested, the ID of the data provider, and the data type of the requested data.
[0035] In a specific embodiment of the present invention, the ID of the data requesting user can be expressed as DataUserID, the ID of the organization to which the data requesting user belongs can be expressed as DataUserOrg, the ID of the user whose data is requested can be expressed as PatientID, the ID of the data provider can be expressed as DataServiceOrg, and the data type of the requested data can be expressed as DataCategory. In an embodiment of the present invention, the data type can be divided according to the department category, that is, the type of medical department from which the medical data comes.
[0036] In the embodiment of the present invention, in order to hide the patient's identity information and protect the patient's privacy, the ID of the user whose data is requested is a hash value, that is, PatientID is encrypted information. In an exemplary embodiment, a hash algorithm can be used for encryption. In addition, when authorizing, the patient needs to know which doctor in which hospital is requesting the data, which data providing hospital is requesting the data, and which department the requested data is from. Therefore, the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, and the ID of the data providing end are in plain text.
[0037] In an embodiment of the present invention, the ID of the data requester is generated based on the on-chain identity and entity identity of the data requesting user, the ID of the organization to which the data requesting user belongs is generated based on the on-chain identity and entity identity of the corresponding organization, the ID of the data requested user is generated based on the on-chain identity and entity identity of the data requested user, and the ID of the data provider is generated based on the on-chain identity and entity identity of the data provider.
[0038] Specifically, the identity authority management of the blockchain in the embodiment of the present invention relies on the digital certificate issued by the CA. The certificate chain can ensure that blockchain users are all authenticated by the CA center before joining the blockchain. In the business of medical data access, access to on-chain data and off-chain data exists at the same time, and the use of the two data is cross-application. When using off-chain data, it is necessary to ensure the authenticity and identity consistency of the operating user entity. That is, the identity of the doctor entity requesting authorization and accessing data matches the DataUserID in the index, and the identity of the operating entity authorized by the patient matches the PatientID.
[0039] In order to realize the joint authentication of the health chain identity certificate and the user identity of the medical data transfer service, the CA center associates the certificate and the user identity information. In the embodiment of the present invention, the entity identity authentication and the health chain certificate authentication are unified, so that one certificate can authenticate both the blockchain identity and the entity user identity. The specific operations are as follows:
[0040] (1) CA center adds user identity information verification
[0041] When a blockchain user requests a CA to issue a certificate, in addition to providing a CSR (Certificate Signing Request) file, the identity information file of the entity user is also added.
[0042] The doctor user uses the public key to generate a certificate signature request CSR file, and organizes the identity information such as the qualification certificate code, doctor's name, ID card information, face photo and other data to form an entity identity information file.
[0043] The patient user uses the public key to generate a certificate signature request CSR file, and organizes identity information such as social security number, name, ID card information, face photo, etc. to form an entity identity information file.
[0044] The client user submits the certificate signature CSR file and entity identity information file to the CA server. The CA verifies the CSR content and identity information respectively. If both are verified, the user's certificate is issued.
[0045] (2) Blockchain certificates extend the unique identification of user entity identity information
[0046] The CA service completes the verification of the certificate request information and issues a digital certificate based on the CSR file. Based on the uniqueness of the social security number, qualification certificate code, and ID number in actual business, the hash value of the certificate number, hash(id), is calculated and used as the unique identifier of the user entity identity. The CA service constructs the identity content subjectIdentity=hash(id) and adds it as an extension field to the issued digital certificate. The certificate contains both the blockchain user identity uniquely determined by the public key and the entity user identity uniquely determined by the user certificate, realizing the association between the CA certificate and the user entity identity information.
[0047] In an embodiment of the present invention, the medical data request index determines the user, owner, source and type of the data, and is a globally unique identifier for medical data, such as patient medical data. At the same time, the creation of the index identifies a medical data retrieval task. One index corresponds to a data flow task, and the index is used to connect the entire medical data retrieval authorization request, patient authorization, data retrieval, data evidence, compliance supervision and other stages. The index coordinates multiple parties in data retrieval, connects the status of each stage of data retrieval, controls the data retrieval business process, uniquely identifies the data retrieval task, locates the patient's medical data, and performs evidence audit and traceability.
[0048] In actual application scenarios, the data requesting user creates a medical data request index, calls the authorization request transaction of the smart contract, records the index into the blockchain, generates a task to access data, and creates a task event. The smart contract determines whether the user type attribute value corresponding to the data requesting user who submits the medical data request index is HealthOrg:hospital. If so, it means that the data requesting user is a user with data request permission, and the request will be approved. Otherwise, it will not be approved. In this way, it can be ensured that each role executes the corresponding permissions. The specific judgment process is: the data requesting user's ID plaintext can be recalculated and the hash value can be compared with the hash value in the corresponding certificate. If they are consistent, it means that the data requesting user is a user with data request permission.
[0049] In the embodiment of the present invention, obtaining a hash value is a process of calculating a string plaintext using a hash algorithm, which is an irreversible encryption and cannot be decrypted. Different string plaintexts generate different hash values. The hash algorithm may include MD5, SHA1, SHA256, SM3 and many other algorithms.
[0050] S200: If the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, the medical data request index is sent.
[0051] After determining that the requesting user is a user with data access permission, the smart contract will determine whether the requesting user's ID is consistent with the data requesting user's ID in the medical data request index, namely DataUserID. If they are consistent, it means that the requesting user is the user who actually requests the data, and the corresponding medical data request index will be sent through the blockchain.
[0052] S300, in response to receiving the authorization information of the medical data request index, judging the role type of the authorized user corresponding to the received authorization information, if the role type of the authorized user belongs to the role type with authorization authority, and the ID of the authorized user is consistent with the ID of the user whose data in the medical data request index is requested, sending the authorization information; the authorization information includes at least: the corresponding medical data request index, authorization status, authorization occurrence time and authorization expiration time.
[0053] In actual application scenarios, when a patient user organized by a health center listens to a contract event and determines that the PatientID is consistent with his or her own UserID, he or she responds to the event, signs the authorization transaction and submits it to the blockchain. In an illustrative embodiment, the authorization state can be represented as AuthState, the authorization time can be represented as AuthTime, and the authorization expiration time can be represented as ValidTime. The authorization state includes a first state indicating that the data requested by the data requesting user is agreed to be sent to the data requesting user and a second state indicating that the data requested by the data requesting user is not agreed to be sent to the data requesting user. The authorization time refers to the time when the authorization is issued, and the authorization expiration time refers to the time period during which the data can be accessed.
[0054] When the blockchain receives the authorization information of the medical data request index, the smart contract will first determine whether the user type attribute value of the authorized user corresponding to the authorization information is HealthOrg:patientcenter. If it is, it means that the authorized user is a user with authorization authority. Otherwise, the sending of the authorization information is blocked. The specific judgment process is: the hash value of the authorized user's ID plain text can be calculated and compared with the hash value in the corresponding certificate. If they are consistent, it means that the authorized user is a user with authorization authority.
[0055] After determining that the authorized user is a user with authorization authority, the smart contract will continue to determine whether the authorized user's ID is consistent with the PatientID in the index. If they are consistent, it means that the authorized user is the user whose data is requested in the medical data request index, and the authorization information will be sent to the blockchain.
[0056] S400, in response to receiving a medical data retrieval request information, determining the role type of the requesting user corresponding to the received medical data retrieval request information, if the role type of the requesting user is a role type with data retrieval authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index; executing S500; the medical data retrieval request information includes at least: a corresponding medical data request index and data query conditions.
[0057] In the embodiment of the present invention, the data query condition is a query condition for required data, which may be a custom condition, for example, lung cancer patients. In an illustrative embodiment, the data query condition may be expressed as Condargs.
[0058] In actual application scenarios, when the data requesting user listens to the authorization information, the corresponding data access request information will be generated and sent to the chain. When the blockchain receives the medical data access request information, the smart contract will first determine whether the user type attribute value of the authorized user corresponding to the data access request information is HealthOrg:hospital. If so, it means that the user is a user with data access permission. Otherwise, the sending of this information will be blocked. After determining that the requesting user is a user with data access permission, the smart contract will continue to determine whether the requesting user's ID is consistent with the DataUserID in the index. If they are consistent, it means that the requesting user is the data requesting user in the medical data request index.
[0059] S500: If the authorization status and authorization expiration time of the authorization information of the medical data request index are both valid states indicating that the data requested by the current data requesting user is in a retrieval state, the medical data retrieval request information is sent.
[0060] After determining that the requesting user is the same as the data requesting user in the medical data request index, the smart contract determines whether the AuthState and ValidTime of the authorization information of the medical data request index are valid. If so, that is, AuthState is in the first state and ValidTime has not expired, it means that the data requesting user can currently obtain the data of the data requested user, and then the data retrieval request information is sent to the blockchain.
[0061] S600, in response to receiving medical data evidence information, judging the role type of the evidence user corresponding to the received medical data evidence information, if the role type of the evidence user belongs to the role type with data providing authority, and the ID of the evidence user is consistent with the ID of the data providing end in the medical data request index, sending the medical data evidence information; the medical data evidence information at least includes: the corresponding medical data request index and the encrypted data access information, the data access information at least includes the storage address of the request data, the hash value of the request data plaintext and the symmetric key for encrypting the request data plaintext; the encrypted data access information includes the first encrypted data access information and the second encrypted data access information, the first encrypted data access information is obtained by encrypting the data access information using the public key of the corresponding data requester, and the second encrypted data access information is obtained by encrypting the data access information using the public key of the corresponding supervisory user. In this way, symmetric encryption is used to efficiently encrypt and protect patient medical data, the symmetric key and the data address are protected by public key encryption, and only the data requesting user and the supervisory user who have the private key can finally obtain the plaintext information of the patient's medical data, thereby preventing the leakage of patient privacy information.
[0062] In an embodiment of the present invention, the data provider listens to the data retrieval request information, responds to the data retrieval event, and determines whether the DataServiceOrg in the index of the retrieved data is consistent with its own organization number. If they are consistent, it will process the target data for retrieval and pass the evidence information corresponding to the retrieved data information to the blockchain.
[0063] In an exemplary embodiment of the present invention, the first encrypted data access information may be expressed as Encrydata, and the second encrypted data access information may be expressed as Supervisedata.
[0064] After the medical data evidence information is uploaded to the chain, the smart contract will first determine whether the user type attribute value of the evidence user corresponding to the evidence information is HealthOrg:dataservice. If so, it means that the evidence user is a user with data provision authority. Otherwise, the sending of the evidence information is blocked. After determining that the evidence user is a user with data provision authority, the smart contract will continue to determine whether the ID of the evidence user is consistent with the DataUserOrg in the index. If they are consistent, it means that the evidence user is the data provider in the medical data request index, and the evidence information will be sent to the blockchain.
[0065] After the medical data evidence information is uploaded to the chain, the data requesting user will use his own private key to decrypt the first encrypted data access information received, obtain the address of the access data in the data security channel and the symmetric key of the encrypted data, and then use the data address to read the encrypted access data, and use the symmetric key to decrypt and obtain the data plaintext for the corresponding medical business calculations. The supervisory user will use his own private key to decrypt the second encrypted data access information received, obtain the address of the access data in the data security channel and the symmetric key of the encrypted data, and then use the data address to read the encrypted access data, and use the symmetric key to decrypt and obtain the data plaintext, review whether the accessed data is compliant and meets the data flow rules issued by the regulator, and verify whether the data mapped by EncryptData and SuperviseData are consistent.
[0066] Furthermore, in an embodiment of the present invention, the supervisory user is used to judge whether the received medical data evidence information meets the preset supervisory requirements, and generate corresponding supervisory information if it is judged that the preset supervisory requirements are not met.
[0067] In the embodiment of the present invention, the preset regulatory requirements can be determined based on actual conditions, as long as they can ensure the safe circulation of medical data, and the present invention does not make any special limitations.
[0068] Further, in the embodiment of the present invention, S100 may be replaced by the following steps:
[0069] S110, in response to receiving a medical data request index, determining the role type of the requesting user corresponding to the received medical data request index, if the role type of the requesting user is a role type with data request authority, and the label corresponding to the requesting user is not an abnormal label, executing S200; the medical data request index includes at least: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the user requested by the data, the ID of the data provider, and the data type of the requested data; the abnormal label is generated based on regulatory information.
[0070] In the embodiment of the present invention, if the data obtained by a certain user does not meet the preset conditions, the user tag is an abnormal tag.
[0071] In an embodiment of the present invention, if the label corresponding to the data requesting user is an abnormal label, it means that the user has obtained data that does not comply with the preset regulatory requirements, and the submitted medical data request index will not be allowed. In this way, all data interactions can comply with the preset regulatory requirements and ensure the security of data transmission.
[0072] Further, in the embodiment of the present invention, S400 is replaced by:
[0073] S410, in response to receiving a medical data retrieval request message, determining the role type of the requesting user corresponding to the received medical data retrieval request message, if the role type of the requesting user is a role type with data retrieval authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, and the data type corresponding to the medical data request index is not an abnormal data type, sending the medical data retrieval request message; the medical data retrieval request message includes at least: a corresponding medical data request index and data query conditions; the abnormal data type is generated based on regulatory information.
[0074] In the embodiment of the present invention, if the data type requested by the data requesting user is a data type that does not comply with preset regulatory requirements, it is an abnormal data type.
[0075] In an embodiment of the present invention, if the data type requested by the data requesting user belongs to an abnormal data type, the corresponding medical data retrieval request information will not be sent, thus ensuring secure data interaction.
[0076] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the present invention.
[0077] The embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.
[0078] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0079] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A medical data interaction method, characterized in that: The application scenario of the method at least includes a first terminal, m second terminals, and a third terminal, wherein the first terminal, the second terminal, and the third terminal are all nodes on the blockchain, the first terminal is connected to the corresponding n first users in communication, and the i-th second terminal is connected to the corresponding f(i) second users in communication; the value of i ranges from 1 to m, and m is the number of second terminals; the third terminal is connected to the corresponding at least one third user in communication; the second terminal is an institution providing medical data, the first user is a user who owns the medical data, the second user is a user who needs medical data, and the third user is a supervisory user; the method comprises the following steps: S100, in response to receiving a medical data request index, determining a role type of a requesting user corresponding to the received medical data request index, if the role type of the requesting user is a role type having data request authority; Execute S200; The medical data request index includes at least: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the user from whom data is requested, the ID of the data provider, and the data type of the requested data; S200, if the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, sending the medical data request index; S300, in response to receiving the authorization information of the medical data request index, judging the role type of the authorized user corresponding to the received authorization information, and if the role type of the authorized user belongs to the role type with authorization authority, and the ID of the authorized user is consistent with the ID of the user whose data is requested in the medical data request index, sending the authorization information; the authorization information at least includes: the corresponding medical data request index, authorization status, authorization occurrence time and authorization expiration time; S400, in response to receiving the medical data access request information, judging the role type of the requesting user corresponding to the received medical data access request information, if the role type of the requesting user belongs to the role type with data access authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, executing S500; the medical data access request information at least includes: the corresponding medical data request index and the data query condition; S500, if the authorization status and authorization expiration time of the authorization information of the medical data request index are both valid states indicating that the data requested by the current data requesting user is in a retrieval state, the medical data retrieval request information is sent; S600, in response to receiving medical data evidence information, judging the role type of the evidence user corresponding to the received medical data evidence information, if the role type of the evidence user belongs to the role type with data providing authority, and the ID of the evidence user is consistent with the ID of the data provider in the medical data request index, sending the medical data evidence information; the medical data evidence information at least includes: the corresponding medical data request index and the encrypted data retrieval information, the data retrieval information at least includes the storage address of the requested data, the hash value of the plaintext of the requested data and the symmetric key for encrypting the plaintext of the requested data; the encrypted data retrieval information includes first encrypted data retrieval information and second encrypted data retrieval information, the first encrypted data retrieval information is obtained by encrypting the data retrieval information using the public key of the corresponding data requester, and the second encrypted data retrieval information is obtained by encrypting the data retrieval information using the public key of the corresponding supervisory user.
2. The method according to claim 1, characterized in that The ID of the data requester is generated based on the on-chain identity and entity identity of the data requesting user. The ID of the organization to which the data requesting user belongs is generated based on the on-chain identity and entity identity of the corresponding organization. The ID of the data requested user is generated based on the on-chain identity and entity identity of the data requested user. The ID of the data provider is generated based on the on-chain identity and entity identity of the data provider.
3. The method according to claim 2, characterized in that The ID of the user requesting the data is a hash value.
4. The method according to claim 1, characterized in that The supervisory user is used to judge whether the received medical data evidence information meets the preset supervisory requirements, and generate corresponding supervisory information if it is judged that the preset supervisory requirements are not met.
5. The method according to claim 4, characterized in that S100 is replaced by: S110, in response to receiving a medical data request index, determining the role type of the requesting user corresponding to the received medical data request index, if the role type of the requesting user is a role type with data request authority, and the label corresponding to the requesting user is not an abnormal label, executing S200; the medical data request index includes at least: the ID of the data requesting user, the ID of the organization to which the data requesting user belongs, the ID of the user requested by the data, the ID of the data provider, and the data type of the requested data; the abnormal label is generated based on regulatory information.
6. The method according to claim 4, characterized in that S400 is replaced by: S410, in response to receiving a medical data retrieval request information, determining the role type of the requesting user corresponding to the received medical data retrieval request information; if the role type of the requesting user is a role type with data retrieval authority, and the ID of the requesting user is consistent with the ID of the data requesting user in the medical data request index, and the data type corresponding to the medical data request index is not an abnormal data type, executing S500; the medical data retrieval request information includes at least: a corresponding medical data request index and a data query condition; the abnormal data type is generated based on regulatory information.
7. An electronic device, characterized in that: It comprises a processor and a memory; the processor is used to execute the steps of the method according to any one of claims 1 to 6 by calling the program or instruction stored in the memory.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 6.
