Information retrieval system and method and proxy server
By establishing the same local area network between the proxy server and the database server, and using encryption and decryption technology to optimize data interaction, the problem of long response time for private information retrieval is solved and the efficiency and security of information retrieval are improved.
Patent Information
- Application Number
- CN202310226863.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2024-09-10
AI Technical Summary
Existing private information retrieval technology has a long response time when the amount of database data is large, making it difficult to meet the demand for rapid retrieval.
By establishing the same local area network between the proxy server and the database server, using encryption and decryption technology, using plain text multi-dimensional data volumes and cipher text multi-dimensional data volumes for data interaction, the data storage and query process is optimized, and the data interaction speed is improved.
Significantly improves the response speed of information retrieval, reduces the delay of data interaction, and enhances the efficiency and security of information retrieval.
Smart Images

Figure CN118626702A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an information retrieval system, method and proxy server. Background Art
[0002] Privacy computing technology can realize secure and efficient data interaction among multiple data interacting parties in a distributed environment, and is a key technology for data interaction. In related technologies, private information retrieval (PIR) is applied to data information query from user to server database. While user information is not leaked to the database, the server cannot leak data information other than the query to the user. It is one of the core technologies for implementing privacy computing technology. However, in related technologies, privacy information retrieval usually adopts homomorphic encryption, oblivious transmission, secret sharing, and differential privacy technologies, which can only perform fast queries when the amount of data in the database is small (less than one million). When the amount of data in the database is large, the amount of interactive data between users, servers and databases is also high. The response time for a single user to query data is long, which makes it difficult to meet the user's fast retrieval needs.
[0003] It can be seen that the existing technology has the problem of long response time for privacy information retrieval. Summary of the invention
[0004] The embodiments of the present invention provide an information retrieval system, method and proxy server to solve the problem of long response time of private information retrieval in the prior art.
[0005] To solve the above problems, the present invention is achieved as follows:
[0006] In a first aspect, an embodiment of the present invention provides an information retrieval system, including:
[0007] A retrieval terminal, the retrieval terminal is used to send a first retrieval request, the first retrieval request is an unencrypted retrieval request;
[0008] a proxy server, the proxy server being used to establish an information transmission channel with the search terminal, the information transmission channel being used to transmit the first search request and the first search result sent by the proxy server to the search terminal, the first search result being a decrypted search result;
[0009] A database server, the database server is communicatively connected to the proxy server, the database server and the proxy server belong to the same local area network, the database server is used to receive a second search request sent by the proxy server, retrieve a second search result based on the second search request, and send the second search result to the proxy server, the second search request is obtained by encrypting the first search request, and the second search result is an encrypted search result.
[0010] In one embodiment, the second search request is obtained by:
[0011] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the proxy server encrypts the first search request based on a preset key to obtain the second search request, and the plaintext multidimensional data body is a multidimensional data body storing the first search result of the proxy server;
[0012] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the proxy server generates a random number, and encrypts the random number and the first search request based on a preset key to obtain the second search request.
[0013] In one embodiment, the proxy server is further configured to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
[0014] In one embodiment, the second search result is obtained by:
[0015] The database server queries the encrypted multidimensional data volume based on the second search request to obtain the second search result. The encrypted multidimensional data volume is a multidimensional data volume that stores the second search request and the second search result corresponding to the second search request.
[0016] In one embodiment, the ciphertext multidimensional data volume is obtained by:
[0017] The proxy server encrypts the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0018] The proxy server shuffles the information in the information group and sends the shuffled information group to the database server;
[0019] The database server fills all second search requests and all second search results in the information group into the initial multidimensional data volume to obtain the ciphertext multidimensional data volume.
[0020] In one embodiment, the plaintext multi-dimensional data volume includes multiple dimensions, and each dimension of the multiple dimensions corresponds to multiple hash functions;
[0021] The step of filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server specifically includes:
[0022] The proxy server is further used to calculate a plurality of first addresses of the first search request in the plaintext multi-dimensional data body, each of the plurality of first addresses corresponding to one dimension of the plurality of dimensions and one hash function of the plurality of hash functions;
[0023] The proxy server is further configured to store the first search result in a blank first address when there is a blank first address among the multiple first addresses.
[0024] In one embodiment, the proxy server is further configured to calculate, when there is no first address in the multiple first addresses and it is blank, multiple second addresses corresponding to each first address in the multiple first addresses corresponding to the first search request, each second address in the multiple second addresses respectively corresponds to one dimension in the multiple dimensions and one function in the multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0025] The proxy server is further configured to store the first search result at the first address corresponding to the blank second address and store the data corresponding to the first address at the blank second address when there is only one blank second address among the multiple second addresses.
[0026] In one embodiment, the proxy server is further configured to calculate a free coefficient corresponding to each blank second address in the plurality of blank second addresses when there are a plurality of blank second addresses in the plurality of second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second addresses in the plurality of dimensions;
[0027] The proxy server stores the first search result at a first address corresponding to the second address of the blank space with the smallest free coefficient, and stores the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0028] In one embodiment, the ciphertext multi-dimensional data volume includes multiple dimensions, and each dimension of the multiple dimensions corresponds to multiple hash functions;
[0029] Filling all the second search requests and all the second search results in the information group into the initial multidimensional data body to obtain the ciphertext multidimensional data body specifically includes:
[0030] The database server is further used to calculate a plurality of third addresses of the second search request in the ciphertext multi-dimensional data volume, each of the plurality of third addresses corresponding to one dimension in the plurality of dimensions and one hash function in the plurality of hash functions;
[0031] The database server is further configured to store the second search result in the blank first address when there is a blank first address among the plurality of third addresses.
[0032] In one embodiment, the database server is further used to calculate, when there is no blank in the multiple third addresses, multiple fourth addresses corresponding to each of the multiple third addresses corresponding to the first search request, each of the multiple fourth addresses respectively corresponds to one dimension in the multiple dimensions and one function in the multiple hash functions, and the multiple fourth addresses are subordinate addresses of the third address;
[0033] The database server is further configured to store the second search result at a third address corresponding to the blank fourth address and store data corresponding to the third address at the blank fourth address when there is only one blank second address among the plurality of fourth addresses.
[0034] In one embodiment, the database server is further configured to calculate, when there are multiple blank fourth addresses in the multiple fourth addresses, a free coefficient corresponding to each blank fourth address in the multiple blank fourth addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank fourth address in the multiple dimensions;
[0035] The second search result is stored in the third address corresponding to the fourth address of the blank with the smallest free coefficient, and the data corresponding to the third address is stored in the second address of the blank with the smallest free coefficient.
[0036] In a second aspect, an embodiment of the present invention further provides an information retrieval method, which is applied to a proxy server, wherein the proxy server is communicatively connected to a database server, and the proxy server and the database server belong to the same local area network, comprising:
[0037] receiving a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal;
[0038] Sending a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0039] receiving a second search result sent by the database server, where the second search result is obtained by searching the database server after receiving the second search request, and the second search result is an encrypted search result;
[0040] A first search result is sent to the search terminal, where the first search result is a decrypted search result.
[0041] In one embodiment, the second search request is obtained by:
[0042] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0043] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, a random number is generated, and the random number and the first search request are encrypted based on a preset key to obtain the second search request.
[0044] In one embodiment, the method further comprises:
[0045] The first search request and the first search result are filled into the plaintext multi-dimensional data body of the proxy server.
[0046] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0047] In one embodiment, the method further comprises:
[0048] Encrypting the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0049] The information in the information group is shuffled, and the shuffled information group is sent to the database server.
[0050] In one embodiment, filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server includes:
[0051] Calculating a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0052] When there is a blank first address among the plurality of first addresses, the first search result is stored in the blank first address.
[0053] In one embodiment, the method further comprises:
[0054] In the case that no first address among the multiple first addresses is blank, calculating multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension among multiple dimensions and one function among multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0055] In the case that there is only one blank second address among the plurality of second addresses, the first search result is stored in the first address corresponding to the blank second address, and the data corresponding to the first address is stored in the blank second address.
[0056] In one embodiment, the method further comprises:
[0057] In the case where there are multiple blank second addresses among the multiple second addresses, calculating a free coefficient corresponding to each blank second address among the multiple blank second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second address in the multiple dimensions;
[0058] The first search result is stored in a first address corresponding to the second address of the blank space with the smallest free coefficient, and data corresponding to the first address is stored in the second address of the blank space with the smallest free coefficient.
[0059] In a third aspect, an embodiment of the present invention further provides a proxy server, wherein the proxy server is communicatively connected to a database server, and the proxy server and the database server belong to the same local area network, including:
[0060] A first receiving module, configured to receive a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal;
[0061] A first sending module, configured to send a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0062] A second receiving module, used to receive a second search result sent by the database server, where the second search result is obtained by the database server after receiving the second search request, and the second search result is an encrypted search result;
[0063] The second sending module is used to send a first search result to the search terminal, where the first search result is a decrypted search result.
[0064] In one embodiment, the second search request is obtained by:
[0065] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0066] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, a random number is generated, and the random number and the first search request are encrypted based on a preset key to obtain the second search request.
[0067] In one embodiment, the proxy server further includes:
[0068] The first processing module is used to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
[0069] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0070] In one embodiment, the proxy server further includes:
[0071] a second processing module, configured to encrypt the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0072] The third sending module is used to shuffle the information in the information group and send the shuffled information group to the database server.
[0073] In one embodiment, the first processing module includes:
[0074] A first processing unit, configured to calculate a plurality of first addresses of a first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0075] The second processing unit is configured to store the first search result in a blank first address when there is a blank first address among the plurality of first addresses.
[0076] In one embodiment, the first processing module further includes:
[0077] a third processing unit, configured to calculate, when no first address among the plurality of first addresses is blank, a plurality of second addresses corresponding to each of the plurality of first addresses corresponding to the first search request, each of the plurality of second addresses respectively corresponding to one dimension among the plurality of dimensions and one function among the plurality of hash functions, the plurality of second addresses being subordinate addresses of the first address;
[0078] The fourth processing unit is used to store the first search result at the first address corresponding to the blank second address and store the data corresponding to the first address at the blank second address when there is only one blank second address among the multiple second addresses.
[0079] In one embodiment, the first processing module further includes:
[0080] a fifth processing unit, configured to calculate, when there are a plurality of blank second addresses among the plurality of second addresses, a free coefficient corresponding to each of the plurality of blank second addresses, wherein the free coefficient is a sum of the number of blank addresses in each dimension corresponding to the blank second addresses in the plurality of dimensions;
[0081] The sixth processing unit is used to store the first search result at the first address corresponding to the second address of the blank space with the smallest free coefficient, and store the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0082] In a fourth aspect, an embodiment of the present invention further provides a proxy server, comprising a transceiver and a processor.
[0083] The transceiver is used to receive a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal;
[0084] The transceiver is further used to send a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0085] The transceiver is further used to receive a second search result sent by the database server, where the second search result is retrieved by the database server after receiving the second search request, and the second search result is an encrypted search result;
[0086] The transceiver is further used to send a first search result to the search terminal, where the first search result is a decrypted search result.
[0087] In one embodiment, the second search request is obtained by:
[0088] In a case where there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the processor is configured to encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0089] When there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the processor is further used to generate a random number, and encrypt the random number and the first search request based on a preset key to obtain the second search request.
[0090] In one embodiment, the processor is further configured to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
[0091] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0092] In one embodiment, the processor is further configured to encrypt the retrieval request corresponding identifier and the private information based on a preset key to generate an information group, wherein the retrieval request corresponding identifier includes an identifier of the first retrieval request, the private information includes the first retrieval result, and the information group includes the second retrieval request and the second retrieval result;
[0093] The transceiver is also used to shuffle the information in the information group and send the shuffled information group to the database server.
[0094] In one embodiment, the processor is further configured to calculate a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0095] The processor is further configured to store the first search result at a blank first address.
[0096] In one embodiment, the processor is further configured to calculate, when there is no blank first address among the multiple first addresses, multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension among multiple dimensions and one function among multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0097] The processor is further configured to store the first search result at a first address corresponding to the blank second address and store data corresponding to the first address at the blank second address when there is only one blank second address among the plurality of second addresses.
[0098] In one embodiment, the processor is further configured to, when there are multiple blank second addresses among the multiple second addresses, calculate a free coefficient corresponding to each blank second address among the multiple blank second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second address in the multiple dimensions;
[0099] The processor is further configured to store the first search result at a first address corresponding to a second address of the blank space with the smallest free coefficient, and store data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0100] In a fifth aspect, an embodiment of the present invention further provides a proxy server, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method described in the second aspect when executed by the processor.
[0101] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the second aspect are implemented.
[0102] In the embodiment of the present invention, an information transmission channel is established between the search terminal and the proxy server, and the proxy server is also connected to the database server in communication, and the database server and the proxy server belong to the same local area network; the search terminal and the proxy server transmit the unencrypted first search request and the first search result through the information transmission channel, and the proxy server and the database server transmit the encrypted second search request and the second search result in the local area network. In this embodiment, the proxy server and the database server belong to the same local area network, which improves the data exchange speed between the proxy server and the database server, and further improves the information retrieval speed; the information transmission channel is established between the proxy server and the search terminal, which improves the data exchange speed between the proxy server and the search terminal, and further improves the information retrieval speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0104] Figure 1 is a structural schematic diagram of an information retrieval system provided by an embodiment of the present invention;
[0105] Figure 2 is a flow chart of encrypting a first search request by a proxy server provided by an embodiment of the present invention;
[0106] Figure 3 This is a flowchart of encrypting identification and privacy information provided by an embodiment of the present invention.
[0107] Figure 4 is a schematic diagram of a padded plaintext multidimensional data body or a ciphertext multidimensional data body provided by an embodiment of the present invention;
[0108] Figure 5 is a schematic diagram of determining a blank coefficient provided by an embodiment of the present invention;
[0109] Figure 6 is a flow chart of an information retrieval method provided by an embodiment of the present invention;
[0110] Figure 7 It is a schematic diagram of the structure of a proxy server provided by an embodiment of the present invention;
[0111] Figure 8 The embodiment of the present invention also provides a schematic diagram of the structure of a proxy server. DETAILED DESCRIPTION
[0112] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0113] See also Figure 1 , Figure 1 is a schematic diagram of the structure of an information retrieval system provided by an embodiment of the present invention, such as Figure 1 As shown, the information retrieval system includes:
[0114] A search terminal 101, wherein the search terminal 101 is used to send a first search request, wherein the first search request is an unencrypted search request;
[0115] A proxy server 102, wherein the proxy server 102 is used to establish an information transmission channel with the search terminal 101, wherein the information transmission channel is used to transmit the first search request and the first search result sent by the proxy server 102 to the search terminal 101, wherein the first search result is a decrypted search result;
[0116] A database server 103 is communicatively connected with the proxy server 102. The database server 103 and the proxy server 102 belong to the same local area network. The database server 103 is used to receive a second search request sent by the proxy server 102, retrieve a second search result based on the second search request, and send the second search result to the proxy server 102. The second search request is obtained by encrypting the first search request, and the second search result is an encrypted search result.
[0117] The above-mentioned search terminal 101 is a terminal that needs to search for private information. In the information search system, the search terminal 101 can be one terminal or multiple terminals, and different terminals can send unencrypted search requests to the proxy server 102. Among them, the search terminal 101 and the proxy server 102 communicate in the wide area network, and the search terminal 101 and the proxy server 102 realize the safe and rapid exchange of the first search request and the first search result through the information transmission channel.
[0118] The proxy server 102 is a server between the retrieval terminal 101 and the database server 103. The database server 103 is a server storing private information that can be retrieved. Since the proxy server 102 and the database server 103 belong to the same local area network, the data exchanged between the proxy server 102 and the database server 103 is not obtained by external terminals, and the data exchange speed between the proxy server 102 and the database server 103 is improved.
[0119] The first search request corresponds to the first search result, and the second search request corresponds to the second search result, wherein the first search request and the first search result are in an unencrypted state, and the second search request and the second search result are in an encrypted state. The first search request and the first search result are exchanged between the search terminal 101 and the proxy server 102, and the second search request and the second search result are exchanged between the proxy server 102 and the database server 103. When the database server 103 receives the first search request, it cannot obtain the information of the search terminal 101 through the first search request; when the search terminal 101 receives the second search result, it cannot obtain the unencrypted private information through the second search result, thereby avoiding the search terminal 101 and the database server 103 from bypassing the proxy server 102 to retrieve the private information, and further improving the security of the private information retrieval.
[0120] In the embodiment of the present invention, an information transmission channel is established between the search terminal 101 and the proxy server 102, and the proxy server 102 is also connected to the database server 103 in communication, and the database server 103 and the proxy server 102 belong to the same local area network; the search terminal 101 and the proxy server 102 transmit the unencrypted first search request and the first search result through the information transmission channel, and the proxy server 102 and the database server 103 transmit the encrypted second search request and the second search result in the local area network. In this embodiment, the proxy server 102 and the database server 103 belong to the same local area network, which improves the data exchange speed between the proxy server 102 and the database server 103, thereby improving the information retrieval speed; the information transmission channel is established between the proxy server 102 and the search terminal 101, which improves the data exchange speed between the proxy server 102 and the search terminal 101, and further improves the information retrieval speed.
[0121] In one embodiment, the second search request is obtained by:
[0122] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server 102, the proxy server 102 encrypts the first search request based on a preset key to obtain the second search request, and the plaintext multidimensional data body is a multidimensional data body of the proxy server 102 storing the first search result;
[0123] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server 102, the proxy server 102 generates a random number, and encrypts the random number and the first search request based on a preset key to obtain the second search request.
[0124] The above-mentioned plaintext multidimensional data body is a multidimensional data body pre-configured by the proxy server 102, and is used to cache the identifier corresponding to the first search result. When the proxy server 102 receives the first search request sent by the search terminal 101, based on whether there is an identifier corresponding to the first search request in the plaintext multidimensional data body, different encryption processing is performed on the first search request to avoid continuous use of the same encryption method for encryption cracking, thereby improving data security.
[0125] The number of addresses stored in the plaintext multidimensional data body is related to the dimension of the plaintext multidimensional data body, the hash function corresponding to each dimension, and the modulus length. For example, if the plaintext multidimensional data body includes m1 dimensions, each dimension corresponds to n1 hash functions, and the modulus length is L1, then the number of storage addresses corresponding to the plaintext multidimensional data body is m1×n1×L1.
[0126] For example, Figure 2 As shown, when the proxy server 102 receives the first search request q sent by the search terminal 101 through the information transmission channel, the proxy server 102 parses the first search request q to obtain the identifier k corresponding to the search terminal 101; when the identifier k exists in the plaintext multidimensional data body of the proxy server 102, the first search request q is directly encrypted using the key e to obtain the second search request q'; when the identifier k exists in the plaintext multidimensional data body of the proxy server 102, the proxy server 102 generates a random number r, and uses the key e to encrypt the first search request q and the random number r to obtain the second search request q'; after obtaining the second search request q', the proxy server 102 sends the second search request q' to the database server 103 for privacy information retrieval.
[0127] In the embodiment of the present invention, when there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server 102, the proxy server 102 encrypts the first search request based on the preset key to obtain the second search request; when there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server 102, the proxy server 102 generates a random number, and encrypts the random number and the first search request based on the preset key to obtain the second search request. In this embodiment, the proxy server 102 performs different encryption processing on the first search request in different situations, so as to avoid continuous use of the same encryption method for encryption and cracking, and further improve the security of information retrieval.
[0128] In one embodiment, the proxy server 102 is further configured to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server 102 .
[0129] In an embodiment of the present invention, the proxy server 102 fills the first search request and the first search result into the plaintext multidimensional data body of the proxy server 102. When the proxy server 102 receives the first search request again, it quickly determines whether the identifier corresponding to the first search request is cached by querying the plaintext multidimensional data body, and then encrypts the first search request accordingly to obtain a second search request.
[0130] Among them, the plaintext multidimensional data body includes multiple dimensions, each dimension corresponds to multiple hash functions, and the proxy server 102 fills the first search request and the first search result into the plaintext multidimensional data body, so that the proxy server 102 can quickly locate the storage address according to the first search request. The storage address is a dimension corresponding to multiple dimensions, and an address corresponding to a hash function in the dimension, thereby improving the retrieval speed. For details, see the subsequent embodiments.
[0131] In one embodiment, the second search result is obtained by:
[0132] The database server 103 queries the encrypted multidimensional data volume based on the second search request to obtain the second search result. The encrypted multidimensional data volume is a multidimensional data volume storing the second search request and the second search result corresponding to the second search request.
[0133] The above-mentioned ciphertext multidimensional data body is a multidimensional data body for storing data inside the database server 103. The data in the ciphertext multidimensional data body are all encrypted data, for example, the second search request, and the second search result corresponding to the second search request. The data is stored in the ciphertext multidimensional data body inside the database server 103, and the data is stored in the plaintext multidimensional data body inside the proxy server 102, so as to avoid the proxy server 102 from parsing the ciphertext multidimensional data body to obtain privacy information after receiving the ciphertext multidimensional data body, and at the same time, avoid the database server 103 from parsing the plaintext multidimensional data body to obtain user information after receiving the plaintext multidimensional data body, thereby improving the security of data storage.
[0134] Among them, the ciphertext multidimensional data body includes multiple dimensions, each dimension corresponds to multiple hash functions, and the database server 103 can quickly locate the storage address according to the second search request. The storage address is a dimension corresponding to the multiple dimensions, and an address corresponding to a hash function in the dimension, thereby improving the retrieval speed. For details, see the subsequent embodiments.
[0135] The number of addresses stored in the ciphertext multidimensional data body is related to the dimension of the ciphertext multidimensional data body, the hash function corresponding to each dimension, and the modulus length. For example, if the ciphertext multidimensional data body includes m2 dimensions, each dimension corresponds to n2 hash functions, and the modulus length is L2, then the number of storage addresses corresponding to the ciphertext multidimensional data body is m2×n2×L2.
[0136] In an embodiment of the present invention, the database server 103 queries the ciphertext multidimensional data body based on the second search request. The ciphertext multidimensional data body stores the second search result corresponding to the second search request. The database server 103 can quickly locate the storage address according to the second search request, obtain the second search result, and then send the second search result to the proxy server 102, thereby improving the speed of information retrieval.
[0137] In one embodiment, the ciphertext multidimensional data volume is obtained by:
[0138] The proxy server 102 encrypts the identifier corresponding to the search request and the private information based on the preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0139] The proxy server 102 shuffles the information in the information group, and sends the shuffled information group to the database server 103;
[0140] The database server 103 fills all the second search requests and all the second search results in the information group into the initial multidimensional data volume to obtain the ciphertext multidimensional data volume.
[0141] The identifier and privacy information corresponding to the above-mentioned retrieval request are information that needs to be stored in the ciphertext multidimensional data body and can be retrieved. Since the ciphertext multidimensional data body only stores encrypted information, before storing it in the ciphertext multidimensional data body, the identifier and privacy information corresponding to the retrieval request are first encrypted by the proxy server 102 to obtain the information group that needs to be stored in the ciphertext multidimensional data body.
[0142] The proxy server 102 encrypts the identifier and private information corresponding to the search request based on the preset key, so that in the subsequent information search process, the proxy server 102 can parse the second search result based on the preset key to obtain the first search result.
[0143] The above information group includes a second search request corresponding to the first search request, and a second search result corresponding to the first search result. After receiving the information group, the database server 103 can store the second search request and the second search result in the information group in the form of key-value pairs.
[0144] It should be understood that Figure 3 As shown, the proxy server 102 encrypts the identifier and private information corresponding to the search request. It is necessary to configure the plaintext multidimensional data body of the proxy server 102 and the plaintext multidimensional data body of the database server 103 in advance, including the dimension m1 and the dimension m2, the hash functions n1 and n2, and the modulus lengths L1 and L2, etc. After the configuration is completed, the proxy server 102 generates a preset key e, and encrypts the identifier k and private information v corresponding to the search request according to the preset key e, obtains an information group including a second search request k' and a second search result v', and transmits the information group to the database server 103. When the database server 103 receives the information group, it fills the information group of the second search request k' and the second search result v' into the initial multidimensional data body to obtain a ciphertext multidimensional data body. The specific filling process is detailed in the subsequent embodiments.
[0145] In an embodiment of the present invention, the proxy server 102 encrypts the identifier and privacy information corresponding to the retrieval request based on a preset key to generate an information group, and then the proxy server 102 scrambles the information in the information group and sends the scrambled information group to the database server 103; after receiving the information group, the database server 103 fills all the second retrieval requests and all the second retrieval results in the information group into the initial multidimensional data body to obtain a ciphertext multidimensional data body, so that the proxy server 102 can parse the second retrieval result based on the preset key to obtain the first retrieval result during the information unlocking process; the encrypted data is stored in the ciphertext multidimensional data body in the database server 103, and it is impossible to directly obtain unencrypted data by parsing the ciphertext multidimensional data body, thereby improving the security of information storage.
[0146] In one embodiment, the plaintext multi-dimensional data volume includes multiple dimensions, and each dimension of the multiple dimensions corresponds to multiple hash functions;
[0147] The filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server 102 specifically includes:
[0148] The proxy server 102 is further configured to calculate a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0149] The proxy server 102 is further configured to store the first search result in a blank first address when there is a blank first address among the multiple first addresses.
[0150] The above-mentioned plaintext multidimensional data body includes multiple dimensions, each dimension corresponds to multiple hash functions, and for an identifier of a first search request, the corresponding first address can be determined by different hash functions in different dimensions. For example, the plaintext multidimensional data body includes m1 dimensions, and each dimension includes n1 hash functions, then the proxy server 102 can calculate m1×n1 first addresses corresponding to the first search request.
[0151] The above-mentioned first address is a storage address for storing the first search request and the first search result. After calculating multiple first addresses, if there are blanks in the multiple first addresses, the first search request and the first search result are stored in the blank first address. When the proxy server 102 subsequently receives the first search request, the multiple first addresses are determined through the first search request, and it is determined whether there is an identifier corresponding to the first search request in the multiple first addresses, so as to achieve rapid screening and further improve the speed of information retrieval.
[0152] In an embodiment of the present invention, the proxy server 102 calculates multiple first addresses of the first search request in the plaintext multidimensional data body, and when there is a blank first address among the multiple first addresses, the first search result is stored in the blank first address, so that when the proxy server 102 subsequently receives the first search request, it determines the multiple first addresses through the first search request, and determines whether there is an identifier corresponding to the first search request among the multiple first addresses, thereby realizing rapid screening and further improving the speed of information retrieval.
[0153] In one embodiment, the proxy server 102 is further configured to calculate, when there is no first address in the multiple first addresses and it is blank, multiple second addresses corresponding to each first address in the multiple first addresses corresponding to the first search request, each second address in the multiple second addresses respectively corresponds to one dimension in the multiple dimensions and one function in the multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0154] The proxy server 102 is further configured to store the first search result at a first address corresponding to the blank second address and store data corresponding to the first address at the blank second address when there is only one blank second address among the multiple second addresses.
[0155] The above-mentioned second address is a subordinate address in the first address. When multiple first addresses are filled, the first address can no longer additionally store the first search request and the first search result, but each first address also corresponds to multiple subordinate addresses. The data in the original first address can be stored in the blank second address, and the first address can store the first search request. When the proxy server 102 subsequently receives the first search request, it determines the multiple first addresses through the first search request and determines whether there is an identifier corresponding to the first search request in the multiple first addresses, thereby realizing rapid screening and further improving the speed of information retrieval.
[0156] In the process of filling the first search request, the first search request is filled into the first address, and the request of the first address is filled into the blank subordinate address.
[0157] Furthermore, if there is no blank second address among the calculated multiple second addresses, multiple third addresses corresponding to each second address corresponding to the first retrieval request are calculated, and the third address is a subordinate address of the second address. If there is a blank third address among the multiple third addresses, the data of the second address corresponding to the third address is stored in the blank third address, the data of the first address corresponding to the second address is stored in the second address, and the first retrieval request is stored in the first address.
[0158] It should be understood that the subordinate addresses can be calculated multiple times until a blank subordinate address exists. In the process of filling the first search request, the first search request is filled into the first address, and the request of the first address is filled into the subordinate address, and the process is continued downwards until the blank subordinate address is filled, thereby completing the filling of the first search request and the first search result.
[0159] For example, Figure 4 As shown, after receiving the first search request k and the first search result v, (k, v) needs to be filled into the plaintext multidimensional data body, and the plaintext multidimensional data body includes 2 dimensions, each dimension corresponding to 2 hash functions. The proxy server 102 calculates the 4 first addresses corresponding to the first search request k. When all 4 first addresses are filled, the 3 second addresses corresponding to each first address are calculated (the position of a subordinate address occupied by the first address itself needs to be removed), for a total of 12 second addresses. In the case where there is only one second address t2 among the 12 second addresses, the first search request is stored to the first address t1 corresponding to the second address t2, and the data of the first address t1 is stored to the second address t2.
[0160] Furthermore, if there are no blanks in the 12 second addresses, three third addresses corresponding to each second address are calculated, for a total of 36 third addresses. If there is only one third address t3 among the 36 third addresses, the first search request is stored in the first address t1 corresponding to the third address t3, the data of the first address t1 is stored in the second address t2 corresponding to the third address t3, and the data of the second address t2 is stored in the third address t3.
[0161] In the embodiment of the present invention, when there is no blank first address among the multiple first addresses, the proxy server 102 calculates multiple second addresses corresponding to each first address among the multiple first addresses corresponding to the first search request, and when there is only one blank second address among the multiple second addresses, stores the first search request and the first search result at the first address corresponding to the blank second address, and stores the data corresponding to the first address at the blank second address, so that when the proxy server 102 subsequently receives the first search request, it determines the multiple first addresses through the first search request and determines whether there is an identifier corresponding to the first search request among the multiple first addresses, thereby realizing rapid screening and further improving the speed of information retrieval.
[0162] In one embodiment, the proxy server 102 is further configured to, when there are multiple blank second addresses in the multiple second addresses, calculate a free coefficient corresponding to each blank second address in the multiple blank second addresses, where the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second addresses in the multiple dimensions;
[0163] The proxy server stores the first search result at a first address corresponding to the second address of the blank space with the smallest free coefficient, and stores the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0164] Since the above-mentioned second address is a subordinate address, data movement will occur during the filling process. For example, the first search result is stored in the first address corresponding to the blank second address, and the data corresponding to the first address is stored in the blank second address. In this case, the moved data will be affected. Frequent movement causes instability of the data at an address in the plaintext multidimensional data body, and it is necessary to reduce the occurrence of movement.
[0165] The above-mentioned idle coefficient can characterize the idle status of the address. The idler the address is, the lower the probability of it being moved. Storing the first search result at the first address corresponding to the blank second address with the smallest idle coefficient, and storing the data corresponding to the first address at the blank second address with the smallest idle coefficient can effectively improve the stability of data storage.
[0166] For example, Figure 5 As shown, after receiving the first search request k and the first search result v, (k, v) needs to be filled into the plaintext multidimensional data body, and the plaintext multidimensional data body includes 2 dimensions, and each dimension corresponds to 2 hash functions. The proxy server 102 calculates the 4 first addresses corresponding to the first search request k (the positions corresponding to the four vertices of the rectangle in the figure). When the 4 first addresses are all filled, the 3 second addresses corresponding to each first address are calculated, for a total of 12 second addresses. Among the 12 addresses, there are 7 blank addresses, and the idle coefficient of each address is calculated at this time. Among them, the first dimension (horizontal in the figure) of the plaintext multidimensional data body includes 34 addresses, and the second dimension (vertical in the figure) includes 28 addresses. The idle coefficient corresponding to each blank second address is calculated as follows:
[0167] The idle coefficient of the second address A is 56;
[0168] The idle coefficient of the second address B is 57;
[0169] The idle coefficient of the second address C is 59;
[0170] The idle coefficient of the second address D is 59;
[0171] The idle coefficient of the second address E is 57;
[0172] The idle coefficient of the second address F is 59;
[0173] The idle coefficient of the second address G is 60;
[0174] It can be seen that the idle coefficient corresponding to the second address G is the largest. In this case, the first search request is stored to the first address corresponding to the second address G, and the data of the first address corresponding to the second address G is stored at the second address G.
[0175] In the embodiment of the present invention, when there are multiple blank second addresses among the multiple second addresses, the proxy server 102 calculates the idle coefficient corresponding to each blank second address among the multiple blank second addresses, stores the first search result at the first address corresponding to the blank second address with the smallest idle coefficient, and stores the data corresponding to the first address at the blank second address with the smallest idle coefficient, thereby reducing the occurrence of data movement and effectively improving the stability of data storage.
[0176] In one embodiment, the ciphertext multi-dimensional data volume includes multiple dimensions, and each dimension of the multiple dimensions corresponds to multiple hash functions;
[0177] Filling all the second search requests and all the second search results in the information group into the initial multidimensional data body to obtain the ciphertext multidimensional data body specifically includes:
[0178] The database server 103 is further configured to calculate a plurality of third addresses of the second search request in the ciphertext multi-dimensional data volume, each of the plurality of third addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0179] The database server 103 is further configured to store the second search result in the blank first address when there is a blank first address among the plurality of third addresses.
[0180] The above-mentioned ciphertext multidimensional data body is similar to the plaintext multidimensional data body, including multiple dimensions, each dimension corresponds to multiple hash functions, and for an identifier of a second retrieval request, the corresponding third address can be determined by different hash functions in different dimensions. For example, the ciphertext multidimensional data body includes m2 dimensions, each dimension includes n2 hash functions, and the database server 103 can calculate m2×n2 third addresses corresponding to the second retrieval request.
[0181] The above-mentioned third address is a storage address for storing the second search request and the second search result. After calculating multiple third addresses, if there are blanks in the multiple third addresses, the second search request and the second search result are stored in the blank third address. When the database server 103 subsequently receives the second search request, the multiple third addresses are determined through the second search request to determine whether there are second search results corresponding to the second search request in the multiple third addresses, thereby achieving rapid screening and further improving the speed of information retrieval.
[0182] In an embodiment of the present invention, the database server 103 calculates multiple third addresses of the second search request in the ciphertext multidimensional data body, and when there is a blank third address among the multiple third addresses, the second search result is stored in the blank third address, so that when the database server 103 subsequently receives the second search request, it determines the multiple third addresses through the second search request, and determines whether there is a second search result corresponding to the second search request among the multiple third addresses, thereby realizing rapid screening and further improving the speed of information retrieval.
[0183] In one embodiment, the database server 103 is further configured to calculate, when there is no blank in the multiple third addresses, multiple fourth addresses corresponding to each of the multiple third addresses corresponding to the first search request, each of the multiple fourth addresses respectively corresponding to one dimension in the multiple dimensions and one function in the multiple hash functions, and the multiple fourth addresses are subordinate addresses of the third address;
[0184] The database server 103 is further configured to store the second search result at a third address corresponding to the blank fourth address and store data corresponding to the third address at the blank fourth address when there is only one blank second address among the plurality of fourth addresses.
[0185] The above-mentioned fourth address is a subordinate address in the third address. Similar to filling a plaintext multidimensional data body, when multiple third addresses are filled, the third address can no longer additionally store the second search request and the second search result, but each third address also corresponds to multiple subordinate addresses. The data in the original third address can be stored in the blank fourth address, and the third address can store the second search request. When the database server 103 subsequently receives the second search request, it determines the multiple third addresses through the second search request, and determines whether there is an identifier corresponding to the second search request in the multiple third addresses, thereby realizing rapid screening and further improving the speed of information retrieval.
[0186] In the process of filling the second search request, the second search request is filled into the third address, and the request of the third address is filled into the blank subordinate address.
[0187] Furthermore, if there is no blank fourth address among the calculated multiple fourth addresses, multiple third addresses corresponding to each fourth address corresponding to the second retrieval request are calculated again, and the third address is a subordinate address of the fourth address. If there is a blank third address among the multiple third addresses, the data of the fourth address corresponding to the third address is stored in the blank third address, the data of the third address corresponding to the fourth address is stored in the fourth address, and the second retrieval request is stored in the third address.
[0188] It should be understood that the subordinate address can be calculated multiple times until a blank subordinate address exists. In the process of filling the second search request, the second search request is filled to the third address, and the request of the third address is filled to the subordinate address, and the process is continued downward until the blank subordinate address is filled, thereby completing the filling of the second search request and the second search result.
[0189] For example, by Figure 4 Filling the second search request and the second search result is explained. After receiving the second search request k' and the second search result v', (k', v') needs to be filled into the ciphertext multidimensional data body. The ciphertext multidimensional data body includes 2 dimensions, and each dimension corresponds to 2 hash functions. The database server 103 calculates the 4 third addresses corresponding to the second search request k. When all 4 third addresses are filled, the 3 fourth addresses corresponding to each third address are calculated (the position of a lower-level address occupied by the third address itself needs to be removed), for a total of 12 fourth addresses. When there is only one fourth address t2 among the 12 fourth addresses, the second search request is stored to the third address t1 corresponding to the fourth address t2, and the data of the third address t1 is stored to the fourth address t2.
[0190] Furthermore, if there are no blanks in the 12 fourth addresses, three third addresses corresponding to each fourth address are calculated, for a total of 36 third addresses. If there is only one third address t3 among the 36 third addresses, the second search request is stored in the third address t1 corresponding to the third address t3, the data of the third address t1 is stored in the fourth address t2 corresponding to the third address t3, and the data of the fourth address t2 is stored in the third address t3.
[0191] In an embodiment of the present invention, when there is no blank third address among the multiple third addresses, the database server 103 calculates multiple fourth addresses corresponding to each third address among the multiple third addresses corresponding to the second search request, and when there is only one blank fourth address among the multiple fourth addresses, stores the second search request and the second search result in the third address corresponding to the blank fourth address, and stores the data corresponding to the third address at the blank fourth address, so that when the database server 103 subsequently receives the first search request, it determines the multiple third addresses through the first search request, and determines whether there is a second search result corresponding to the second search request among the multiple third addresses, thereby achieving rapid screening and further improving the speed of information retrieval.
[0192] In one embodiment, the database server 103 is further configured to, when there are multiple blank fourth addresses in the multiple fourth addresses, calculate a free coefficient corresponding to each blank fourth address in the multiple blank fourth addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank fourth address in the multiple dimensions;
[0193] The second search result is stored in the third address corresponding to the fourth address of the blank with the smallest free coefficient, and the data corresponding to the third address is stored in the second address of the blank with the smallest free coefficient.
[0194] It should be understood that, similar to the second address, since the above-mentioned fourth address is a subordinate address, data movement will occur during the filling process. For example, the second search result is stored in the third address corresponding to the blank fourth address, and the data corresponding to the third address is stored in the blank fourth address. In this case, the moved data will be affected. Frequent movement causes instability in the data of an address in the plaintext multidimensional data body, and the occurrence of movement needs to be reduced.
[0195] The above-mentioned idle coefficient can characterize the idle status of the address. The idler the address is, the lower the probability of it being moved. Storing the second search result at the third address corresponding to the blank fourth address with the smallest idle coefficient, and storing the data corresponding to the third address at the blank fourth address with the smallest idle coefficient can effectively improve the stability of data storage.
[0196] In an embodiment of the present invention, when there are multiple blank fourth addresses among multiple fourth addresses, the ciphertext server calculates the idle coefficient corresponding to each blank fourth address among the multiple blank fourth addresses, stores the second retrieval result in the third address corresponding to the blank fourth address with the smallest idle coefficient, and stores the data corresponding to the third address in the blank fourth address with the smallest idle coefficient, thereby reducing the occurrence of data movement and effectively improving the stability of data storage.
[0197] See also Figure 6 , Figure 6 is a flowchart of an information retrieval method provided by an embodiment of the present invention, which is applied to a proxy server, wherein the proxy server is connected to a database server for communication, and the proxy server and the database server belong to the same local area network, such as Figure 6 As shown, the method includes:
[0198] Step 601: receiving a first search request sent by a search terminal, where the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, where the information transmission channel is a channel established between the proxy server and the search terminal;
[0199] Step 602: Send a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0200] Step 603: receiving a second search result sent by the database server, where the second search result is obtained by searching the database server after receiving the second search request, and the second search result is an encrypted search result;
[0201] Step 604: Send a first search result to the search terminal, where the first search result is a decrypted search result.
[0202] In the embodiment of the present invention, an information transmission channel is established between the search terminal and the proxy server, and the proxy server is also connected to the database server in communication, and the database server and the proxy server belong to the same local area network; the search terminal and the proxy server transmit the unencrypted first search request and the first search result through the information transmission channel, and the proxy server and the database server transmit the encrypted second search request and the second search result in the local area network. In this embodiment, the proxy server and the database server belong to the same local area network, which improves the data exchange speed between the proxy server and the database server, and further improves the information retrieval speed; the information transmission channel is established between the proxy server and the search terminal, which improves the data exchange speed between the proxy server and the search terminal, and further improves the information retrieval speed.
[0203] In one embodiment, the second search request is obtained by:
[0204] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0205] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, a random number is generated, and the random number and the first search request are encrypted based on a preset key to obtain the second search request.
[0206] In one embodiment, the method further comprises:
[0207] The first search request and the first search result are filled into the plaintext multi-dimensional data body of the proxy server.
[0208] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0209] In one embodiment, the method further comprises:
[0210] Encrypting the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0211] The information in the information group is shuffled, and the shuffled information group is sent to the database server.
[0212] In one embodiment, filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server includes:
[0213] Calculating a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0214] When there is a blank first address among the plurality of first addresses, the first search result is stored in the blank first address.
[0215] In one embodiment, the method further comprises:
[0216] In the case that no first address among the multiple first addresses is blank, calculating multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension among multiple dimensions and one function among multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0217] In the case that there is only one blank second address among the plurality of second addresses, the first search result is stored in the first address corresponding to the blank second address, and the data corresponding to the first address is stored in the blank second address.
[0218] In one embodiment, the method further comprises:
[0219] In the case where there are multiple blank second addresses among the multiple second addresses, calculating a free coefficient corresponding to each blank second address among the multiple blank second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second address in the multiple dimensions;
[0220] The first search result is stored in a first address corresponding to the second address of the blank space with the smallest free coefficient, and data corresponding to the first address is stored in the second address of the blank space with the smallest free coefficient.
[0221] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a proxy server provided by an embodiment of the present invention, wherein the proxy server is connected to a database server for communication, and the proxy server and the database server belong to the same local area network, such as Figure 7 As shown, the proxy server 700 includes:
[0222] A first receiving module 701 is used to receive a first search request sent by a search terminal, where the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, where the information transmission channel is a channel established between the proxy server and the search terminal;
[0223] A first sending module 702 is used to send a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0224] A second receiving module 703 is used to receive a second search result sent by the database server, where the second search result is obtained by the database server after receiving the second search request, and the second search result is an encrypted search result;
[0225] The second sending module 704 is used to send a first search result to the search terminal, where the first search result is a decrypted search result.
[0226] In one embodiment, the second search request is obtained by:
[0227] If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0228] If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, a random number is generated, and the random number and the first search request are encrypted based on a preset key to obtain the second search request.
[0229] In one embodiment, the proxy server 700 further includes:
[0230] The first processing module is used to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
[0231] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0232] In one embodiment, the proxy server 700 further includes:
[0233] a second processing module, configured to encrypt the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result;
[0234] The third sending module is used to shuffle the information in the information group and send the shuffled information group to the database server.
[0235] In one embodiment, the first processing module includes:
[0236] A first processing unit, configured to calculate a plurality of first addresses of a first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0237] The second processing unit is configured to store the first search result in a blank first address when there is a blank first address among the plurality of first addresses.
[0238] In one embodiment, the first processing module further includes:
[0239] a third processing unit, configured to calculate, when no first address among the plurality of first addresses is blank, a plurality of second addresses corresponding to each of the plurality of first addresses corresponding to the first search request, each of the plurality of second addresses respectively corresponding to one dimension among the plurality of dimensions and one function among the plurality of hash functions, the plurality of second addresses being subordinate addresses of the first address;
[0240] The fourth processing unit is used to store the first search result at the first address corresponding to the blank second address and store the data corresponding to the first address at the blank second address when there is only one blank second address among the multiple second addresses.
[0241] In one embodiment, the first processing module further includes:
[0242] a fifth processing unit, configured to calculate, when there are a plurality of blank second addresses among the plurality of second addresses, a free coefficient corresponding to each of the plurality of blank second addresses, wherein the free coefficient is a sum of the number of blank addresses in each dimension corresponding to the blank second addresses in the plurality of dimensions;
[0243] The sixth processing unit is used to store the first search result at the first address corresponding to the second address of the blank space with the smallest free coefficient, and store the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0244] The proxy server is capable of implementing each process of each embodiment of the above-mentioned information retrieval method applied to the proxy server. The technical features correspond one to one and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0245] An embodiment of the present invention also provides a proxy server, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, each process of the above-mentioned information retrieval method embodiment applied to the proxy server is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0246] For details, see Figure 8 The embodiment of the present invention further provides a proxy server, including a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805 and a memory 806.
[0247] The transceiver 802 is used to receive a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal;
[0248] The transceiver 802 is further configured to send a second search request to the database server, where the second search request is obtained by encrypting the first search request;
[0249] The transceiver 802 is further configured to receive a second search result sent by the database server, wherein the second search result is obtained by searching the database server after receiving the second search request, and the second search result is an encrypted search result;
[0250] The transceiver 802 is further configured to send a first search result to the search terminal, where the first search result is a decrypted search result.
[0251] In one embodiment, the second search request is obtained by:
[0252] When there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the processor 805 is configured to encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result;
[0253] When there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the processor 805 is further used to generate a random number, and encrypt the random number and the first search request based on a preset key to obtain the second search request.
[0254] In one embodiment, the processor 805 is further configured to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
[0255] In one embodiment, the second search result is obtained by the database server querying the encrypted multidimensional data body based on the second search request; the encrypted multidimensional data body is a multidimensional data body that stores the second search request and the second search result corresponding to the second search request.
[0256] In one embodiment, the processor 805 is further configured to encrypt the retrieval request corresponding identifier and the private information based on a preset key to generate an information group, wherein the retrieval request corresponding identifier includes an identifier of the first retrieval request, the private information includes the first retrieval result, and the information group includes the second retrieval request and the second retrieval result;
[0257] The transceiver 802 is further used to shuffle the information in the information group and send the shuffled information group to the database server.
[0258] In one embodiment, the processor 805 is further configured to calculate a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions;
[0259] The processor 805 is further configured to store the first search result at a blank first address.
[0260] In one embodiment, the processor 805 is further configured to, when there is no blank first address among the multiple first addresses, calculate multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension among the multiple dimensions and one function among the multiple hash functions, and the multiple second addresses are subordinate addresses of the first address;
[0261] The processor 805 is further configured to, when there is only one blank second address among the multiple second addresses, store the first search result at a first address corresponding to the blank second address, and store data corresponding to the first address at the blank second address.
[0262] In one embodiment, the processor 805 is further configured to, when there are multiple blank second addresses in the multiple second addresses, calculate a free coefficient corresponding to each blank second address in the multiple blank second addresses, where the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second address in the multiple dimensions;
[0263] The processor 805 is further configured to store the first search result at a first address corresponding to the second address of the blank space with the smallest free coefficient, and store the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
[0264] exist Figure 8In the embodiment, the bus architecture (represented by bus 801) is shown, and bus 801 may include any number of interconnected buses and bridges, and bus 801 links various circuits including one or more processors represented by processor 805 and memory represented by memory 806. Bus 801 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 804 provides an interface between bus 801 and transceiver 802. Transceiver 802 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 805 is transmitted on a wireless medium via antenna 803, and further, antenna 803 also receives data and transmits the data to processor 805.
[0265] The processor 805 is responsible for managing the bus 801 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 806 can be used to store data used by the processor 805 when performing operations.
[0266] Optionally, the processor 805 may be a CPU, an ASIC, an FPGA or a CPLD.
[0267] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned VoLTE voice encryption communication method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0268] The terms "first", "second" etc. in the embodiments of the present invention are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of the connected objects, such as A and / or B and / or C, indicating that A alone, B alone, C alone, and A and B all exist, B and C all exist, A and C all exist, and 7 situations in which A, B and C all exist.
[0269] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0270] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a second terminal device, etc.) to execute the methods of each embodiment of the present application.
[0271] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An information retrieval system, characterized in that: include: A retrieval terminal, the retrieval terminal is used to send a first retrieval request, the first retrieval request is an unencrypted retrieval request; a proxy server, the proxy server being used to establish an information transmission channel with the search terminal, the information transmission channel being used to transmit the first search request and the first search result sent by the proxy server to the search terminal, the first search result being a decrypted search result; A database server, the database server is communicatively connected to the proxy server, the database server and the proxy server belong to the same local area network, the database server is used to receive a second search request sent by the proxy server, retrieve a second search result based on the second search request, and send the second search result to the proxy server, the second search request is obtained by encrypting the first search request, and the second search result is an encrypted search result.
2. The information retrieval system according to claim 1, characterized in that: The second search request is obtained in the following manner: If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the proxy server encrypts the first search request based on a preset key to obtain the second search request, and the plaintext multidimensional data body is a multidimensional data body storing the first search result of the proxy server; If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, the proxy server generates a random number, and encrypts the random number and the first search request based on a preset key to obtain the second search request.
3. The information retrieval system according to claim 2, characterized in that: The proxy server is further configured to fill the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server.
4. The information retrieval system according to claim 1, characterized in that: The second search result is obtained by: The database server queries the encrypted multidimensional data volume based on the second search request to obtain the second search result. The encrypted multidimensional data volume is a multidimensional data volume that stores the second search request and the second search result corresponding to the second search request.
5. The information retrieval system according to claim 4, characterized in that: The ciphertext multidimensional data body is obtained in the following manner: The proxy server encrypts the identifier corresponding to the search request and the private information based on a preset key to generate an information group, wherein the identifier corresponding to the search request includes the identifier of the first search request, the private information includes the first search result, and the information group includes the second search request and the second search result; The proxy server shuffles the information in the information group and sends the shuffled information group to the database server; The database server fills all second search requests and all second search results in the information group into the initial multidimensional data volume to obtain the ciphertext multidimensional data volume.
6. The information retrieval system according to claim 3, characterized in that: The plaintext multi-dimensional data body includes multiple dimensions, and each dimension of the multiple dimensions corresponds to multiple hash functions; The step of filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server specifically includes: The proxy server is further used to calculate a plurality of first addresses of the first search request in the plaintext multi-dimensional data body, each of the plurality of first addresses corresponding to one dimension of the plurality of dimensions and one hash function of the plurality of hash functions; The proxy server is further configured to store the first search result in a blank first address when there is a blank first address among the multiple first addresses.
7. The information retrieval system according to claim 6, characterized in that: The proxy server is further configured to calculate, when there is no first address in the multiple first addresses and it is blank, multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension in the multiple dimensions and one function in the multiple hash functions, and the multiple second addresses are subordinate addresses of the first address; The proxy server is further configured to store the first search result at the first address corresponding to the blank second address and store the data corresponding to the first address at the blank second address when there is only one blank second address among the multiple second addresses.
8. The information retrieval system according to claim 7, characterized in that: The proxy server is further configured to calculate, when there are multiple blank second addresses among the multiple second addresses, a free coefficient corresponding to each blank second address among the multiple blank second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second addresses in the multiple dimensions; The proxy server stores the first search result at a first address corresponding to the second address of the blank space with the smallest free coefficient, and stores the data corresponding to the first address at the second address of the blank space with the smallest free coefficient.
9. The information retrieval system according to claim 5, characterized in that: The ciphertext multi-dimensional data body includes multiple dimensions, each of the multiple dimensions corresponds to multiple hash functions; Filling all the second search requests and all the second search results in the information group into the initial multidimensional data body to obtain the ciphertext multidimensional data body specifically includes: The database server is further used to calculate a plurality of third addresses of the second search request in the ciphertext multi-dimensional data volume, each of the plurality of third addresses corresponding to one dimension in the plurality of dimensions and one hash function in the plurality of hash functions; The database server is further configured to store the second search result in the blank first address when there is a blank first address among the plurality of third addresses.
10. The information retrieval system according to claim 9, characterized in that: The database server is further configured to calculate, when there is no blank in the plurality of third addresses, a plurality of fourth addresses corresponding to each of the plurality of third addresses corresponding to the second search request, each of the plurality of fourth addresses respectively corresponding to one dimension in the plurality of dimensions and one function in the plurality of hash functions, and the plurality of fourth addresses are subordinate addresses of the third address; The database server is further configured to store the second search result at a third address corresponding to the blank fourth address and store data corresponding to the third address at the blank fourth address when there is only one blank second address among the plurality of fourth addresses.
11. The information retrieval system according to claim 10, characterized in that: The database server is further configured to calculate, when there are multiple blank fourth addresses among the multiple fourth addresses, a free coefficient corresponding to each blank fourth address among the multiple blank fourth addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank fourth address in the multiple dimensions; The second search result is stored in the third address corresponding to the fourth address of the blank with the smallest free coefficient, and the data corresponding to the third address is stored in the second address of the blank with the smallest free coefficient.
12. An information retrieval method, applied to a proxy server, wherein the proxy server is in communication with a database server, and the proxy server and the database server belong to the same local area network, characterized in that: include: receiving a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal; Sending a second search request to the database server, where the second search request is obtained by encrypting the first search request; receiving a second search result sent by the database server, where the second search result is obtained by searching the database server after receiving the second search request, and the second search result is an encrypted search result; A first search result is sent to the search terminal, where the first search result is a decrypted search result.
13. The method according to claim 12, characterized in that The second search request is obtained in the following manner: If there is an identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, encrypt the first search request based on a preset key to obtain the second search request, wherein the plaintext multidimensional data body is a multidimensional data body of the proxy server storing the first search result; If there is no identifier corresponding to the first search request in the plaintext multidimensional data body cached internally by the proxy server, a random number is generated, and the random number and the first search request are encrypted based on a preset key to obtain the second search request.
14. The method according to claim 13, characterized in that The method further comprises: The first search request and the first search result are filled into the plaintext multi-dimensional data body of the proxy server.
15. The method according to claim 14, characterized in that The step of filling the first search request and the first search result into the plaintext multi-dimensional data body of the proxy server includes: Calculating a plurality of first addresses of the first search request in the plaintext multi-dimensional data volume, each of the plurality of first addresses corresponding to one of the plurality of dimensions and one of the plurality of hash functions; When there is a blank first address among the plurality of first addresses, the first search result is stored in the blank first address.
16. The method according to claim 15, characterized in that The method further comprises: In the case that no first address among the multiple first addresses is blank, calculating multiple second addresses corresponding to each of the multiple first addresses corresponding to the first search request, each of the multiple second addresses respectively corresponding to one dimension among multiple dimensions and one function among multiple hash functions, and the multiple second addresses are subordinate addresses of the first address; In the case that there is only one blank second address among the plurality of second addresses, the first search result is stored in the first address corresponding to the blank second address, and the data corresponding to the first address is stored in the blank second address.
17. The method according to claim 16, characterized in that The method further comprises: In the case where there are multiple blank second addresses among the multiple second addresses, calculating a free coefficient corresponding to each blank second address among the multiple blank second addresses, wherein the free coefficient is the sum of the number of blank addresses in each dimension corresponding to the blank second address in the multiple dimensions; The first search result is stored in a first address corresponding to the second address of the blank space with the smallest free coefficient, and data corresponding to the first address is stored in the second address of the blank space with the smallest free coefficient.
18. A proxy server, wherein the proxy server is in communication connection with a database server, and the proxy server and the database server belong to the same local area network, characterized in that: include: A first receiving module, configured to receive a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal; A first sending module, configured to send a second search request to the database server, where the second search request is obtained by encrypting the first search request; A second receiving module, used to receive a second search result sent by the database server, where the second search result is obtained by the database server after receiving the second search request, and the second search result is an encrypted search result; The second sending module is used to send a first search result to the search terminal, where the first search result is a decrypted search result.
19. A proxy server, characterized in that: Including transceiver and processor, The transceiver is used to receive a first search request sent by a search terminal, wherein the first search request is an unencrypted search request sent by the search terminal through an information transmission channel, and the information transmission channel is a channel established between the proxy server and the search terminal; The transceiver is further used to send a second search request to the database server, where the second search request is obtained by encrypting the first search request; The transceiver is further used to receive a second search result sent by the database server, where the second search result is retrieved by the database server after receiving the second search request, and the second search result is an encrypted search result; The transceiver is further used to send a first search result to the search terminal, where the first search result is a decrypted search result.
20. A proxy server, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the information retrieval method according to any one of claims 12 to 19 are implemented.
Citation Information
Patent Citations
Distributed encrypted storage and authentication method based on local area network
CN105791274A
Water affairs data access method and device
CN106161467A
Power monitoring system network security data processing method and device, equipment and medium
CN110557383A
Database ciphertext retrieval system and method based on bidirectional security index
CN112800088A
Cited By
Secret communication method, terminal, equipment, platform, storage medium and product
CN119363418A
