A multi-end medical data query method with forward and backward privacy

By employing a multi-terminal medical data query method, data owners generate system keys and security indexes, data users generate query tokens, and cloud servers match query results. This solves the search difficulties and privacy protection issues in existing medical data queries, achieving efficient and secure data querying and privacy protection.

CN116186095BActive Publication Date: 2026-01-02BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310085025.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-19
Publication Date
2026-01-02
Estimated Expiration
2043-01-19

AI Technical Summary

Technical Problem

Existing medical data query methods face difficulties in searching on cloud servers due to PHI file encryption. Furthermore, multiple clients need to frequently interact to search encrypted data, resulting in high communication resource consumption and an inability to guarantee forward and backward privacy.

Method used

A multi-terminal medical data query method is adopted, in which the data owner generates a system key and a security index, the data user generates a query token, and the cloud server matches the query results to achieve non-interactive multi-terminal searchable encryption. Keyword search is performed through polynomial matching and random matrix multiplication techniques.

Benefits of technology

It enables efficient and secure medical data retrieval, reduces communication overhead, ensures forward and backward privacy, and improves search efficiency and data utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116186095B_ABST
    Figure CN116186095B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-terminal medical data query methods with front-back privacy, it is related to medical data query and privacy protection technical field.The specific implementation of the method includes: data owner generates system key, and the security index corresponding to pre-constructed keyword dictionary, system key is sent to data user, and security index is sent to cloud server;Data user generates query request according to system key, to-be-queried time range and to-be-queried keyword, and sends the query request to cloud server;Cloud server uses query token to match security index, obtains the query result corresponding to query request, and sends the query result to data user;Data user decrypts query result, and obtains target file corresponding to query request.This implementation can realize non-interactive multi-terminal searchable encryption, avoid frequent interaction between data user and data owner, reduce communication overhead, and ensure the security of data user query content.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of medical data query and privacy protection, and particularly relates to a multi-terminal medical data query method with forward and backward privacy. BACKGROUND

[0002] With the development of cloud computing and Internet of Things technology, the traditional medical mode is gradually changing into a more efficient and flexible cloud-assisted electronic medical mode. Personal health information (PHI) of a patient is monitored by a wireless wearable device worn on the patient's body, and the PHI is periodically or irregularly transmitted to a data owner (for example, a device manufacturer). The data owner generates an encrypted PHI file and sends it to a cloud server for storage. When medical data needs to be accessed, a query request is sent to the cloud server. However, since the PHI file is encrypted, it is difficult for the cloud server to search.

[0003] The existing file search method under encryption mainly includes symmetric searchable encryption technology based on static database and dynamic symmetric searchable encryption technology based on dynamic database. The dynamic searchable encryption technology is divided into single-client searchable encryption (the data user must be the same as the data owner) and multi-client searchable encryption (the data user can be the same as or different from the data owner).

[0004] However, since the PHI is updated without being limited by factors such as time and place, the data of the cloud server changes dynamically, making it impossible for the search based on the static database to meet the data needs of the data user. The medical data of the single-client searchable encryption cannot be shared, the data utilization rate is low, and better health services cannot be provided for the patient. The multi-client searchable encryption requires frequent interaction between the data user and the data owner, including requesting a keyword state, sending a query request, receiving a query result, and the like. The communication resource consumption is large, the query content of the data user is easy to leak, and the forward and backward privacy of the medical data cannot be guaranteed. SUMMARY

[0005] Therefore, the present application provides a multi-terminal medical data query method with forward and backward privacy, which can realize non-interactive multi-terminal searchable encryption, avoid frequent interaction between the data user and the data owner, reduce communication overhead, prevent the query content of the data user from leaking, guarantee the security of data query, and enable the data user and the data owner to provide health diagnosis and medical services for the patient.

[0006] The technical scheme of the present application is as follows:

[0007] A multi-end medical data query method with forward and backward privacy, the method is executed by a multi-end medical data query system, the multi-end medical data query system comprises a data owner, a data user and a cloud server, and the method comprises:

[0008] The data owner generates a system key, a security index corresponding to a pre-constructed keyword dictionary, sends the system key to the data user, and sends the security index to the cloud server; wherein the security index is constructed by encrypting the text keyword extracted from the PHI file;

[0009] The data user generates a query request according to the system key, a to-be-queried time range and a to-be-queried keyword, and sends the query request to the cloud server; wherein the query request comprises a query token;

