A multi-disease privacy-preserving medical pre-diagnosis method and system based on partially homomorphic encryption

By adopting partial homomorphic encryption technology in Internet medical diagnosis, the problems of accuracy and privacy protection in Internet medical diagnosis are solved, and the secure transmission and accurate comparison of data are achieved, ensuring the privacy and security of user data.

CN115085899BActive Publication Date: 2024-12-03HENAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210809646.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2024-12-03
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

There are accuracy and privacy protection issues in Internet medical diagnosis, especially in the process of data transmission, it is difficult to effectively prevent privacy leakage.

Method used

Adopt a multi-disease privacy-protecting medical prediagnosis method based on partial homomorphic encryption. By generating system parameters and keys, data encryption and signature is used using a secure hash function and a bilinear signature algorithm to ensure that it is in the medical service provider and users. Secure comparison and verification are carried out during data transmission to prevent data tampering.

Benefits of technology

It effectively protects the privacy of users' medical diagnostic data, prevents privacy leakage, and realizes secure comparison of data and accurate acquisition of diagnostic results under encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115085899B_ABST
    Figure CN115085899B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical privacy protection technology, and discloses a multi-disease privacy protection medical pre-diagnosis method and system based on partially homomorphic encryption. The method uses a random forest classifier for medical diagnosis, including a system initialization phase, query vector generation, pre-diagnosis service, and query result analysis. The method mainly uses a partially homomorphic encryption algorithm, which is used to implement a secure comparison protocol. It can compare data under data encryption, and can correspond one-to-one with each node of the random forest, and compare to obtain a diagnosis result. The present invention can effectively protect the data security in the process of medical pre-diagnosis service, and uses a signature algorithm to prevent the data transmission process from being tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical privacy protection technology, and in particular to a multi-disease privacy protection medical pre-diagnosis method and system based on partially homomorphic encryption. Background Art

[0002] A new type of medical method has emerged with the rapid development of the Internet. It uses hospitals as the background support, organizes medical resources in actual and virtual ways, transfers some services that can be performed off-site to the Internet platform, and provides in-depth medical and health care services for different consumer groups. As the living standards of the Chinese people continue to improve, people pay more attention to their own health, but the current medical resources in my country are still unevenly distributed in different regions, showing that large hospitals are overcrowded and primary medical institutions are deserted. The rapid development of artificial intelligence has brought new opportunities to the medical industry, but also new challenges due to the uncertainty of its development. Moreover, most people are unfamiliar with hospitals, and sometimes they waste a lot of unnecessary time in the face of some unknown diseases. Therefore, it has become a trend to diagnose medical diseases through the Internet, and the accuracy and privacy protection issues that follow have also become problems that must be solved. After all, medical problems are related to the lives of patients, and things can be big or small. On this basis, a privacy-protected multi-disease medical pre-diagnosis plan is formulated to help people obtain disease diagnosis knowledge more conveniently. Summary of the invention

[0003] In response to the accuracy and privacy protection issues in diagnosing medical diseases through the Internet, the present invention proposes a multi-disease privacy-preserving medical pre-diagnosis method and system based on partially homomorphic encryption, which can protect the user's data privacy during the medical diagnosis process and effectively prevent privacy leakage.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] On the one hand, the present invention proposes a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption, comprising:

[0006] Step 1: Initialize the system, including generating system parameters, initializing the medical service provider SP and the medical user User;

[0007] Step 2: The User generates an encrypted query vector, signs it and sends it to the SP; the query vector includes the User's physiological feature data;

[0008] Step 3: SP uses the SHE public key to encrypt the local random forest classifier, and uses a secure comparison method to compare the query vector with the corresponding node thresholds in the random forest classifier to obtain the pre-diagnosis result;

[0009] Step 4: Return the encrypted pre-diagnosis result to the User, and the User obtains the pre-diagnosis result after decryption.

[0010] Further, the generation of system parameters includes:

[0011] By running the bilinear parameter generator Gen of the BLS signature algorithm, with the security parameter κ as the input, output a 5-tuple (p, g, G, G T , ); where G, G T are two cyclic groups of prime order p; g is the generator of the group G; the bilinear mapping G×G→G T ; p is a prime number of k bits in length; select a cryptographic hash function H: {0,1} * →G.

[0012] Further, the initialization of the medical service provider SP includes:

[0013] The SP selects a random number as the private key sk of the BLS signature algorithm SP = s SP , and the public key

