Encrypted-search method and encrypted-search system

By using multiple public keys to encrypt query information in end-to-end instant communication, and using inverted indexing and feature extraction in search service devices, the search and sorting of encrypted messages is realized, solving the poor user experience and search difficulties. The problem has improved the efficiency and security of communication products.

WO2024234891A1PCT designated stage expired Publication Date: 2024-11-21HANGZHOU AKEY ME CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/087450
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-15
Filing Date
2024-04-12
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

In end-to-end instant communication, although encrypted communication ensures security, it is difficult to achieve encrypted search of messages, resulting in poor user experience, and it is difficult to segment word and index after the same message information is encrypted, resulting in difficulty in searching.

Method used

The user equipment uses multiple public keys to encrypt the query information, and passes the encrypted query information to the search service device. Preset indexes such as inverted indexes are used to match, and combined with feature extraction and sorting algorithms, the search and search of encrypted messages and Sort.

Benefits of technology

While ensuring communication security, it realizes search and sorting of encrypted messages, improves user experience, and reduces the use of transmission bandwidth and storage resources, solving the problem of difficult word segmentation and indexing of encrypted messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087450_21112024_PF_FP_ABST
    Figure CN2024087450_21112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to an encrypted-search method and an encrypted-search system. The encrypted-search method comprises: a search service device acquiring a plurality of pieces of encrypted query information from a user device, wherein the plurality of pieces of encrypted query information are generated by means of encrypting query information from a user by using a plurality of public keys of the user; the search service device querying, on the basis of a preset index, hit message information which matches with the plurality of pieces of encrypted query information, so as to generate a search result, wherein the preset index is established by the search service device according to encrypted message information acquired of a message service device, the encrypted message information is generated by means of encrypting message information from the user by using a corresponding public key from among the plurality of public keys, and the search result is configured to indicate the found hit message information or indicate that no hit message information is found; and the search service device returning the search result to the user equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Encrypted search method and encrypted search system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application number "202310556370.2" and entitled "Encrypted Search Method and Encrypted Search System" filed by Hangzhou Ansiyuan Technology Co., Ltd. with the China Patent Office on May 15, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of information security technology, and more specifically, to an encrypted search method and an encrypted search system. Background Art

[0004] To ensure communication security in end-to-end instant messaging, both the sender and receiver can encrypt and decrypt messages on their respective user devices, preventing plaintext messages from being accessed by messaging services. However, while this approach effectively ensures the confidentiality and security of communications, it also prevents messaging platform providers from providing value-added services such as message search and message recommendations, hindering the user experience.

[0005] Summary of the Invention

[0006] One of the purposes of this application is to provide an encrypted search method and an encrypted search system, which can realize encrypted search of messages while ensuring communication security, thereby improving user experience.

[0007] According to a first aspect of the present application, an encrypted search method is provided, comprising:

[0008] The search service device obtains a plurality of encrypted query information from the user device, wherein the plurality of encrypted query information is generated by encrypting the query information from the user using a plurality of public keys of the user;

[0009] The search service device searches for hit message information matching the multiple encrypted query information based on a preset index to generate search results, wherein the preset index is established by the search service device based on encrypted message information obtained from a message service device, the encrypted message information is generated by encrypting message information from the user using a corresponding one of the multiple public keys, and the search results are configured to indicate the hit message information that was queried or to indicate that no hit message information was queried; and

[0010] The search service device returns the search result to the user device.

[0011] In some embodiments, the search service device obtains multiple pieces of encrypted query information from the user device, including:

[0012] The search service device obtains encrypted query data from the user device, wherein the encrypted query data is generated by merging and compressing the multiple pieces of encrypted query information;

[0013] The search service device decompresses the encrypted query data; and

[0014] The search service device decomposes the decompressed encrypted query data to obtain the multiple pieces of encrypted query information.

[0015] In some embodiments, the preset index includes an inverted index.

[0016] In some embodiments, the search service device establishing the preset index according to the encrypted message information obtained from the message service device includes:

[0017] The search service device obtains encrypted message information from the message service device, wherein the encrypted message information is composed of one or more data blocks, and each of the one or more data blocks has the same number of bytes;

[0018] The search service device determines each data block in the encrypted message information, and if the data block contains padding bytes, removes the padding bytes to extract valid message information from the encrypted message information;

[0019] The search service device extracts features from the valid message information; and

[0020] The search service device establishes an inverted index based on the extracted features, wherein the inverted index is configured to indicate the encrypted message information where each character is located.

[0021] In some embodiments, the extracted features include at least one of the following:

[0022] a numeric feature configured to indicate the number of characters in the valid message information; and,

[0023] A character feature is configured to indicate a byte boundary corresponding to each character in the valid message information.

[0024] In some embodiments, the search service device searches for hit message information matching the plurality of encrypted query information based on a preset index to generate search results, including:

[0025] The search service device obtains, based on the preset index, identification marks of the hit message information that matches the multiple pieces of encrypted query information, wherein the identification marks are configured to uniquely indicate the corresponding message information;

[0026] The search service device removes duplicates from the queried hit message information according to the identification mark; and

[0027] The search service device sorts the deduplicated hit message information based on a preset sorting algorithm to generate the search results, wherein the hit message information indicated by the search results is sorted according to the degree of matching with the query information.

[0028] In some embodiments, the search service device sorts the deduplicated hit message information based on a preset sorting algorithm, including:

[0029] For each hit message in the deduplicated hit message information, perform the following operations:

[0030] The score (D, Q) of the hit message information is calculated according to the following formula: n(q i )=∑ 0≤j<M n(c ij ),

[0031] Among them, IDF(q i ) is the i-th character q in the query information in the search service device i The inverse document frequency, f(q i , D) is the i-th character q in the query information i The word frequency in the hit message information, k1 is the first parameter, b is the second parameter, |D| is the total number of characters contained in the hit message information, avgdl is the average number of characters in all message information in the search service device, N is the total number of message information in the search service device, n(q i ) is the i-th character q in the query information i The total number of message information, M is the total number of public keys, c ij To use the jth public key to query the i-th character q in the query information i the ciphertext characters produced by the encryption; and,

[0032] Sort the deduplicated hit message information in descending order of their scores.

[0033] In some embodiments, the first parameter k1∈[1.2,2.0], and the second parameter b=0.75.