[0010] The cloud server matches the security index with the query token to obtain a query result corresponding to the query request, and sends the query result to the data user;

[0011] The data user decrypts the query result to obtain a target file corresponding to the query request.

[0012] Optionally, the system key wherein, is the seed of a pseudo-random function; sk is a symmetric encryption key; M1 is a first random encryption matrix, and M2 is a second random encryption matrix; the data owner sends the system key and the keyword dictionary to the data user through a secure channel.

[0013] Optionally, the data owner generates the security index, comprising:

[0014] Receiving the PHI transmitted by each medical device and generating a PHI file, extracting corresponding file keywords from the PHI file according to the keyword dictionary;

[0015] Generating a position sequence number set of the text keywords of the PHI file according to the position sequence numbers of the file keywords in the keyword dictionary;

[0016] Encrypting the file identifier and the operator of the PHI file to generate an encrypted file identifier and an index address of the PHI file;

[0017] According to the number of keywords of the keyword dictionary and the number of file keywords, the data owner generates a position sequence number set of the PHI file in combination with a position sequence number set of the file keywords, and uses a polynomial algorithm to calculate a coefficient vector of a position sequence number set of a merged literal keyword of the PHI file;

[0018] According to the correspondence between the position sequence number set of the literal keyword and the position sequence number set of the keyword dictionary, a first chain vector is constructed, the coefficient vector, a first integer vector converted from a time stamp of the receiving time of the PHI information, and the first chain vector are spliced, a third random encryption matrix and a fourth random encryption matrix are constructed;

[0019] The first random encryption matrix, the second random encryption matrix, the third random encryption matrix, and the fourth random encryption matrix are used to generate a target encryption matrix, the target encryption matrix, an index address of each PHI file, and an encrypted file identifier of each PHI file are combined to form the secure index, and the secure index is sent to the cloud server for storage.

[0020] Optionally, the data user generates a query request according to the system key, a to-be-queried time range, and a to-be-queried keyword, including:

[0021] According to the keyword dictionary, the position sequence number of the to-be-queried keyword is determined, and a power vector of the position sequence number of the to-be-queried keyword is constructed;

[0022] According to the correspondence between the position sequence number set of the to-be-queried keyword and the position sequence number set of the keyword dictionary, a second chain vector is constructed;

[0023] The power vector, a second integer vector converted from a time stamp of the to-be-queried time range, and the second chain vector are spliced, a fifth random encryption matrix and a sixth random encryption matrix are constructed;

[0024] The inverse matrix of the first random encryption matrix, the inverse matrix of the second random encryption matrix, the fifth random encryption matrix, and the sixth random encryption matrix are used to generate a query token, and the query token is sent to the cloud server.

[0025] Optionally, the cloud server matches the secure index by using the query token to obtain a query result corresponding to the query request, including:

[0026] A1: The data owner latest uploaded secure index is taken as a current secure index;

[0027] A2: The trace of the product of the query token and the target encryption matrix of the current secure index is calculated;

[0028] A3: judging whether the trace of the product is within a preset threshold, if yes, adding the corresponding encrypted file marker to the query result, the value of the trace is the index address corresponding to the PHI file containing the keyword last time, obtaining the new corresponding encrypted file marker and the target encrypted matrix through the value of the trace, and turning to step A2; if no, taking the next security index as the current security index, and turning to step A2.

[0029] Advantages:

[0030] (1) Through polynomial matching, time range query and random matrix multiplication technology, the privacy efficient searchable encryption based on matrix encryption can be realized, the keyword search is completed under the ciphertext, and compared with the searchable encryption scheme based on public key encryption, the scheme is more efficient. The present application focuses on multiple clients, the data owner encrypts the security index and uploads it to the cloud server, and the data user sends an encrypted query token to the cloud server to search for the required data. The present application can be applied to various large-scale electronic medical data sharing systems, and efficiently and privately helps the data user to query the data.

[0031] (2) In the initialization and query stage, the data user generates a query token by using a to-be-queried time range, non-interactive forward privacy can be realized, so that newly added files cannot be searched by past query tokens, compared with the existing "keyword counter method to realize forward privacy, the data user needs to request keyword state information or search tokens from the data owner", the huge communication overhead caused by frequent interaction of multiple terminals is avoided, the data owner does not need to be online at any time, the search efficiency is greatly improved, and the risk of privacy leakage is reduced.

