Data retrieval method and device based on homomorphic encryption algorithm, electronic equipment and storage medium

By combining multi -level indexes and homogenic encryption algorithms, the encrypted index files are generated for data retrieval, which solves the problem of difficulty and security in the existing technologies, and achieves efficient and secure data retrieval.

CN119358036AActive Publication Date: 2025-01-24CLP INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411919401.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-24
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The prior art is difficult to ensure data security while improving data retrieval efficiency, especially in industrial control systems, data security issues are becoming increasingly prominent.

Method used

By combined with multi -level indexes and homogenic encryption algorithms, the encrypted index files are generated for data retrieval to ensure the privacy of the sensitive information of the data and improve the efficiency of data retrieval.

Benefits of technology

Effectively improve the real -time and security of data retrieval, protect the privacy of sensitive information of data, and improve the efficiency of data retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358036A_ABST
    Figure CN119358036A_ABST
Patent Text Reader

Abstract

The invention provides a data retrieval method and device based on a homomorphic encryption algorithm, electronic equipment and a storage medium, and the method comprises the steps: determining a multi-level index structure corresponding to a plurality of data files based on multi-modal features of the data files; performing multi-level index storage processing based on the multi-level index structure and the plurality of data files, and generating an index file corresponding to the database; and encrypting the index file according to a homomorphic encryption algorithm, performing data retrieval of tag point indexing, date indexing and time indexing on the encrypted index file based on a retrieval data query demand of a user, and determining a data address corresponding to the retrieval data query demand, so that target data is obtained based on the data address. According to the method, the multi-level index and the homomorphic encryption algorithm are combined for use, the real-time performance and safety of data retrieval are effectively improved, the privacy of sensitive information of data is protected, the encrypted index file is used for data retrieval, and the data retrieval efficiency can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data retrieval technology, and in particular to a data retrieval method, device, electronic device and storage medium based on a homomorphic encryption algorithm. Background Art

[0002] With the rapid development of information and Internet technology, modern society has entered a new era of increasing data. While the increase in data makes modern life more and more convenient, it also makes data storage, management, security and analysis more and more difficult. Only by continuously optimizing and innovating data storage and retrieval technology can we efficiently utilize these massive data. At present, the main data index structures are arrays, AVL trees, B trees, B+ trees, etc. The array as an index structure can be properly grown by predicting the size or using technologies such as virtual storage mapping to minimize the space used by the array index. Its disadvantage is that it cannot be maintained dynamically, and the amount of data movement caused by each maintenance operation is O(N). The disadvantage of using AVL tree as a memory index structure is that its effective memory utilization rate is very low. B trees and B+ trees have good operating performance and can be dynamically maintained, but the memory utilization rate is low. In addition, in industrial control systems, data security issues are becoming increasingly prominent. Although strong encryption can alleviate data security issues by ensuring the confidentiality of data, once the data is encrypted, the availability of data and the efficiency of data retrieval will be greatly reduced. Therefore, how to improve the efficiency of data retrieval and ensure data security has become a technical issue that cannot be underestimated. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a data retrieval method, device, electronic device and storage medium based on a homomorphic encryption algorithm. Through the combined use of multi-level indexing and homomorphic encryption algorithm, the real-time and security of data retrieval are effectively improved, the privacy of sensitive information of the data is protected, and data retrieval is performed using encrypted index files, which can greatly improve the efficiency of data retrieval.

[0004] The present application provides a data retrieval method based on a homomorphic encryption algorithm, the data retrieval method comprising: Based on the multimodal features of multiple data files in the database, a multi-level index structure corresponding to the multiple data files is determined; wherein the multi-level index structure includes a tag point index, a date index, and a time index; Performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database; The index file is encrypted according to a homomorphic encryption algorithm, and data retrieval is performed on the encrypted index file using label point indexing, date indexing, and time indexing based on the user's retrieval data query requirements, and the data address corresponding to the retrieval data query requirements is determined so that the target data can be obtained based on the data address.