[0034] In some embodiments, the search result includes at least one of an identification mark, index information, and summary information of the hit message information, wherein the identification mark, index information, and summary information are configured to uniquely indicate the corresponding message information.

[0035] According to a second aspect of the present application, a search service device is provided, comprising a first memory and a first processor, wherein the first memory stores instructions, and when the instructions are executed by the first processor, the steps of the above-mentioned encrypted search method are implemented.

[0036] According to a third aspect of the present application, an encrypted search method is provided, comprising:

[0037] The user device obtains query information from the user;

[0038] The user device encrypts the query information using the user's multiple public keys to generate multiple pieces of encrypted query information, and transmits the multiple pieces of encrypted query information to the search service device; and

[0039] The user device obtains search results from the search service device and outputs hit message information according to the search results if there is hit message information, wherein the search results are configured to indicate the queried hit message information or indicate that no hit message information is queried.

[0040] In some embodiments, the encrypted search method further includes:

[0041] The user equipment obtains message information from the user;

[0042] The user equipment encrypts the message information using a current public key of the multiple public keys to generate encrypted message information, wherein the encrypted message information is composed of one or more data blocks, and each of the one or more data blocks has the same number of bytes; and

[0043] The user equipment transmits the encrypted message information to the message service equipment.

[0044] In some embodiments, the plurality of public keys are generated based on a double ratchet algorithm.

[0045] In some embodiments, the user device encrypts the query information using multiple public keys of the user in parallel.

[0046] In some embodiments, the user device transmitting the plurality of encrypted query information to the search service device includes:

[0047] The user equipment merges the multiple pieces of encrypted query information;

[0048] The user equipment compresses the combined multiple pieces of encrypted query information to generate encrypted query data; and

[0049] The user equipment transmits the encrypted query data to the search service device.

[0050] In some embodiments, the user device obtains search results from the search service device, and outputs hit message information according to the search results if hit message information exists, including:

[0051] In a case where the search result indicates that the hit message information is found, the user equipment determines whether the hit message information exists locally;

[0052] If so, the user equipment outputs the hit message information;

[0053] If not, the user device transmits the search result to the message service device, obtains the encrypted message information corresponding to the search result from the message service device, and decrypts the encrypted message information to generate and output the hit message information.

[0054] According to a fourth aspect of the present application, a user device is provided, comprising a second memory and a second processor, wherein the second memory stores instructions, and when the instructions are executed by the second processor, the steps of the encryption search method described above are implemented.

[0055] According to a fifth aspect of the present application, an encrypted search method is provided, comprising:

[0056] The message service device obtains encrypted message information from the user device, wherein the encrypted message information is generated by encrypting the message information from the user using a current public key among multiple public keys of the user; and

[0057] The message service device transmits the encrypted message information to the search service device.

[0058] In some embodiments, the encrypted search method further includes:

[0059] When the message service device obtains the search result from the user equipment, the encrypted message information corresponding to the search result is transmitted to the user equipment.

[0060] According to a sixth aspect of the present application, a message service device is provided, comprising a third memory and a third processor, wherein the third memory stores instructions, and when the instructions are executed by the third processor, the steps of the encryption search method described above are implemented.

[0061] According to a seventh aspect of the present application, an encrypted search system is provided, comprising:

[0062] a user device configured to obtain at least one of message information and query information from a user, encrypt the message information using a current public key of a plurality of public keys of the user to generate encrypted message information, and encrypt the query information using the plurality of public keys respectively to generate a plurality of encrypted query information;

[0063] a message service device, the message service device being communicatively connected to the user device and configured to obtain encrypted message information from the user device; and

[0064] A search service device, wherein the search service device is communicatively connected to the user device and the message service device, and the search service device is configured to obtain encrypted message information from the message service device and establish a preset index based on the encrypted message information. The search service device is also configured to obtain the multiple encrypted query information from the user device, query hit message information matching the multiple encrypted query information based on the preset index to generate search results, and return the search results to the user device, so that the user device outputs hit message information according to the search results if there is hit message information, wherein the search results are configured to indicate the hit message information that has been queried or to indicate that no hit message information has been queried.

[0065] According to an eighth aspect of the present application, a computer-readable storage medium is provided, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the steps of the encryption search method described above are implemented.

[0066] Other features and advantages of the present application will become more apparent from the following detailed description of exemplary embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.

[0068] The present application can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0069] FIG1 shows a schematic diagram of an encrypted search method according to an exemplary embodiment of the present application;

[0070] FIG2 shows a schematic flow chart of an encrypted search method performed at a search service device according to an exemplary embodiment of the present application;

[0071] FIG3 shows a schematic flow chart of an encryption search method performed at a user equipment according to an exemplary embodiment of the present application;

[0072] FIG4 shows a schematic flow chart of an encryption search method performed at a message service device according to an exemplary embodiment of the present application;

[0073] FIG5 shows a schematic diagram of feature extraction according to a specific embodiment of the present application;

[0074] FIG6 shows a schematic diagram of querying hit message information according to a specific embodiment of the present application;

[0075] FIG7 shows a block diagram of an encryption search system according to an exemplary embodiment of the present application.

[0076] Note that in the embodiments described below, the same reference numerals are sometimes used in common across different drawings to denote the same parts or parts having the same functions, and their repeated descriptions are omitted. In this specification, similar reference numerals and letters are used to denote similar items. Therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.

[0077] To facilitate understanding, the positions, sizes, and ranges of various structures shown in the drawings and the like may not always represent actual positions, sizes, and ranges. Therefore, the disclosed invention is not limited to the positions, sizes, and ranges disclosed in the drawings and the like. Furthermore, the drawings are not necessarily drawn to scale, and some features may be exaggerated to illustrate details of specific components. DETAILED DESCRIPTION

[0078] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present application.

[0079] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the present invention and its application or use. It will be understood by those skilled in the art that these descriptions are merely exemplary, rather than exhaustive, of the various embodiments of the present invention.

[0080] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0081] With the development of society, privacy and data protection issues have received increasing attention, and accordingly, end-to-end encrypted communication methods have become more widely adopted. In this method, both the sender and the receiver can encrypt and decrypt communication messages on their own user devices, thereby preventing plaintext messages from being accessed by platforms providing messaging services. Furthermore, multiple sets of keys (public-private key pairs) can be generated for encryption and decryption operations. For example, different public-private key pairs can be used for encryption and decryption at different times to prevent security risks caused by the cracking of a single set of keys.