[0032] (3) The present application matches the security index with the query token, and the result obtained by successful matching is the PHI file containing the keyword last time, thereby realizing the sub-linear search efficiency. Compared with the existing "privacy protection symptom keyword matching method based on linear structure", the number of matching times is reduced, and the efficiency is greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 FIG. 1 is a schematic diagram of the main process of a multi-terminal medical data query method with forward and backward privacy according to an embodiment of the present application.

[0034] Figure 2 FIG. 2 is a schematic diagram of a multi-terminal medical data query system according to an embodiment of the present application.

[0035] Figure 3 FIG. 3 is a schematic diagram of the main process of an initialization method of a data owner according to an embodiment of the present application.

[0036] Figure 4A schematic diagram of the main flow of the method for generating a secure index according to an embodiment of the present application.

[0037] Figure 5 A schematic diagram of the main flow of the method for generating a query token according to an embodiment of the present application.

[0038] Figure 6 A schematic diagram of a Boolean wildcard vector of a time range to be queried according to an embodiment of the present application.

[0039] FIG. 7(a) is a schematic diagram of the generation of an integer vector and a power vector according to an embodiment of the present application.

[0040] FIG. 7(b) is a schematic diagram of the generation of a chain vector according to an embodiment of the present application.

[0041] FIG. 7(c) is a schematic diagram of the matching of a time range to be queried according to an embodiment of the present application.

[0042] Figure 8 A schematic diagram of the main flow of the method for decrypting an encrypted file identifier corresponding to a keyword to be queried according to an embodiment of the present application.

[0043] Figure 9 A schematic diagram of the search time comparison between the multi-terminal medical data query method according to an embodiment of the present application and the existing medical data query method. DETAILED DESCRIPTION

[0044] It should be noted that in the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs. Term explanation:

[0045] Forward privacy: refers to that the current token can only search files before and after the current token, and cannot search files updated after the current token, thereby ensuring forward privacy.

[0046] Backward privacy: refers to that the current token can only search existing files, and cannot search deleted files, thereby ensuring backward privacy.

[0047] The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0048] In an embodiment of the present application, as shown in Figure 1 A multi-terminal medical data query method with forward and backward privacy includes the following steps:

[0049] In an embodiment of the present application, the multi-terminal medical data query method with forward and backward privacy is executed by a multi-terminal medical data sharing system, as shown in Figure 2As shown, the multi-terminal medical data sharing system includes a data owner, a data user, and a cloud server, the number of data users can be one or more, the present application does not limit the number of data users, the terminal corresponding to the data owner, the terminal corresponding to the data user and the cloud server can communicate with each other, and no special description is made, the data owner and the data user of the present application are executed by the corresponding terminal to execute the medical data query method of the present application.

[0050] Step 11, the data owner generates a system key and a security index corresponding to a pre-constructed keyword dictionary, sends the system key to the data user, and sends the security index to the cloud server; wherein the security index includes a file identifier of a PHI file corresponding to each keyword of the keyword dictionary.

[0051] In the embodiment of the present application, the data user can be the same as or different from the data owner, and the data owner can be the device manufacturer of the wireless wearable device worn by the patient. The patient accepts the information collection protocol of the wireless wearable device used, and the data owner can obtain the personal health information (hereinafter referred to as PHI) of the patient.

[0052] In the embodiment of the present application, as shown, Figure 3 The initialization method of the data owner of the present application includes the following steps:

[0053] Step 31, the data owner constructs a keyword dictionary, the keyword dictionary includes the position serial number of the keyword and the corresponding relationship of the keyword.

[0054] Step 32, the data owner generates a system key and a security index corresponding to a pre-constructed keyword dictionary.

[0055] In the embodiment of the present application, the system key msk randomly generated by the data owner is The seed of the pseudo-random function; sk is a symmetric encryption key; M1 is a first random encryption matrix, M2 is a second random encryption matrix, M1 and M2 are two n*n reversible matrices for encryption, such as lower triangular matrix, the value is any real number; n is the dimension of the index vector of the security index before encryption, n = 2m + τ + 4, m is the number of keywords of the keyword dictionary, τ is the number of bits of the time stamp Ts of the receiving time of PHI, which can be selectively set according to the need, such as τ = 30.

[0056] In the embodiment of the present application, the data owner encrypts the medical data, extracts the symptom keywords from the medical data, generates an index vector according to the extracted keywords, and uploads the encrypted security index to the cloud server for storage.