[0014] Further, the initialization of the medical user User includes:

[0015] a. Select the SHE encryption algorithm, including the key generation algorithm Gen(), the encryption algorithm Enc(), and the decryption algorithm Dec();

[0016] 1) Gen(k0, k1, k2): When the input security parameters {k0, k1, k2} satisfy k1 << k2 < k0, the key generation algorithm first selects two large prime numbers p, q, |p| = |q| = k0, and generates the private key where is a random number, Then, calculate and set the public parameters Finally, set the basic message space

[0017] 2) Enc pk (m): With the public key pk and the message as the input, the encryption algorithm outputs the ciphertext Enc pk (m) = m + r1·Enc sk (0)1 + r2·Enc sk (0)2 mod N, where is a random number; Enc sk (0)1 and Encsk (0)2 represents the ciphertext of 0 encrypted with different random numbers. The message is encrypted using the private key sk The encryption algorithm is where and are random numbers;

[0018] 3) Dec sk (Enc pk (m)): When the user inputs the private key sk and the ciphertext Enc pk (m), the decryption algorithm recovers the message When , it means m ≥ 0 and m = m'; otherwise, m < 0,

[0019] b. Generate system keys;

[0020] User selects security parameters {k0, k1, k2} such that k1 << k2 < k0 and executes the key generation algorithm Gen(k0, k1, k2) to generate system cryptographic parameters, including the private key the public key pk U =(Enc sk (0)1, Enc sk (0)2), Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers, and the public parameters

[0021] c. Generate signature keys;

[0022] User selects a random number as its signature private key BS U = s U , and the public key

[0023] d. Send keys;

[0024] User sends pk U and BK U to SP through a secure communication channel.

[0025] Furthermore, the step 2 includes:

[0026] Step 2.1: Obtain the physiological characteristics of the User;

[0027] The User obtains an n-dimensional physiological data x = (v1, v2,..., v n ) through their own wearable device;

[0028] Step 2.2: extracting and encrypting the n-dimensional physiological data features;

[0029] According to the feature selection method of SP random forest classifier, feature selection is performed on the n-dimensional physiological data to obtain a vector x1=(v1, v2,…, v k ), User uses his own public key pk U Encrypt x1 to get

[0030] Step 2.3: User signs and sends to SP;

[0031] Each User registers at the SP and obtains an ID before undergoing medical diagnosis. U , User uses his own signature private key pair Sign Where TS1 is the current timestamp and sends the encrypted query vector to SP.

[0032] Furthermore, the step 3 comprises:

[0033] Step 3.1: SP receives After that, first check the timestamp TS1 and user ID U ;

[0034] Step 3.2: Verification It is a bilinear mapping. After verifying that the equation holds, SP obtains

[0035] Step 3.3: SP generates an encrypted random forest classifier;

[0036] SP uses User's public key pk U Encrypt each non-leaf node of the decision tree w in the local random forest classifier to obtain The decision tree w=(w1,w2,…,w k ),i∈[1,k],w i It is a non-leaf node of the decision tree, representing the threshold of each physiological feature;

[0037] Step 3.4: A safe comparison is performed with the decision tree threshold to obtain the query vector v through this method. i With the decision tree threshold w i The comparison results;

[0038] Step 3.5: SP uses the coin tossing mechanism to get s∈{-1,1} and selects two random numbers r1, r2 need to satisfy r1>r2>0;

[0039] Step 3.6: SP calculation The calculation formula is as follows:

[0040]

[0041] SP communicates via a secure channel Send to User;

[0042] Step 3.7: User receives When first using its own private key sk U To restore α; check α, if α<0, then otherwise, and will Send to SP;

[0043] Step 3.8: SP receives After that, check the value of s. When s=1, the output of the security comparison protocol is When s = -1, calculate

[0044] Step 3.9: If v i <w i ,but

[0045] Step 3.10: If Then repeat steps 3.6 to 3.8, and compare the next feature of the query vector with the left subtree node threshold of the node; otherwise, use the next feature of the query vector to compare with the right subtree node threshold of the node until the feature comparison is completed, and obtain the result of the random forest classifier C = {C1, C2, ..., C k};

[0046] Step 3.11: Encrypt the k diagnostic results to obtain k∈[1,f]; SP uses its own private key to sign the diagnosis result, Where TS2 is the current timestamp and sends to User.

[0047] Furthermore, the step 4 comprises:

[0048] Step 4.1: User receives the message sent by SP First check the timestamp TS1 and user ID U ;