[0082] However, in this communication mode, since the key is always changing dynamically, the same message information may be encrypted into completely different encrypted message information. Then, when the message information needs to be searched, it will be difficult to perform operations such as word segmentation and indexing, making the search difficult.

[0083] Specifically, the encrypted characters can be stored in the memory in the form of data blocks, where each data block can have the same number of bytes, for example, each data block can be 8 bytes. In some cases, different characters in the same word may be in different encrypted data blocks. For example, the two messages "Today I am visiting West Lake in Hangzhou" and "What's the weather in Hangzhou today" both contain the word "Hangzhou". When encrypting these two messages, since "Hangzhou" in the first message is located in the middle of the sentence, the corresponding ciphertext may be distributed in two data blocks, the first data block and the second data block. However, since "Hangzhou" in the second message is located at the beginning of the sentence, the corresponding ciphertext may be in the same data block at the beginning. In this case, if the user searches for "Hangzhou", the first message may not be found because "Hangzhou" is divided into two different data blocks.

[0084] In addition, in some encryption mechanisms, the content of the subsequent encrypted data block may depend on the content of the previous encrypted data block, or different public keys may be used for encryption at different times. These may cause the ciphertext of the same word or character in different data blocks to be different, making it impossible to perform effective search.

[0085] To address the above issues, the present application proposes an encrypted search method. Figure 1 shows a schematic diagram of an encrypted search method according to an exemplary embodiment of the present application, and Figures 2 to 4 show flow charts of the encrypted search method executed at a search service device, a user device, and a message service device, respectively, according to an exemplary embodiment of the present application.

[0086] As shown in Figure 1, the encrypted search system for implementing the encrypted search method of the present application may include a user device 200, a message service device 300 and a search service device 100. Among them, the user device 200 can be a smart terminal such as a mobile phone, a tablet computer, etc., and an application (APP) for instant messaging can be installed on the user device 200. The user can conduct end-to-end instant messaging with another user based on the APP. The message service device 300 and the search service device 100 can be provided by a platform provider that provides instant messaging services. Among them, the message service device 300 is used to provide message communication services to users, and the search service device 100 is used to provide message search services to users. In some cases, the search service device 100 can also further provide users with message recommendation services based on the message search service. In addition, the message service device 300 and the search service device 100 can each be implemented as a different server, or can also be located in the same server, which is not limited here.

[0087] During end-to-end instant messaging, as shown in Figure 1, user device 200 can obtain message information from a user, encrypt the message information using a current public key among the user's multiple public keys to generate encrypted message information, and then transmit the encrypted message information to message service device 300. After obtaining the encrypted message information from user device 200, message service device 300 can forward the encrypted message information to another user device in communication with user device 200. The other user device can decrypt the encrypted message information using a private key corresponding to the public key used to encrypt the message information, thereby obtaining the message information from user device 200. Furthermore, message service device 300 can store the obtained encrypted message information and provide it to the corresponding user device or search service device 100 when needed. Thus, during the communication process, all encryption and decryption operations are performed at the corresponding user device, and message service device 300 cannot obtain the plaintext message information, thereby ensuring the confidentiality and security of the communication.

[0088] Furthermore, in this document, when a public key is used to encrypt a message or query information (described later), this encryption can be performed on a character-by-character basis. This means that each character in the message or query information is encrypted using the public key, and all encrypted characters in the message are combined into an encrypted message, and all encrypted characters in the query information are combined into an encrypted query information. Each character in the same message can be encrypted using the same public key; different messages (e.g., messages sent at different times) can be encrypted using different public keys, such as the current public key generated at the time the message is sent.

[0089] In addition, the generated encrypted message information or encrypted query information described below may be formatted to meet preset format requirements for easy storage and transmission. In some embodiments, the encrypted message information or encrypted query information may be composed of one or more data blocks, that is, the smallest unit of the encrypted message information or encrypted query information may be a data block, where each data block may have the same number of bytes. If the original message information or query information cannot be represented as an integer number of data blocks, this problem can be solved by adding padding bytes.

[0090] In a specific example, when converting the message information "The weather in Hangzhou is really good today." into an encrypted message information, the current public key can be used to encrypt each of the characters "today", "day", "Hangzhou", "day", "air", "real", "good" and "." to obtain the corresponding ciphertext, wherein each encrypted character can be 4 bytes. Furthermore, the encrypted message information is in data blocks. Assuming that each data block is 32 bytes, each data block can represent 8 encrypted characters. The encrypted message information "The weather in Hangzhou is really good today." can be represented by two data blocks. In addition, since the message information includes 9 characters, the second data block can be filled with an additional 7 padding bytes, as shown in the following table:

[0091] It is understandable that in some other embodiments, depending on the characteristics of the message information, more or fewer bytes may be used to represent each encrypted character, or each data block may represent more or fewer characters, which is not limited here.

[0092] In order to meet the user's search needs for message information, in an exemplary embodiment of the present application, as shown in FIG1 and FIG3 , the encrypted search method may include:

[0093] In step S210 , the user device 200 obtains query information from the user.

[0094] The query information may include a specific message that the user wants to search for. For example, when the user wants to search for a message containing "Hangzhou", "Hangzhou" may be directly provided to the user device 200 as query information.

[0095] As shown in FIG1 and FIG3 , the encrypted search method may further include:

[0096] In step S220 , the user device 200 encrypts the query information using multiple public keys of the user to generate multiple pieces of encrypted query information, and transmits the multiple pieces of encrypted query information to the search service device 100 .

[0097] The multiple public keys here encompass all possible public keys that user device 200 may use to encrypt message information. Since the encrypted message information stored in search service device 100 is encrypted using only one of the multiple public keys, if the user's query information is encrypted using a different public key than the aforementioned public key, it is obviously impossible to search for the corresponding encrypted message information based on the encrypted query information. Therefore, to avoid omissions in the search due to different public keys, the query information can be encrypted using all possible public keys of the user to generate all possible encrypted query information, thereby ensuring that subsequent queries or searches are comprehensive and complete.