[0057] Step 33, the data owner sends the system key and the keyword dictionary to the data user and sends the security index to the cloud server through a secure channel.

[0058] In the embodiment of the application, the data owner sends the first random encryption matrix M1, the second random encryption matrix M2 and the symmetric key sk of the system key to the data user through a secure channel.

[0059] In the embodiment of the application, the data owner sends the security index to the cloud server, so that the cloud server can search by using the query token of the data user to determine the encrypted file identifier of the target file corresponding to the to-be-queried keyword of the query token from the pre-stored security index.

[0060] In the embodiment of the application, the initialization method of the data owner further includes the initialization of the keyword state table St. The St records the keyword w i , the keyword counter cnt i and the keyword operator opw i , and is used for storing the index address of each PHI file corresponding to each keyword.

[0061] In the embodiment of the application, through the initialization method of the data owner of the application, the data user only needs to send the system key and the security dictionary to the data owner at the initial time, without other interactive processes, so that the frequent interaction between the data user and the data owner is avoided, thereby realizing the non-interactive multi-end searchable encryption, reducing the communication overhead, preventing the query content of the data user from being leaked, and ensuring the security of data query.

[0062] In the embodiment of the application, as shown in Figure 4 , the generation method of the security index of the application includes the following steps:

[0063] Step 41, receiving the PHI transmitted by each medical device and generating a PHI file.

[0064] In the embodiment of the application, the medical device can be various forms of medical devices such as mobile (for example, wireless wearable devices), fixed or semi-fixed, as long as it has a communication function or can be connected with other communicable intermediaries to upload data. The PHI file can be various formats such as doc, docx, wps, xls, xlsx, txt, htm and html, which can be selectively set according to needs.

[0065] Step 42, according to the keyword dictionary, extracting the corresponding file keyword from the PHI file, generating the position sequence number set of the text keyword of the PHI file according to the position sequence number of the file keyword in the keyword dictionary.

[0066] In the embodiment of the application, for each PHI file, the data owner extracts the file keyword from the PHI file according to the keyword dictionary, and the position sequence number set of the d file keywords Wherein, represents the text keyword, x i represents the text keyword w xi The position sequence number in the keyword dictionary, i∈1,2,3,…,d. Therefore, the position sequence number set A of the text keyword ind ={x1,x2,…,x d}. Because the file keyword is extracted according to the keyword dictionary, the keyword in W ind of each PHI file is in the keyword dictionary.

[0067] Step 43, encrypting the file identifier and operator of the PHI file, generating the encrypted file identifier and index address of the PHI file.

[0068] In the embodiment of the application, the file identifier ind is the sequence number of the PHI file, and the file operator op is the file operator of the PHI file, indicating the operation state of the PHI file. When op=add, it indicates that the operation state of the PHI file is addition; when op=del, it indicates that the operation state of the PHI file is deletion. The data owner uses the symmetric key sk of the system key to symmetrically encrypt the file identifier ind and the file operator op of the PHI file, and obtains the encrypted file identifier Enc(sk, ind||op) of the PHI file.

[0069] In the embodiment of the application, the file identifier ind and the file operator op are encrypted by using the seed of the pseudo-random function, and the index address as the state value St[w i ] corresponding to the keyword w i in the keyword state table.

[0070] Step 44, for the PHI file, the data owner fills in a virtual keyword according to the difference between the number of keywords of the keyword dictionary and the number of file keywords, so that the total number of the virtual keyword and the file keyword is equal to the number of keywords of the keyword dictionary, and generates the position sequence number set of the keyword of the PHI file.

[0071] In the embodiment of the present application, the number of keywords in the keyword dictionary is m, the number of file keywords of the PHI file is d, and the data owner generates randomly |m-d| virtual keywords different from the keywords in the keyword dictionary according to the difference |m-d| between the two, and defines the position serial numbers of the virtual keywords as {x d+1 ,…,x m} which are combined with the position serial number set A ind of the literal keywords to generate the position serial number set Dk ind of the keywords of the PHI file. ind Correspondingly, the number of position serial numbers of Dk

[0072] Step 45, using a polynomial algorithm to calculate the coefficient vector of the position serial number set of the keywords of the PHI file.

[0073] In the embodiment of the present application, the polynomial algorithm is Vieta’s Formulas, as shown in the following formula (1):

[0074] a m (x-x m )…(x-x1)=a m x m +…+a1x+a0 (1)