[0049] Step 4.2: Verify the signature If the equation holds, the user gets

[0050] Step 4.3: After decryption, we get C, and sort the results according to the number of times the disease appears. The one with the highest number of occurrences is the query result of this medical diagnosis. At the same time, we get the disease risk list of the user based on the sorting.

[0051] On the other hand, the present invention proposes a multi-disease privacy-preserving medical pre-diagnosis system based on partially homomorphic encryption, comprising:

[0052] The system initialization module is used to initialize the system, including: generating system parameters, initializing the medical service provider SP and the medical user User;

[0053] A query vector generation module is used for the User to generate an encrypted query vector, which is signed and sent to the SP; the query vector includes the User's physiological feature data;

[0054] Pre-diagnosis query module, used by SP to encrypt the local random forest classifier using the SHE public key, and use the secure comparison method to compare the query vector with the corresponding node thresholds in the random forest classifier to obtain the pre-diagnosis result;

[0055] The pre-diagnosis result obtaining module returns the encrypted pre-diagnosis result to the User, who obtains the pre-diagnosis result after decryption.

[0056] Furthermore, the generation system parameters include:

[0057] By running the bilinear parameter generator Gen of the BLS signature algorithm, taking the security parameter κ as input, it outputs a 5-tuple (p, g, G, G T , );G,G T are two cyclic groups with order p; g is a generator of group G; bilinear mapping G×G→G T ; p is a prime number of length κ bits; choose a cryptographic hash function H: {0,1} * →G.

[0058] Furthermore, the medical service provider SP initialization includes:

[0059] SP chooses a random number As the private key sk of the BLS signature algorithm SP =s SP , public key

[0060] Furthermore, the medical user User initialization includes:

[0061] a. Select the SHE encryption algorithm, including the key generation algorithm Gen(), the encryption algorithm Enc(), and the decryption algorithm Dec();

[0062] 1) Gen(k0,k1,k2): When the input security parameters {k0,k1,k2} satisfy k1 << k2 < k0, the key generation algorithm first selects two large prime numbers p, q, |p| = |q| = k0, and generates the private key where is a random number, Then, calculate and set the public parameters Finally, set the basic message space

[0063] 2) Enc pk (m): Taking the public key pk and the message as input, the encryption algorithm outputs the ciphertext Enc pk (m) = m + r1·Enc sk (0)1 + r2·Enc sk (0)2 mod N, where is a random number; Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers. The encryption algorithm for encrypting the message using the private key sk is where and are random numbers;

[0064] 3) Dec sk (Enc pk (m)): When the user inputs the private key sk and the ciphertext Enc pk (m), the decryption algorithm recovers the message When it means m ≥ 0, m = m′; otherwise, m < 0,

[0065] b. Generate the system key;

[0066] User selects the security parameters {k0,k1,k2} satisfying k1 << k2 < k0, and executes the key generation algorithm Gen(k0,k1,k2) to generate the system password parameters, including the private key the public key pk U =(Enc sk (0)1, Enc sk (0)2), Enc sk (0)1 and Enc sk(0)2 means the ciphertext of 0 is encrypted with different random numbers, and the public parameter pp = (k0, k1, k2, N);

[0067] c. Generate a signing key;

[0068] User chooses to select a random number As its signature private key BS U =s U , public key

[0069] d. Send the key;

[0070] User will pk U and BK U Sent to SP via a secure communication channel.

[0071] Furthermore, the query vector generation module is specifically used for:

[0072] Step 2.1: Obtain User's physiological characteristics;

[0073] The user obtains an n-dimensional physiological data x=(v1, v2,…, v n );

[0074] Step 2.2: extracting and encrypting the n-dimensional physiological data features;

[0075] According to the feature selection method of SP random forest classifier, feature selection is performed on the n-dimensional physiological data to obtain a vector x1=(v1, v2,…, v k ), User uses his own public key pk U Encrypt x1 to get

[0076] Step 2.3: User signs and sends to SP;

[0077] Each User registers at the SP and obtains an ID before undergoing medical diagnosis. U , User uses his own signature private key pair Sign Where TS1 is the current timestamp and sends the encrypted query vector to SP.

[0078] Furthermore, the pre-diagnosis query module is specifically used for:

[0079] Step 3.1: SP receives After that, first check the timestamp TS1 and user ID U ;

[0080] Step 3.2: Verification It is a bilinear mapping. After verifying that the equation holds, SP obtains