[0098] A user's multiple public keys can be generated based on a variety of encryption algorithms. In a specific example, multiple public keys can be generated based on a double ratchet algorithm. The generated keys (including matching public and private key pairs) can rotate and change continuously like a "ratchet", so that the encrypted information also changes continuously. The "ratchet" can only rotate in one direction and cannot rotate back. The two "ratchets" can well ensure the forward security (FS) and backward security (PCS) of the communication. Among them, the number of key pairs M generated based on the double ratchet algorithm can satisfy the following relationship: M = M1*M2, M1 is the number of "teeth" of the first "ratchet", and M2 is the number of "teeth" of the second "ratchet".

[0099] In addition, considering that in the encrypted search method of the present application, it is necessary to use all possible public keys to encrypt the query information, and it involves operations such as the transmission of all possible encrypted query information, in order to rationally utilize resources such as transmission and storage and avoid excessive resource occupation, the number of key groups used can be appropriately reduced. For example, in conventional end-to-end encrypted communications, the number of key groups generated based on the double ratchet algorithm can be on the order of ten thousand groups to ensure good communication security. However, in some embodiments of the present application, the number of key groups generated based on the double ratchet algorithm can be around one thousand groups, thereby helping to achieve efficient search while ensuring relative communication security.

[0100] In some embodiments, especially when the user device 200 adopts a multi-processor architecture, the user device 200 can encrypt the query information using multiple public keys in parallel, thereby improving throughput and search efficiency.

[0101] In some embodiments, to further improve the efficiency of transmitting encrypted query information from the user device 200 to the search service device 100 and reduce the required transmission bandwidth, the user device 200 transmitting multiple pieces of encrypted query information to the search service device 100 may include: the user device 200 merging the multiple pieces of encrypted query information; the user device 200 compressing the merged multiple pieces of encrypted query information to generate encrypted query data; and the user device 200 transmitting the encrypted query data to the search service device 100. Here, the multiple pieces of encrypted query information may be compressed using an appropriate compression algorithm based on the characteristics of the generated multiple pieces of encrypted query information to reduce the amount of data to be transmitted.

[0102] In a specific example, assume that user device 200 is capable of providing 1000 sets of keys for message encryption, with the public keys denoted as S1, S2, ..., S1000. The user provides a plaintext query message "Hangzhou." User device 200 can then use these 1000 public keys to encrypt "Hangzhou," generating a total of 1000 encrypted query messages, denoted as C1, C2, ..., C1000. Here, "Hangzhou" contains two characters. Accordingly, if each encrypted character is 4 bytes, the size of each encrypted query message Cj is 4 * 2 = 8 bytes. As can be seen, if these 1000 encrypted query messages are not compressed, a total of 8 * 1000 = 8 kilobytes of data will be generated for transmission, which can significantly impact transmission delay. To address this issue, in this specific example, a variable-length encoding compression algorithm can be used to compress the multiple encrypted query messages. This algorithm can reduce the number of bytes occupied by the same data during network transmission by an average of approximately 30%.

[0103] Specifically, in the variable-length coding compression algorithm, the most significant bit is set for each byte except the last byte. A most significant bit of 1 indicates that the following bits still belong to the current byte, and a most significant bit of 0 indicates that this is the last bit of the current byte. The lower 7 bits of each byte are represented by a binary complement that stores numbers in groups of 7 bits, with the least significant group first, or the least significant byte first, that is, the bytes after variable-length coding are arranged in little-endian order. In the specific example of this application, each character can be represented by 4 bytes, that is, a 32-bit integer. For example, for the integer "2,023,666", its binary representation is 00000000 00011110 1110000011110010. After variable-length coding compression in the above manner, it can be converted to "11110010 1100000 1 011110 11". In this way, the integer originally occupying 4 bytes is compressed to 3 bytes. It is understandable that smaller integers can be compressed more. For example, the integer "8,522" has a binary representation of "00000000 00000000 00100001 01001010". Since the first two bytes are both "0", they can be discarded as invalid bytes. Ultimately, the integer can be compressed to 2 bytes, and its compression ratio can reach 200%.

[0104] It is understandable that in other embodiments, for example, when the transmission bandwidth is sufficient, the user device 200 may also directly transmit multiple encrypted query information to the search service device 100 without compression to simplify the calculation process.

[0105] Corresponding to the steps in the encrypted search method performed by the user device 200 described above, as shown in FIG1 and FIG2 , the encrypted search method performed at the search service device 100 may include:

[0106] In step S110 , the search service device 100 obtains a plurality of encrypted query information from the user device 200 .

[0107] In some embodiments, when the user device 200 transmits encrypted query data generated based on multiple encrypted query information that has been merged and compressed, the search service device 100 obtaining multiple encrypted query information from the user device 200 may include: the search service device 100 obtaining the encrypted query data from the user device 200; the search service device 100 decompressing the encrypted query data; and the search service device 100 decompressing the decompressed encrypted query data to obtain multiple encrypted query information. In other words, the search service device 100 may format the received encrypted query data according to the above steps for subsequent query or search. It is understandable that the decompression algorithm executed by the search service device 100 corresponds to the compression algorithm executed by the user device 200 to restore the correct encrypted query information.

[0108] Furthermore, as shown in FIG1 and FIG2 , the encrypted search method may further include:

[0109] In step S120 , the search service device 100 searches for hit message information that matches the plurality of encrypted query information based on a preset index to generate search results.

[0110] In this document, message information may also be referred to as a chat record or document, and one message information corresponds to one chat record or one document. The preset index may be established by the search service device 100 based on the encrypted message information obtained from the message service device 300. Specifically, as shown in FIG1 and FIG4 , the encrypted search method performed at the message service device 300 may include:

[0111] Step S310: The message service device 300 obtains the encrypted message information from the user device 200; and

[0112] In step S320 , the message service device 300 transmits the encrypted message information to the search service device 100 .

[0113] That is, during the communication process, the message service device 300 not only transmits the encrypted message information from the user device 200 to another user device to achieve end-to-end communication, but also simultaneously transmits the encrypted message information to the search service device 100 so that the search service device 100 can establish a preset index. As described above, the transmitted encrypted message information can be in data blocks as the smallest unit.

[0114] In some embodiments, the preset index may include an inverted index. As shown in FIG1 , the search service device 100 may establish a preset index based on encrypted message information obtained from the message service device 300, which may include: the search service device 100 obtaining the encrypted message information (or the encrypted message shown in FIG1 ) from the message service device 300; the search service device 100 determining each data block in the encrypted message information and, if the data block contains padding bytes, removing the padding bytes to extract valid message information from the encrypted message information; the search service device 100 performing feature extraction on the valid message information; and the search service device 100 establishing an inverted index based on the extracted features, wherein the inverted index is configured to indicate the encrypted message information where each character is located.