[0075] In the above formula, a m is a non-zero integer which can be selected arbitrarily, and it is only required to ensure that the order of magnitude of a m is fixed.

[0076] Further, the coefficient vector C of the position serial number set of the keywords of the PHI file is (a m ,…,a1,a0). For example, the coefficient vector C is shown in FIG. 7(a).

[0077] Step 46, converting the time stamp of the receiving time of the PHI into a first integer vector.

[0078] In the embodiment of the present application, the data owner first converts the time stamp Ts of the receiving time of the PHI into a Boolean vector Ts bin =(t1,…,t τ ), and the conversion of the Boolean vector can be binary conversion. Then the Boolean vector is converted into a first integer vector Ts′ bin =(t′1,…,t′ τ ,t′ τ+1 ), which is prepared for the subsequent calculation of the inner product of vectors, wherein for the ith item in the vector Ts bin , when t i =0, t′ i =1; when t i= 1, t' = t i = -1 (1≤i≤τ) ; t' = t τ+1 = 1, set t' = t τ+1 is for inner product matching in the subsequent search process.

[0079] Step 47, constructing a first chain vector according to the correspondence between the position sequence set of the literal keyword and the position sequence set of the keyword dictionary.

[0080] In the embodiment of the application, the first chain vector is used to represent whether each keyword of the keyword dictionary appears in each PHI file, and if the keyword appears, the element value of the chain vector corresponding to the keyword is the PHI file address eid, and if the keyword does not appear, the element value is 0.

[0081] Further, the element number of the first chain vector G = (g1,..., g m ) constructed by the data owner is the same as the number of the position sequence of the keyword dictionary, and each position sequence in the position sequence set of the literal keyword is the same as the position sequence of the keyword dictionary, that is, i∈A ind , the corresponding element of the first chain vector G is the index address of the PHI file, that is, g i = eid; otherwise, g i = 0. For example, the first chain vector G is shown in Fig. 7 (b).

[0082] Step 48, splicing the coefficient vector, the first integer vector and the first chain vector to construct a third random encryption matrix and a fourth random encryption matrix.

[0083] In the embodiment of the application, the data owner splices the coefficient vector C, the first integer vector Ts' bin and the first chain vector G, and uses random numbers to disturb to obtain a first spliced vector I = [r w ·C, r t ·Ts' bin , G, -r1, r1] = [r w ·a m ,..., r w ·a0, r t ·t'1,..., r t ·t' τ+1 , g1,..., g m , -r1, r1], wherein r w , r t , r1 are non-zero random numbers, which can be any integer.

[0084] Further, the data owner takes the first spliced vector I as the main diagonal element to generate a third random encryption matrix The third random encryption matrix The first random encryption matrix M1 is a random n*n lower triangular random matrix, and other elements except the main diagonal element can be randomly taken. k The fourth random encryption matrix I k The fourth random encryption matrix I is a random n*n lower triangular random matrix, and other elements except the main diagonal element can be randomly taken.

[0085] Step 49, generating a target encryption matrix by using the first random encryption matrix, the second random encryption matrix, the third random encryption matrix and the fourth random encryption matrix, and sending the target encryption matrix and the index address of each PHI file, the encrypted file identifier of each PHI file to the cloud server for storage.

[0086] In the embodiment of the application, the first random encryption matrix M1, the second random encryption matrix M2, the third random encryption matrix and the fourth random encryption matrix I k generate a target encryption matrix The index address eid of each PHI file, the target encryption matrix mat and the encrypted file identifier Enc(ind||op) of each PHI file are combined to form a secure index (eid, mat, Enc(ind||op)), and are sent to the cloud server for storage.

[0087] Further, the data owner sets the order identifier of the secure index generated by the first PHI file to-1, and when the cloud server searches, the search is performed in a reverse order according to the adding order of each secure index, and-1 is searched to indicate the end of the search, so that the sub-linear search efficiency of the cloud server is realized.

[0088] In the embodiment of the application, by using the secure index generation method of the application, the data owner generates a PHI file from the medical data transmitted by the patient, extracts the keywords in the file, generates an index vector according to the extracted keywords, encrypts the index vector to generate a secure index and uploads the secure index to the cloud server, so that the data user can directly interact with the cloud server when querying, and the encrypted file identifier of the target file is obtained, the frequent interaction between the data user and the data owner is avoided, the communication overhead is reduced, and the security of data query is ensured.