[0081] Step 3.3: SP generates an encrypted random forest classifier;

[0082] SP uses User's public key pk U Encrypt each non-leaf node of the decision tree w in the local random forest classifier to obtain The decision tree w=(w1,w2,…,w k ),i∈[1,k],w i It is a non-leaf node of the decision tree, representing the threshold of each physiological feature;

[0083] Step 3.4: A safe comparison is performed with the decision tree threshold to obtain the query vector v through this method. i With the decision tree threshold w i The comparison results;

[0084] Step 3.5: SP uses the coin tossing mechanism to get s∈{-1,1} and selects two random numbers r1, r2 need to satisfy r1>r2>0;

[0085] Step 3.6: SP calculation The calculation formula is as follows:

[0086]

[0087] SP communicates via a secure channel Send to User;

[0088] Step 3.7: User receives When first using its own private key sk U To restore α; check α, if α<0, then otherwise, and will Send to SP;

[0089] Step 3.8: SP receives After that, check the value of s. When s=1, the output of the security comparison protocol is When s = -1, calculate

[0090] Step 3.9: If v i <w i ,but

[0091] Step 3.10: If Then repeat steps 3.6 to 3.8, and compare the next feature of the query vector with the left subtree node threshold of the node; otherwise, use the next feature of the query vector to compare with the right subtree node threshold of the node until the feature comparison is completed, and obtain the result of the random forest classifier C = {C1, C2, ..., C k};

[0092] Step 3.11: Encrypt the k diagnostic results to obtain k∈[1,f]; SP uses its own private key to sign the diagnosis result, Where TS2 is the current timestamp and sends to User.

[0093] Furthermore, the pre-diagnosis result obtaining module is specifically used for:

[0094] Step 4.1: User receives the message sent by SP First check the timestamp TS1 and user ID U ;

[0095] Step 4.2: Verify the signature If the equation holds, the user gets

[0096] Step 4.3: After decryption, we get C, and sort the results according to the number of times the disease appears. The one with the highest number of occurrences is the query result of this medical diagnosis. At the same time, we get the disease risk list of the user based on the sorting.

[0097] Compared with the prior art, the present invention has the following beneficial effects:

[0098] The present invention uses a partially homomorphic encryption algorithm, and utilizes the algorithm to implement a secure comparison protocol, which can compare data while encrypting the data, and can correspond one-to-one with each node of the random forest, and compare to obtain a diagnosis result. The present invention can effectively protect the data security in the process of medical pre-diagnosis services, and uses a signature algorithm to prevent the data transmission process from being tampered with. The present invention protects the data privacy of users in the process of medical diagnosis and effectively prevents privacy leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] Figure 1 This is one of the flow charts of a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption according to an embodiment of the present invention;

[0100] Figure 2This is the second flowchart of a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption in an embodiment of the present invention;

[0101] Figure 3 This is an application scenario diagram of a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption according to an embodiment of the present invention;

[0102] Figure 4 This is a schematic diagram of the architecture of a multi-disease privacy-preserving medical pre-diagnosis system based on partially homomorphic encryption in an embodiment of the present invention. DETAILED DESCRIPTION

[0103] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0104] like Figure 1 , Figure 2 As shown in the figure, a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption is proposed. The application scenarios of this method are as follows: Figure 3 As shown, the method specifically includes:

[0105] S1. System initialization

[0106] Parameter generation:

[0107] Let G,G T are two cyclic groups with order p. g is the generator of group G, and the bilinear map G×G→G T The bilinear parameter generator Gen that runs the BLS signature algorithm is a probabilistic algorithm that takes the security parameter κ as input and outputs a 5-tuple (p, g, G, G T , ), where p is a prime number of length κ bits. Choose a secure cryptographic hash function H: {0,1} * →G.

[0108] Healthcare Service Provider (SP):

[0109] SP chooses a random number As the private key sk of the BLS signature algorithm SP =s SP , public key The secure BLS signature algorithm is used to ensure that data is not tampered with during transmission.

[0110] Medical User:

[0111] (1) Select the SHE encryption algorithm, including the key generation algorithm Gen(), the encryption algorithm Enc(), and the decryption algorithm Dec().

[0112] 1) Gen(k0, k1, k2): When the input security parameters {k0, k1, k2} satisfy k1 << k2 < k0, the key generation algorithm first selects two large prime numbers p, q, where |p| = |q| = k0, and generates the private key where is a random number, Then, the algorithm calculates and sets the public parameters Finally, set the basic message space