[0115] Among them, by determining the data block and removing possible padding bytes, valid message information is extracted from the encrypted message information, or the encrypted message information is formatted, the search service device 100 can extract the inverted index features without decrypting the encrypted message information, thereby being able to effectively search while ensuring communication security.

[0116] Further, in some embodiments, as shown in Figure 5, the extracted features may include at least one of numerical features and character features, wherein the numerical features may be configured to indicate the number of characters in the valid message information, and the character features may be configured to indicate the byte boundaries corresponding to each character in the valid message information.

[0117] Typically, when establishing an inverted index based on plaintext message information, the message information can be segmented and an inverted index can be established based on the segmentation. However, in an exemplary embodiment of the present application, the inverted index is established based on the encrypted message information in ciphertext. Since the meaning of each character contained in the encrypted message information cannot be directly derived, it is impossible to effectively segment the encrypted message information. To solve this problem, in an exemplary embodiment of the present application, an inverted index can be established based on characters. In other words, features can be extracted for each character contained in the encrypted message information, and an inverted index can be established based on the extracted features. In this case, it is not necessary to obtain the plaintext characters corresponding to the encrypted message information. Instead, feature extraction can be used to determine the number of characters in the encrypted message information, the byte boundaries of each character, etc., in order to establish an inverted index. The search service device 100 can perform retrieval based on a digital array or based on character information. In order to improve the recall rate of the search, both digital features and character features can be extracted simultaneously when establishing the inverted index.

[0118] The search results may be configured to indicate the hit message information (chat log or document) that was queried or to indicate that no hit message information was found. In some embodiments, in order to reduce the size of the search results to be transmitted to save resources such as transmission bandwidth, the search results may only include at least one of the identification mark, index information, and summary information of the hit message information. Here, the identification mark, index information, or summary information may each uniquely indicate the hit message information so that the hit message information itself can be obtained based on the search results. Among them, the identification mark may be a unique number of the message information, the index information may include the address of the message information, etc., and the summary information may include a summary of the message information, a hash value, etc.

[0119] In some embodiments, the search service device 100 searches for hit message information that matches multiple encrypted query information based on a preset index to generate search results, which may include: the search service device 100 obtains identification marks of the hit message information that matches the multiple encrypted query information based on the preset index; the search service device 100 deduplicates the retrieved hit message information according to the identification marks; and the search service device 100 sorts the deduplicated hit message information based on a preset sorting algorithm to generate search results, wherein the hit message information indicated by the search results is sorted according to the degree of matching with the query information. The search service device 100 may include a search engine to perform matching or recall of the encrypted query information and the encrypted message information, thereby obtaining corresponding search or query results.

[0120] In a specific example, as shown in FIG6 , it is assumed that the user provides query information (Query), and the user has a total of 1000 sets of keys. Thus, the Query can be encrypted using 1000 public keys to obtain corresponding 1000 encrypted query information, namely, encrypted Query1, encrypted Query2, ..., encrypted Query1000. Then, these 1000 encrypted query information can be transmitted to the search service device 100, and the search service device 100 can obtain the identification mark of the hit message information that matches the 1000 encrypted query information based on the inverted index pre-set therein. In the specific example shown in FIG6 , the hit message information that matches the encrypted Query1 includes Query1 document 1 and Query1 document 2, the hit message information that matches the encrypted Query2 includes Query2 document 1, ..., and the hit message information that matches the encrypted Query999 includes Query999 document 1, Query999 document 2, and Query999 document 3. In addition, it is determined through the query that there is no hit message information that matches the encrypted Query1000.

[0121] Furthermore, all of the aforementioned hit message information, namely, Query1 Document 1, Query1 Document 2, Query2 Document 1, ..., Query999 Document 1, Query999 Document 2, and Query999 Document 3, can be deduplicated. For example, when there are multiple hit message information with the same identification flag, only one of the hit message information is retained. This deduplication operation can effectively reduce the amount of data required for subsequent processing, thereby reducing processing difficulty and improving processing efficiency.

[0122] In some embodiments, the hit message information after deduplication can be sorted based on the IDF algorithm. Specifically, the search service device 100 sorts the hit message information after deduplication based on the preset sorting algorithm, which may include: for each hit message information in the hit message information after deduplication, calculating the score score (D, Q) of the hit message information according to the following formula: n(q i )=∑ 0≤j<M n(c ij ), (3)

[0123] Among them, IDF(q i ) is the i-th character q in the query information in the search service device 100 i The inverse document frequency, f(q i ,D) is the i-th character q in the query information i The word frequency in the hit message information, k1 is the first parameter, b is the second parameter, |D| is the total number of characters contained in the hit message information, avgdl is the average number of characters of all message information in the search service device 100, N is the total number of message information in the search service device 100, n(q i ) contains the i-th character q in the query information i The total number of message information, M is the total number of public keys, c ij To query the i-th character q in the message using the j-th public key i The ciphertext characters generated by encryption. In a specific example, the first parameter k1∈[1.2,2.0], and the second parameter b=0.75. Here, k1 and b can be hyperparameters, which are generally related to experience. In addition, it is understood that the i and j here are counted from zero.

[0124] It should be noted that the difference between the preset sorting algorithm in this application and the sorting algorithm based on plain text is that due to the existence of multiple public keys, the same plain text character corresponds to multiple different cipher text characters. Therefore, when performing word frequency statistics, it is necessary to count the word frequencies of all cipher text characters corresponding to the same plain text character, and sum the word frequencies of these cipher text characters to obtain the word frequency of the corresponding plain text character, that is, use the above formula (3) to calculate the character q i In addition, for the word frequency f(q i ,D), the corresponding hit message information is encrypted using only one of the multiple public keys. For example, the jth public key is used for encryption, then f(q i ,D)=f(c ij ,E[j]), where E[j] is the encrypted message information generated by encrypting the hit message information with the jth public key.

[0125] Then, the search service device 100 sorts the deduplicated hit message information based on a preset sorting algorithm, and further includes sorting the deduplicated hit message information in descending order of scores of the hit message information.

[0126] It is understandable that in some other embodiments, other sorting algorithms may also be used to sort the hit message information, such as the TF-IDF algorithm or the BM25 ranking algorithm, etc., which are not limited here.