[0005] In a possible implementation manner, determining a multi-level index structure corresponding to a plurality of data files based on multimodal features of the plurality of data files in the database includes: Analyzing the multimodal features of the plurality of data files to determine label features, date features, and time features of the data files; Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index; The multi-level index structure is constructed based on the nodes corresponding to the tag point index, the date index and the time index in a node order.

[0006] In a possible implementation manner, performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database includes: Performing a hash value transformation on the label information of the data file, and storing the label information after the hash value transformation in the label point index of the corresponding label point index node; wherein each transformed hash value corresponds to a label point index node; Performing numerical conversion on the date information of the data file, and storing the numerically converted date information in the date index of the corresponding date index node; wherein the numerically converted date information is an integer corresponding to the date information in a year, and each integer corresponds to a date index node; The time information of the data file is stored in the time index of the time index node, and the data file is stored in the data packet under the time index node; Based on the stored tag point index, the date index and the time index, an index file corresponding to the database is generated.

[0007] In a possible implementation manner, the data retrieval of the encrypted index file by using a tag point index, a date index, and a time index based on the user's retrieval data query requirement, and determining the data address corresponding to the retrieval data query requirement includes: Based on multiple label point indexes of the target label information in the retrieval data query requirement in the encrypted index file, determine the target label point index node corresponding to the target label information; Determine the target date index node corresponding to the target date information in the retrieval data query requirement according to the multiple date index files under the target tag point index node; According to the multiple time index files under the target date index node, the target time index node corresponding to the target time information in the retrieval data query requirement is determined, so as to obtain the data address under the target time index node.

[0008] In a possible implementation manner, encrypting the index file according to a homomorphic encryption algorithm includes: Input the key generation source to generate the encrypted key; A random data seed is selected based on the key and combined with a pseudo-random function to encrypt each index node in the read index file to determine the encrypted index file.

[0009] In a possible implementation manner, before determining the multi-level index structure corresponding to the plurality of data files based on the multimodal features of the plurality of data files in the database, the data retrieval method further includes: The data file is encrypted according to a homomorphic encryption algorithm.

[0010] The embodiment of the present application also provides a data retrieval device based on a homomorphic encryption algorithm, the data retrieval device comprising: A structure determination module, used to determine a multi-level index structure corresponding to a plurality of data files in a database based on multi-modal features of the plurality of data files; wherein the multi-level index structure includes a tag point index, a date index, and a time index; An index file generating module, used for performing multi-level index storage processing based on the multi-level index structure and the plurality of data files, and generating an index file corresponding to the database; The retrieval module is used to encrypt the index file according to the homomorphic encryption algorithm, perform data retrieval of the encrypted index file by label point indexing, date indexing and time indexing based on the user's retrieval data query requirements, and determine the data address corresponding to the retrieval data query requirements so as to obtain the target data based on the data address.

[0011] In a possible implementation manner, when the structure determination module is used to determine the multi-level index structure corresponding to the multiple data files based on the multimodal features of the multiple data files in the database, the structure determination module is specifically used to: Analyzing the multimodal features of the plurality of data files to determine label features, date features, and time features of the data files; Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index; The multi-level index structure is constructed based on the nodes corresponding to the tag point index, the date index and the time index in a node order.

[0012] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the data retrieval method based on the homomorphic encryption algorithm as described above are performed.

[0013] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data retrieval method based on the homomorphic encryption algorithm as described above are executed.

[0014] The embodiment of the present application provides a data retrieval method, device, electronic device and storage medium based on a homomorphic encryption algorithm, the data retrieval method comprising: determining a multi-level index structure corresponding to a plurality of data files based on the multimodal features of the plurality of data files in the database; wherein the multi-level index structure comprises a label point index, a date index and a time index; performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database; encrypting the index file according to the homomorphic encryption algorithm, performing data retrieval of the label point index, date index and time index on the encrypted index file based on the user's retrieval data query requirements, determining the data address corresponding to the retrieval data query requirements, so as to obtain the target data based on the data address. By combining the use of multi-level indexing and homomorphic encryption algorithms, the real-time and security of data retrieval are effectively improved, the privacy of sensitive information of the data is protected, and the efficiency of data retrieval can be greatly improved by using encrypted index files for data retrieval.