[0113] 2) Enc pk (m): Taking the public key pk and the message as input, the encryption algorithm outputs the ciphertext Enc pk (m) = m + r1·Enc sk (0)1 + r2·Enc sk (0)2 mod N, where is a random number; Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers. The encryption algorithm for encrypting the message using the private key sk is where and are random numbers;

[0114] 3) Dec sk (Enc pk (m)): When the user inputs the private key sk and the ciphertext Enc pk (m), the decryption algorithm recovers the message When it means m ≥ 0, m = m'. Otherwise, m < 0,

[0115] (2) Generate the system key.

[0116] User User selects the security parameters {k0, k1, k2} satisfying k1 << k2 < k0, and executes the key generation algorithm Gen(k0, k1, k2) to generate the system password parameters, including the private key The public key is pk U =(Enc sk (0)1, Enc sk (0)2), Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers. The public parameters In some scenarios, an entity may only need to encrypt messages. If we set skU Authorizing an entity may reduce the security of the entire system. In this case, pk U =(Enc sk (0)1,Enc sk (0)2), instead of sk U , transmitted to an entity that can encrypt the message using the above formula.

[0117] (3) Generate a signature key.

[0118] Medical User (User) Select a random number As his signature private key BS U =s U , public key

[0119] (4) Send the key.

[0120] The user will pk U and BK U Sent to SP via a secure communication channel.

[0121] S2. Generate query vector

[0122] (1) Obtaining physiological characteristics.

[0123] The medical user (User) obtains an n-dimensional physiological data x=(v1,v2,…,v n ), users want to obtain primary diagnosis results through query vectors, but query vectors are sensitive.

[0124] (2) Extract features and encrypt.

[0125] According to the feature selection method of the classifier, the physiological feature is selected to obtain a vector x1=(v1, v2,…, v k ). User uses his own public key pk U Encrypt x1 to get

[0126] (3) Sign and send to SP.

[0127] Because each user needs to register with the SP and obtain an ID before medical diagnosis U , User uses his own signature private key pair Sign Where TS1 is the current timestamp and sends the encrypted query vector to SP.

[0128] S3. Perform pre-diagnosis query

[0129] (1) SP receives After that, first check the timestamp TS1 and user ID U .

[0130] (2) Verification It is a bilinear mapping. After verifying that the equation holds, SP obtains

[0131] (3) SP generates an encrypted random forest classifier.

[0132] SP has a random forest classifier. According to the definition of random forest, the random forest classifier contains w decision trees. Each decision tree is randomly sampled from the medical examples owned by SP and the result of feature selection. Each decision tree can be used to judge k physiological characteristics. The non-leaf nodes of the decision tree represent the threshold of a physiological characteristic. SP can diagnose f types of diseases, that is, there are C j ,j∈[1,f], SP encrypts the classifier diagnosis model it has. Let’s take a decision tree as an example. The decision tree w=(w1,w2,…,w k ),i∈[1,k],w i It is a non-leaf node of the decision tree, representing the threshold of each physiological feature. SP uses the user’s public key pk U Encrypt each non-leaf node to get

[0133] (4) Compare the query vector v with the decision tree threshold. i With the decision tree threshold w i The comparison results.

[0134] (5) The medical service provider SP uses a coin tossing mechanism to obtain s∈{-1,1} and selects two random numbers r1, r2 need to satisfy the condition r1>r2>0.

[0135] (6) SP calculation The calculation formula is as follows:

[0136]

[0137] SP uses a secure communication channel to Sent to User.

[0138] (7) User receives When first using his private key sk UTo restore α. The user checks α, if α<0, then otherwise, and will Send to SP.

[0139] (8) SP receives Then check the value of s. When s=1, let When s = -1, calculate

[0140]

[0141] (9) is the output of the security comparison protocol. In summary, if v i <w i , then

[0142] (10) If Then repeat the above operations (6)-(8), that is, continue to compare the next feature of the query vector with the left subtree node threshold of the node; otherwise, use the next feature of the query vector to compare with the right subtree node threshold of the node until the feature comparison is completed. The result of the random forest classifier is obtained. C = {C1, C2, ..., C k}.

[0143] (11) Encrypt these k diagnosis results to obtain k∈[1,f]. SP signs the diagnosis result using its own private key. Where TS2 is the current timestamp and sends to User.

[0144] S4. Get query results

[0145] (1) The user receives the message sent by SP First check the timestamp TS1 and user ID U .