[0127] Returning to FIG. 1 and FIG. 2 , in an exemplary embodiment of the present application, the encrypted search method may further include:

[0128] Step S130 : The search service device 100 returns the search results to the user device 200 .

[0129] As described above, the search results are configured to indicate the hit message information that was found or to indicate that no hit message information was found. In some embodiments, when the search results indicate the hit message information that was found, the search results may include only at least one of the identification mark, index information, and summary information of the hit message information, rather than the hit message information itself, thereby effectively reducing the amount of data to be transmitted, reducing the use of transmission resources, and improving search efficiency.

[0130] Corresponding to the above step S130 performed by the search service device 100, as shown in FIG1 and FIG3 , the encrypted search method performed at the user device 200 may include:

[0131] In step S230 , the user device 200 obtains search results from the search service device 100 , and outputs hit message information according to the search results if there is hit message information.

[0132] Specifically, the user device 200 obtains the search results from the search service device 100, and outputs the hit message information according to the search results when there is hit message information, which may include: when the search results indicate that the hit message information is queried, the user device 200 determines whether there is hit message information locally; if so, the user device 200 outputs the hit message information; if not, the user device 200 passes the search results to the message service device 300, obtains the encrypted message information corresponding to the search results from the message service device 300, and decrypts the encrypted message information to generate and output the hit message information.

[0133] In addition, in some embodiments, when the search results indicate that no hit message information is found, the user device 200 may not output any content or may output a prompt message such as "no search results found".

[0134] Corresponding to the above step of user device 200 transmitting search results to message service device 300 and obtaining encrypted message information corresponding to the search results from message service device 300, as shown in FIG1 , the encrypted search method may further include: upon obtaining search results from user device 200, message service device 300 transmitting the encrypted message information corresponding to the search results to user device 200. In a specific example, message service device 300 may obtain the corresponding encrypted message information based on an identification flag, index information, or summary information of the hit message information contained in the search results.

[0135] The present application also proposes an encrypted search system, which can be used to implement the encrypted search method described above. In an exemplary embodiment of the present application, as shown in Figures 1 and 7, the encrypted search system may include a user device 200, a message service device 300, and a search service device 100. Among them, the user device 200 can be configured to obtain at least one of message information and query information from the user, encrypt the message information using a current public key among the user's multiple public keys to generate encrypted message information, and encrypt the query information using multiple public keys to generate multiple encrypted query information. The message service device 300 can be communicatively connected to the user device 100, and the message service device 300 can be configured to obtain encrypted message information from the user device. The search service device 100 can be communicatively connected to the user device 200 and the message service device 300, and the search service device 100 can be configured to obtain encrypted message information from the message service device 300 and establish a preset index based on the encrypted message information. The search service device 100 can also be configured to obtain multiple encrypted query information from the user device 200, query hit message information that matches the multiple encrypted query information based on the preset index to generate search results, and return the search results to the user device 200, so that the user device 200 outputs hit message information according to the search results if there is hit message information, wherein the search results can be configured to indicate the hit message information that was queried or to indicate that no hit message information was queried.

[0136] In addition, the present application also proposes a search service device. As shown in Figure 7, the search service device 100 may include a first memory 191 and a first processor 192. Instructions are stored on the first memory 191. When the instructions are executed by the first processor 192, the steps of the encrypted search method performed by the search service device 100 as described above can be implemented.

[0137] The present application also proposes a user device 200, as shown in Figure 7, the user device 200 may include a second memory 291 and a second processor 292, and the second memory 291 stores instructions. When the instructions are executed by the second processor 292, the steps of the encryption search method performed by the user device 200 as described above can be implemented.

[0138] The present application also proposes a message service device 300, as shown in Figure 7, the message service device 300 may include a third memory 391 and a third processor 392, and the third memory 391 stores instructions. When the instructions are executed by the third processor 392, the steps of the encryption search method performed by the message service device 300 as described above can be implemented.

[0139] Among them, any one of the first processor 192, the second processor 292 and the third processor 392 can perform various actions and processes according to the instructions stored in the corresponding memory. Specifically, the processor can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can be an X86 architecture or an ARM architecture, etc.

[0140] Any one of the first memory 191, the second memory 291, and the third memory 391 stores executable instructions that, when executed by the corresponding processor, implement the steps of the encryption search method described above. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that memory of the methods described herein is intended to comprise, but not be limited to, these and any other suitable types of memory.

[0141] The present application also proposes a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the steps of the encryption search method described above can be implemented.

[0142] Similarly, the computer-readable storage medium in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memory. It should be noted that the computer-readable storage medium described herein is intended to include but is not limited to these and any other suitable types of memory.

[0143] The present application also proposes a computer program product, which includes computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the encryption search method described above can be implemented.

[0144] The instructions may be any set of instructions to be executed directly by one or more processors, such as machine code, or any set of instructions to be executed indirectly, such as a script. The terms "instructions," "application," "process," "steps," and "program" are used interchangeably herein. The instructions may be stored in object code format for direct processing by one or more processors, or as a script or collection of independent source code modules in any other computer language, including those interpreted on demand or compiled in advance. The instructions may include instructions that cause one or more processors to act as the various neural networks herein. The functions, methods, and routines of the instructions are explained in more detail elsewhere herein.

[0145] The technical solution of the present application can realize encrypted search of encrypted message information on the service device under the premise that the privacy security of the user is guaranteed by the encryption algorithm. For example, all message information (or chat records) between two users or multiple user groups can be stored in the message service device in the form of encrypted message information, or stored in the search service device in the form of a preset index such as an inverted index. In addition, the service device cannot obtain the user's key. In this way, the service device will not be able to obtain message information in plain text, thereby ensuring the security of communication. At the same time, based on the encrypted search scheme described above, whether it is the user who originally participated in the chat or the user who newly joined the chat, they can search the historical message information to obtain the desired data, get relevant recommendations, or understand the active status of other users participating in the chat, etc., which greatly facilitates users to use communication products based on the encrypted search scheme of the present application and improves the user experience. Moreover, in the encrypted search scheme of the present application, by compressing multiple encrypted query information and / or by returning search results that uniquely indicate the hit message information instead of returning the hit message information itself, it is possible to efficiently perform encrypted searches without increasing the storage capacity (including memory and hard disk storage, etc.), CPU time or workload of the message service device, thereby reducing the bandwidth required for transmission and the transmission delay time. In other words, based on the encrypted search scheme of the present application, there is no need to perform operations such as recalculating ciphertext in the message service device, and only a small amount of intranet bandwidth is required to transmit search-related data. In addition, in the technical solution of the present application, preset indexes such as inverted indexes can be established based on characters, thereby solving problems related to word segmentation and indexing, so that the search service device can smoothly recall search results for user query requests based on preset indexes at the character level. In addition, the present application also makes corresponding improvements to the sorting of search results based on the characteristics of encrypted search, so that it can accurately restore sorting results consistent with plaintext-based searches.