[0015] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flowchart of a data retrieval method based on a homomorphic encryption algorithm provided in an embodiment of the present application; Figure 2 A schematic diagram of a multi-level index structure of data provided in an embodiment of the present application; Figure 3 A schematic diagram of an index file of data provided in an embodiment of the present application; Figure 4 One of the structural schematic diagrams of a data retrieval device based on a homomorphic encryption algorithm provided in an embodiment of the present application; Figure 5 The second structural diagram of a data retrieval device based on a homomorphic encryption algorithm provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0019] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied in the field of data retrieval technology.

[0020] Research has found that with the rapid development of information and Internet technology, modern society has entered a new era of increasing data. While the increase in data makes modern life more and more convenient, it also makes data storage, management, security and analysis more and more difficult. Only by continuously optimizing and innovating data storage and retrieval technology can we efficiently utilize these massive data. At present, the main data index structures are arrays, AVL trees, B trees, B+ trees, etc. The array as an index structure can be properly grown by predicting the size or using technologies such as virtual storage mapping to minimize the space used by the array index. Its disadvantage is that it cannot be maintained dynamically, and the amount of data movement caused by each maintenance operation is O(N). The disadvantage of using AVL tree as a memory index structure is that its effective memory utilization is very low. B trees and B+ trees have good operating performance and can be dynamically maintained, but the memory utilization is low. In addition, in industrial control systems, data security issues are becoming increasingly prominent. Although strong encryption can alleviate data security issues by ensuring the confidentiality of data, once the data is encrypted, the availability of data and the efficiency of data retrieval will be greatly reduced. Therefore, how to improve the efficiency of data retrieval and ensure data security has become a technical issue that cannot be underestimated.

[0021] Based on this, an embodiment of the present application provides a data retrieval method based on a homomorphic encryption algorithm. Through the combined use of multi-level indexing and a homomorphic encryption algorithm, the real-time and security of data retrieval are effectively improved, the privacy of sensitive information of the data is protected, and data retrieval is performed using encrypted index files, which can greatly improve the efficiency of data retrieval.

[0022] See also Figure 1 , Figure 1 This is a flow chart of a data retrieval method based on a homomorphic encryption algorithm provided in an embodiment of the present application. Figure 1 As shown in , the data retrieval method provided in the embodiment of the present application includes: S101: Based on multimodal features of multiple data files in a database, determine a multi-level index structure corresponding to the multiple data files; wherein the multi-level index structure includes a tag point index, a date index, and a time index.

[0023] In this step, a multi-level index structure corresponding to the multiple data files is determined based on the multimodal features of the multiple data files in the database.

[0024] Among them, the multimodal features include label features, date features and time features of the data file.

[0025] In a possible implementation manner, determining a multi-level index structure corresponding to a plurality of data files based on multimodal features of the plurality of data files in the database includes: (1): Analyze the multimodal features of the plurality of data files to determine the label features, date features, and time features of the data files.

[0026] Here, the multimodal features of multiple data files are analyzed to determine the label features, date features, and time features of the data files.

[0027] (2): Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index.

[0028] Here, the label feature is used as the label point index, the date feature is used as the date index, and the time feature is used as the time index.

[0029] (3): Based on the nodes corresponding to the tag point index, the date index and the time index, the multi-level index structure is constructed in node order.

[0030] Here, a multi-level index structure is constructed according to the node order based on the nodes corresponding to the label point index, date index and time index.

[0031] For further information, see Figure 2 , Figure 2 This is a schematic diagram of the multi-level index structure of data provided in the embodiment of the present application. Figure 2 As shown, the index is divided into three levels. The label point index node is the root node, the time index node is the leaf node, and the remaining date index nodes are intermediate nodes. The leaf node is the disk data block, and its various parts correspond to different data files.

[0032] S102: Perform multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database.

[0033] In this step, multi-level index storage processing is performed according to the multi-level index structure and multiple data files to generate an index file corresponding to the database. In a possible implementation manner, performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database includes: A: Performing a hash value transformation on the label information of the data file, and storing the label information after the hash value transformation in the label point index of the corresponding label point index node; wherein each transformed hash value corresponds to a label point index node.

