Data security sharing method, system and equipment
By separating searchable and encrypted search from stored procedures in the electronic medical record system and adopting an optimized inverted index structure, the shortcomings of the electronic medical record system in terms of data sharing, efficiency and security are solved, and efficient and secure data sharing and retrieval are achieved.
Patent Information
- Application Number
- CN202411645884.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing electronic medical record system has shortcomings in data sharing, efficiency and security, making it difficult to achieve efficient and secure data sharing, and the efficiency of ciphertext data retrieval is low.
By separating the searchable encryption search from the stored procedure, an optimized inverted index structure is proposed. The doctor client uses the public key of the patient client to encrypt the EMR, store the EMR ciphertext on the cloud server, and efficiently query it through the inverted index table on the blockchain.
It has realized efficient query of electronic medical records on blockchain, improved the efficiency of medical data retrieval, and realized efficient and secure data sharing among different medical institutions, improving the shortcomings of existing systems in data sharing, efficiency and security.
Smart Images

Figure CN119580911A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a data security sharing method, system and device. Background Art
[0002] With the demand for information construction and development in my country, information construction in the medical industry is an important part. Against the background of the development of the Internet, medical scenarios are changing faster and faster, and the diversification of demands and terminals requires medical information systems to be able to respond to changes quickly.
[0003] In today's electronic medical record sharing solutions, third-party cloud servers are semi-trusted, and there are internal attacks such as attempts to crack, monitor or guess trapdoor information on encrypted electronic medical records. At the same time, external attackers may illegally obtain, intercept, tamper with or forge transmission information during trapdoors and file transmissions, and use some technical means to perform statistical analysis on trapdoors and returned files, try to find the inherent connections or guess related information contained therein, and conduct keyword guessing attacks. With the growing demand for storage and sharing of electronic medical records, the blockchain system has gradually revealed problems such as high system overhead and difficult data retrieval due to the growth of on-chain data. If the function of ciphertext retrieval is added, the efficiency of data retrieval will be further reduced, which will undoubtedly cause a poor user experience. At present, searchable encryption technology can allow direct search of encrypted data while ensuring data encryption, effectively improving data retrieval efficiency and playing an important role in protecting data privacy.
[0004] However, the current methods make it difficult to achieve efficient and secure data sharing between different medical institutions, the data processing efficiency is low, and it cannot meet the needs of rapid retrieval. Summary of the invention
[0005] In view of the deficiencies of electronic medical record systems in the prior art in terms of data sharing, efficiency and security, the present invention proposes a data security sharing method, system, device and storage medium, which solves the problems existing in the prior art by separating the searchable encrypted retrieval and storage processes and proposing an optimized inverted index structure.
[0006] A data security sharing method, wherein the scenario of data security sharing includes a doctor client, a patient client, a third-party user client, a cloud server and a blockchain, wherein the blockchain generates a public parameter according to a given security parameter, and the doctor client and the patient client generate their respective corresponding public keys and private keys according to the public parameter; the method comprises the following steps:
[0007] The medical data of the patient client is encrypted; the encryption process specifically includes: the doctor client establishes an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the public key generated by the patient client to obtain C w ; At the same time, the public key generated by the patient client is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions;
[0008] The doctor client generates an obfuscation trapdoor set using the medical record number and keywords generated by the patient client and sends it to the blockchain for retrieval. The patient client's medical data is decrypted based on the obfuscation trapdoor. After the third-party user client obtains authorization from the patient client, it obtains the decrypted EMR data through the doctor client.
[0009] Furthermore, the generation process of the obfuscated trapdoor includes the following steps:
[0010] After being authorized by the patient client, the doctor client uses the private key to calculate the correct trapdoor, and generates multiple error trapdoors by XORing the correct trapdoor and the random number;
[0011] The correct trapdoor and the wrong trapdoor use the private key of the doctor to encrypt the medical record number to generate the correct medical record number and the wrong medical record number;
[0012] The correct trapdoor and the wrong trapdoor are combined with the correct medical record number and the wrong medical record number to form a confusion trapdoor set;
[0013] The correct trapdoor position is located through the Tag, and the Tag is encrypted using the homomorphic encryption algorithm Paillier, and the obfuscated trapdoor set is sent to the blockchain for retrieval.
[0014] Furthermore, the doctor client generates an obfuscation trapdoor set through the medical record number and keywords generated by the patient client and sends it to the blockchain for retrieval, and decrypts the medical data of the patient client according to the obfuscation trapdoor, specifically including the following steps:
[0015] The doctor client generates a set of obfuscated trapdoors using the patient client’s medical record number and keywords and sends them to the blockchain for retrieval;
[0016] After receiving the obfuscated trapdoor set, the blockchain calculates the tag value through Paillier and selects the correct trapdoor;
[0017] Decrypt the encrypted medical record number and preliminarily screen whether there is EMR data of the patient client in the inverted index table. If it exists, execute the trapdoor matching algorithm. If the match is successful, the encrypted EMR data C is obtained. f Index address on the cloud server f , according to Index f Calculate C f The hash value and Hash(C f ) Verify C f The doctor client uses the private key SK p C f Decryption.
[0018] Furthermore, the blockchain generates public parameters according to given security parameters, specifically including the following steps:
[0019] Given a security parameter λ, construct two finite cyclic groups G1 and G2, and a bilinear map e:G1×G1→G2;
[0020] Select the generator g of G1 and define two national secret SM3 hash functions: H1:{0,1} * →G1,H2:G2→{0,1} logλ ; then the public parameters Params = {G1, G2, e, g, H1, H2}, G1, G2, e, g, H1, H2 are all intermediate variables.
[0021] Furthermore, the doctor client and the patient client generate their own corresponding public and private keys according to the public parameters, specifically including: when the patient client visits the doctor, according to the input public parameter Params, randomly selects As the private key SK p and public key PK p =g α ; Doctor client randomly selects As the private key SK d and public key PK d =g x , is a positive integer that contains all those less than q and coprime with q, ɑ and x are random numbers.
[0022] Furthermore, the inverted index table includes a quick lookup table and a position table; the quick lookup table is represented by T={ID i ,C(w i ,PK p )}, ID i represents the patient's EMR medical record number, C(w i ,PK p ) represents the keyword ciphertext in PEKS, where w is the keyword plaintext, PKp is the public key of the patient client, C is the keyword encryption algorithm, and i is an index number;
[0023] The position table L consists of a position array A wi It consists of the transaction hash addresses of all documents corresponding to a certain keyword ciphertext on the blockchain.
[0024] Furthermore, for each patient client’s EMR data, the patient client’s public key PK p Use asymmetric encryption algorithm RSA to encrypt EMR data to generate C f .
[0025] Furthermore, when the patient client visits a doctor, the department or other attributes of the patient client are used as the keyword C, and the doctor client randomly selects a Through the patient client's public key PK p Calculate C w =(g α ,H2(e(H1(W),g αz ))),C f and C w Upload to the local server, z is a random variable, g az is the public key of the patient client and the public key calculated from the random variable z.
[0026] The present invention also includes a data security sharing system, wherein the scenario of data security sharing includes a doctor client, a patient client, a third-party user client, a cloud server and a blockchain, wherein the blockchain generates a public parameter according to a given security parameter, and the doctor client and the patient client generate their respective corresponding public and private keys according to the public parameter, including:
[0027] The encryption module is used to encrypt the medical data of the patient client. The encryption process specifically includes: the doctor client creates an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the patient client's public key to obtain C w ; At the same time, the patient client's public key is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions;
[0028] The query module is used by the doctor client to generate an obfuscation trapdoor set through the patient client's medical record number and keywords and send it to the blockchain for retrieval, and decrypt the patient client's medical data based on the obfuscation trapdoor; after the third-party user obtains the patient client's authorization, he or she can obtain the decrypted EMR data through the doctor client.
[0029] The present invention also includes a data security sharing computer device, including: a memory, a processor and a computer program stored in the memory, and the processor implements the steps of the data security sharing method when executing the computer program.
[0030] The present invention provides a data security sharing method, system and device, which have the following beneficial effects:
[0031] The present invention separates the searchable encrypted retrieval from the storage process. The doctor client uses the public key of the patient client to encrypt the generated EMR, stores the EMR ciphertext on the cloud server, and proposes an optimized inverted index structure. This can effectively ensure the efficiency of querying electronic medical records on the blockchain, solving the problem of low efficiency in retrieval of ciphertext data. When the patient client visits the doctor for the second time or has an examination in other hospitals, the doctor client can retrieve the relevant cases of the patient client on the blockchain and query them on the cloud. When a third-party user client wants to query the data of the patient client, it obtains the relevant data through the authorization of the patient client. This method realizes efficient medical data retrieval, and at the same time can realize efficient and secure data sharing between different medical institutions, thereby comprehensively improving the deficiencies of the existing electronic medical record system in data sharing, efficiency and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a technical framework diagram of data security sharing based on blockchain and searchable encryption in an embodiment of the present invention;
[0033] Figure 2 This is a diagram of an inverted index structure in an embodiment of the present invention;
[0034] Figure 3 This is a diagram of the obfuscation trapdoor set in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0036] The present invention proposes a data security sharing method, in which medical institutions negotiate to build a blockchain system and subscribe to a cloud server as a medical cloud. Each medical institution has a local server to process business, and the keys in the model are stored in a third-party trusted key management center. The blockchain stores transaction information such as keyword ciphertext, medical record number, case hash, etc., and the cloud server stores electronic medical record ciphertext. The main body of the present invention includes a doctor client, a patient client, a third-party user client, a cloud server and a blockchain.
[0037] Doctor client: After diagnosing and examining the patient, an EMR is created for the patient, which contains the patient's basic information, diagnosis information, medical record number, etc. The EMR is encrypted and uploaded to the cloud server. At the same time, the hash value of the EMR is calculated, and the keywords are extracted and encrypted in the EMR. The keyword ciphertext, medical record number, case hash, case index, and doctor identity information are uploaded to the blockchain system as a transaction for storage. During the diagnosis process, if the doctor needs to understand the patient, he can query the patient's medical record by sending a trap to the blockchain to provide accurate diagnosis results.
[0038] Patient client: When a patient visits a hospital, he / she should first register his / her identity based on the patient information or some other means, and generate a public-private key pair exclusive to the patient client. The doctor client uses the patient client's public key to encrypt the generated EMR and stores the EMR ciphertext on the cloud server. When the patient visits the hospital for a second time or is examined in another hospital, the doctor can retrieve the patient client's related cases on the chain and query them on the cloud. When a third-party user client other than the doctor client wants to use the data, it needs to be authorized by the patient client to access it.
[0039] Third-party user client: When third-party data users such as pharmaceutical companies, insurance companies, and the National Health Commission need to use the medical data of the patient client, they need to obtain authorization from the patient client and then obtain relevant data through the doctor client.
[0040] Cloud Server: The cloud server stores the EMR ciphertext of the patient client and provides a secure and reliable retrieval service when retrieving the file ciphertext through the EMR index.
[0041] Blockchain: Blockchain is the core of the cloud chain model and the bridge between users and cloud servers. Since the alliance chain has the advantages of high efficiency, security and easy scalability, the blockchain in this model adopts the alliance chain method. The blockchain stores the keywords, hash values, logs and other information of the patient client EMR, uses keywords to provide retrieval services, returns the hash value, index and other information of the EMR, and then retrieves the EMR ciphertext on the cloud server.
[0042] like Figure 1 As shown, the method specifically comprises the following steps:
[0043] S1. Build a scenario for secure data sharing, including doctor client, patient client, third-party user client, cloud server and blockchain. The blockchain generates public parameters based on given security parameters, and the doctor client and patient client generate their respective public and private keys based on the public parameters.
[0044] The system will execute security parameters to generate public parameters Params. The doctor client and patient client will generate their own public and private keys based on Params for encryption and decryption of electronic medical record data. Third-party user clients do not participate in the ciphertext search algorithm and obtain the patient's authorization through other authentication methods, and the doctor client will retrieve it on their behalf.
[0045] Initialize variables: Given a security parameter λ, construct two finite cyclic groups G1 and G2, and a bilinear map e:G1×G1→G2. Select the generator g of G1, and define two national secret SM3 hash functions: H1:{0,1} * →G1,H2:G2→{0,1} logλ Public parameters Params = {G1, G2, e, g, H1, H2}.
[0046] n=p×q (1)
[0047] φ(n)=(p-1)×(q-1) (2)
[0048] Calculate the public key exponent e and the private key exponent d:
[0049] gcd(e,φ(n))=1,1<e<φ(n) (3)
[0050] d≡e -1 (modφ(n)) (4)
[0051] Calculate λ:
[0052] λ=lcm(p-1,q-1) (5)
[0053] Calculate μ:
[0054] μ=(λ -1 modn) (6)
[0055] Public parameters Params = {G1, G2, e, g, H1, H2, p, q, σ, λ, μ}.
[0056] Among them, G1, G2, e, g, H1, H2, p, q, σ, λ, μ are all intermediate variables.
[0057] The patient client enters the public parameters Params when visiting the doctor, and randomly selects As the private key SKp , public key PK p =g α ; Doctor client randomly selects As the private key SK d , public key PK d =g x ; Select RSA public key PK1 = (e, n), RSA private key SK1 = (d, n); Select Paillier homomorphic encryption public key PK2 = n, private key SK2 = (λ, μ). PK1 and SK1 represent RSA public and private keys. The RSA public key is used to encrypt the electronic medical record data and store it on the cloud server. After the searchable encrypted retrieval is completed, the RSA private key is used to decrypt it; PK2 and SK2 represent Paillier homomorphic encryption public and private keys. The public key is used when encrypting several trapdoors to form a confused trapdoor set in the trapdoor generation phase, and the private key is used when verifying the correct trapdoor on the server.
[0058] S2. Encrypt the medical data of the patient client. The encryption process specifically includes: the doctor client creates an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the patient client's public key to obtain C. w ; At the same time, the patient client's public key is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions.
[0059] Index table construction: Build an index table based on inverted index locally to speed up the search efficiency of EMR. The index table can be synchronized to other nodes through the characteristics of blockchain distributed system to avoid leakage. The constructed index table structure is as follows Figure 2 As shown, the inverted index table I consists of two parts, one of which is a quick lookup table and the other is a position table.
[0060] Quick Lookup Table T = {ID i ,C(w i ,PK p )}, ID i represents the patient's EMR medical record number, C(w i ,PK p ) represents the keyword ciphertext in PEKS, where w is the keyword plaintext, PK p is the patient's public key, C is the keyword encryption algorithm; first, for each keyword wi Generate an identifier IDi and then encrypt the keyword w i Generate keyword ciphertext, add IDi and keyword ciphertext to quick-lookup table T, and when querying, decrypt the query keyword for each transaction, which is equal to w after decryption i , the hash value of the transaction, w i And the hash of IDi is added to the list L.
[0061] The position table L consists of the position array A wi It contains the transaction hash addresses of all documents corresponding to a certain keyword ciphertext on the blockchain. The blockchain uses the medical record number ID of the EMR in the quick lookup table to obtain the i After a preliminary screening, the verification algorithm in PEKS is used to check whether the keyword is valid. After obtaining the transaction hash, the result is directly queried to avoid PEKS wasting computing power on verifying irrelevant transactions on the blockchain.
[0062] Initialize the inverted index structure I using the quick lookup table T and the location table L.
[0063] By constructing a national secret ciphertext search algorithm based on inverted index, the efficiency of querying electronic medical records on the blockchain can be effectively guaranteed, and a trapdoor obfuscation strategy can be added to ensure that attackers cannot obtain the correlation between the trapdoor and the results.
[0064] S2.1. For each patient client’s EMR data, use RSA to obtain the patient client’s public key PK p Encrypted EMR data generation C f :
[0065] C f =f e (modn)(7).
[0066] S2.2. When a patient visits a doctor, the department or other attributes he / she visits are used as the keyword C. The doctor client randomly selects a keyword C. Through the patient client public key PK p Calculate C w =(g α ,H2(e(H1(W),g αz ))),C f and C w Upload to a local server.
[0067] S2.3, the local server will C f Upload to the cloud server, the cloud server returns the data storage index Index f , the local server is based on C w 、Hash(C f ), Index fGenerate an inverted index table I and upload it to the blockchain through transactions. The blockchain will put the transaction on the chain after the consensus mechanism.
[0068] S3. Generate a trapdoor.
[0069] If a doctor client wants to view the EMR data of a patient client containing a specific keyword, it first requests authorization from the patient client and then uses the private key SK of the doctor client. d Calculate Trapdoor TD a =H1(C) x , and according to the correct trapdoor TD a XOR with the random number s to generate i error trapdoors that meet the trapdoor format TD'=(TD1, TD2, ..., TD i ), TD a Use private key SK with TD' d Encrypt medical record number to generate correct medical record number Enc a (ID) and wrong medical record number Enc i (ID). The above trapdoor and the encrypted medical record number form a confusion trapdoor set, such as Figure 3 As shown, the array Tag = (0,0,…,1,0,…i) is initialized so that the correct trap index position in the obfuscated trap set is 1, and the rest are 0, and a random number is selected. And use the Paillier homomorphic encryption algorithm to encrypt each element to get C tag :
[0070]
[0071] C tag =[C tag1 ,C tag2 ,…C tagi ] (9)
[0072] Finally, the obfuscated trapdoor set is sent to the blockchain for retrieval.
[0073] If a third-party client user wants to obtain relevant data, he needs to obtain authorization from the patient client and generate a trapdoor through the doctor client and send it to the blockchain for query.
[0074] S4. Ciphertext retrieval and decryption.
[0075] When the patient client visits the doctor for the second time, if the doctor client needs to query the patient client's previous EMR data to provide higher quality diagnosis and treatment, the doctor client generates a set of obfuscated trapdoors based on the patient client's medical record number and the keywords to be searched and sends them to the blockchain for retrieval. After the blockchain receives the obfuscated trapdoor set, it initializes the array Tag0 = (0,0,…,i) and selects a random number Encrypt each element using the Paillier homomorphic encryption algorithm to obtain C tag0 :
[0076]
[0077] C tag and C tag0 Multiply to get C m :
[0078]
[0079] Decrypt each ciphertext to get m:
[0080]
[0081] The function:
[0082]
[0083] Calculate the tag value, select the correct trapdoor, decrypt the encrypted medical record number, and preliminarily screen whether the patient's EMR data exists in the inverted index table. If it exists, execute the trapdoor matching algorithm and test:
[0084] H2(e(T w ,S1))=S2(15)
[0085] Where T w represents a trapdoor, S1 and S2 represent C w If the match is successful, the encrypted EMR data C is obtained. f Index address on the cloud server f , calculate C f The hash value and Hash(C f ) to verify the integrity of the data, and finally the doctor uses SK1 to f Decrypted EMR data:
[0086]
[0087] The main computational overheads in the present invention are shown in Table 1, where the execution time of basic operations is ranked as T q >T p >T e >T h ,The computational overhead of other basic operations is much smaller than these four calculations. The following comparative analysis only considers these four computational overheads.
[0088] Table 1 Basic operation cost table
[0089]
[0090] The execution time of the encryption phase and the search phase of the searchable encrypted data sharing scheme based on inverted index proposed by the present invention is compared with that of the prior art. As shown in Table 2, although the present invention involves obfuscation strategy and homomorphic encryption, the computational overhead of the encryption phase and the search phase is smaller than that of the prior art scheme. The computational overhead of the prior art scheme in the encryption phase is 3T q +4T e +3T p , while the present invention only needs 3T q +3T e +2T p , which has two fewer exponential operations and one less bilinear pairing operation. The computational overhead of the existing technical solution in the search phase is T q +2T e +2T p , the present invention only needs T q +T p +T h , which requires two fewer exponential operations and one less bilinear pairing operation. Although one more homomorphic operation is added, it consumes less time and the overall search phase time is better than the existing technical solution. The existing technical solution adopts a dual-chain structure, which requires a lot of system overhead when verifying the consistency of private chain and alliance chain data. The cloud chain collaborative model adopted by the present invention is more suitable for scenarios with large amounts of electronic medical record data.
[0091] Table 2 Computational cost comparison table
[0092]
[0093] The algorithm of the present invention is subjected to numerical simulation experiments, and the computational efficiency of the present invention is analyzed by changing the number of keywords, and the number of keywords is set to 10, 20, 30, 40 and 50. The experimental results are the average value of 50 runs of the algorithm, and the results are shown in Table 3.
[0094] Table 3 Execution schedule of the algorithm of the present invention
[0095]
[0096] The system construction phase simulates the initialization of the system and various parameters. The data encryption phase simulates the encryption of the patient's EMR data and keywords. The trap generation phase simulates the generation of search traps when the data user searches. The ciphertext retrieval phase simulates the process of receiving the obfuscated trap set, using the traps and keywords to match on the blockchain, and finally returning the EMR data from the cloud server. The decryption phase simulates the decryption of the patient's client EMR ciphertext data. As can be seen from the table, the computational consumption of the system construction phase and the data decryption phase does not change with the number of keywords. The data encryption phase, the trap generation phase, and the ciphertext retrieval phase are all related to keywords and are proportional to the number of keywords. Since these three phases involve multiple bilinear pairing operations, exponential operations, and hash mapping to group operations, the computational consumption increases slowly.
[0097] Based on the same inventive concept, the present invention also proposes a data security sharing system, wherein the scenarios of data security sharing include a doctor client, a patient client, a third-party user client, a cloud server and a blockchain, wherein the blockchain generates a public parameter according to a given security parameter, and the doctor client and the patient client generate their respective corresponding public and private keys according to the public parameter; including:
[0098] The encryption module is used to encrypt the medical data of the patient client. The encryption process specifically includes: the doctor client creates an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the patient client's public key to obtain C w ; At the same time, the patient client's public key is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions.
[0099] The query module is used by the doctor client to generate an obfuscation trapdoor set through the patient client's medical record number and keywords and send it to the blockchain for retrieval, and decrypt the patient client's medical data based on the obfuscation trapdoor; after the third-party user obtains the patient client's authorization, he or she can obtain the decrypted EMR data through the doctor client.
[0100] The present invention also proposes a data security sharing computer device, comprising: a memory, a processor and a computer program stored in the memory, and the processor implements the steps of the data security sharing method when executing the computer program.
[0101] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A data security sharing method, wherein the scenario of data security sharing includes a doctor client, a patient client, a third-party user client, a cloud server and a blockchain, wherein the blockchain generates a public parameter according to a given security parameter, and the doctor client and the patient client generate their respective corresponding public key and private key according to the public parameter, characterized in that: The method comprises the following steps: The medical data of the patient client is encrypted; the encryption process specifically includes: the doctor client establishes an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the public key generated by the patient client to obtain C w ; At the same time, the public key generated by the patient client is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions; The doctor client generates an obfuscation trapdoor set using the medical record number and keywords generated by the patient client and sends it to the blockchain for retrieval. The patient client's medical data is decrypted based on the obfuscation trapdoor. After the third-party user client obtains authorization from the patient client, it obtains the decrypted EMR data through the doctor client.
2. A data security sharing method according to claim 1, characterized in that: The generation process of the obfuscated trapdoor comprises the following steps: After being authorized by the patient client, the doctor client uses the private key to calculate the correct trapdoor, and generates multiple error trapdoors by XORing the correct trapdoor and the random number; The correct trapdoor and the wrong trapdoor use the private key of the doctor to encrypt the medical record number to generate the correct medical record number and the wrong medical record number; The correct trapdoor and the wrong trapdoor are combined with the correct medical record number and the wrong medical record number to form a confusion trapdoor set; The correct trapdoor position is located through the Tag, and the Tag is encrypted using the homomorphic encryption algorithm Paillier, and the obfuscated trapdoor set is sent to the blockchain for retrieval.
3. A data security sharing method according to claim 2, characterized in that: The doctor client generates a set of obfuscation trapdoors through the medical record number and keywords generated by the patient client and sends them to the blockchain for retrieval. The medical data of the patient client is decrypted according to the obfuscation trapdoors, specifically including the following steps: The doctor client generates a set of obfuscated trapdoors using the patient client’s medical record number and keywords and sends them to the blockchain for retrieval; After receiving the obfuscated trapdoor set, the blockchain calculates the tag value through Paillier and selects the correct trapdoor; Decrypt the encrypted medical record number and preliminarily screen whether there is EMR data of the patient client in the inverted index table. If it exists, execute the trapdoor matching algorithm. If the match is successful, the encrypted EMR data C is obtained. f Index address on the cloud server f , according to Index f Calculate C f The hash value and Hash(C f ) Verify C f The doctor client uses the private key SK p C f Decryption.
4. A data security sharing method according to claim 1, characterized in that: The blockchain generates public parameters according to given security parameters, specifically including the following steps: Given a security parameter λ, construct two finite cyclic groups G1 and G2, and a bilinear map e:G1×G1→G2; Select the generator g of G1 and define two national secret SM3 hash functions: H1:{0,1} * →G1,H2:G2→{0,1} logλ ; then the public parameters Params = {G1, G2, e, g, H1, H2}, G1, G2, e, g, H1, H2 are all intermediate variables.
5. A data security sharing method according to claim 4, characterized in that: The doctor client and the patient client generate their own corresponding public and private keys according to the public parameters, specifically including: when the patient client visits the doctor, according to the input public parameter Params, randomly select As the private key SK p and public key PK p =g α ; Doctor client randomly selects As the private key SK d and public key PK d =g x , is a positive integer that contains all those less than q and coprime with q, ɑ and x are random numbers.
6. A data security sharing method according to claim 5, characterized in that: The inverted index table includes a quick lookup table and a position table; the quick lookup table is represented by T={ID i ,C(w i ,PK p )}, ID i represents the patient's client EMR medical record number, C(w i ,PK p ) represents the keyword ciphertext in PEKS, where w is the keyword plaintext, PK p is the public key of the patient client, C is the keyword encryption algorithm, and i is an index number; The position table L consists of a position array A wi It consists of the transaction hash addresses of all documents corresponding to a certain keyword ciphertext on the blockchain.
7. A data security sharing method according to claim 6, characterized in that: For each patient client’s EMR data, the patient client’s public key PK p Use asymmetric encryption algorithm RSA to encrypt EMR data to generate C f .
8. A data security sharing method according to claim 6, characterized in that: When the patient client visits the doctor, the department or other attributes of the patient are used as the keyword C. The doctor client randomly selects a Through the patient client's public key PK p Calculate C w =(g α ,H2(e(H1(W),g αz ))),C f and C w Upload to the local server, z is a random variable, g az is the public key of the patient client and the public key calculated from the random variable z.
9. A data security sharing system, wherein the scenarios of data security sharing include a doctor client, a patient client, a third-party user client, a cloud server and a blockchain, wherein the blockchain generates a public parameter according to a given security parameter, and the doctor client and the patient client generate their respective corresponding public and private keys according to the public parameter, characterized in that: include: An encryption module, used to encrypt patient client medical data; The encryption process specifically includes: the doctor client creates an EMR for the patient client after the consultation, extracts the keyword C, and encrypts the keyword C using the patient client's public key to obtain C w ; At the same time, the patient client's public key is used to encrypt the EMR and generate C f , and calculate the hash value Hash(C f ); C f Send to the cloud server to obtain the storage index of the data f ; The local server is based on C w 、Hash(C f ), Index f Generate an inverted index table and upload it to the blockchain through transactions; The query module is used by the doctor client to generate an obfuscation trapdoor set through the patient client's medical record number and keywords and send it to the blockchain for retrieval, and decrypt the patient client's medical data based on the obfuscation trapdoor; after obtaining the patient client's authorization, the third-party user obtains the decrypted EMR data through the doctor client.
10. A data security sharing computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, wherein the processor implements the steps of the data security sharing method according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Electronic medical record sharing method, system and equipment based on block chain and storage medium
CN116469501A
Electronic medical record security sharing system and method combining quantum key and block chain
CN116527709A
Sensitive medical document search verification method based on verifiable dynamic symmetry searchable encryption
CN118013572A
Method for producing positive electrode active material, positive electrode active material, positive electrode and secondary battery comprising the same
KR1020210101912A