Privacy joint search method and system based on cloud-Internet of Things medical health system
By employing table storage and multiple input methods in the cloud-IoT healthcare system, the problems of low accuracy and insufficient privacy in multi-attribute joint search are solved, enabling efficient, accurate, and private information retrieval.
Patent Information
- Application Number
- CN202511348703.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-12-30
AI Technical Summary
In existing cloud-IoT healthcare systems, information retrieval by medical staff suffers from low accuracy, especially when performing multi-attribute joint searches, which can easily lead to incorrect matching and inaccurate query results.
A tabular storage method is adopted to classify and store each uploaded physiological data according to different attributes and upload frequency. The search is performed by multiple inputs. By encrypting the physiological data and the counts and random numbers of its attributes and values, the search is performed by two inputs. This ensures that the cloud server cannot know the query content through deduction, thereby improving the accuracy and privacy of the query.
This approach improves the accuracy of multi-attribute joint searches, reduces the amount of information feedback, enhances transmission and retrieval efficiency, and strengthens query privacy by ensuring that the cloud server cannot access the query content, thus protecting patient privacy.
Smart Images

Figure CN121239701A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data query technology, and in particular to a privacy-based joint search method for a cloud-IoT healthcare system, a cloud-IoT healthcare system, computer equipment, computer-readable storage media, and computer program products. Background Technology
[0002] With the rapid development of IoT and cloud computing technologies, cloud-IoT healthcare systems integrating these two technologies have been widely applied in real life. Wearable IoT devices can collect patients' physiological data in real time and aggregate it into electronic health records (EHRs), which are then uploaded to cloud servers for storage and analysis. This approach not only facilitates healthcare professionals in remotely accessing patient information and making diagnoses but also significantly reduces the storage and management costs of massive amounts of medical data.
[0003] Medical data is highly sensitive, and its leakage can lead to patient privacy breaches, reputational damage, and even social discrimination. Cloud servers are typically located in semi-trusted or untrusted environments, and storing plaintext data directly in the cloud poses significant risks. Therefore, encryption is necessary before data upload. Specifically, patients encrypt their physiological data using wearable IoT devices, generating a file. Key information within the physiological data is also encrypted, and an index is generated for the file. The file and its index are then transmitted to the cloud server. The cloud server stores the patient's file and its directory.
[0004] Table 1 – Schematic diagram of cloud server storage structure
[0005]
[0006] Patient 1's file contains encrypted medical history: hypertension, family history: diabetes, and encrypted key information: medical history, hypertension, family history, and diabetes. Patient 2's file contains encrypted medical history: diabetes, family history: hypertension, and encrypted key information: medical history, diabetes, family history, and hypertension. When medical staff need to query relevant information on the cloud server, for example, to find patients with a medical history of hypertension and a family history of diabetes, the system will match the encrypted key information in each file based on the encrypted medical history, hypertension, family history, and diabetes. The encrypted key information for both Patient 1 and Patient 2 will match successfully, thus outputting the files for Patient 1 and Patient 2. Medical staff can then decrypt the contents of the files for Patient 1 and Patient 2 to obtain their physiological data, which can then be used for treatment, research, and other analyses.
[0007] In reality, healthcare professionals need to find information about patients with a history of hypertension and a family history of diabetes, i.e., Patient 1. Patient 2, however, has a history of diabetes and a family history of hypertension, which does not match the healthcare professionals' primary search requirement. This incorrect matching result reduces the accuracy of information retrieval by the cloud-based IoT healthcare system. Summary of the Invention
[0008] The purpose of this application is to provide a privacy-based joint search method, cloud-IoT healthcare system, computer equipment, computer-readable storage medium, and computer program product based on a cloud-IoT healthcare system, so as to improve the accuracy of information query in the power grid cloud-IoT healthcare system.
[0009] To address the aforementioned technical problems, the embodiments of this application provide the following technical solutions:
[0010] The first aspect of this application provides a privacy-based joint search method for a cloud-IoT healthcare system. The method is applied to a cloud-IoT healthcare system, which includes a patient terminal, a cloud server, and a healthcare worker terminal. The patient terminal uploads each piece of encrypted data, the cloud server stores multiple pieces of encrypted data, and the healthcare worker terminal searches within these multiple pieces of encrypted data. The multiple pieces of encrypted data are stored in a table, where each row represents encrypted data uploaded by different patients or by the same patient at different times, and each column represents the values of different attributes in the encrypted data. Each row of the table also corresponds to a first ciphertext (based on the plaintext data of the encrypted data), containing the attribute name, corresponding value, and count, a random number, and a second ciphertext (based on the pairwise attribute name, corresponding value, count, and random number). For the same attribute name and corresponding value in different rows, the corresponding count increases sequentially from 1. The method includes: the healthcare worker terminal generating a first query request based on a first query requirement and sending the first query request to the cloud server. The first query requirement instructs a query to be performed on the rows containing the corresponding values of two specified attributes. The first query request includes a search based on the values of the specified two attributes. The cloud server generates multiple first target ciphertexts based on the first attribute, corresponding value, and different counts i, where i is an integer from 1 to the first maximum value, and the first maximum value is the largest count in the cloud server that is identical to the ciphertext of the first attribute and corresponding value. The cloud server matches each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determines the row corresponding to the successfully matched first ciphertext as the target row, and sends the target random number corresponding to the target row to the medical staff. The medical staff generates a second query request based on the first query requirement and the target random number, and sends the second query request to the cloud server. The second query request includes multiple second target ciphertexts generated by specifying the second attribute, corresponding value, different counts j, and target random number in two specified attributes, where j is an integer from 1 to the second maximum value, and the second maximum value is the largest count in the cloud server that is identical to the ciphertext of the second attribute and corresponding value. The cloud server matches each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determines the row corresponding to the successfully matched second ciphertext as the result row, and sends the result row information to the medical staff.
[0011] Compared to existing technologies, the privacy-preserving joint search method based on a cloud-IoT healthcare system provided in the first aspect of this application stores uploaded physiological data in a tabular format of attribute-value pairs according to different upload frequencies and attributes. This not only associates attributes and their corresponding values but also enables joint searches of multiple attributes, improving the accuracy of target searches. Furthermore, in the cloud server, not only is the physiological data encrypted, but the joint counts of each attribute and value are also encrypted, as are the joint counts of multiple attributes and values and random numbers. During the joint search, input is performed in two stages: the first input includes one attribute and value along with various counts; the second input, based on the random number corresponding to the file matched in the first stage, combines multiple attributes and values with various counts to generate multiple inputs. This prevents the cloud server from associating search inputs and thus from deducing the specific content of each query, enhancing query privacy.
[0012] In other embodiments provided in this application, each row of the table is also configured with a first encrypted row identifier and a second encrypted row identifier; sending the information of the result row to the medical staff includes: sending the first encrypted row identifier of the result row to the medical staff; the method further includes: the medical staff determines the result row according to the first encrypted row identifier of the result row, and generates the second encrypted row identifier of the result row according to a preset encryption algorithm, and sends the second encrypted row identifier of the result row to the cloud server; the cloud server matches the second encrypted row identifier of the result row with the second encrypted row identifier of each row, and sends the information of the row corresponding to the successfully matched second encrypted row identifier to the medical staff.
[0013] Each row's identifier is also encrypted, and two types of encryption are used. This prevents the cloud server from knowing the content it returns, further improving the privacy of information retrieval.
[0014] In other embodiments provided in this application, the first encrypted row identifier is a bitmap, the number of bits in the bitmap is the same as the number of rows in the cloud server, different bits correspond one-to-one with the corresponding rows in the cloud server, and the result row is multiple rows; before sending the first encrypted row identifier of the result row to the medical staff, the method further includes adding the bitmaps corresponding to each result row to obtain a total bitmap; sending the first encrypted row identifier of the result row to the medical staff includes: sending the total bitmap to the medical staff.
[0015] Bitmaps allow for the encrypted summation of multiple retrieved rows to produce a single result, reducing the amount of data transmitted and improving transmission efficiency, thus enhancing retrieval efficiency. Furthermore, this prevents the cloud server from knowing the content and purpose of the operation, further improving search privacy.
[0016] In other embodiments provided in this application, generating a first query request based on a first query requirement includes: obtaining a first attribute and its corresponding value and a second attribute and its corresponding value from the first query requirement; searching for the count of the first attribute and its corresponding value, and the count of the second attribute and its corresponding value in the count; determining the attribute and its corresponding value corresponding to the smaller count as the target attribute and its corresponding value; and generating a first query request based on the target attribute and its corresponding value, and the smaller count.
[0017] When a medical professional enters a query request for the first time, selecting the attribute and its corresponding value with the smallest count among the two attributes and their corresponding values can reduce the number of rows searched in the first query, allowing the second query to search in fewer rows, thus reducing the amount of data searched and improving search efficiency.
[0018] In other embodiments provided in this application, the cloud server also stores encrypted medical staff identifiers and their access-permitted attribute encrypted texts, as well as encrypted texts corresponding to each attribute in each row. The first query request or the second query request also includes the encrypted medical staff identifier of the current medical staff terminal. Before sending the result row information to the medical staff terminal, the method further includes: obtaining the target encrypted medical staff identifier from the first query request or the second query request; matching the target encrypted medical staff identifier with each encrypted medical staff identifier, and determining the attribute encrypted text corresponding to the successfully matched encrypted medical staff identifier as the target attribute encrypted text; matching the target attribute encrypted text with the encrypted text corresponding to each attribute in each row, and determining the encrypted text corresponding to the successfully matched attribute as the target encrypted text; sending the result row information to the medical staff terminal, including: sending the information corresponding to the target encrypted text in the result row to the medical staff terminal.
[0019] When providing feedback on the retrieved rows, the system retrieves the values of corresponding access attributes from the rows based on the access permissions of different medical staff. This not only reduces the amount of information feedback and improves transmission efficiency, thereby enhancing retrieval efficiency, but also avoids excessive exposure of patient information, further improving retrieval privacy. Furthermore, information such as medical staff and access permissions is encrypted to prevent the cloud server from obtaining more information, thus further enhancing search privacy.
[0020] In other embodiments provided in this application, the cloud server also stores ciphertext corresponding to each attribute in each row; the method further includes: the medical staff generating a third query request based on a second query requirement and sending the third query request to the cloud server, wherein the second query requirement is used to instruct the query of the corresponding value under a specified single attribute, and the third query request includes a third target ciphertext generated based on the specified single attribute; the cloud server matches the third target ciphertext in the third query request with the ciphertext corresponding to each attribute, and determines the attribute corresponding to the successfully matched ciphertext as the target attribute, and sends the information corresponding to the target attribute and the basic information of the corresponding row to the medical staff.
[0021] It can perform joint searches not only based on attributes, but also full searches based on single attributes, improving the flexibility of privacy searches.
[0022] In other embodiments provided in this application, each row of the table is also configured with backup information. The backup information includes a first backup ciphertext based on the initial letter combination of each attribute name, the initial letter combination of the corresponding value, and the count in the plaintext data of the encrypted data, a random number, and a second backup ciphertext based on the initial letter combination of each pair of attribute names, the initial letter combination of the corresponding value, the count, and the random number. The method further includes: when the medical staff detects that the remaining available resources of the cloud server are less than a preset amount, a first backup query request is generated based on the first query requirement, and the first backup query request is sent to the cloud server. The first backup query request includes multiple first backup target ciphertexts generated based on the initial letter combination of the first attribute, the initial letter combination of the corresponding value, and different counts i of two specified attributes. The cloud server will send the first backup... Each first backup target ciphertext in the query request is matched with the first backup ciphertext corresponding to each row in the backup information. The row corresponding to the successfully matched first backup ciphertext is determined as the target row, and the target random number corresponding to the target row is sent to the medical staff. The medical staff generates a second backup query request based on the first backup query request and the target random number, and sends the second backup query request to the cloud server. The second backup query request includes multiple second backup target ciphertexts generated by specifying the first letter combination of the second attribute in two attributes, the first letter combination of the corresponding value, different counts j, and the target random number. The cloud server matches each second backup target ciphertext in the second backup query request with the second backup ciphertext corresponding to the target row in the backup information, and the row corresponding to the successfully matched second backup ciphertext is determined as the result row, and the result row information is sent to the medical staff.
[0023] When resources are limited, an alternative encryption system is used, namely, searching with backup information. The backup information retains the original encryption method and search rules, but each attribute and value uses a combination of the first letter of a single character. This ensures privacy while enabling efficient searching with limited resources.
[0024] The second aspect of this application provides a cloud-IoT healthcare system, comprising a patient terminal, a cloud server, and a healthcare terminal. The patient terminal uploads each piece of encrypted data, the cloud server stores multiple pieces of encrypted data, and the healthcare terminal searches within these encrypted data. The multiple encrypted data are stored in a table, where each row represents encrypted data uploaded by different patients or by the same patient at different times, and each column represents the values of different attributes within the encrypted data. Each row of the table is also configured with a first ciphertext (based on the plaintext data of the encrypted data), containing the attribute name, corresponding value, and count, a random number, and a second ciphertext (containing the attribute name, corresponding value, count, and random number for each pair of attributes). For the same attribute name and corresponding value in different rows, the corresponding count increases sequentially from 1. Within the system: the healthcare terminal generates a first query request based on a first query requirement and sends the first query request to the cloud server. The first query requirement instructs a query to be performed on the rows containing the corresponding values of two specified attributes. The first query request includes queries based on the first attribute, corresponding value, and different counts i of the two specified attributes. Multiple first target ciphertexts are generated, where i is an integer from 1 to a first maximum value, which is the maximum count in the cloud server that is identical to the ciphertext of the first attribute and its corresponding value. The cloud server is used to match each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determine the row corresponding to the successfully matched first ciphertext as the target row, and send the target random number corresponding to the target row to the medical staff. The medical staff is also used to generate a second query request based on the first query requirement and the target random number, and send the second query request to the cloud server. The second query request includes multiple second target ciphertexts generated by specifying the second attribute, its corresponding value, different counts j, and the target random number, where j is an integer from 1 to a second maximum value, which is the maximum count in the cloud server that is identical to the ciphertext of the second attribute and its corresponding value. The cloud server is also used to match each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determine the row corresponding to the successfully matched second ciphertext as the result row, and send the result row information to the medical staff.
[0025] A third aspect of this application provides a computer device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of the first aspect.
[0026] The fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of the first aspect.
[0027] The fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the method of the first aspect.
[0028] The cloud-IoT healthcare system provided in the second aspect of this application, the computer equipment provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect have the same or similar beneficial effects as the privacy joint search method based on the cloud-IoT healthcare system provided in the first aspect. Attached Figure Description
[0029] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein:
[0030] Figure 1 This is a schematic diagram of the cloud-IoT healthcare system in the embodiments of this application;
[0031] Figure 2 This is a flowchart illustrating the privacy joint search method based on a cloud-IoT healthcare system in this application embodiment. Figure 1 ;
[0032] Figure 3 This is a flowchart illustrating the privacy joint search method based on a cloud-IoT healthcare system in this application embodiment. Figure 2 ;
[0033] Figure 4 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0034] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0035] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0036] Currently, privacy searches in cloud-based IoT healthcare systems employ a flat management approach, where attributes and keywords of each physiological data point are encrypted separately and used as an index for that data. This approach can lead to mismatched attributes and values in search results for combined searches, such as searching for rows containing two specified attributes and their values, thus reducing the accuracy of privacy searches.
[0037] In view of this, embodiments of this application provide a privacy-based joint search method, a cloud-IoT healthcare system, a computer device, a computer-readable storage medium, and a computer program product based on a cloud-IoT healthcare system. The method stores each uploaded physiological data row-by-row and categorizes it according to different attributes. Furthermore, each attribute and its value, as well as associated attributes and their values, are encrypted and used as an index. The method employs multiple inputs for searching, thereby improving both accuracy and privacy while ensuring accurate searching.
[0038] It should be noted that all components, data, and related processing methods involved in this application are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0039] First, the application scenarios of the privacy joint search method based on the cloud-IoT medical and health system provided in the embodiments of this application are described in detail.
[0040] Figure 1 This is a schematic diagram of the cloud-IoT healthcare system in the embodiments of this application. See also... Figure 1 As shown, the structure may include: patient terminal 11, cloud server 12, and medical staff terminal 13.
[0041] The patient terminal 11 is used to upload each piece of encrypted data. The patient terminal 11 can refer to the software installed on the patient's device. The patient can refer to an individual requiring health data monitoring. The device can refer to various health monitoring devices, such as smart bracelets, health monitors, etc. Each piece of encrypted data refers to the encrypted physiological data uploaded by the patient terminal 11 at one time. For example: If a patient uploaded their blood pressure, blood sugar, and hypertension history at 8:00 AM this morning, these values, after encryption, constitute one piece of encrypted data. As another example: If the same patient uploaded their blood pressure, blood sugar, and hypertension history at 9:00 PM tonight, these values, after encryption, constitute another piece of encrypted data. Similarly, if another patient uploaded their blood pressure, blood sugar, and metformin medication history at 9:00 PM tonight, these values, after encryption, constitute yet another piece of encrypted data.
[0042] The cloud server 12 is used to store multiple encrypted data entries. After the patient's terminal 11 uploads the encrypted data, the cloud server 12 stores each encrypted data entry line by line. Each line of data can also be stored as a file.
[0043] In cloud server 12, multiple encrypted data entries are stored in a table. Each row in the table represents encrypted data uploaded by different patients or by the same patient at different times. Each column in the table represents the values of different attributes in the encrypted data. Each row of the table also corresponds to a first ciphertext (based on the plaintext data of the encrypted data), consisting of the attribute name, corresponding value, and count, plus a random number, and a second ciphertext (containing the attribute name, corresponding value, count, and random number for each pair of attributes). For the same attribute name and corresponding value in different rows, the corresponding count starts from 1 and increases sequentially.
[0044] Here is an example illustrating the storage format of data uploaded by the patient client 11 in the cloud server 12.
[0045] Suppose Patient 1 uploads the following data via their patient client 11: "Patient History: Hypertension, Family History: Diabetes, Medication History: Aspirin"; Patient 2 uploads the same data via their patient client 11: "Patient History: Diabetes, Family History: Hypertension, Medication History: Metformin"; and Patient 3 uploads the same data via their patient client 11: "Patient History: Hypertension, Family History: Coronary Artery Disease, Medication History: Aspirin". Patient client 11 will encrypt each of these uploaded physiological data into a single file and will also generate index information for this data. This index information may include encrypted data containing attributes, values, and counts, random numbers, encrypted data containing multiple attributes, values, counts, and random numbers, etc.
[0046] Table 2 – Schematic Diagram of Cloud Server Storage Structure
[0047]
[0048] It's important to note that all the data in this table is encrypted. Different types of data use different encryption keys and functions. The encryption keys and functions used are configured uniformly by the system.
[0049] Furthermore, Patient 3's medical history of hypertension is the same as Patient 1's. Therefore, the count corresponding to Patient 3's medical history of hypertension is no longer count 1 in Patient 1, but count 2. Similarly, the count corresponding to Patient 3's medication history of aspirin is no longer count 1 in Patient 1, but count 2.
[0050] Furthermore, if an attribute of uploaded data has multiple values, such as Patient 1's history of hypertension and coronary heart disease, then a single attribute and value will correspond to multiple encrypted data, such as: history of hypertension-1, history of coronary heart disease-1.
[0051] Furthermore, if a single data upload corresponds to two or more attributes, such as past medical history, family history, and medication history, then the pairs of attributes, as well as the three or more attributes, also need to be encrypted with their corresponding values and random numbers. For example: Past Medical History - Hypertension - 1 - Family History - Diabetes - 1 - Random Number 1, Past Medical History - Hypertension - 1 - Medication History - Aspirin - 1 - Random Number 1, Past Medical History - Hypertension - 1 - Family History - Diabetes - 1 - Medication History - Aspirin - 1 - Random Number 1, etc.
[0052] The medical staff terminal 13 is used to search through multiple encrypted data entries. Here, the medical staff terminal 13 can refer to software capable of performing queries on the cloud server 12. The medical staff terminal 13 can be installed on the devices of medical personnel using the system. These devices can refer to various types of mobile terminals, such as computers and mobile phones. Medical personnel can refer to doctors, nurses, etc.
[0053] When a user on the healthcare client 13 needs to perform a data search, the user enters the search information. The healthcare client 13 first encrypts a portion of the search information and sends it to the cloud server 12 for searching. Then, based on the feedback from the cloud server 12, it encrypts the remaining information from the search information again and sends it to the cloud server 13, ultimately obtaining the search results from the cloud server 13. (This process will be explained in more detail later.)
[0054] Next, the privacy joint search method based on the cloud-IoT medical and health system provided in the embodiments of this application will be described in detail.
[0055] Figure 2 This is a flowchart illustrating the privacy joint search method based on a cloud-IoT healthcare system in this application embodiment. Figure 1 See Figure 2 As shown, the method may include:
[0056] S21: The medical staff generates a first query request based on the first query requirement and sends the first query request to the cloud server.
[0057] The first query request instructs a query to be performed on the rows containing the corresponding values under two specified attributes. The first query request includes multiple first target ciphertexts generated based on the first attribute, its corresponding value, and different counts i among the two specified attributes. i is an integer from 1 to a first maximum value, which is the largest count in the cloud server that is identical to the ciphertext of the first attribute and its corresponding value.
[0058] In practical applications, the first query need can refer to the query need of a doctor conducting medical research, the query need of a doctor treating a patient, the query need of a nurse treating a patient, and so on.
[0059] Continuing with Table 2 as an example, when a healthcare professional needs to query rows containing both a history of hypertension and a family history of diabetes (i.e., the corresponding file), the professional inputs the history of hypertension and family history of diabetes into their terminal. The terminal then selects one attribute and its corresponding value from these two options, for example, selecting history of hypertension. The counter in Table 2 shows that the history of hypertension has been updated twice, meaning the maximum count is 2. At this point, the "History-Hypertension-1" and "History-Hypertension-2" data are encrypted, resulting in two encrypted data sets. The healthcare professional then sends these encrypted data sets to the cloud server.
[0060] The cloud server contains a counter. This counter stores encrypted attributes and their corresponding values, as well as the maximum number of each attribute and its corresponding value in historical data updates. For example, when Patient 1 uploads data containing a history of hypertension, the counter counts for hypertension as 1. Then, when Patient 3 uploads data containing a history of hypertension, the counter counts for hypertension as 2.
[0061] When healthcare professionals need to query the count, they can carry encrypted past hypertension history data to search for the same attributes and corresponding values in the counter, and use the count of the same attributes and corresponding values found as the maximum count for this query.
[0062] S22: The cloud server matches each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determines the row corresponding to the first ciphertext that is successfully matched as the target row, and sends the target random number corresponding to the target row to the medical staff.
[0063] Continuing with the example above, the cloud server receives Past History-Hypertension-1 and Past History-Hypertension-2, and matches them with index 1 of each row in the index of Table 2. Patient 1 is matched with Past History-Hypertension-1, and Patient 2 is matched with Past History-Hypertension-2. Then, the random number 1 corresponding to Patient 1 and the random number 3 corresponding to Patient 2 are sent to the medical staff.
[0064] S23: The medical staff generates a second query request based on the first query requirement and the target random number, and sends the second query request to the cloud server.
[0065] The second query request includes multiple second target ciphertexts generated from the specified second attribute, corresponding value, different counts j, and target random number. j is an integer from 1 to the second maximum value. The second maximum value is the largest count in the cloud server that is identical to the ciphertext of the second attribute and its corresponding value.
[0066] After receiving random number 1 and random number 3, the healthcare provider retrieves the other attribute and its corresponding value from the associated attributes (in this example, family history-diabetes) and queries the counter for the maximum count of this attribute and its corresponding value (in this example, the maximum count is 1). Then, it combines the first attribute and its corresponding value, along with each number in its maximum count, and the other attribute and its corresponding value, along with its maximum count, with random number 1 and random number 3 respectively to generate a second query request, which is then sent to the cloud server.
[0067] In the example above, the second query request includes: Past history-hypertension-1-family history-diabetes-1-random number 1, Past history-hypertension-2-family history-diabetes-1-random number 1, Past history-hypertension-1-family history-diabetes-1-random number 3, Past history-hypertension-2-family history-diabetes-1-random number 3.
[0068] S24: The cloud server matches each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determines the row corresponding to the successfully matched second ciphertext as the result row, and sends the result row information to the medical staff.
[0069] Continuing with the example above, after the cloud server receives the second query request, it matches the four encrypted data points in the second query request against index 2 of table 2. At this point, only the data corresponding to Patient 1 (Patient History-Hypertension-1-Family History-Diabetes-1-Random Number 1) matches successfully in index 2. This confirms that the data corresponding to Patient 1 is the data that needs to be searched, i.e., the result of the related data search.
[0070] Furthermore, from the cloud server's perspective, the medical staff performed two searches using different indexes and were unaware that the medical staff were searching for two related attributes and corresponding values, thus improving the privacy of the search.
[0071] At this point, the cloud server can directly send the encrypted data for Patient 1 to the healthcare provider. The healthcare provider can then decrypt the encrypted data to obtain the plaintext search results. In the example above, the cloud server sends Patient 1's encrypted "Past Medical History: Hypertension, Family History: Diabetes, Medication History: Aspirin" to the healthcare provider.
[0072] Alternatively, the cloud server can select attributes and corresponding values within the permissions granted to the healthcare provider from all of Patient 1's attributes and corresponding values and send them to the healthcare provider. Continuing the example above, assuming the healthcare provider currently only has access permissions to the past medical history and family history attributes, then the cloud server would send "Patient History: Hypertension, Family History: Diabetes" to the healthcare provider.
[0073] After receiving encrypted data from the cloud server, the healthcare provider decrypts the data using a preset decryption function and key, outputting the plaintext attributes and corresponding values, allowing healthcare providers to view the search results.
[0074] As described above, the privacy-preserving joint search method based on a cloud-IoT healthcare system provided in this application stores uploaded physiological data in a tabular format of attribute-value pairs according to different upload counts and attributes. This not only associates attributes and their corresponding values but also enables joint searches of multiple attributes, improving the accuracy of target searches. Furthermore, in the cloud server, not only is the physiological data encrypted, but the joint counts of each attribute and value are also encrypted, as are the joint counts of multiple attributes and values and random numbers. During the joint search, input is performed twice: the first input includes one attribute and value along with various counts; the second input, based on the random number corresponding to the file matched in the first input, combines multiple attributes and values with various counts to generate multiple inputs. This prevents the cloud server from associating the search inputs and thus from deducing the specific content of each query, improving query privacy.
[0075] Furthermore, as a response to Figure 2 In a refinement and extension of the method shown, this application embodiment also provides a privacy-based joint search method for a cloud-IoT healthcare system.
[0076] Based on the aforementioned embodiments, each row of data on the cloud server is also configured with an encrypted bitmap and corresponding access permissions for each medical staff member.
[0077] Table 3 – Schematic Diagram of Cloud Server Storage Structure
[0078]
[0079]
[0080] Figure 3 This is a flowchart illustrating the privacy joint search method based on a cloud-IoT healthcare system in this application embodiment. Figure 2 See Figure 3 As shown, the method may include:
[0081] S31: The medical staff obtains the first attribute and its corresponding value and the second attribute and its corresponding value from the first query request; searches for the count of the first attribute and its corresponding value, as well as the count of the second attribute and its corresponding value, in the count; sends the first query request to the cloud server to determine the attribute and its corresponding value corresponding to the smaller count as the target attribute and its corresponding value; generates the first query request based on the target attribute and its corresponding value, as well as the smaller count, and sends the first query request to the cloud server.
[0082] For Table 3, the counters include:
[0083] Past medical history - hypertension, count: 2
[0084] Family history - diabetes, count: 1
[0085] Medication history - Aspirin, count: 2
[0086] Past medical history - diabetes, count: 1
[0087] Family history - hypertension, count: 1
[0088] Medication history - Metformin, count: 1
[0089] Family history - coronary heart disease, count: 1
[0090] Here, the first attribute and corresponding value in the first query request are past history of hypertension and the second attribute and corresponding value are family history of diabetes. The count for past history of hypertension is 2, and the count for family history of diabetes is 1. Therefore, we select family history of diabetes as the target attribute and corresponding value, and encrypt the data based on family history of diabetes and the count of 1 to obtain the first query request.
[0091] It should be noted that if the family history-diabetes count is 2, then the first query request will include two query contents: family history-diabetes-1 and family history-diabetes-2.
[0092] Choosing attributes and corresponding values with small counts can reduce the number of rows retrieved in the first query, which in turn reduces the number of random numbers obtained by the healthcare provider, thereby reducing the query volume in the second query request and ultimately improving search efficiency.
[0093] S32: The cloud server matches each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determines the row corresponding to the first ciphertext that is successfully matched as the target row, and sends the target random number corresponding to the target row to the medical staff.
[0094] Step S32 here is implemented in the same way as step S22 in the previous embodiment. Please refer to the relevant description in the previous embodiment. It will not be repeated here.
[0095] S33: The medical staff generates a second query request based on the first query requirement and the target random number, and sends the second query request to the cloud server.
[0096] Step S33 here is implemented in the same way as step S23 in the previous embodiment. Please refer to the relevant description in the previous embodiment. It will not be repeated here.
[0097] S34: The cloud server matches each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determines the row corresponding to the successfully matched second ciphertext as the result row.
[0098] Step S34 here is implemented in the same way as step S24 in the previous embodiment when querying the result row. Please refer to the relevant description in the previous embodiment. It will not be repeated here.
[0099] S35: The first encrypted row identifier of the result row sent by the cloud service to the healthcare provider.
[0100] S36: The medical staff determines the result row based on the first encrypted row identifier of the result row, generates the second encrypted row identifier of the result row according to the preset encryption algorithm, and sends the second encrypted row identifier of the result row to the cloud server.
[0101] S37: The cloud server matches the second encrypted row identifier of the result row with the second encrypted row identifier of each row, and sends the information of the row corresponding to the successfully matched second encrypted row identifier to the medical staff.
[0102] In index 4 of Table 3 above, two different row identifiers can be stored, and these two row identifiers can be encrypted using the same or different encryption functions and keys. Here, the first encrypted row identifier is 001, 010, etc., and the second encrypted row identifier is f1, f2, etc.
[0103] After the cloud server determines the result row, it first sends an encrypted row identifier of the result row to the medical staff. After the medical staff decrypts the first encrypted row identifier, it switches to another row identifier of the same row, encrypts it, and then sends it to the cloud server. The cloud server matches it with another encrypted row identifier of each of its rows, and sends the information of the row that matches successfully to the medical staff.
[0104] From the cloud server's perspective, the healthcare client performs two different searches and is unaware that the previous search result was sent to the healthcare client, further enhancing the privacy of related attribute searches.
[0105] In practical applications, the two different row identifiers can be of various types, such as Arabic numerals, letters, bitmaps, etc.
[0106] For bitmaps, the number of bits is the same as the number of rows in the cloud server. Different bits correspond one-to-one with the corresponding rows in the cloud server. For example, in Table 3, there are 3 rows of data, meaning the bitmap uses 3 bits. Each bit represents a row or a file. 0 indicates that it does not exist, and 1 indicates that it exists. Specifically, 001 represents the first row, 010 represents the second row, and 100 represents the third row.
[0107] When the result row has multiple rows, the cloud server obtains encrypted bitmaps of multiple result rows. In this case, the cloud server does not send each bitmap directly to the medical staff, but adds the bitmaps together and sends only the summed bitmap to the medical staff.
[0108] Specifically, step S37 above may include: adding the bitmaps corresponding to each result row to obtain a total bitmap; and sending the total bitmap to the medical staff.
[0109] For example, suppose there are patients 1 and 3 in the result table 3. Patient 1's bitmap is 001 and patient 3's bitmap is 100. Then, add 001 and 100 to get 101, and send 101 to the medical staff.
[0110] Once the healthcare provider receives and decrypts the encrypted number 101, they can see it and know that the results of the related attribute search are rows 1 and 3. They then encrypt f1 and f3 and send them to the cloud server. The cloud server decrypts the data, obtains the data from rows 1 and 3 that the healthcare provider needs, and then sends the information for patient 1 and patient 3 to the healthcare provider.
[0111] To achieve greater privacy protection for patient information, the cloud server can send patient information corresponding to their attributes to the healthcare provider based on their access permissions.
[0112] Specifically, the cloud server also stores encrypted medical staff identifiers and their access-restricted attribute encrypted texts, as well as the encrypted text corresponding to each attribute in each row.
[0113] For example, the cloud server stores: Doctor A's medical history and family history, Doctor B's medical history and medication history, Nurse C's medication history, and so on. This content is also encrypted.
[0114] In Table 3, attributes such as past medical history, family history, and medication history are also encrypted.
[0115] When healthcare professionals need to perform a search in the system, they can add encrypted healthcare professional identifiers to the first or second query request.
[0116] The encrypted medical staff identification here refers to the encrypted name, employee number, etc. of a doctor or nurse.
[0117] After obtaining the medical staff identifier encrypted text from the first or second query request, the cloud server can match the obtained medical staff identifier encrypted text with the medical staff identifier encrypted text in the correspondence between the medical staff identifier encrypted text and the attribute encrypted text with access permissions, and use the attribute encrypted text corresponding to the successfully matched medical staff identifier encrypted text as the attribute with browsing permission for this query.
[0118] After the cloud server determines the result row, before sending the result row information to the medical staff, it filters the information of the result row according to the previously determined permission attributes, that is, selects the corresponding values of the determined permission attributes in the result row and sends them to the medical staff.
[0119] Specifically, step S37 may include: obtaining the target medical staff identifier ciphertext from the first query request or the second query request; matching the target medical staff identifier ciphertext with each medical staff identifier ciphertext, and determining the attribute ciphertext corresponding to the successfully matched medical staff identifier ciphertext as the target attribute ciphertext; matching the target attribute ciphertext with the ciphertext corresponding to each attribute in each row, and determining the ciphertext corresponding to the successfully matched attribute as the target ciphertext; and sending the information corresponding to the target ciphertext in the result row to the medical staff terminal.
[0120] For example, suppose the cloud server retrieves Doctor B from the first query request, and then matches it in the identifier-attribute mapping to obtain Doctor B's past medical history and family history. Still using Table 3 as an example, after the cloud server locates Patient 1 through the second query request, since Doctor B only has viewing permissions for past medical history and family history, the cloud server only sends encrypted data on past hypertension and family diabetes to the healthcare provider.
[0121] It's important to note that when the cloud server sends the encrypted result row data to the healthcare provider, it only returns the values of the attributes that the current healthcare provider has viewing permissions for. This is unrelated to the attribute information involved in the first and second query requests (from the cloud server's perspective, each previous query is independent and unrelated).
[0122] The above describes the process by which the system implements privacy queries based on associated attributes. Associated attributes can be two or more attributes. This is the system's granular query function. Of course, the system also has a generalized query function, which queries all values related to a specific attribute, i.e., information about that attribute for each patient.
[0123] Specifically, the cloud server also stores the encrypted data corresponding to each attribute in each row. Taking Table 3 as an example, past medical history, family history, and medication history are all encrypted and stored in the corresponding positions of the table attributes.
[0124] Alongside steps S31-S37 described above, the method may further include:
[0125] Step A1: The medical staff generates a third query request based on the second query requirement and sends the third query request to the cloud server.
[0126] The second query request instructs the user to query for the corresponding value under a specified single attribute. The third query request includes a third target ciphertext generated based on the specified single attribute.
[0127] Taking Table 3 as an example, assuming the second query requirement is to obtain all medication history, then the third query request is the encrypted medication history.
[0128] Step A2: The cloud server matches the third target ciphertext in the third query request with the ciphertext corresponding to each attribute, and determines the attribute corresponding to the successfully matched ciphertext as the target attribute. The information corresponding to the target attribute and the basic information of the corresponding row are sent to the medical staff.
[0129] Continuing with the example above, the cloud server can obtain the medication history and compare it with the encrypted past medical history, family history, and medication history in Table 3. This allows it to lock the attribute in the medication history section of Table 3 as the target attribute, and then send the information of all rows in that section to the medical staff.
[0130] To facilitate access for healthcare professionals, the cloud server can send the corresponding values of all patients' target attributes, as well as all patients' basic information, such as encrypted patient names and numbers, to the healthcare professionals for them to view.
[0131] It should be noted that after performing a generalized search on a single attribute, when the cloud server sends encrypted physiological data to the healthcare provider, it also needs to verify the healthcare provider's access permissions for the attribute. The specific verification method is the same as the verification method for healthcare providers to view the attributes they have permission to during the previous fine-grained search, and will not be repeated here.
[0132] The above describes the normal search process on a cloud server. In some special cases, such as when system resources are insufficient to process more data, more concise information, i.e., backup information, can be used in addition to the above index information.
[0133] The backup information includes a first backup ciphertext consisting of the initial letter combination of each attribute name, the initial letter combination of the corresponding value, and a count, along with a random number, based on the plaintext data from the encrypted data on the patient's end. A second backup ciphertext consists of the initial letter combination of each pair of attribute names, the initial letter combination of the corresponding value, a count, and a random number. In other words, the entire encryption and search method is the same as described above; only the initial letter combination is used for attributes and their corresponding values in the index. For example, "past medical history" is represented by "jws." Another example is "hypertension" as a corresponding value, represented by "gxy."
[0134] Alongside steps S31-S37 described above, the method may further include:
[0135] Step B1: When the medical staff detects that the remaining available resources of the cloud server are less than the preset amount, they generate a first backup query request based on the first query requirement and send the first backup query request to the cloud server. The first backup query request includes multiple first backup target ciphertexts generated based on the first letter combination of the first attribute in two specified attributes, the first letter combination of the corresponding value, and different counts i.
[0136] When healthcare professionals input information into their client (this information is typically a query request, such as information about patients with a history of hypertension or a family history of diabetes), the client retrieves the remaining available resources on the cloud server. If the retrieved remaining available resources are less than a preset amount, subsequent queries will use backup information for searching.
[0137] In practical applications, the remaining available resources can be represented by 1 - Central Processing Unit (CPU) utilization, load, etc. The preset value can be any corresponding numerical value. The specific value of the preset value can be determined based on actual needs and is not limited here.
[0138] Step B2: The cloud server matches each first backup target ciphertext in the first backup query request with the first backup ciphertext corresponding to each row in the backup information, and determines the row corresponding to the successfully matched first backup ciphertext as the target row, and sends the target random number corresponding to the target row to the medical staff.
[0139] Step B3: The medical staff generates a second backup query request based on the first backup query requirement and the target random number, and sends the second backup query request to the cloud server. The second backup query request includes the first letter combination of the second attribute in the specified two attributes, the first letter combination of the corresponding value, and multiple second backup target ciphertexts generated by different counts j and the target random number.
[0140] Step B4: The cloud server matches each second backup target ciphertext in the second backup query request with the second backup ciphertext corresponding to the target row in the backup information, and determines the row corresponding to the successfully matched second backup ciphertext as the result row, and sends the result row information to the medical staff.
[0141] Steps B1-B4 here are the same as steps S21-S24 in the aforementioned embodiments, as well as steps S31-S37 and steps A1-A2. Please refer to the relevant descriptions above, and they will not be repeated here.
[0142] This concludes the description of the privacy joint search method based on the cloud-IoT healthcare system provided in this application.
[0143] Based on the same inventive concept, this application also provides a cloud-IoT medical and health system.
[0144] See also Figure 1 As shown, the system may include: a patient terminal 11, a cloud server 12, and a medical staff terminal 13.
[0145] The patient terminal 11 is used to upload each piece of encrypted data, the cloud server 12 is used to store multiple pieces of encrypted data, and the medical staff terminal 13 is used to search among multiple pieces of encrypted data. The multiple pieces of encrypted data are stored in a table. Each row in the table contains encrypted data uploaded by different patients or by the same patient at different times. Each column in the table contains the values of different attributes in the encrypted data. Each row of the table is also configured with a first ciphertext, a random number, and a second ciphertext, which consists of the name, corresponding value, and count of each attribute in the plaintext data of the encrypted data, based on the patient terminal 11. The second ciphertext consists of the name, corresponding value, count, and random number of each pair of attributes. For the same attribute name and corresponding value in different rows, the corresponding count increases sequentially from 1.
[0146] In the system:
[0147] The medical staff terminal 13 is used to generate a first query request based on a first query requirement and send the first query request to the cloud server 12. The first query requirement is used to instruct a query to be performed on the row where the corresponding value is under two specified attributes. The first query request includes multiple first target ciphertexts generated based on the first attribute, the corresponding value and different counts i in the two specified attributes. i is an integer from 1 to the first maximum value. The first maximum value is the maximum count in the cloud server 12 that is the same as the ciphertext of the first attribute and the corresponding value.
[0148] The cloud server 12 is used to match each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and to determine the row corresponding to the first ciphertext that is successfully matched as the target row, and send the target random number corresponding to the target row to the medical staff terminal 13.
[0149] The medical staff terminal 13 is also used to generate a second query request based on the first query requirement and the target random number, and send the second query request to the cloud server 12. The second query request includes a second attribute, a corresponding value, a different count j, and a target random number that are generated by the second attribute and the target random number, respectively. j is an integer from 1 to the second maximum value. The second maximum value is the maximum count in the cloud server 12 that is the same as the ciphertext of the second attribute and the corresponding value.
[0150] The cloud server 12 is also used to match each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and to determine the row corresponding to the successfully matched second ciphertext as the result row, and send the result row information to the medical staff terminal 13.
[0151] Furthermore, as Figure 1 In addition to the refinement and expansion of the system shown, this application also provides a cloud-IoT medical and health system.
[0152] See also Figure 1 As shown, in the system:
[0153] The medical staff terminal 13 is used to obtain the first attribute and its corresponding value and the second attribute and its corresponding value from the first query request; search for the count of the first attribute and its corresponding value, and the count of the second attribute and its corresponding value in the count; determine the attribute and its corresponding value corresponding to the smaller count as the target attribute and its corresponding value; generate a first query request based on the target attribute and its corresponding value, and the smaller count, and send the first query request to the cloud server 12. The first query request is used to instruct a query to be performed on the row where the corresponding value is located under the specified two attributes. The first query request includes multiple first target ciphertexts generated based on the first attribute, its corresponding value, and different counts i in the specified two attributes. i is an integer from 1 to the first maximum value. The first maximum value is the largest count in the cloud server 12 that is the same as the ciphertext of the first attribute and its corresponding value.
[0154] The cloud server 12 is used to match each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and to determine the row corresponding to the first ciphertext that is successfully matched as the target row, and send the target random number corresponding to the target row to the medical staff terminal 13.
[0155] The medical staff terminal 13 is also used to generate a second query request based on the first query requirement and the target random number, and send the second query request to the cloud server 12. The second query request includes a second attribute, a corresponding value, a different count j, and a target random number that are generated by the second attribute and the target random number, respectively. j is an integer from 1 to the second maximum value. The second maximum value is the maximum count in the cloud server 12 that is the same as the ciphertext of the second attribute and the corresponding value.
[0156] The cloud server 12 is also used to match each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and to determine the row corresponding to the successfully matched second ciphertext as the result row, and send the result row information to the medical staff terminal 13.
[0157] With each row of the table also configured with a first encrypted row identifier and a second encrypted row identifier, the cloud server 12 is also specifically used to send the first encrypted row identifier of the result row to the medical staff terminal 13.
[0158] The medical staff terminal 13 is also used to determine the result row based on the first encrypted row identifier of the result row, generate the second encrypted row identifier of the result row according to the preset encryption algorithm, and send the second encrypted row identifier of the result row to the cloud server 12.
[0159] The cloud server 12 is also used to match the second encrypted row identifier of the result row with the second encrypted row identifier of each row, and send the information of the row corresponding to the successfully matched second encrypted row identifier to the medical staff terminal 13.
[0160] The first encrypted row is identified as a bitmap. The number of bits in the bitmap is the same as the number of rows in the cloud server 12. Different bits correspond one-to-one with the corresponding rows in the cloud server 12. In the case of multiple result rows, the cloud server 12 is also used to add the bitmaps corresponding to each result row to obtain the total bitmap; and send the total bitmap to the medical staff terminal 13.
[0161] In the case that the cloud server 12 also stores the encrypted text of each medical staff identifier and the encrypted text of the attributes with access permissions, as well as the encrypted text corresponding to each attribute in each row, and the first query request or the second query request also includes the encrypted text of the medical staff identifier of the current medical staff terminal 13, the cloud server 12 is further used to obtain the target medical staff identifier encrypted text from the first query request or the second query request; match the target medical staff identifier encrypted text with each medical staff identifier encrypted text, and determine the encrypted text of the attribute corresponding to the successfully matched medical staff identifier encrypted text as the target attribute encrypted text; match the target attribute encrypted text with the encrypted text corresponding to each attribute in each row, and determine the encrypted text corresponding to the successfully matched attribute as the target encrypted text; and send the information corresponding to the target encrypted text in the result row to the medical staff terminal 13.
[0162] With cloud server 12 also storing ciphertext corresponding to each attribute in each row, cloud server 12 is further used by medical staff terminal 13 to generate a third query request based on the second query requirement and send the third query request to cloud server 12. The second query requirement is used to instruct the query of the corresponding value under a specified single attribute, and the third query request includes a third target ciphertext generated based on the specified single attribute. The third target ciphertext in the third query request is matched with the ciphertext corresponding to each attribute, and the attribute corresponding to the successfully matched ciphertext is determined as the target attribute. The information corresponding to the target attribute and the basic information of the corresponding row are sent to medical staff terminal 13.
[0163] Each row of the table is also configured with backup information. The backup information includes the first backup ciphertext of the first letter combination of each attribute name, the first letter combination of the corresponding value, and the count in the plaintext data of the encrypted data on the patient end 11, and a random number, as well as the second backup ciphertext of the first letter combination of each pair of attribute names, the first letter combination of the corresponding value, the count, and the random number. On the medical end 13, when it is detected that the remaining available resources of the cloud server 12 are less than the preset amount, a first backup query request is generated based on the first query requirement, and the first backup query request is sent to the cloud server 12. The first backup query request includes multiple first backup target ciphertexts generated based on the first letter combination of the first attribute, the first letter combination of the corresponding value, and different counts i in two specified attributes.
[0164] The cloud server 12 is also used to match each first backup target ciphertext in the first backup query request with the first backup ciphertext corresponding to each row in the backup information, and to determine the row corresponding to the successfully matched first backup ciphertext as the target row, and send the target random number corresponding to the target row to the medical staff terminal 13.
[0165] The medical staff terminal 13 is also used to generate a second backup query request based on the first backup query requirement and the target random number, and send the second backup query request to the cloud server 12. The second backup query request includes a combination of the first letter of the second attribute in the specified two attributes, a combination of the first letter of the corresponding value, and multiple second backup target ciphertexts generated by different counts j and the target random number.
[0166] The cloud server 12 is also used to match each second backup target ciphertext in the second backup query request with the second backup ciphertext corresponding to the target row in the backup information, and to determine the row corresponding to the successfully matched second backup ciphertext as the result row, and send the result row information to the medical staff terminal 13.
[0167] It should be noted that the description of the system embodiments above is similar to the description of the method embodiments above, and has similar beneficial effects. For technical details not disclosed in the system embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0168] Based on the same inventive concept, this application also provides a computer device.
[0169] Figure 4 This is a schematic diagram of the structure of the computer device in an embodiment of this application. See also... Figure 4 As shown, the computer device may include: a memory 41, a processor 42, and a computer program stored on the memory 41, wherein the processor 42 executes the computer program to implement the methods described in the foregoing embodiments.
[0170] It should be noted that the description of the above computer device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the computer device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0171] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the methods described in the foregoing embodiments.
[0172] It should be noted that the description of the above computer-readable storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the computer-readable storage medium embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0173] Based on the same inventive concept, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the methods described in the foregoing embodiments.
[0174] It should be noted that the descriptions of the above computer program product embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the computer program product embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0175] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A privacy-based joint search method for a cloud-IoT healthcare system, characterized in that, The method is applied to a cloud-IoT healthcare system, which includes a patient terminal, a cloud server, and a healthcare provider terminal. The patient terminal uploads each piece of encrypted data, the cloud server stores multiple pieces of encrypted data, and the healthcare provider terminal searches among these multiple pieces of encrypted data. The multiple pieces of encrypted data are stored in a table, where each row represents encrypted data uploaded by different patients or by the same patient at different times, and each column represents the values of different attributes in the encrypted data. Each row of the table also corresponds to a first ciphertext (based on the plaintext data of the encrypted data), consisting of the patient terminal's first ciphertext (name, value, and count of each attribute, plus a random number), and a second ciphertext (name, value, count, and random number for each pair of attributes). For the same attribute name and corresponding value in different rows, the corresponding count starts from 1 and increases sequentially; the method includes: The medical staff terminal generates a first query request based on a first query requirement and sends the first query request to the cloud server. The first query requirement is used to instruct a query to be performed on the row containing the corresponding values under two specified attributes. The first query request includes multiple first target ciphertexts generated based on the first attribute, the corresponding value, and different counts i in the two specified attributes. i is an integer from 1 to a first maximum value. The first maximum value is the maximum count in the cloud server that is the same as the ciphertext of the first attribute and the corresponding value. The cloud server matches each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determines the row corresponding to the first ciphertext that is successfully matched as the target row, and sends the target random number corresponding to the target row to the medical staff terminal; The medical staff terminal generates a second query request based on the first query requirement and the target random number, and sends the second query request to the cloud server. The second query request includes a second attribute of the specified two attributes, a corresponding value, different counts j, and multiple second target ciphertexts generated by the target random number. The j is an integer from 1 to the second maximum value, and the second maximum value is the maximum count in the cloud server that is the same as the ciphertext of the second attribute and the corresponding value. The cloud server matches each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determines the row corresponding to the successfully matched second ciphertext as the result row, and sends the information of the result row to the medical staff.
2. The method according to claim 1, characterized in that, Each row of the table is also configured with a first encrypted row identifier and a second encrypted row identifier; the information of sending the result row to the medical staff includes: Send the first encrypted row identifier of the result row to the medical staff terminal; The method further includes: The medical staff determines the result row based on the first encrypted row identifier of the result row, generates a second encrypted row identifier of the result row according to a preset encryption algorithm, and sends the second encrypted row identifier of the result row to the cloud server; The cloud server matches the second encrypted row identifier of the result row with the second encrypted row identifier of each row, and sends the information of the row corresponding to the successfully matched second encrypted row identifier to the medical staff terminal.
3. The method according to claim 2, characterized in that, The first encrypted row identifier is a bitmap, the number of bits in the bitmap is the same as the number of rows in the cloud server, and different bits correspond one-to-one with the corresponding rows in the cloud server. The result row consists of multiple rows. Before sending the first encrypted row identifier of the result row to the medical staff terminal, the method further includes: Add the bitmaps corresponding to each result row together to obtain the total bitmap; The first encrypted row identifier for sending the result row to the medical staff includes: The overall bitmap is sent to the medical staff terminal.
4. The method according to claim 1, characterized in that, A first query request is generated based on the first query requirement, including: Obtain the first attribute and its corresponding value, and the second attribute and its corresponding value from the first query request; Find the count of the first attribute and its corresponding value, and the count of the second attribute and its corresponding value in the count; Define the attribute and corresponding value corresponding to the smaller count as the target attribute and corresponding value; The first query request is generated based on the target attribute and its corresponding value, as well as the small count.
5. The method according to claim 1, characterized in that, The cloud server also stores encrypted medical staff identifiers and their access-restricted attribute encrypted texts, as well as the encrypted texts corresponding to each attribute in each row. The first query request or the second query request also includes the encrypted medical staff identifiers of the current medical staff terminal. Before sending the result row information to the healthcare provider, the method further includes: Obtain the target medical staff identifier encrypted text from the first query request or the second query request; The target medical staff identifier ciphertext is matched with each of the medical staff identifier ciphertexts, and the attribute ciphertext corresponding to the successfully matched medical staff identifier ciphertext is determined as the target attribute ciphertext; The target attribute ciphertext is matched with the ciphertext corresponding to each attribute in each row, and the ciphertext corresponding to the successfully matched attribute is determined as the target ciphertext; The information sent to the medical staff terminal includes: The information corresponding to the target ciphertext in the result row is sent to the medical staff terminal.
6. The method according to claim 1, characterized in that, The cloud server also stores the ciphertext corresponding to each attribute in each row; the method further includes: The medical staff generates a third query request based on the second query requirement and sends the third query request to the cloud server. The second query requirement is used to instruct the query of the corresponding value under a specified single attribute, and the third query request includes a third target ciphertext generated based on the specified single attribute. The cloud server matches the third target ciphertext in the third query request with the ciphertext corresponding to each attribute, and determines the attribute corresponding to the successfully matched ciphertext as the target attribute, and sends the information corresponding to the target attribute and the basic information of the corresponding row to the medical staff terminal.
7. The method according to any one of claims 1 to 6, characterized in that, Each row of the table also corresponds to a spare information, which includes the first letter combination of each attribute name, the first letter combination of the corresponding value, and the count of the plaintext data based on the encrypted data on the patient's end, a first spare ciphertext, a random number, and the second spare ciphertext of the first letter combination of each pair of attribute names, the first letter combination of the corresponding value, the count, and the random number; the method further includes: When the medical staff detects that the remaining available resources of the cloud server are less than a preset amount, it generates a first backup query request based on the first query requirement and sends the first backup query request to the cloud server. The first backup query request includes multiple first backup target ciphertexts generated based on the first letter combination of the first attribute in two specified attributes, the first letter combination of the corresponding value, and different counts i. The cloud server matches each first backup target ciphertext in the first backup query request with the first backup ciphertext corresponding to each row in the backup information, and determines the row corresponding to the successfully matched first backup ciphertext as the target row, and sends the target random number corresponding to the target row to the medical staff terminal; The medical staff terminal generates a second backup query request based on the first backup query requirement and the target random number, and sends the second backup query request to the cloud server. The second backup query request includes the first letter combination of the second attribute in the two specified attributes, the first letter combination of the corresponding value, different counts j, and multiple second backup target ciphertexts generated by the target random number. The cloud server matches each second backup target ciphertext in the second backup query request with the second backup ciphertext corresponding to the target row in the backup information, and determines the row corresponding to the successfully matched second backup ciphertext as the result row, and sends the information of the result row to the medical staff.
8. A cloud-IoT healthcare system, characterized in that, The system includes a patient terminal, a cloud server, and a healthcare terminal. The patient terminal uploads each piece of encrypted data, the cloud server stores multiple pieces of encrypted data, and the healthcare terminal searches within these encrypted data. The multiple encrypted data pieces are stored in a table, where each row represents encrypted data uploaded by different patients or by the same patient at different times, and each column represents the values of different attributes within the encrypted data. Each row of the table also corresponds to a first ciphertext (based on the plaintext data of the encrypted data), containing the attribute name, corresponding value, and count, along with a random number, and a second ciphertext (containing the attribute name, corresponding value, count, and random number for each pair of attributes). For identical attribute names and corresponding values in different rows, the corresponding counts increment sequentially from 1. In this system: The medical terminal is used to generate a first query request based on a first query requirement and send the first query request to the cloud server. The first query requirement is used to instruct a query to be performed on the row containing the corresponding values under two specified attributes. The first query request includes multiple first target ciphertexts generated based on the first attribute, the corresponding value, and different counts i in the two specified attributes. i is an integer from 1 to a first maximum value. The first maximum value is the maximum count in the cloud server that is the same as the ciphertext of the first attribute and the corresponding value. The cloud server is used to match each first target ciphertext in the first query request with the first ciphertext corresponding to each row, and determine the row corresponding to the successfully matched first ciphertext as the target row, and send the target random number corresponding to the target row to the medical staff terminal; The medical terminal is further configured to generate a second query request based on the first query requirement and the target random number, and send the second query request to the cloud server. The second query request includes a second attribute, a corresponding value, a different count j, and multiple second target ciphertexts generated by the target random number, wherein j is an integer from 1 to a second maximum value, and the second maximum value is the maximum count in the cloud server that is the same as the ciphertext of the second attribute and the corresponding value. The cloud server is further configured to match each second target ciphertext in the second query request with the second ciphertext corresponding to the target row, and determine the row corresponding to the successfully matched second ciphertext as the result row, and send the information of the result row to the medical staff terminal.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.