[0034] Here, the label information of the data file is transformed into a hash value, and the label information after the hash value transformation is stored in the label point index of the corresponding label point index node.

[0035] In the database system, the names of the tag points are all named in the form of strings. If the data is accessed by the tag point name in the entire database, the efficiency is very low because the search speed for the string is very slow and it also takes up more storage space. Therefore, the tag point name is mapped to a unique tag point number through hash transformation, and all internal access is performed by the tag point number. The hash table resides in memory, reducing disk I / O operations, and its time complexity is determined by the hash algorithm.

[0036] B: Performing numerical transformation on the date information of the data file, and storing the numerically transformed date information in the date index of the corresponding date index node; wherein the numerically transformed date information is an integer corresponding to the date information in a year, and each integer corresponds to a date index node.

[0037] Here, the date information of the data file is numerically transformed, and the date information after the numerical transformation is stored in the date index of the corresponding date index node.

[0038] The date is converted into an integer representing a day of the year, which makes it easy to quickly find the disk location of the specified date. This level of index is called direct index. Therefore, the date index node can directly read the disk and complete it in one I / O operation.

[0039] C: storing the time information of the data file in the time index of the time index node, and storing the data file in the data packet under the time index node.

[0040] Here, the time index node can be found through the date index node, and the number of disk reads is determined by the number of its time index nodes. All time index nodes belonging to this day are read into the memory, and the location of the data packet is finally found.

[0041] D: Generate an index file corresponding to the database based on the stored tag point index, the date index and the time index.

[0042] Here, an index file corresponding to the database is generated according to the stored tag point index, date index and time index.

[0043] For further information, see Figure 3 , Figure 3 This is a schematic diagram of an index file of data provided in the embodiment of the present application. Figure 3As shown, the hash value transformation is performed on the label point name, and the hash value corresponding to each punctuation name is determined, and the hash value is stored in the label point index of the corresponding label point index node. There are multiple date index nodes under a label point index node, and the date index corresponding to the date index node stores the date information after the numerical transformation. There are multiple time index nodes under a date index node, and each time index node corresponds to a data packet, and the data packet corresponds to a data file.

[0044] In the present application, label point index nodes are stored in label point index files, each node occupies a fixed space and is stored in sequence according to its label point number; date index nodes correspond to date index files, and the number of date index nodes in each label index node is fixed in one year; time index nodes correspond to time index files, and one date index node corresponds to several time index nodes.

[0045] This application should use different indexing methods for different types of data, give full play to the strengths of various algorithms, and improve the overall performance of the system. This application proposes a new data structure such as Figure 3 As shown. This structure is a multi-layer index structure that combines tree index and hash index. The tree index is a B-tree index structure and a clustered index structure. The hash index is used to organize index keys and memory data objects.

[0046] S103: Encrypt the index file according to the homomorphic encryption algorithm, perform data retrieval by label point indexing, date indexing and time indexing on the encrypted index file based on the user's retrieval data query requirements, and determine the data address corresponding to the retrieval data query requirements, so as to obtain the target data based on the data address.

[0047] In this step, the index file is encrypted according to the homomorphic encryption algorithm, and the encrypted index file is subjected to data retrieval by label point indexing, date indexing, and time indexing according to the user's retrieval data query requirements, and the data address corresponding to the retrieval data query requirement is determined so that the target data can be obtained according to the data address.

[0048] In a possible implementation manner, the data retrieval of the encrypted index file by using a tag point index, a date index, and a time index based on the user's retrieval data query requirement, and determining the data address corresponding to the retrieval data query requirement includes: a: Based on multiple label point indexes of the target label information in the retrieval data query requirement in the encrypted index file, determine the target label point index node corresponding to the target label information.

[0049] Here, according to the multiple label point indexes of the target label information in the encrypted index file in the retrieval data query requirement, the target label point index node corresponding to the target label information is determined.

[0050] The target tag information is subjected to a hash value transformation to determine the target hash value, and the corresponding target tag point index node is determined according to the target hash value.

[0051] b: Determine the target date index node corresponding to the target date information in the retrieval data query requirement according to the multiple date index files under the target tag point index node.