[0146] (2) Verify the signature The equation holds, and the user gets

[0147] (3) Yes After decryption, we get C, and sort the results according to the number of times the disease appears. The one with the highest number of occurrences is the query result of this medical diagnosis, and based on the sorting, we also get the disease risk list of the user.

[0148] Based on the above embodiments, Figure 4 As shown, the present invention also proposes a multi-disease privacy-preserving medical pre-diagnosis system based on partially homomorphic encryption, comprising:

[0149] System initialization module, used for system initialization; including: generating system parameters, initializing the medical service provider SP and initializing the medical user User;

[0150] Query vector generation module, used for User to generate an encrypted query vector, sign it and send it to SP; the query vector includes User's physiological characteristic data;

[0151] Pre-diagnosis query module, used for SP to encrypt the local random forest classifier using the SHE public key, and use the secure comparison method to compare the query vector with the thresholds of each corresponding node in the random forest classifier to obtain the pre-diagnosis result;

[0152] Pre-diagnosis result obtaining module, returns the encrypted pre-diagnosis result to User, and User decrypts it to obtain the pre-diagnosis result.

[0153] Furthermore, the generating system parameters include:

[0154] By running the bilinear parameter generator Gen of the BLS signature algorithm, with the security parameter κ as the input, output a 5-tuple (p, g, G, G T , ); where G, G T are two cyclic groups, with order being the prime number p; g is the generator of the group G; the bilinear mapping G×G→G T ; p is a prime number with κ bits in length; select an encryption hash function H: {0,1} * →G.

[0155] Furthermore, the initialization of the medical service provider SP includes:

[0156] SP selects a random number as the private key sk of the BLS signature algorithm SP = s SP , and the public key

[0157] Furthermore, the initialization of the medical user User includes:

[0158] a. Select the SHE encryption algorithm, including the key generation algorithm Gen(), the encryption algorithm Enc(), and the decryption algorithm Dec();

[0159] 1) Gen(k0,k1,k2): When the input security parameters {k0,k1,k2} satisfy k1 << k2 < k0, the key generation algorithm first selects two large prime numbers p, q, |p| = |q| = k0, and generates the private key where is a random number, Then, calculate And set the common parameters Finally, set the basic message space

[0160] 2) Enc pk (m): With the public key pk and the message as input, the encryption algorithm outputs the ciphertext Enc pk (m) = m + r1·Enc sk (0)1 + r2·Enc sk (0)2 mod N, where is a random number; Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers. The encryption algorithm for encrypting the message using the private key sk is where and are random numbers; is a random number;

