A privacy-preserving Chinese text fuzzy search method
By adopting a method based on threshold privacy interrogation in privacy information retrieval technology, the problem of insufficient support for Chinese fuzzy search in the existing technology is solved, and a more flexible and efficient query process is achieved, while ensuring data privacy and security.
Patent Information
- Application Number
- CN202411187733.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing privacy information retrieval technology is difficult to support Chinese fuzzy search, resulting in limited performance in some application scenarios that require flexible search functions.
Using the technology based on threshold privacy interception, the query keywords are split into single-word sets and word segmentation sets, and the threshold values are set to optimize the threshold privacy interception of single-word and word segmentation sets, and finally the query results are obtained through priority algorithm sorting and random number protection.
It significantly improves the PIR system's ability to support fuzzy queries, enhances the flexibility and accuracy of queries, while maintaining advanced data privacy and security.
Smart Images

Figure CN119166688B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of privacy computing, and specifically discloses a privacy-protecting Chinese text fuzzy search method. Background Art
[0002] Privacy Information Retrieval (PIR), also known as "anonymous query", is an important branch of information security that focuses on protecting the privacy of users when performing data queries. The main goal of PIR is to retrieve information securely without revealing the content of the user's query. This is particularly important in fields such as medical, financial, and personal data.
[0003] In some text search scenarios, the querying party wants to hide its query request. For example, when retrieving public public opinion information, intelligence personnel do not want the service party to obtain their own search conditions; for another example, when querying threat intelligence, security personnel do not want the service party to understand the risk conditions of the query. In order to solve the above needs, PIR can obtain query matching information without leaking the querying party. The existing PIR solution is for precise queries, that is, it can only support information that is the same as the query keyword. However, common queries are usually fuzzy queries. For example, the queryer uses "Yangtze River*" to match all keywords starting with "Yangtze River" and output them in order of matching degree.
[0004] The technology of fuzzy search method is an important extension of traditional PIR technology. This method not only protects user privacy, but also allows more flexible queries, even if users are not completely sure about the information they want. In many cases, users may only remember part of the information or want to explore related information. Fuzzy search allows such non-precise queries, thereby better serving the actual needs of users. One of the key challenges in designing fuzzy search methods is to maintain high performance and privacy protection while providing flexibility. This involves complex algorithms and security protocols.
[0005] Therefore, there is a technical problem that needs to be solved urgently: how to improve the PIR system's support for fuzzy queries without sacrificing user privacy, and at the same time require that it can not only handle inaccurate or partial keyword queries, but also maintain data security and response efficiency. There are two solutions in the prior art:
[0006] (1) Perform precise matching based on the results of Chinese word segmentation: Chinese word segmentation technology refers to the technology of segmenting continuous Chinese text into words. Since Chinese text is a string without spaces, word segmentation becomes the first step to understand Chinese text. Existing Chinese word segmentation technologies mainly include dictionary-based, rule-based and statistical methods, as well as the recently emerging deep learning-based technology.
[0007] (2) Match the quantity according to the method of Chinese single characters, and then compare the continuity of the single characters.
[0008] The disadvantages of the above two schemes are poor performance. If the Chinese word segmentation scheme is adopted, since Chinese word segmentation includes various different word segmentation methods, it is necessary to traverse all word segmentation methods before performing accurate matching, and the number of matches may expand by an order of magnitude (10 times) or more; if the Chinese single character scheme is adopted, the matching space can be reduced, but it may cause misjudgment. The query condition and the retrieved content are both split into single characters, but there is a context relationship between Chinese characters. For example, "Chinese" and "in the text" are two completely different logics. Splitting single characters will inevitably increase the error rate of text search.
[0009] The present invention aims to solve several key technical problems in the existing privacy information retrieval (PIR) technology, especially for the significant limitations of traditional PIR protocols in supporting Chinese fuzzy search. The existing PIR protocols mainly have the following technical problems:
[0010] 1. Do not support fuzzy search: Traditional PIR protocols mainly support exact matching queries and lack support for fuzzy search. This limits the flexibility of the protocol in practical applications, especially when users cannot provide exact query keywords.
[0011] 2. Limited application scope: Due to the lack of support for Chinese fuzzy search, traditional PIR protocols are limited in many application scenarios that require more flexible search functions, such as in the fields of business intelligence, medical information retrieval, and academic research. Summary of the Invention
[0012] In order to solve the above technical problems existing in the prior art, the present invention proposes a privacy-preserving Chinese text fuzzy search method, including the following steps:
[0013] Step 1, subset sampling: The query party splits the query keyword into a single character set and a word segmentation set, and ignores the asterisk keyword "*". The data party splits each record text into a single character set and a word segmentation set;
[0014] Step 2, threshold privacy intersection optimization:
[0015] Step 2.1, perform threshold privacy intersection of the single character set, set a threshold value, filter out the record texts with empty results, and save the set number of the intersection of the record texts with non-empty results and the random number uniquely matching the query party's record text;
[0016] Step 2.2, perform threshold privacy intersection of the word segmentation set, set a threshold value, filter out the record texts with empty results, and save the set number of the intersection of the record texts with non-empty results and the random number uniquely matching the query party's record text;
[0017] Step 3, sorting the results: sorting the intersections obtained in step 2.1 and step 2.2 by a priority algorithm, wherein the input of the priority algorithm is the number of sets of intersections obtained in step 2.1 and the number of sets of intersections obtained in step 2.2;
[0018] Step 4, query results: According to the results sorted in step 3, the query party selects the display range, the data party displays the record text, and uses random numbers and the standard PIR algorithm to obtain the specific record text.
[0019] Furthermore, in step 1, the data cube pre-splits each record text into a single word set and a word segmentation set offline.
[0020] Furthermore, in step 2.1 and step 2.2, the threshold value is set equal to a fixed value.
[0021] Furthermore, in step 2.1 and step 2.2, a threshold value is set so that the threshold value is related to the length of the keyword.
[0022] Based on the existing PIR, the present invention realizes a fuzzy retrieval method for Chinese text by using a threshold privacy intersection-based technology, which has the following beneficial effects:
[0023] 1. Enhanced query flexibility and accuracy: By supporting fuzzy search, the present invention can significantly improve query flexibility. Users can search based on imprecise keywords or fuzzy conditions, thereby obtaining more extensive and relevant search results. This is particularly useful when processing complex or incomplete query requests, improving overall search efficiency and user experience.
[0024] 2. Maintain high-level data privacy and security: While improving functionality, the present invention still emphasizes data privacy and security protection. Even when conducting more complex fuzzy searches, the user's query content and personal data can be fully protected. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0026] In order to better understand the purpose, technical solution and function of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings, but the present invention can be implemented in a variety of different ways as defined and covered by the claims. The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0027] In the field of privacy computing technology, privacy intersection is a privacy computing technology and one of the most basic privacy computing primitives. It has been widely used, such as user alignment for federated learning. The following examples illustrate the functions it can achieve:
[0028] Alice has set A and Bob has set B. Alice and Bob execute a private intersection protocol, where one party obtains A∩B, the intersection of A and B, and cannot obtain any information other than the intersection.
[0029] In addition, threshold privacy intersection is based on the classic algorithm, adding threshold conditions to achieve the following functions:
[0030] Alice owns set A, Bob owns set B, and the number of elements in both sets is n;
[0031] Both parties agree on a threshold t;
[0032] Alice and Bob execute the private intersection protocol, and output A∩B only when |A∩B|≥nt, otherwise the output is empty.
[0033] It can be seen that the threshold privacy intersection adds a threshold requirement compared to the classic algorithm. The intersection is returned only when the number of intersections is greater than the threshold number, otherwise it returns empty.
[0034] The present invention improves the threshold privacy intersection and realizes the following functions:
[0035] Alice owns set A, Bob owns set B, and the number of elements in both sets is n;
[0036] Both parties agree on a threshold t;
[0037] Alice and Bob execute the privacy intersection protocol. Only when |A∩B|≥nt, they output |A∩B| and a random number that uniquely matches B's record, otherwise they output nothing.
[0038] Compared with the classic threshold privacy intersection method, only the number of sets of intersection is output here, not the set of data intersection. The improved method has a certain degree of security: first, the output intersection includes both set elements and the number of sets, which is less secure than only outputting the number; second, Party B records the matching random number, which is only maintained by Party B and is not disclosed to Party A. If you want to further improve security, you can change the random number regularly. In order to ensure security, this random number is required to uniquely correspond to set B.
[0039] The privacy - protecting Chinese text fuzzy search method proposed by the present invention involves two roles. One is the querying party, which inputs query keywords, including fuzzy queries. The other is the data party, which, without obtaining the query conditions, returns the query results that match them. If there are multiple results, they are output in the order of relevance.
[0040] Taking the query keyword "*Yangtze River Bridge*" as an example, it is expected to obtain all keywords containing "Yangtze River Bridge", such as "Nanjing Yangtze River Bridge", "Wuhan Yangtze River Bridge", and "Yangtze River Bridge Tunnel".
[0041] Suppose the data party has three records: "North Bus Station of Chongqing Fuling Yangtze River Bridge", "Nanbao Park of Nanjing Yangtze River Bridge", and "Wuhan Yangtze River Highway Bridge". The query keyword of the querying party is "*Yangtze River Bridge Park*".
[0042] As Figure 1 shown, the specific method of an embodiment of the present invention is divided into four stages:
[0043] (1) Subsampling
[0044] The querying party splits the query keyword Q into two sets: a single - character set and a word - segmentation set, ignoring the asterisk keyword "*". In fuzzy search, the asterisk "*" can replace all matching strings. For example, splitting "Yangtze River Bridge Park" gives:
[0045] Single - character set Q1: {"长", "江", "大", "桥", "公", "园"}
[0046] Word - segmentation set Q2: {"长江", "大桥", "长江大桥", "公园"}
[0047] Among them, the word - segmentation set is a common technique in natural language processing (NLP), and this method is applicable to other languages such as English.
[0048] The data party processes each record in the same way. For example, for the record "North Bus Station of Chongqing Fuling Yangtze River Bridge" D, two subsets are generated:
[0049] D1: {"重", "庆", "涪", "陵", "长", "江", "大", "桥", "北", "公", "交", "站"}
[0050] D2: {"重庆", "涪陵", "长江", "大桥", "长江大桥", "桥北", "公交", "公交站"}
[0051] For the record "Nanbao Park of Nanjing Yangtze River Bridge" M, two subsets are generated:
[0052] M1: {"南", "京", "长", "江", "大", "桥", "南", "堡", "公", "园"}
[0053] M2: {"Nanjing", "Yangtze River", "Bridge", "Yangtze River Bridge", "South of the Bridge", "South Fort", "Park"}
[0054] "Wuhan Yangtze River Highway Bridge" generates two subsets:
[0055] K1: {"Wu", "Han", "Chang", "Jiang", "Gong", "Lu", "Qiao"}
[0056] K2: {"Wuhan", "Yangtze River", "Highway", "Highway Bridge"}
[0057] When the number of records of the data party is large, the record text can be split into multiple subsets according to word segmentation in advance offline to improve the online query performance.
[0058] (2) Threshold Privacy Intersection Optimization
[0059] Since there are two sets for each record of the query keyword Q and the data party, this step is also divided into two parts:
[0060] (2.1) Threshold Privacy Intersection of Single-Character Sets
[0061] For example, set the threshold value. There are two ways to set the threshold value:
[0062] First, set the threshold value equal to a fixed value. For example, the threshold is set to 2;
[0063] Second, set the threshold value so that the threshold value is related to the length of the keyword. For example, the threshold value is half of the length of the query keyword.
[0064] Save the number [5] of the intersection result {"Chang", "Jiang", "Da", "Qiao", "Gong"} of record D, save the number [5] of the intersection result {"Chang", "Jiang", "Da", "Qiao", "Gong"} of record M, and save the number [3] of the intersection result {"Chang", "Jiang", "Gong"} of record K as the basis for subsequent similarity judgment.
[0065] It should be noted that the single-character set here is to improve the execution efficiency and filter out most of the irrelevant records;
[0066] After this step, the information of the query party is shown in Table 1, where rand1, rand2, and rand3 are random numbers.
[0067] Table 1
[0068] Word collection D D1_PSI=5 rand1 M M1_PSI=5 rand2 K K1_PSI=3 rand3
[0069] (2.2) Threshold Intersection of Segmented Sets
[0070] Through the records of the previous step, continue to perform the second step of finding the intersection of the word sets, set the threshold value in the same way, save the number of intersection results D {"Yangtze River" "Bridge" "Yangtze River Bridge"} [3], the number of intersection results M {"Yangtze River" "Bridge" "Yangtze River Bridge" "Park"} [4], and the number of intersection results K {"Yangtze River"} [1], as shown in Table 2.
[0071] Table 2
[0072] Word set D D2_PSI=3 M M2_PSI=4 K K2_PSI=1
[0073] (3) Result sorting
[0074] Design a priority algorithm. The input of the algorithm is the three intersection values of three records D, M, and K, namely the intersection value of the threshold privacy intersection of the single word set and the intersection value of the threshold intersection of the word segmentation set. The intersection value is the number of intersection sets. The function of the algorithm is to output the priority ranking of records D, M, and K. This algorithm can be simply designed as a weighted average, such as w1*D1_PSI+w2*D2_PSI, where w1 and w2 are the weights of single word matching and keyword matching respectively, and the final output result is the weighted average sorted from large to small.
[0075] (4) Query results
[0076] According to the results of the above sorting, the query party selects a certain range, such as the TOP20 display record values (M, D, K, ...). At this time, the specific record values are obtained through rand, rand2, and rand3 using the standard PIR algorithm.
[0077] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A privacy-protecting Chinese text fuzzy search method, characterized in that: The steps include: Step 1, subset sampling: The query party splits the query keyword into a single word set and a word segmentation set, and ignores the asterisk keyword "*". The data party splits each record text into a single word set and a word segmentation set; Step 2: Threshold privacy intersection optimization: Step 2.1, perform threshold privacy intersection of single word sets, set threshold value, filter out empty record texts, save the number of intersection sets of record texts whose results are not empty and the random number that uniquely matches the querying party record text; Step 2.2, perform threshold privacy intersection of the word segmentation set, set the threshold value, filter out the record text with empty result, save the number of intersection sets of the record text with non-empty result and the random number that uniquely matches the query party record text; Step 3, sorting the results: sorting the intersections obtained in step 2.1 and step 2.2 by a priority algorithm, wherein the input of the priority algorithm is the number of sets of intersections obtained in step 2.1 and the number of sets of intersections obtained in step 2.2; Step 4, query results: According to the results sorted in step 3, the query party selects the display range, the data party displays the record text, and uses random numbers and the standard PIR algorithm to obtain the specific record text.
2. A privacy-protecting Chinese text fuzzy search method according to claim 1, characterized in that: In step 1, the data cube pre-splits each record text into a single word set and a word segmentation set offline.
3. A privacy-protecting Chinese text fuzzy search method according to claim 1, characterized in that: In step 2.1 and step 2.2, the threshold value is set equal to a fixed value.
4. A privacy-protecting Chinese text fuzzy search method according to claim 1, characterized in that: In step 2.1 and step 2.2, the threshold value is set so that the threshold value is related to the length of the keyword.
Citation Information
Patent Citations
Fuzzy query method and device, multi-party security computing system and readable storage medium
CN115168455A
Full-text fuzzy search method for similar-form chinese characters in ciphertext domain
US20200372023A1