[0146] The words "left," "right," "front," "back," "top," "bottom," "up," "down," "high," "low," and the like, if any, in the specification and claims, are used for descriptive purposes and are not necessarily intended to describe invariant relative positions. It should be understood that the words so used are interchangeable under appropriate circumstances, such that the embodiments of the present application described herein, for example, are capable of operation in orientations other than those shown or otherwise described herein. For example, when the device in the drawings is turned over, features previously described as "above" other features could now be described as "below" the other features. The device can also be otherwise oriented (rotated 90 degrees or in other orientations), and relative spatial relationships would be interpreted accordingly.

[0147] In the specification and claims, when an element is referred to as being "on," "attached," "connected," "coupled," or "in contact with," etc., another element, the element may be directly on, directly attached, directly connected, directly coupled, or directly in contact with the other element, or one or more intervening elements may be present. In contrast, when an element is referred to as being "directly" "on," "directly attached," "directly connected," "directly coupled," or "in direct contact with" another element, there will be no intervening elements. In the specification and claims, when a feature is arranged "adjacent" to another feature, it may mean that the feature has a portion that overlaps with the adjacent feature or a portion that is located above or below the adjacent feature.

[0148] As used herein, the word "exemplary" means "serving as an example, instance, or illustration," rather than as a "model" to be precisely copied. Any implementation described as exemplary herein is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, this application is not to be bound by any expressed or implied theory presented in the technical field, background, summary, or detailed description.

[0149] As used herein, the term "substantially" is intended to encompass any minor variations due to design or manufacturing imperfections, device or component tolerances, environmental influences, and / or other factors. The term "substantially" also allows for deviations from a perfect or ideal condition due to parasitic effects, noise, and other practical considerations that may be present in actual implementations.

[0150] Additionally, terms such as "first," "second," and the like may also be used herein for reference purposes only and are not intended to be limiting. For example, the terms "first," "second," and other numerical terms referring to structures or elements do not imply a sequence or order unless the context clearly indicates otherwise.

[0151] It should also be understood that when the term “include / comprises” is used in this document, it indicates the presence of the specified features, integers, steps, operations, units and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, units and / or components and / or their combinations.

[0152] In this application, the term "provide" is used in a broad sense to cover all ways of obtaining an object, and thus "providing an object" includes but is not limited to "purchasing", "preparing / manufacturing", "arranging / setting up", "installing / assembling", and / or "ordering" an object, etc.

[0153] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0154] Those skilled in the art will appreciate that the boundaries between the above-mentioned operations are merely illustrative. Multiple operations can be combined into a single operation, a single operation can be distributed among additional operations, and operations can be performed at least partially overlapping in time. Moreover, alternative embodiments can include multiple instances of a particular operation, and the order of operations can be changed in various other embodiments. However, other modifications, variations, and replacements are also possible. Aspects and elements of all embodiments disclosed above can be combined in any manner and / or in combination with aspects or elements of other embodiments to provide multiple additional embodiments. Therefore, this specification and the accompanying drawings should be regarded as illustrative, not restrictive.

[0155] Although some specific embodiments of the present application have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present application. The various embodiments disclosed herein may be combined in any manner without departing from the spirit and scope of the present application. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present application. The scope of the present application is defined by the appended claims.

Claims

1. An encrypted search method, It is characterized in that The encryption search method comprises: The search service device obtains multiple pieces of encrypted query information from the user device, wherein the multiple pieces of encrypted query information are generated by encrypting the same piece of query information from the user using multiple public keys of the user, and the multiple public keys include all public keys that can be used to encrypt message information of the user; The search service device searches for hit message information matching the multiple pieces of encrypted query information based on a preset index to generate search results, wherein the preset index is established by the search service device according to encrypted message information obtained from a message service device, the encrypted message information is generated by encrypting message information from the user using a corresponding one of the multiple public keys, and the search result is configured to indicate the hit message information that has been queried or to indicate that no hit message information has been queried; and The search service device returns the search result to the user device.

2. The encrypted search method according to claim 1, It is characterized in that The search service device obtains multiple pieces of encrypted query information from the user device including: The search service device acquires encrypted query data from the user device, wherein the encrypted query data is generated by merging and compressing the multiple pieces of encrypted query information; The search service device decompresses the encrypted query data; and The search service device decomposes the decompressed encrypted query data to obtain the plurality of encrypted query information.

3. The encrypted search method according to claim 1, It is characterized in that The preset index includes an inverted index.

4. The encrypted search method according to claim 3, It is characterized in that The search service device establishing the preset index according to the encrypted message information obtained from the message service device includes: The search service device obtains encrypted message information from the message service device, wherein the encrypted message information is composed of one or more data blocks, and each of the one or more data blocks has the same number of bytes; The search service device determines each data block in the encrypted message information, and removes the padding bytes when the data block contains padding bytes, so as to extract valid message information in the encrypted message information; The search service device extracts features from the valid message information; and The search service device establishes an inverted index based on the extracted features, wherein the inverted index is configured to indicate the encrypted message information where each character is located.

5. The encrypted search method according to claim 4, It is characterized in that The extracted features include at least one of the following: a numeric feature configured to indicate the number of characters in the valid message information; and A character feature is configured to indicate a byte boundary corresponding to each character in the valid message information.

6. The encrypted search method according to claim 1, It is characterized in that The search service device searches for hit message information matching the plurality of encrypted query information based on a preset index to generate search results including: The search service device acquires, based on the preset index, identification marks of hit message information matching the plurality of encrypted query information, wherein the identification marks are configured to uniquely indicate corresponding message information; The search service device removes duplicates from the queried hit message information according to the identification mark; and The search service device sorts the deduplicated hit message information based on a preset sorting algorithm to generate the search result, wherein the hit message information indicated by the search result is sorted according to the degree of matching with the query information.