[0161] 3) Dec sk (Enc pk (m)0: When the user inputs the private key sk and the ciphertext Enc pk (m), the decryption algorithm recovers the message When it means m ≥ 0, m = m'; otherwise, m < 0, m = m' - L;

[0162] b. Generate the system key;

[0163] User selects the security parameters {k0, k1, k2} satisfying k1 << k2 < k0 and executes the key generation algorithm Gen(k0, k1, k2) to generate the system cryptographic parameters, which include the private key the public key pk U = (Enc sk (0)1, Enc sk (0)2), Enc sk (0)1 and Enc sk (0)2 represent the ciphertexts of 0 encrypted with different random numbers. The common parameters

[0164] c. Generate the signature key;

[0165] User selects a random number as its signature private key BS U = s U , the public key

[0166] d. Send the key;

[0167] User will pk U and BK U Sent to SP via a secure communication channel.

[0168] Furthermore, the query vector generation module is specifically used for:

[0169] Step 2.1: Obtain User's physiological characteristics;

[0170] The user obtains an n-dimensional physiological data x=(v1, v2,…, v n );

[0171] Step 2.2: extracting and encrypting the n-dimensional physiological data features;

[0172] According to the feature selection method of SP random forest classifier, feature selection is performed on the n-dimensional physiological data to obtain a vector x1=(v1, v2,…, v k ), User uses his own public key pk U Encrypt x1 to get

[0173] Step 2.3: User signs and sends to SP;

[0174] Each User registers at the SP before undergoing medical diagnosis and obtains an ID U , User uses his own signature private key pair Sign Where TS1 is the current timestamp and sends the encrypted query vector to SP.

[0175] Furthermore, the pre-diagnosis query module is specifically used for:

[0176] Step 3.1: SP receives After that, first check the timestamp TS1 and user identity IDx;

[0177] Step 3.2: Verification It is a bilinear mapping. After verifying that the equation holds, SP obtains

[0178] Step 3.3: SP generates an encrypted random forest classifier;

[0179] SP uses User's public key pk U Encrypt each non-leaf node of the decision tree w in the local random forest classifier to obtain The decision tree w=(w1,w2,…,w k),i∈[1,k],w i It is a non-leaf node of the decision tree, representing the threshold of each physiological feature;

[0180] Step 3.4: A safe comparison is performed with the decision tree threshold to obtain the query vector v through this method. i With the decision tree threshold w i The comparison results of

[0181] Step 3.5: SP uses the coin tossing mechanism to get s∈{-1,1} and selects two random numbers r1, r2 need to satisfy r1>r2>0;

[0182] Step 3.6: SP calculation The calculation formula is as follows:

[0183]

[0184] SP uses a secure communication channel to Send to User;

[0185] Step 3.7: User receives When first using its own private key sk U To restore α; check α, if α<0, then otherwise, and will Send to SP;

[0186] Step 3.8: SP receives After that, check the value of s. When s=1, the output of the security comparison protocol is When s = -1, calculate

[0187] Step 3.9: If v i <w i ,but

[0188] Step 3.10: If Then repeat steps 3.6 to 3.8, and compare the next feature of the query vector with the left subtree node threshold of the node; otherwise, use the next feature of the query vector to compare with the right subtree node threshold of the node until the feature comparison is completed, and obtain the result of the random forest classifier C = {C1, C2, ..., C k};

[0189] Step 3.11: Encrypt the k diagnostic results to obtain k∈[1,f]; SP uses its own private key to sign the diagnosis result, Where TS2 is the current timestamp and sends to User.

[0190] Furthermore, the pre-diagnosis result obtaining module is specifically used for:

[0191] Step 4.1: User receives the message sent by SP First check the timestamp TS1 and user ID U ;

[0192] Step 4.2: Verify the signature If the equation holds, the user gets

[0193] Step 4.3: After decryption, we get C, and sort the results according to the number of times the disease appears. The one with the highest number of occurrences is the query result of this medical diagnosis. At the same time, we get the disease risk list of the user based on the sorting.

[0194] In summary, the present invention uses a partially homomorphic encryption algorithm, and utilizes the algorithm to implement a secure comparison protocol, which can compare data while encrypting the data, and can correspond one-to-one with each node of the random forest, and compare to obtain a diagnosis result. The present invention can effectively protect the data security in the medical pre-diagnosis service process, and uses a signature algorithm to prevent the data transmission process from being tampered with. The present invention protects the data privacy of users during medical diagnosis and effectively prevents privacy leakage.

[0195] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption, characterized in that: include: Step 1: Initialize the system, including generating system parameters, initializing the medical service provider SP and the medical user User; The medical user User initialization includes: a. Select the SHE encryption algorithm, including the key generation algorithm Gen(), encryption algorithm Enc(), and decryption algorithm Dec(); 1) Gen(k0,k1,k2): When the input security parameters {k0,k1,k2} satisfy k1 << k2 < k0, the key generation algorithm first selects two large prime numbers p,q, |p| = |q| = k0, and generates the private key where is a random number, Then, calculate and set the public parameters Finally, set the basic message space 2)Enc pk (m): public key pk and message As input, the encryption algorithm outputs the ciphertext Enc pk (m) = m + r1·Enc sk (0)1+r2·Enc sk (0)2mod N, where is a random number; Enc sk (0)1 and Enc sk (0)2 represents the ciphertext of 0 encrypted with different random numbers, and the message is encrypted using the private key sk The encryption algorithm is in and is a random number; 3)Dec sk (Enc pk (m)): When the user enters the private key sk and the ciphertext Enc pk (m), the decryption algorithm recovers the message when When m≥0, m=m ′ ; otherwise, m<0, b. Generate system key; The user selects security parameters {k0, k1, k2} such that k1 << k2 < k0 and executes the key generation algorithm Gen(k0, k1, k2) to generate system cryptographic parameters, including a private key a public key pk U =(Enc sk (0)1, Enc sk (0)2), Enc sk (0)1 and Enc sk (0)2 denote ciphertexts obtained by encrypting 0 with different random numbers, and the public parameters c. Generate a signing key; User chooses to select a random number As its signature private key BS U =s U , public key d. Send the key; User will pk U and BK U Sent to SP via a secure communication channel; Step 2: The User generates an encrypted query vector, signs it and sends it to the SP; the query vector includes the User's physiological feature data; The step 2 comprises: Step 2.1: Obtain User's physiological characteristics; The user obtains an n-dimensional physiological data x=(v1, v2,…, v n ); Step 2.2: extracting and encrypting the n-dimensional physiological data features; According to the feature selection method of SP random forest classifier, feature selection is performed on the n-dimensional physiological data to obtain a vector x1=(v1, v2,…, v k ), User uses his own public key pk U Encrypt x1 to get Step 2.3: User signs and sends to SP; Each User registers at the SP and obtains an ID before undergoing medical diagnosis. U , User uses his own signature private key pair Sign Where TS1 is the current timestamp and sends the encrypted query vector to SP; Step 3: SP uses the SHE public key to encrypt the local random forest classifier, and uses a secure comparison method to compare the query vector with the corresponding node thresholds in the random forest classifier to obtain the pre-diagnosis result; The step 3 comprises: Step 3.1: SP receives After that, first check the timestamp TS1 and user ID U ; Step 3.2: Verification It is a bilinear mapping. After verifying that the equation holds, SP obtains Step 3.3: SP generates an encrypted random forest classifier; SP uses User's public key pk U Encrypt each non-leaf node of the decision tree w in the local random forest classifier to obtain The decision tree w=(w1,w2,…,w k ),i∈[1,k],w i It is a non-leaf node of the decision tree, representing the threshold of each physiological feature; Step 3.4: A safe comparison is performed with the decision tree threshold to obtain the query vector v through this method. i With the decision tree threshold w i The comparison results of Step 3.5: SP uses the coin tossing mechanism to get s∈{-1,1} and selects two random numbers r1, r2 need to satisfy r1>r2>0; Step 3.6: SP calculation The calculation formula is as follows: SP communicates via a secure channel Send to User; Step 3.7: User receives When first using its own private key sk U To restore α; check α, if α<0, then otherwise, and will Send to SP; Step 3.8: SP receives After that, check the value of s. When s=1, the output of the security comparison protocol is When s = -1, calculate Step 3.9: If v i <w i ,but Step 3.10: If Then repeat steps 3.6 to 3.8, and compare the next feature of the query vector with the left subtree node threshold of the node; otherwise, use the next feature of the query vector to compare with the right subtree node threshold of the node until the feature comparison is completed, and obtain the result of the random forest classifier C = {C1, C2, ..., C k }; Step 3.11: Encrypt the k diagnostic results to obtain f means that there are f types of diagnosed diseases; SP uses its own private key to sign the diagnosis result. Where TS2 is the current timestamp and sends to User; Step 4: Return the encrypted pre-diagnosis result to the user, who decrypts it to obtain the pre-diagnosis result.