[0052] Here, according to the multiple date index files under the target tag point index node, the target date index node corresponding to the target date information in the retrieval data query requirement is determined.

[0053] The target date information is transformed into an integer value to determine the integer value corresponding to the target information, and the corresponding target date index node is determined according to the multiple date index files under the target label point index node according to the integer value corresponding to the target information.

[0054] c: According to the multiple time index files under the target date index node, determine the target time index node corresponding to the target time information in the retrieval data query requirement, so as to obtain the data address under the target time index node. Here, according to the multiple time index files under the target date index node, the target time index node corresponding to the target time information in the data search requirement is determined, so as to obtain the data address under the target time index node.

[0055] In a possible implementation manner, encrypting the index file according to a homomorphic encryption algorithm includes: A key generation source is input to generate an encryption key; a random data seed is selected based on the key and combined with a pseudo-random function to encrypt each index node in the read index file to determine the encrypted index file.

[0056] Here, let the integer Abelian group be ZN, group order N>1, and the pseudo-random function F:{0,1}nx{0.1}n→ZN is defined as Fk(x)=F(k,x), which maps a string of length n to the Abelian group ZN, where n is the key length, which can be set according to specific needs. Homomorphic encryption methods usually include the following three parts: 1) Key generation CreateNewKey: Input the key generation source n=1n, output the key for encryption, k=CreateNewKey(1n), k∈{0,1}n; 2) Encryption encrypt: According to the key k, select the random data seed r∈{0,1}n, and encrypt each index node m∈ZN in the plaintext index file in combination with the pseudo-random function, and output the ciphertext c=<(m+Fk(r))mod N,[r],δ>; 3) Decryption decrypt: According to the key k, the ciphertext message c, m=decrypt(k,c). Among them, the ciphertext is the encrypted index file.

[0057] In a possible implementation manner, before determining the multi-level index structure corresponding to the plurality of data files based on the multimodal features of the plurality of data files in the database, the data retrieval method further includes: The data file is encrypted according to a homomorphic encryption algorithm.

[0058] This application uses a homomorphic encryption algorithm to encrypt the index file information, which plays a role in security and privacy protection for access to sensitive data. Because homomorphic encryption has the characteristic of not affecting the arithmetic and logical operations of index data, data accessors encrypt data and retrieval information through a homomorphic encryption algorithm, and use ciphertext in the process of data access and retrieval.

[0059] The embodiment of the present application provides a data retrieval method based on a homomorphic encryption algorithm, the data retrieval method comprising: determining a multi-level index structure corresponding to a plurality of data files based on the multimodal features of the plurality of data files in the database; wherein the multi-level index structure includes a label point index, a date index, and a time index; performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database; encrypting the index file according to the homomorphic encryption algorithm, performing data retrieval of the label point index, date index, and time index on the encrypted index file based on the user's retrieval data query requirements, and determining the data address corresponding to the retrieval data query requirements, so as to obtain the target data based on the data address. By combining the use of multi-level indexing and homomorphic encryption algorithms, the real-time and security of data retrieval are effectively improved, the privacy of sensitive information of the data is protected, and the use of encrypted index files for data retrieval can greatly improve the efficiency of data retrieval.

[0060] See also Figure 4 , Figure 5 , Figure 4 One of the structural schematic diagrams of a data retrieval device based on a homomorphic encryption algorithm provided in an embodiment of the present application; Figure 5 The second structural diagram of a data retrieval device based on a homomorphic encryption algorithm provided in an embodiment of the present application. Figure 4 As shown in , the data retrieval device 400 comprises: The structure determination module 410 is used to determine a multi-level index structure corresponding to a plurality of data files in the database based on the multi-modal features of the plurality of data files; wherein the multi-level index structure includes a tag point index, a date index, and a time index; An index file generating module 420, configured to perform multi-level index storage processing based on the multi-level index structure and the plurality of data files, and generate an index file corresponding to the database; The retrieval module 430 is used to encrypt the index file according to the homomorphic encryption algorithm, perform data retrieval of label point index, date index and time index on the encrypted index file based on the user's retrieval data query requirements, and determine the data address corresponding to the retrieval data query requirements so as to obtain the target data based on the data address.