7. The encrypted search method according to claim 6, It is characterized in that The search service device sorts the hit message information after deduplication based on a preset sorting algorithm, including: For each hit message in the hit message information after deduplication, perform the following operations respectively: The score (D, Q) of the hit message information is calculated according to the following formula: n(q i )=∑ 0≤j<M n(c ij ), Among them, IDF(q i ) is the i-th character q in the query information contained in the search service device i The inverse document frequency, f(q i , D) is the i-th character q in the query information i The frequency of words appearing in the hit message information, k 1 is the first parameter, b is the second parameter, |D| is the total number of characters contained in the hit message information, avgdl is the average number of characters of all message information in the search service device, N is the total number of message information in the search service device, n(q i ) is the i-th character q in the query information i The total number of message information, M is the total number of public keys, c ij To use the jth public key to query the i-th character q in the query information i the ciphertext characters produced by the encryption; and The hit message information after deduplication is sorted in descending order of the scores of the hit message information.

8. The encrypted search method according to claim 7, It is characterized in that The first parameter k 1 ∈[1.2,2.0], and the second parameter b=0.

75.

9. The encrypted search method according to claim 1, It is characterized in that The search result includes at least one of an identification mark, index information and summary information of the hit message information, wherein the identification mark, index information and summary information are configured to uniquely indicate the corresponding message information.

10. A search service device, It is characterized in that The search service device includes a first memory and a first processor, wherein the first memory stores instructions, and when the instructions are executed by the first processor, the steps of the encryption search method according to any one of claims 1 to 9 are implemented.

11. An encrypted search method, It is characterized in that The encryption search method comprises: The user device obtains query information from the user; The user device encrypts the same query information using multiple public keys of the user to generate multiple encrypted query information, and transmits the multiple encrypted query information to the search service device, wherein the multiple public keys include all public keys that can be used to encrypt the user's message information; and The user device obtains search results from the search service device, and outputs hit message information according to the search results if there is hit message information, wherein the search results are configured to indicate the queried hit message information or to indicate that no hit message information is queried.

12. The encrypted search method according to claim 11, It is characterized in that The encrypted search method further comprises: The user equipment obtains message information from the user; The user equipment encrypts the message information using a current public key of the multiple public keys to generate encrypted message information, wherein the encrypted message information is composed of one or more data blocks, and each of the one or more data blocks has the same number of bytes; and The user equipment transmits the encrypted message information to the message service equipment.

13. The encrypted search method according to claim 11, It is characterized in that The multiple public keys are generated based on a double ratchet algorithm.

14. The encrypted search method according to claim 11, It is characterized in that The user equipment encrypts the same query information respectively using the multiple public keys of the user in parallel.

15. The encrypted search method according to claim 11, It is characterized in that The user equipment transmitting the plurality of pieces of encrypted query information to the search service equipment comprises: The user equipment merges the multiple pieces of encrypted query information; The user equipment compresses the combined multiple pieces of encrypted query information to generate encrypted query data; and The user equipment transmits the encrypted query data to the search service equipment.

16. The encrypted search method according to claim 11, It is characterized in that The user device acquires search results from the search service device, and outputs hit message information according to the search results if there is hit message information, including: In a case where the search result indicates that the hit message information is queried, the user equipment determines whether the hit message information exists locally; If yes, the user equipment outputs the hit message information; If not, the user device transmits the search result to the message service device, obtains the encrypted message information corresponding to the search result from the message service device, and decrypts the encrypted message information to generate and output the hit message information.

17. A user device, It is characterized in that The user equipment includes a second memory and a second processor, and the second memory stores instructions. When the instructions are executed by the second processor, the steps of the encryption search method according to any one of claims 11 to 16 are implemented.

18. An encrypted search method, It is characterized in that The encryption search method comprises: The message service device obtains encrypted message information from the user device, wherein the encrypted message information is generated by encrypting the message information from the user using a current public key among multiple public keys of the user; and The message service device transmits the encrypted message information to the search service device, wherein the search service device is configured to obtain multiple encrypted query information from the user device, and to query hit message information matching the multiple encrypted query information based on a preset index to generate search results, the multiple encrypted query information are generated by encrypting the same query information from the user using the multiple public keys respectively, the multiple public keys include all public keys that can be used to encrypt the user's message information, and the search results are configured to indicate the hit message information that has been queried or to indicate that no hit message information has been queried.

19. The encrypted search method according to claim 18, It is characterized in that The encrypted search method further comprises: When the message service device obtains the search result from the user device, the encrypted message information corresponding to the search result is transmitted to the user device.

20. A message service device, It is characterized in that The message service device comprises a third memory and a third processor, wherein the third memory stores instructions, and when the instructions are executed by the third processor, the steps of the encryption search method according to any one of claims 18 to 19 are implemented.

21. An encrypted search system, It is characterized in that The encrypted search system comprises: A user device, the user device being configured to obtain at least one of message information and query information from a user, encrypt the message information using a current public key among a plurality of public keys of the user to generate encrypted message information, and encrypt the same query information using the plurality of public keys respectively to generate a plurality of encrypted query information, wherein the plurality of public keys include all public keys that can be used to encrypt the message information of the user; a message service device, the message service device being communicatively connected to the user device and configured to obtain encrypted message information from the user device; and A search service device, wherein the search service device is communicatively connected to the user device and the message service device, and the search service device is configured to obtain encrypted message information from the message service device and establish a preset index based on the encrypted message information. The search service device is also configured to obtain the multiple encrypted query information from the user device, query hit message information matching the multiple encrypted query information based on the preset index to generate search results, and return the search results to the user device, so that the user device outputs the hit message information according to the search results when there is hit message information, wherein the search result is configured to indicate the hit message information that has been queried or to indicate that no hit message information has been queried.

22. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the encryption search method according to any one of claims 1 to 9, 11 to 16 or 18 to 19 are implemented.

Citation Information

Patent Citations

  • Searchable encryption method and system capable of flexibly replacing ciphertexts, and computer equipment

    CN113626484A

  • Multi-keyword fuzzy ciphertext retrieval method and system

    CN114610843A

  • Encryption search method and encryption search system

    CN116305293A

  • Searchable encryption processing system and searchable encryption processing method

    US20160335450A1

  • Method and system for privacy based search

    US20210021576A1