[0089] Step 12, the data user generates a query request according to the system key, the to-be-queried time range and the to-be-queried keyword, and sends the query request to the cloud server; wherein the query request includes a query token.

[0090] In the embodiment of the present application, the data user generates a query token according to the system key, the time range to be queried, and the keyword to be queried, and sends the query token to the cloud server. The cloud server calculates the encrypted file identifier corresponding to the keyword to be queried by using the query token and the security index, and sends the encrypted file identifier to the data user. The data user can obtain the file serial number and the file operator including the keyword to be queried by symmetric decryption, and determine whether to take the PHI file as a target file according to the file operation state corresponding to the file operator.

[0091] In the embodiment of the present application, as shown in Figure 5 the generation method of the query token of the present application includes the following steps:

[0092] In the embodiment of the present application, the generation method of the query token of the present application is executed by the data user or the data owner (at this time, the data owner acts as the data user). The data user introduces a second chain vector to splice a fifth random encryption matrix and a sixth random encryption matrix according to the position serial number set of the keyword to be queried and the integer vector of the time range to be queried, and encrypts the second spliced vector by using the first random encryption matrix and the second random encryption matrix to obtain the query token. It should be noted that the number of data users is not limited in the present application, and the present application is suitable for actual use scenarios.

[0093] Step 51, determining the position serial number of the keyword to be queried according to the keyword dictionary, and constructing the power vector of the position serial number of the keyword to be queried.

[0094] In the embodiment of the present application, the data user uses the keyword dictionary to find the position serial number j of the keyword to be queried w j In the keyword dictionary, the position serial number j is constructed into the power vector P of the position serial number of the keyword to be queried P = (j m ,…,j 2 ,j,1), and the power vector P is an (m+1) dimensional vector. For example, the power vector P is shown in FIG. 7(a).

[0095] Step 52, converting the time stamp of the time range to be queried into a second integer vector.

[0096] In the embodiment of the present application, the data user uses the prefix tree to convert the time range to be queried into a group of Boolean wildcard vectors T r =(t1,…,t τ ). Then, the Boolean wildcard vector T r is converted into a second integer vector T′ r =(t′1,…,t′ τ ,t′ τ+1 ): wherein, for the i-th item in the Boolean wildcard vector T r , when t iWhen t' = 0, i =1; when t i When t = 1, t′ i =-1; when t i When t' = *, i =0 (1≤i≤τ), * is used to supplement the Boolean wildcard vector t i If it doesn't exist; finally set t′. τ+1 =∑ ≠* t i -τ, to determine the matching result based on the inner product. Figure 6 Taking the time range to be queried as [0,5] as an example, the total time query range is [0,7]. The Boolean wildcard vector for 0 is (0,0,*,*), and the Boolean wildcard vector for 5 is (0,1,0,*). The second integer vectors are (1,1,0,0) and (1,-1,1,0) respectively, as shown in Figure 7(c). Each second integer vector of the time range to be queried is multiplied by the first integer vector of the timestamp of the PHI file's reception time. If any inner product is 0, it means that the match is successful and belongs to the time range to be queried.

[0097] Step 53: Construct a second chain vector based on the correspondence between the set of position numbers of the keyword to be queried and the set of position numbers of the keyword dictionary.

[0098] In this embodiment of the invention, the second chain vector is used to indicate whether each query keyword appears in the keyword dictionary. If it exists, the element value of the chain vector of the corresponding keyword is 1, and if it does not exist, it is 0.

[0099] Furthermore, the second chain vector H = (h1,…,h) constructed by the data user m The number of elements in the second chain vector H is the same as the number of position indices in the keyword dictionary. When the position indices in the keyword dictionary are the same as all position indices in the set of position indices for the keyword to be queried (i.e., i∈j), the corresponding element of the second chain vector H is 1, i.e., h. i =1; otherwise, h i =0. For example, the second chain vector H is shown in Figure 7(b).

[0100] Step 54: Concatenate the power vector, the second integer vector, and the second chain vector to construct the fifth random encryption matrix and the sixth random encryption matrix.