2. According to claim 1, a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption is characterized in that: The generation system parameters include: By running the bilinear parameter generator Gen of the BLS signature algorithm, taking the security parameter κ as input, it outputs a 5-tuple Among them, G,G T are two cyclic groups with order p; g is a generator of group G; bilinear mapping p is a prime number of length κ bits; choose a cryptographic hash function H: {0,1} * →G.

3. According to claim 2, a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption is characterized in that: The medical service provider SP initialization includes: SP chooses a random number As the private key sk of the BLS signature algorithm SP =s SP , public key 4. According to claim 1, a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption is characterized in that: The step 4 comprises: Step 4.1: User receives the message sent by SP First check the timestamp TS1 and user ID U ; Step 4.2: Verify the signature If the equation holds, the user gets Step 4.3: After decryption, we get C, and sort the results according to the number of times the disease appears. The one with the highest number of occurrences is the query result of this medical diagnosis. At the same time, we get the disease risk list of the user based on the sorting.

5. A multi-disease privacy-preserving medical pre-diagnosis system based on a multi-disease privacy-preserving medical pre-diagnosis method based on partially homomorphic encryption according to any one of claims 1 to 4, characterized in that: include: The system initialization module is used to initialize the system, including: generating system parameters, initializing the medical service provider SP and the medical user User; A query vector generation module is used for the User to generate an encrypted query vector, which is signed and sent to the SP; the query vector includes the User's physiological feature data; Pre-diagnosis query module, used by SP to encrypt the local random forest classifier using the SHE public key, and use the secure comparison method to compare the query vector with the corresponding node thresholds in the random forest classifier to obtain the pre-diagnosis result; The pre-diagnosis result obtaining module returns the encrypted pre-diagnosis result to the User, who obtains the pre-diagnosis result after decryption.