[0061] Furthermore, when the structure determination module 410 is used to determine the multi-level index structure corresponding to the multiple data files based on the multimodal features of the multiple data files in the database, the structure determination module 410 is specifically used to: Analyzing the multimodal features of the plurality of data files to determine label features, date features, and time features of the data files; Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index; The multi-level index structure is constructed based on the nodes corresponding to the tag point index, the date index and the time index in a node order.

[0062] Furthermore, when the index file generation module 420 is used to perform multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database, the index file generation module 420 is specifically used to: Performing a hash value transformation on the label information of the data file, and storing the label information after the hash value transformation in the label point index of the corresponding label point index node; wherein each transformed hash value corresponds to a label point index node; Performing numerical conversion on the date information of the data file, and storing the numerically converted date information in the date index of the corresponding date index node; wherein the numerically converted date information is an integer corresponding to the date information in a year, and each integer corresponds to a date index node; The time information of the data file is stored in the time index of the time index node, and the data file is stored in the data packet under the time index node; Based on the stored tag point index, the date index and the time index, an index file corresponding to the database is generated.

[0063] Further, when the retrieval module 430 is used to perform data retrieval of the encrypted index file by tag point index, date index and time index based on the user's retrieval data query demand and determines the data address corresponding to the retrieval data query demand, the retrieval module 430 is specifically used to: Based on multiple label point indexes of the target label information in the retrieval data query requirement in the encrypted index file, determine the target label point index node corresponding to the target label information; Determine the target date index node corresponding to the target date information in the retrieval data query requirement according to the multiple date index files under the target tag point index node; According to the multiple time index files under the target date index node, the target time index node corresponding to the target time information in the retrieval data query requirement is determined, so as to obtain the data address under the target time index node.

[0064] Further, such as Figure 5 As shown, the data retrieval device 400 further includes an encryption module 440, which is used to: Input the key generation source to generate the encrypted key; A random data seed is selected based on the key and combined with a pseudo-random function to encrypt each index node in the read index file to determine the encrypted index file.

[0065] Furthermore, the encryption module 440 is also used for: The data file is encrypted according to a homomorphic encryption algorithm.

[0066] The embodiment of the present application provides a data retrieval device based on a homomorphic encryption algorithm, the data retrieval device comprising: a structure determination module, for determining a multi-level index structure corresponding to a plurality of data files in a database based on multimodal features of the plurality of data files; wherein the multi-level index structure comprises a label point index, a date index and a time index; an index file generation module, for performing multi-level index storage processing based on the multi-level index structure and the plurality of data files, and generating an index file corresponding to the database; a retrieval module, for encrypting the index file according to the homomorphic encryption algorithm, performing data retrieval of the label point index, the date index and the time index on the encrypted index file based on the user's retrieval data query requirements, and determining the data address corresponding to the retrieval data query requirements, so as to obtain the target data based on the data address. By combining the use of multi-level indexing and homomorphic encryption algorithms, the real-time and security of data retrieval are effectively improved, the privacy of sensitive information of the data is protected, and the efficiency of data retrieval can be greatly improved by using encrypted index files for data retrieval.

[0067] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown in , the electronic device 600 includes a processor 610 , a memory 620 and a bus 630 .

[0068] The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 communicates with the memory 620 via the bus 630. When the machine-readable instructions are executed by the processor 610, the above-mentioned Figure 1 The steps of the data retrieval method based on the homomorphic encryption algorithm in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.

[0069] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the data retrieval method based on the homomorphic encryption algorithm in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.

[0070] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0071] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0072] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0073] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0074] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0075] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data retrieval method based on a homomorphic encryption algorithm, characterized in that: The data retrieval method comprises: Based on the multimodal features of multiple data files in the database, a multi-level index structure corresponding to the multiple data files is determined; wherein the multi-level index structure includes a tag point index, a date index, and a time index; Performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database; The index file is encrypted according to a homomorphic encryption algorithm, and data retrieval is performed on the encrypted index file using label point indexing, date indexing, and time indexing based on the user's retrieval data query requirements, and the data address corresponding to the retrieval data query requirements is determined so that the target data can be obtained based on the data address.