[0101] In this embodiment of the invention, the data user concatenates the power vector, the second integer vector, and the second chain vector, and perturbs them with random numbers to obtain the second concatenated vector Q = [r]. j ·P,r o ·T′ r [H,r2,r2]=[r j jm ,…,r j ,r o ·t′1,…,r o ·t′ τ+1 ,h1,…,h m [,r2,r2], where r j r o r2 is a non-zero random number that can take any integer value.

[0102] Furthermore, the data user uses the second concatenated vector Q as the main diagonal element to generate the fifth random encryption matrix. Fifth random encryption matrix The data is a random n×n lower triangular matrix, where all elements except the main diagonal elements can take any value; the data owner uses the vector (1,1,…,1) as the main diagonal elements to generate the sixth random encryption matrix I. y The sixth random encryption matrix I y It is a random n×n lower triangular matrix, and the elements other than the main diagonal elements can take any value.

[0103] Step 55: Generate a query token using the inverse of the first random encryption matrix, the inverse of the second random encryption matrix, the fifth random encryption matrix, and the sixth random encryption matrix, and send it to the cloud server.

[0104] In this embodiment of the invention, the inverse matrix of the first random encryption matrix is ​​used. The inverse of the second random encryption matrix Fifth random encryption matrix and the sixth random encryption matrix I y Generate query token And send it to the cloud server.

[0105] Step 13: The cloud server uses the query token to match the security index to obtain the query result corresponding to the query request, and sends the query result to the data user.

[0106] In embodiments of the present invention, such as Figure 8 As shown, the decryption method for the encrypted file identifier corresponding to the query keyword of the present invention includes the following steps:

[0107] In this embodiment of the invention, the decryption method for the encrypted file identifier corresponding to the query keyword is executed by a cloud server. The cloud server, based on the query token, finds the encrypted file identifier containing the query keyword within the query time range and returns the encrypted file identifier to the data user. Because the query time range is limited, the most recently updated PHI files cannot be searched, thus satisfying the requirement of forward privacy.

[0108] Step 81, taking the latest uploaded security index of the data owner as the current security index.

[0109] In the embodiment of the present application, the cloud server searches in reverse order according to the addition order of the security index, and judges whether each PHI file contains the to-be-queried keyword one by one until the calculation result is within the set threshold; initially, the latest uploaded security index of the data owner is taken as the current security index.

[0110] Further, if the calculation of the latest uploaded security index does not meet the condition, the second-to-last uploaded security index is taken as the current security index for judgment according to the upload order of the security index, and so on until the first uploaded security index is judged. That is, after the current security index search is completed, the security index uploaded before the current security index is taken as the current security index.

[0111] Step 82, calculating the trace of the product of the query token and the target encryption matrix of the current security index.

[0112] In the embodiment of the present application, the cloud server multiplies the query token and the target encryption matrix mat of the current security index (eid, mat, Enc(ind||op)), and calculates the trace of the product of and mat, as shown in the following formula:

[0113]

[0114] Step 83, judging whether the trace of the product is within the preset threshold, if yes, going to step 84; if no, going to step 86.

[0115] In the embodiment of the present application, the cloud server judges whether the value of the trace is within the preset threshold θ, and the preset threshold θ can be set according to needs, for example, θ is greater than 0 and less than the maximum value of the pseudo-random number.

[0116] In the embodiment of the present application, if the to-be-queried keyword and the to-be-queried time range can match, C°P=0, the value of the trace is within the preset threshold θ, and the address of the previous security index containing the search keyword is.

[0117] Step 84, adding Enc(ind||op) of the corresponding security index to the query result R.

[0118] Step 85, the value of trace res is the index address corresponding to the PHI file containing the keyword last time, and the new corresponding Enc(ind||op) and the encryption matrix mat are obtained through the index address, and the step 82 is turned to.

[0119] In the embodiment of the present application, according to the value of trace, the index address corresponding to the PHI file containing the keyword last time is obtained, and the corresponding security index is taken as the current security index, and the step 82 is turned to continue to judge.

[0120] Step 86, it is judged whether all security indexes are searched, if yes, the step 87 is turned to, and if no, the step 88 is turned to.

[0121] Step 87, the query result is sent to the data user, and the search operation is ended.

[0122] Step 88, the next security index is taken as the current security index, and the step 82 is turned to.

[0123] In the embodiment of the present application, if any of the to-be-queried keyword and the to-be-queried time range does not match, the value of trace res exceeds the preset threshold θ or is less than 0, and the Enc(ind||op) of the corresponding security index does not belong to the query result R, the next security index is continued to be judged, and the security index uploaded before the current security index is taken as the current security index to judge, that is, the trace of the product of the query token and the target encryption matrix of the next security index is calculated.

[0124] Step 14, the data user decrypts the query result to obtain the target file corresponding to the query request.

[0125] In the embodiment of the present application, the data user decrypts the query result R to obtain one or more Enc(ind||op) therein, if op=add, the PHI file corresponding to the file identifier ind is taken as the target file; and if op=del, the PHI file corresponding to the file identifier ind is determined as a non-target file.

[0126] In the embodiment of the present application, as shown in the figure, Figure 9 Compared with the existing searchable encryption technology, the performance advantage of the present application is very detailed, wherein the abscissa is the size of the PHI file set, the ordinate is the running time, and the keyword dictionary of both schemes includes 30 keywords.

[0127] To sum up, the above is only a preferred embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A multi-party medical data query method with forward and backward privacy, characterized in that, The method is executed by a multi-terminal medical data query system including a data owner, a data user and a cloud server, and the method includes: The data owner generates a system key, a secure index corresponding to a pre-constructed keyword dictionary, sends the system key to the data user, and sends the secure index to the cloud server; wherein the secure index is constructed by encrypting the text keywords extracted from the PHI file; the system key wherein, is a seed of a pseudo-random function; is a symmetric encryption key; is a first random encryption matrix, is a second random encryption matrix, the data owner sends the system key and the keyword dictionary to the data user through a secure channel; The data owner generates the secure index, including: Receiving the PHI transmitted by each medical device and generating a PHI file, extracting corresponding file keywords from the PHI file according to the keyword dictionary; Generating a position sequence number set of the text keywords of the PHI file according to the position sequence numbers of the file keywords in the keyword dictionary; Encrypting the file identifier and the operator of the PHI file to generate an encrypted file identifier and an index address of the PHI file; For the PHI file, the data owner fills in virtual keywords according to the difference between the number of keywords in the keyword dictionary and the number of file keywords, so that the total number of virtual keywords and file keywords is equal to the number of keywords in the keyword dictionary, generates a position sequence number set of the keywords of the PHI file, and calculates a coefficient vector of the position sequence number set of the keywords of the PHI file using a polynomial algorithm; According to the correspondence between the position sequence number set of the text keywords and the position sequence number set of the keyword dictionary, a first chain vector is constructed, the coefficient vector, a first integer vector converted from the time stamp of the reception time of the PHI information, and the first chain vector are spliced to construct a third random encryption matrix and a fourth random encryption matrix; A target encryption matrix is generated using the first random encryption matrix, the second random encryption matrix, the third random encryption matrix and the fourth random encryption matrix, the target encryption matrix and the index address of each PHI file, and the encrypted file identifier of each PHI file are combined to form the secure index, and the secure index is sent to the cloud server for storage; The data user generates a query request according to the system key, the query time range and the query keyword, and sends the query request to the cloud server; wherein the query request includes a query token; The cloud server matches the secure index using the query token to obtain a query result corresponding to the query request, and sends the query result to the data user; The data user decrypts the query result to obtain a target file corresponding to the query request.

2. The method of claim 1, wherein, The data user generates a query request according to the system key, the query time range and the query keyword, including: According to the keyword dictionary, the position sequence number of the query keyword is determined, and a power vector of the position sequence number of the query keyword is constructed; According to the correspondence between the position sequence number set of the query keyword and the position sequence number set of the keyword dictionary, a second chain vector is constructed; Splice the power vector, the second integer vector converted from the timestamp of the time range to be queried and the second chain vector to construct a fifth random encryption matrix and a sixth random encryption matrix; Generate a query token by using the inverse matrix of the first random encryption matrix, the inverse matrix of the second random encryption matrix, the fifth random encryption matrix and the sixth random encryption matrix, and send it to the cloud server.

3. The method of claim 2, wherein, The cloud server matches the query token with the security index to obtain a query result corresponding to the query request, including: A1: taking the latest security index uploaded by the data owner as the current security index; A2: calculating the trace of the product of the query token and the target encryption matrix of the current security index; A3: judging whether the trace of the product is within a preset threshold, if yes, adding the corresponding encrypted file identifier to the query result, the value of the trace being the index address corresponding to the last PHI file containing the keyword, obtaining a new corresponding encrypted file identifier and target encryption matrix through the value of the trace, and returning to step A2; if not, taking the next security index as the current security index, and returning to step A2.

Citation Information

Patent Citations

  • Verifiable and searchable encryption method based on dictionary in cloud storage

    CN104052740A

  • Cloud storage searchable encryption method based on on-grid attribute bases

    CN112287368A