Data hiding query method and device, electronic equipment and storage medium
By receiving and decrypting the encrypted query conditions of the data query end, determining the target encryption method, and transmitting the encrypted query data, the problem of data query under multiple data encryption methods in the existing technology is solved, and the data anonymity and security are improved.
Patent Information
- Application Number
- CN202410759458.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-10
AI Technical Summary
The existing technology lacks data query methods suitable for data providers with multiple different data encryption methods, and cannot guarantee the security and confidentiality of data.
By receiving the encrypted query conditions sent by the data query end, decrypting them using the randomly assigned first key, determining the target encryption method of the data provider, transmitting the encrypted query data, and obtaining the original query condition correspondence through the first key decryption target query data.
It implements data hiding queries for data providers with various data encryption methods, improves the versatility of data hiding queries, and ensures the anonymity and security of data through encrypted transmission.
Smart Images

Figure CN118626516A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a data anonymity query method, device, electronic equipment and storage medium. Background Art
[0002] Anonymous query refers to a data query method in which the data query party hides the keywords or customer ID information of the queried object, and the data provider provides matching query results but cannot know which specific query object it corresponds to. This method is widely used in fields such as medicine and finance.
[0003] Usually, the data provided by the data provider is encrypted data and different data providers encrypt the data in different ways. In the related art, a fixed data anonymity query method is usually developed for one data provider, that is, the method is only applicable to data providers with the same data encryption method, that is, there is currently a lack of a data query method that is applicable to data providers with multiple different data encryption methods and can ensure data security and anonymity. Summary of the invention
[0004] The present invention provides a data anonymity query method, device, electronic device and storage medium to solve the current problem of lacking a data query method applicable to data providers of multiple different data encryption methods and capable of ensuring data security and anonymity.
[0005] According to one aspect of the present invention, a data anonymity query method is provided, which is applied to a server, wherein the method comprises:
[0006] Receiving an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting an original query condition using a first key randomly assigned to the data query terminal;
[0007] Decrypting the encrypted query condition using the first key to obtain a decrypted query condition;
[0008] Determine a target encryption mode of encrypted storage data in the data provider, and determine target query data based on the target encryption mode, the decryption query condition, and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption;
[0009] Encrypting the target query data by using the first key to obtain encrypted query data, and returning the encrypted query data to the data query end;
[0010] so that the data query end decrypts the encrypted query data using the first key,
[0011] The target query data corresponding to the original query condition is obtained.
[0012] According to another aspect of the present invention, a data anonymity query device is provided, wherein the device comprises:
[0013] A condition receiving module, used for receiving an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting the original query condition by using a first key randomly assigned to the data query terminal;
[0014] A condition decryption module, used to decrypt the encrypted query condition using the first key to obtain a decrypted query condition;
[0015] A data query module, used to determine a target encryption mode of encrypted storage data in a data provider, and determine target query data based on the target encryption mode, the decryption query condition and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption;
[0016] An encryption return module, used for encrypting the target query data by using the first key to obtain encrypted query data, and returning the encrypted query data to the data query end;
[0017] The data decryption module is used to enable the data query end to decrypt the encrypted query data using the first key to obtain the target query data corresponding to the original query condition.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data anonymity query method described in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data anonymity query method described in any embodiment of the present invention when executed.
[0023] The technical solution of the embodiment of the present invention is to receive the encrypted query condition sent by the data query end, wherein the encrypted query condition is obtained by encrypting the original query condition by the first key randomly assigned to the data query end; decrypt the encrypted query condition by the first key to obtain the decrypted query condition; determine the target encryption mode of the encrypted storage data in the data provider end, and determine the target query data based on the target encryption mode, the decrypted query condition and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption; encrypt the target query data by the first key to obtain the encrypted query data, and return the encrypted query data to the data query end; so that the data query end decrypts the encrypted query data by the first key to obtain the target query data corresponding to the original query condition. The data anonymity query for the data provider end with various different data encryption modes is realized, and the versatility of the data anonymity query is improved. In the entire data anonymity query process of the present invention, the encrypted transmission mode is adopted to further ensure the anonymity and security of the data.
[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flow chart of a data anonymity query method provided according to the first embodiment of the present invention;
[0027] Figure 2 is a flow chart of a data anonymity query method provided according to Embodiment 2 of the present invention;
[0028] Figure 3 This is an overall flow chart of a data anonymity query method provided according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the structure of a data anonymity query device provided according to Embodiment 3 of the present invention;
[0030] Figure 5 It is a structural schematic diagram of an electronic device for implementing the data anonymity query method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1 A flowchart of a data anonymity query method is provided for the first embodiment of the present invention. This embodiment is applicable to data anonymity query of data providers with different data encryption methods. The method can be executed by a data anonymity query device, which can be implemented in the form of hardware and / or software. The data anonymity query device can be configured in a computer. Figure 1 As shown, the method includes:
[0035] S110. Receive an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting an original query condition using a first key randomly assigned to the data query terminal.
[0036] The data query terminal can be understood as a terminal that has the need for data anonymity query. In the embodiment of the present invention, the data query terminal can be one or more.
[0037] The data anonymity query requirement may be a requirement for not exposing the object information of the target query object in the original query condition during the data query process. The target query object may be a person, and the object information may include an object ID and an object keyword.
[0038] The encrypted query condition may be understood as an encrypted query condition. The original query condition may be understood as an unencrypted query condition. In the embodiment of the present invention, the original query condition may include object information of the target query object.
[0039] The first key may be used to encrypt or decrypt the query condition.
[0040] Specifically, when the data query end is detected to be logged in, a key, namely a first key, is randomly assigned to the data query end; so that the data query end encrypts the generated original query conditions by the first key to obtain encrypted query conditions; and sends the encrypted query conditions to the server.
[0041] The technical solution of the above embodiment realizes the effect of concealing the object information of the target query object in the query condition by encrypting the query condition; and the data transmission is performed after the query condition is encrypted, thereby ensuring the security of the data transmission.
[0042] S120. Decrypt the encrypted query condition using the first key to obtain a decrypted query condition.
[0043] The decrypted query condition may be understood as the decrypted query condition obtained by the server.
[0044] S130, determining a target encryption method for encrypted storage data in a data provider, and determining target query data based on the target encryption method, the decryption query condition, and the encrypted storage data, wherein the target encryption method includes key encryption or custom encryption.
[0045] The data provider may be understood as a terminal that provides data. In the embodiment of the present invention, there may be multiple data providers, and different data providers may use different encryption methods for encrypted storage data.
[0046] The data provider can be preset according to the scenario requirements and is not specifically limited here. Optionally, the data provider may include a medical data system or a bank data system, wherein the medical data system may include medical data, and the bank data system may include transaction data, and the medical data and transaction data can be queried. The technical solution of the embodiment of the present invention can realize the query of the target query information corresponding to the original query condition, but does not expose the object information of the target query object in the original query condition, that is, the data provider provides data, but cannot know the effect of the target query object.
[0047] The encrypted storage data may be understood as data stored in the data provider after being encrypted.
[0048] The target encryption method can be understood as the encryption method of the encrypted storage data. In the embodiment of the present invention, the target encryption method can be preset according to the scene requirements and is not specifically limited here. Optionally, the target encryption method can include key encryption or custom encryption.
[0049] The key encryption can be understood as a method of encrypting data using a key.
[0050] The custom encryption can be understood as a custom encryption method. In an embodiment of the present invention, the custom encryption can be preset according to the scenario requirements and is not specifically limited here. Optionally, the custom encryption can be a field conversion, for example, converting the field value corresponding to the decryption query condition from the first field value to the second field value, and / or converting the field order corresponding to the decryption query condition from the first order to the second order. Among them, the conversion method between the first field value and the second field value, and the conversion method between the first order and the second order can be customized by the developer.
[0051] The target query data may be understood as the query result corresponding to the decryption query condition.
[0052] The present invention realizes data anonymity query for data providing terminals with various data encryption modes, thereby improving the versatility of data anonymity query.
[0053] Optionally, determining the target query data based on the target encryption mode, the decryption query condition, and the encrypted storage data includes:
[0054] When the target encryption mode is the key encryption, determining a plurality of second keys for encrypting the encrypted storage data;
[0055] Loading the encrypted stored data, and decrypting the encrypted stored data using a plurality of the second keys to obtain decrypted stored data;
[0056] The target query data is determined based on the decrypted stored data and the decrypted query condition.
[0057] The second key may be understood as a key used to encrypt the encrypted storage data. In the embodiment of the present invention, the first key and the second key may be the same or different.
[0058] The decrypted storage data can be understood as data decrypted by the server.
[0059] Specifically, the decrypted stored data and the decrypted query condition are matched to obtain the target query data in the decrypted stored data corresponding to the decrypted query condition.
[0060] Optionally, before determining the target encryption mode for encrypting and storing data in the data provider, the method further includes:
[0061] Determine, through the data providing end, the original provided data and multiple types of sub-data contained in the original provided data, and determine the security level information corresponding to the sub-data;
[0062] Acquire a plurality of the second keys corresponding to the security level information, and encrypt the sub-data using the plurality of the second keys to obtain the encrypted sub-data;
[0063] The encrypted original provided data is determined based on the encrypted sub-data, and the encrypted original provided data is stored in a target database to obtain the encrypted stored data.
[0064] The originally provided data may be understood as the original data in the data provider, that is, the data that has not been encrypted.
[0065] The original provided data may contain multiple types of sub-data, and the security level of each type of sub-data may be the same or different.
[0066] The security level information may include the number of security level categories included in the sub-data and the target security level corresponding to each type of sub-data; wherein the number of security level categories refers to the number of security levels included in the sub-data.
[0067] The target database may be used to store the encrypted storage data. The target database may be located at the data providing end.
[0068] Optionally, the acquiring a plurality of the second keys corresponding to the security level information includes:
[0069] Based on the number of categories of security levels included in the sub-data and the target security level corresponding to each category of sub-data, a plurality of the second keys are obtained.
[0070] S140. Encrypt the target query data using the first key to obtain encrypted query data, and return the encrypted query data to the data query end.
[0071] The encrypted query data may be data encrypted by the server.
[0072] In the embodiment of the present invention, the target query data is encrypted before data transmission, thereby ensuring the security of data transmission during the data query process.
[0073] S150, enabling the data query end to decrypt the encrypted query data using the first key to obtain the target query data corresponding to the original query condition.
[0074] Optionally, encryption operations on data, decryption operations on data, and processing operations between data are performed in a trusted environment.
[0075] The Trusted Execution Environment (TEE) can be understood as a secure execution environment. The embodiments of the present invention can ensure the security of data processing operations, that is, the security of processed data.
[0076] Based on the above-mentioned embodiment scheme, the present invention ensures the security of data processing operations during the entire data query process, that is, ensures the security of the processed data.
[0077] The technical solution of the embodiment of the present invention is to receive the encrypted query condition sent by the data query end, wherein the encrypted query condition is obtained by encrypting the original query condition by the first key randomly assigned to the data query end; decrypt the encrypted query condition by the first key to obtain the decrypted query condition; determine the target encryption mode of the encrypted storage data in the data provider end, and determine the target query data based on the target encryption mode, the decrypted query condition and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption; encrypt the target query data by the first key to obtain the encrypted query data, and return the encrypted query data to the data query end; so that the data query end decrypts the encrypted query data by the first key to obtain the target query data corresponding to the original query condition. The data anonymity query for the data provider end with various different data encryption modes is realized, and the versatility of the data anonymity query is improved. In the entire data anonymity query process of the present invention, the encrypted transmission mode is adopted to further ensure the anonymity and security of the data.
[0078] Embodiment 2
[0079] Figure 2 This is a flow chart of a data anonymity query method provided in the second embodiment of the present invention. This embodiment refines the determination of target query data based on the target encryption method, the decryption query condition and the encrypted storage data described in the above embodiment. Figure 2 As shown, the method includes:
[0080] S210. Receive an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting an original query condition using a first key randomly assigned to the data query terminal.
[0081] S220. Decrypt the encrypted query condition using the first key to obtain a decrypted query condition.
[0082] S230: Determine the target encryption method for encrypting and storing data in the data provider.
[0083] S240. When the target encryption mode is the custom encryption, determine a custom encryption algorithm for encrypting the encrypted storage data, and encrypt the decryption query condition by using the custom encryption algorithm to obtain an algorithm encryption condition.
[0084] The custom encryption algorithm may be understood as an algorithm for performing custom encryption. In the embodiment of the present invention, the custom encryption algorithm corresponds to the custom encryption in the above embodiment, and will not be described in detail here.
[0085] The algorithm encryption condition can be understood as the query condition encrypted by the server.
[0086] S250. Determine a plurality of interference encryption conditions corresponding to the algorithm encryption condition, and determine the target query data based on the algorithm encryption condition, the interference encryption condition, and the encrypted storage data.
[0087] The interference encryption condition may be understood as a query condition used to interfere with the data provider obtaining object information of a target query object corresponding to the algorithm encryption condition.
[0088] In the embodiment of the present invention, the algorithm encryption bar and the plurality of interference encryption conditions may be sent to the data provider at the same time.
[0089] The technical solution of the embodiment of the present invention can further interfere with the data provider's acquisition of the object information of the target query object corresponding to the algorithm encryption condition by simultaneously sending the algorithm encryption bar and multiple interference encryption conditions to the data provider for data query, thereby improving the confidentiality of the data query.
[0090] Optionally, the determining the target query data based on the algorithm encryption condition, the interference encryption condition, and the encrypted storage data includes:
[0091] Sending the algorithm encryption condition and the interference encryption condition to the data provider so that the data provider determines and returns a plurality of candidate encryption data;
[0092] Determine target encrypted data corresponding to the algorithm encryption condition in the candidate encrypted data;
[0093] The target encrypted data is decrypted by the custom encryption algorithm to obtain the target query data.
[0094] The candidate encryption data may be understood as query results returned based on the algorithm encryption condition and multiple interference encryption conditions. The candidate encryption data includes query results corresponding to the algorithm encryption condition and query results corresponding to the interference encryption condition.
[0095] The target encrypted data can be understood as the query result corresponding to the algorithm encryption condition. Specifically, the target encrypted data can be determined from the plurality of candidate encrypted data based on the condition identifier corresponding to the algorithm encryption condition. One query condition can correspond to a unique condition identifier.
[0096] Optionally, before determining the target encryption mode for encrypting and storing data in the data provider, the method further includes:
[0097] The data provider performs custom encryption on the original provided data based on the preset custom encryption algorithm to obtain the encrypted original provided data, and stores the encrypted original provided data in the target database to obtain the encrypted stored data.
[0098] In the embodiment of the present invention, the custom encryption algorithm is an encryption algorithm customized by a developer, that is, private. The present invention encrypts data through a custom encryption algorithm, which can reduce the possibility of being cracked and ensure data security.
[0099] S260: Encrypt the target query data using the first key to obtain encrypted query data, and return the encrypted query data to the data query end.
[0100] S270, enabling the data query end to decrypt the encrypted query data using the first key to obtain the target query data corresponding to the original query condition.
[0101] The technical solution of the embodiment of the present invention is to determine the custom encryption algorithm used to encrypt the encrypted storage data when the target encryption method is the custom encryption, and encrypt the decryption query condition by the custom encryption algorithm to obtain the algorithm encryption condition; determine multiple interference encryption conditions corresponding to the algorithm encryption condition, and determine the target query data based on the algorithm encryption condition, the interference encryption condition and the encrypted storage data. The present invention can further interfere with the data provider to obtain the object information of the target query object corresponding to the algorithm encryption condition by simultaneously sending the algorithm encryption bar and the multiple interference encryption conditions to the data provider for data query, thereby improving the confidentiality of data query.
[0102] Figure 3 FIG. 1 is an overall flow chart of a data anonymity query method provided according to an embodiment of the present invention. Figure 3 As shown, the overall process of the data anonymity query method can be:
[0103] Through the data provider, the second key is obtained from the key distribution of the server, and the basic fields of the original provided data are encrypted by the second key, or specific fields are customized through a custom algorithm; the encrypted original provided data is saved in the target database; the data query end encrypts and transmits the query conditions based on the randomly assigned first key; after the server decrypts the query conditions with the first key, it performs data query based on the trusted execution environment TEE, and uses different query methods to realize hidden query of data according to the encryption method of the data in the target database.
[0104] With respect to data encryption and interface security in the present invention, the key in the present invention may be an elliptic curve cryptography (ECC) algorithm or a secure hash (SHA) algorithm. The present invention may encrypt the original provided data according to user requirements, for example, by encrypting the user-specified fields through a custom algorithm, or by encrypting the basic fields through an acquired key. With respect to the data provider in the present invention, only an interface for acquiring the key may be provided to further ensure data security, and finally, the encrypted data may be stored in the target database.
[0105] For the key in the present invention, the key can be stored in multiple physically isolated environments by decomposing the key. Specifically, the key is randomly split into N groups, each of which can be 10-15 characters long; the length of each group of keys, the group number, and the length of the chase segment are shifted left to obtain the database mapping value; multi-level coordinates are generated based on the mapping value and polynomial of each group, and square matrix decomposition (LU Factorization, LU) is used for analysis and verification; the mapping value and each coordinate are stored in the database separately by consistent hashing. The decomposition of the key can refer to the following formula:
[0106]
[0107] Among them, value represents the mapping value in the database, len represents the number of key groups, clen represents the length of each key group, and size represents the maximum binary length of each key group preset by the system.
[0108] Regarding the first key for data encryption and transmission negotiated and confirmed between the data query end and the server end in the present invention, after the data query end logs into the system, the server end randomly assigns the first key. The data query end can request the encryption list supported by the server end and confirm the encryption method. During the data query process, the data returned is encrypted and transmitted using the first key.
[0109] For the TEE environment in the present invention, the generation of passwords, encryption and decryption in the data query process of the present invention are all performed in the TEE environment, and temporary storage all uses the protected physical memory area (Enclave Page Cache, EPC). Only the core operation code is loaded in the TEE to run, ensuring that the trusted computing base (TCB) is as small as possible, and ensuring that the interaction between the rich execution environment (REE) and the TEE is carried out through the specified interface. Due to the memory based on the TEE environment, the amount of data supported by the general structure is relatively limited. For matching with high security requirements, data will be loaded from the target database to the TEE environment for decryption and generation of a red-black tree, and then data query will be executed; based on the obfuscated id, all required data is loaded through the database and decrypted through the key; encrypted and returned through the key of the data query end.
[0110] For the custom encryption algorithm in the present invention, single-character hash calculation is performed based on the Blake2 algorithm as a whole, supporting equal value and inclusion queries.
[0111] The technical solution of the embodiment of the present invention improves the versatility of data anonymity query, as well as the anonymity and security of data during the data anonymity query process.
[0112] Embodiment 3
[0113] Figure 4 This is a schematic diagram of the structure of a data anonymity query device provided by Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a conditional receiving module 310, a conditional decryption module 320, a data query module 330, an encryption return module 340 and a data decryption module 350. Among them,
[0114] Among them, the condition receiving module 310 is used to receive the encrypted query condition sent by the data query end, wherein the encrypted query condition is obtained by encrypting the original query condition with a first key randomly assigned to the data query end; the condition decryption module 320 is used to decrypt the encrypted query condition with the first key to obtain the decrypted query condition; the data query module 330 is used to determine the target encryption method of the encrypted stored data in the data provider, and determine the target query data based on the target encryption method, the decrypted query condition and the encrypted stored data, wherein the target encryption method includes key encryption or custom encryption; the encryption return module 340 is used to encrypt the target query data with the first key to obtain encrypted query data, and return the encrypted query data to the data query end; the data decryption module 350 is used to enable the data query end to decrypt the encrypted query data with the first key to obtain the target query data corresponding to the original query condition.
[0115] The technical solution of the embodiment of the present invention is to receive the encrypted query condition sent by the data query end, wherein the encrypted query condition is obtained by encrypting the original query condition by the first key randomly assigned to the data query end; decrypt the encrypted query condition by the first key to obtain the decrypted query condition; determine the target encryption mode of the encrypted storage data in the data provider end, and determine the target query data based on the target encryption mode, the decrypted query condition and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption; encrypt the target query data by the first key to obtain the encrypted query data, and return the encrypted query data to the data query end; so that the data query end decrypts the encrypted query data by the first key to obtain the target query data corresponding to the original query condition. The data anonymity query for the data provider end with various different data encryption modes is realized, and the versatility of the data anonymity query is improved. In the entire data anonymity query process of the present invention, the encrypted transmission mode is adopted to further ensure the anonymity and security of the data.
[0116] Optionally, the data query module 330 is specifically used for:
[0117] When the target encryption mode is the key encryption, determining a plurality of second keys for encrypting the encrypted storage data;
[0118] Loading the encrypted stored data, and decrypting the encrypted stored data using a plurality of the second keys to obtain decrypted stored data;
[0119] The target query data is determined based on the decrypted stored data and the decrypted query condition.
[0120] Optionally, the data anonymity query device further includes: a level information determination module, a sub-data encryption module and a data storage module; wherein,
[0121] The level information determination module is used to determine the original provided data and multiple types of sub-data contained in the original provided data through the data providing end, and determine the security level information corresponding to the sub-data before determining the target encryption mode of encrypting and storing the data in the data providing end;
[0122] The sub-data encryption module is used to obtain a plurality of the second keys corresponding to the security level information, and to perform key encryption on the sub-data using the plurality of the second keys to obtain the encrypted sub-data;
[0123] The data storage module is used to determine the encrypted original provided data based on the encrypted sub-data, and store the encrypted original provided data in a target database to obtain the encrypted stored data.
[0124] Optionally, the data query module 330 includes: a conditional encryption unit and a conditional interference unit; wherein,
[0125] The conditional encryption unit is used to determine the custom encryption algorithm used to encrypt the encrypted storage data when the target encryption mode is the custom encryption, and encrypt the decryption query condition by the custom encryption algorithm to obtain the algorithm encryption condition;
[0126] The conditional interference unit is used to determine multiple interference encryption conditions corresponding to the algorithm encryption condition, and determine the target query data based on the algorithm encryption condition, the interference encryption condition and the encrypted storage data.
[0127] Optionally, the conditional interference unit is specifically used to:
[0128] Sending the algorithm encryption condition and the interference encryption condition to the data provider so that the data provider determines and returns a plurality of candidate encryption data;
[0129] Determine target encrypted data corresponding to the algorithm encryption condition in the candidate encrypted data;
[0130] The target encrypted data is decrypted by the custom encryption algorithm to obtain the target query data.
[0131] Optionally, the data anonymity query device also includes: a custom encryption module, which is used to perform custom encryption on the original provided data based on the preset custom encryption algorithm through the data provider end before determining the target encryption method for encrypting and storing the data in the data provider end, so as to obtain the encrypted original provided data, and store the encrypted original provided data in the target database to obtain the encrypted stored data.
[0132] Optionally, encryption operations on data, decryption operations on data, and processing operations between data are performed in a trusted execution environment.
[0133] The data anonymity query device provided in the embodiment of the present invention can execute the data anonymity query method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0134] Embodiment 4
[0135] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0136] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0137] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0138] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data anonymity query method.
[0139] In some embodiments, the data anonymity query method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data anonymity query method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the data anonymity query method in any other appropriate manner (e.g., by means of firmware).
[0140] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0142] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0143] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0144] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0145] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0146] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0147] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data anonymity query method, It is characterized in that Applied to the server, the method includes: Receiving an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting an original query condition using a first key randomly assigned to the data query terminal; Decrypting the encrypted query condition using the first key to obtain a decrypted query condition; Determine a target encryption mode of encrypted storage data in the data provider, and determine target query data based on the target encryption mode, the decryption query condition, and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption; Encrypting the target query data by using the first key to obtain encrypted query data, and returning the encrypted query data to the data query end; The data query end decrypts the encrypted query data using the first key to obtain the target query data corresponding to the original query condition.
2. The method according to claim 1, It is characterized in that The determining the target query data based on the target encryption mode, the decryption query condition and the encrypted storage data includes: When the target encryption mode is the key encryption, determining a plurality of second keys for encrypting the encrypted storage data; Loading the encrypted stored data, and decrypting the encrypted stored data using a plurality of the second keys to obtain decrypted stored data; The target query data is determined based on the decrypted stored data and the decrypted query condition.
3. The method according to claim 2, It is characterized in that Before determining the target encryption method for encrypting and storing data in the data provider, the method further includes: Determine, through the data providing end, the original provided data and multiple types of sub-data contained in the original provided data, and determine the security level information corresponding to the sub-data; Acquire a plurality of the second keys corresponding to the security level information, and encrypt the sub-data using the plurality of the second keys to obtain the encrypted sub-data; The encrypted original provided data is determined based on the encrypted sub-data, and the encrypted original provided data is stored in a target database to obtain the encrypted stored data.
4. The method according to claim 1, It is characterized in that The determining the target query data based on the target encryption mode, the decryption query condition and the encrypted storage data includes: In the case where the target encryption mode is the custom encryption, determining a custom encryption algorithm for encrypting the encrypted storage data, and encrypting the decryption query condition by the custom encryption algorithm to obtain an algorithm encryption condition; A plurality of interference encryption conditions corresponding to the algorithm encryption condition are determined, and the target query data is determined based on the algorithm encryption condition, the interference encryption condition and the encrypted storage data.
5. The method according to claim 4, It is characterized in that The determining the target query data based on the algorithm encryption condition, the interference encryption condition and the encrypted storage data includes: sending the algorithm encryption condition and the interference encryption condition to the data provider so that the data provider determines and returns a plurality of candidate encrypted data; Determine target encrypted data corresponding to the algorithm encryption condition in the candidate encrypted data; The target encrypted data is decrypted by the custom encryption algorithm to obtain the target query data.
6. The method according to claim 4, It is characterized in that Before determining the target encryption method for encrypting and storing data in the data provider, the method further includes: The data provider performs custom encryption on the original provided data based on the preset custom encryption algorithm to obtain the encrypted original provided data, and stores the encrypted original provided data in the target database to obtain the encrypted stored data.
7. The method according to any one of claims 1 to 6, It is characterized in that The encryption operation on the data, the decryption operation on the data, and the processing operation between the data are performed in the trusted execution environment.
8. A data anonymity query device, It is characterized in that include: A condition receiving module, used for receiving an encrypted query condition sent by a data query terminal, wherein the encrypted query condition is obtained by encrypting the original query condition by using a first key randomly assigned to the data query terminal; A condition decryption module, used to decrypt the encrypted query condition using the first key to obtain a decrypted query condition; A data query module, used to determine a target encryption mode of encrypted storage data in a data provider, and determine target query data based on the target encryption mode, the decryption query condition and the encrypted storage data, wherein the target encryption mode includes key encryption or custom encryption; An encryption return module, used for encrypting the target query data by using the first key to obtain encrypted query data, and returning the encrypted query data to the data query end; The data decryption module is used to enable the data query end to decrypt the encrypted query data using the first key to obtain the target query data corresponding to the original query condition.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data anonymity query method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data anonymity query method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Index-based single-server hidden query method
CN120670470A
Block chain enabled efficient authentication consultation method and system
CN120805180A