2. The data retrieval method according to claim 1, characterized in that: The step of determining a multi-level index structure corresponding to a plurality of data files based on multimodal features of the plurality of data files in the database comprises: Analyzing the multimodal features of the plurality of data files to determine label features, date features, and time features of the data files; Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index; The multi-level index structure is constructed based on the nodes corresponding to the tag point index, the date index and the time index in a node order.

3. The data retrieval method according to claim 1, characterized in that: The performing multi-level index storage processing based on the multi-level index structure and the plurality of data files to generate an index file corresponding to the database includes: Performing a hash value transformation on the label information of the data file, and storing the label information after the hash value transformation in the label point index of the corresponding label point index node; wherein each transformed hash value corresponds to a label point index node; Performing numerical conversion on the date information of the data file, and storing the numerically converted date information in the date index of the corresponding date index node; wherein the numerically converted date information is an integer corresponding to the date information in a year, and each integer corresponds to a date index node; The time information of the data file is stored in the time index of the time index node, and the data file is stored in the data packet under the time index node; Based on the stored tag point index, the date index and the time index, an index file corresponding to the database is generated.

4. The data retrieval method according to claim 1, characterized in that: The step of performing data retrieval based on the user's retrieval data query requirements on the encrypted index file by using the tag point index, date index, and time index to determine the data address corresponding to the retrieval data query requirements includes: Based on multiple label point indexes of the target label information in the retrieval data query requirement in the encrypted index file, determine the target label point index node corresponding to the target label information; Determine the target date index node corresponding to the target date information in the retrieval data query requirement according to the multiple date index files under the target tag point index node; According to the multiple time index files under the target date index node, the target time index node corresponding to the target time information in the retrieval data query requirement is determined, so as to obtain the data address under the target time index node.

5. The data retrieval method according to claim 1, characterized in that: The encrypting the index file according to the homomorphic encryption algorithm includes: Input the key generation source to generate the encrypted key; A random data seed is selected based on the key and combined with a pseudo-random function to encrypt each index node in the read index file to determine the encrypted index file.

6. The data retrieval method according to claim 1, characterized in that: Before determining the multi-level index structure corresponding to the plurality of data files based on the multimodal features of the plurality of data files in the database, the data retrieval method further includes: The data file is encrypted according to a homomorphic encryption algorithm.

7. A data retrieval device based on a homomorphic encryption algorithm, characterized in that: The data retrieval device comprises: A structure determination module, used to determine a multi-level index structure corresponding to a plurality of data files in a database based on multi-modal features of the plurality of data files; wherein the multi-level index structure includes a tag point index, a date index, and a time index; An index file generating module, used for performing multi-level index storage processing based on the multi-level index structure and the plurality of data files, and generating an index file corresponding to the database; The retrieval module is used to encrypt the index file according to the homomorphic encryption algorithm, perform data retrieval of the encrypted index file by label point indexing, date indexing and time indexing based on the user's retrieval data query requirements, and determine the data address corresponding to the retrieval data query requirements so as to obtain the target data based on the data address.

8. The data retrieval device according to claim 7, characterized in that: When the structure determination module is used to determine the multi-level index structure corresponding to the multiple data files based on the multimodal features of the multiple data files in the database, the structure determination module is specifically used to: Analyzing the multimodal features of the plurality of data files to determine label features, date features, and time features of the data files; Using the tag feature as the tag point index, using the date feature as the date index, and using the time feature as the time index; The multi-level index structure is constructed based on the nodes corresponding to the tag point index, the date index and the time index in a node order.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor when running to execute the steps of the data retrieval method based on the homomorphic encryption algorithm as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data retrieval method based on the homomorphic encryption algorithm as described in any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Multi-keyword ciphertext search method and system based on homomorphic encryption and tree structure

    CN116107967A

  • Data search and query method and system based on searchable encryption and homomorphic encryption

    CN116266180A

  • Privacy protection cross-modal retrieval method and system

    CN118332570A

  • Block chain-based big data security protection method

    CN118797743A

  • Systems and methods for search time tree indexes

    US20120197900A1