Query request processing method and apparatus
By determining whether there are data combinations containing only one entity in the query result set, it is possible to determine whether individual privacy has been leaked. If a leak is detected, de-identification processing is performed, which solves the problem of low availability of query results in the existing technology and improves the availability of query results while ensuring data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies offer limited availability of query results while ensuring data security.
By receiving user query requests and historical query results, it determines whether there is a data combination in the query result set that contains only one entity. If so, it is determined that individual privacy has been leaked, and the data is anonymized before responding; otherwise, the query result is responded to directly.
While ensuring data security, the availability of query results has been improved.
Smart Images

Figure CN114461689B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information processing technology, and in particular to a query request processing method and apparatus. Background Technology
[0002] Currently, to prevent privacy leaks in the response results when a query request is received, a method called "differential privacy" is used to prevent privacy leaks that could lead to differential attacks. Differential privacy adds Gaussian or Laplace noise to the database to ensure that the probability of two queries producing the same value is the same, making it impossible for attackers to find the remaining individual information.
[0003] In the process of developing this application, the inventors discovered that this "differential privacy" method provides low availability of query results while ensuring data security. Summary of the Invention
[0004] In view of this, this application provides a query request processing method and apparatus that can improve the availability of query results while ensuring data security.
[0005] To solve the above-mentioned technical problems, the technical solution of this application is implemented as follows:
[0006] In one embodiment, a query request processing method is provided, the method comprising:
[0007] Receive query requests sent by users;
[0008] Obtain the user's historical query results and the current query result corresponding to the query request;
[0009] If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0010] The current query results will be anonymized and then sent back to the user.
[0011] In another embodiment, a query request processing apparatus is provided, the apparatus comprising: a storage unit, a receiving unit, an acquiring unit, a determining unit, a processing unit, and a sending unit;
[0012] The storage unit is used to store the user's historical query results;
[0013] The receiving unit is used to receive query requests sent by users;
[0014] The acquisition unit is used to acquire historical query results for the user from the storage unit and acquire the current query result corresponding to the query request from the database.
[0015] The determining unit is configured to determine that the individual privacy of the entity has been leaked if the set of query results formed by the historical query results obtained by the obtaining unit and the current query results contains a combination of data containing only one entity.
[0016] The processing unit is used to de-identify the current query results obtained by the acquisition unit when the determining unit determines that the individual privacy of the entity has been leaked;
[0017] The sending unit is used to respond to the user with the current query result after it has been de-identified by the processing unit.
[0018] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the query request processing method.
[0019] In another embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the query request processing method.
[0020] As can be seen from the above technical solution, in the above embodiments, when a request is received from a user, the user's historical query results are combined with the current query results. If a combination of data containing only one entity exists, it indicates that the individual privacy of the entity has been leaked, and the query results corresponding to the current query request need to be anonymized. This solution only anonymizes the query results and responds when it is determined that the query results corresponding to the query request have leaked the individual privacy of the entity; otherwise, it directly responds with the queried data. Therefore, it can improve the usability of query results while ensuring data security. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the query request processing flow in Embodiment 1 of this application;
[0023] Figure 2 This is a schematic diagram illustrating the process of determining whether an entity's individual privacy has been leaked in an embodiment of this application;
[0024] Figure 3This is a schematic diagram of the query request processing flow in Embodiment 2 of this application;
[0025] Figure 4 This is a schematic diagram of the query request processing flow in Embodiment 3 of this application;
[0026] Figure 5 This is a schematic diagram of the query request processing flow in Embodiment 4 of this application;
[0027] Figure 6 This is a schematic diagram of query vector combination in Embodiment 5 of this application;
[0028] Figure 7 This is a schematic diagram of the query request processing device structure in an embodiment of this application;
[0029] Figure 8 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] The technical solution of the present invention will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0033] This application provides a query request processing method. When a user receives a request, the method combines the user's historical query results with the current query result for judgment. If a combination contains data of only one entity, it indicates that the entity's individual privacy has been leaked, and the query result corresponding to the current query request needs to be anonymized. Otherwise, the query result corresponding to the current query request is directly responded to the user. This scheme only anonymizes the query result and responds when it is determined that the query result corresponding to the query request leaks the entity's individual privacy; otherwise, it directly responds to the query result, eliminating the need to process the query result every time before responding. Therefore, it can improve the usability of query results while ensuring data security.
[0034] Definitions of terms used in the embodiments of this application:
[0035] Query vector: Suppose the database has 10 rows, and the operation involved in a group in a certain SQL query is R = r1 + 2r2 + 3r5, then R = [1, 2, 0, 0, 3, 0, 0, 0, 0, 0] T This is the query vector.
[0036] Query matrix: A matrix consisting of query vectors represented by each group in the SQL.
[0037] Combined query matrix: A matrix formed by concatenating multiple query matrices represented by SQL in the column direction.
[0038] Example 1
[0039] See Figure 1 , Figure 1 This is a schematic diagram of the request processing flow in Embodiment 1 of this application. The specific steps are as follows:
[0040] Step 101: Receive the query request sent by the user.
[0041] Step 102: Obtain the user's historical query results and the current query results corresponding to the query request.
[0042] In this embodiment, query requests are processed on a user-by-user basis. When a query request is received from a user, the stored historical query results for that user are obtained. Here, the historical query results are the query results that are responded to the user without any de-identification processing. If the query results are responded to the user after de-identification processing, they are not stored in the historical query results.
[0043] The current query result corresponding to the current query request is obtained directly from the database.
[0044] Step 103: If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0045] In this embodiment of the application, it is necessary to determine whether the current query result will lead to privacy leakage based on historical query results and the current query result.
[0046] The entities here can be various categories based on actual circumstances, such as brands, product categories, regions, etc., but are not limited to these categories. For example, if categorized by brand, then one brand corresponds to one entity.
[0047] In a specific implementation, this application embodiment can determine whether the individual privacy of an entity has been leaked by taking the rank of the matrix.
[0048] See Figure 2 , Figure 2 This is a flowchart illustrating the process of determining whether to leak an entity's individual privacy in an embodiment of this application. The specific steps are as follows:
[0049] Step 201: Generate a combined query matrix R corresponding to the query result set based on the query vector of the query result set composed of historical query results and current query results.
[0050] Taking brands as the entity as an example: Assume that all data corresponds to four brands, namely: a, b, c and d; the row number corresponding to the data of each brand is shown in Table 1, which shows the correspondence between row number and brand.
[0051] line number Physical store (brand) r0 a r1 b r2 a r3 b r4 c r5 a r6 d r7 c r8 d r9 c r10 c
[0052] Table 1
[0053] Suppose that the current query request is the second query request, and a first query request was made before it, and the query result corresponding to the first query request is: R0 = r0 + r1 + r5 + r6 + r7 + r10;
[0054] The query result corresponding to the second query request is: R1 = r0 + r1 + r4 + r6 + r7 + r10.
[0055] See Table 2, which shows the correspondence between the query results and row numbers. In Table 2, ri represents the row number. The query results R0 and R1 corresponding to the query request need to be represented as vectors of the same length as the database. If the query results include a certain row number, then the position of that row number in the vector is set to 1; otherwise, it is set to 0.
[0056] a b c d R0 R1 r0 1 0 0 0 1 1 r1 0 1 0 0 1 1 r2 1 0 0 0 0 0 r3 0 1 0 0 0 0 r4 0 0 1 0 0 1 r5 1 0 0 0 1 0 r6 0 0 0 1 1 1 r7 0 0 1 0 1 1 r8 0 0 0 1 0 1 r9 0 0 1 0 0 0 r10 0 0 1 0 1 1
[0057] Table 2
[0058] As shown in Table 2, judging by individual criteria, R0 involves data from four brands: a, b, c, and d. Judging by individual criteria, this query is safe.
[0059] R1 involves data from four brands: a, b, c, and d. Judging this query alone is also safe.
[0060] The query vectors R1 and R2 in Table 2 form a combined query matrix R, denoted as [R0 R1]. In the actual implementation, it can be determined in turn whether each brand has been leaked by an individual.
[0061] Step 202: Set all the values of the rows belonging to the entity in the combined query matrix R to 0 to obtain the processed combined query matrix A.
[0062] Let's take the following example to determine whether brand A has been leaked by an individual:
[0063] Change all the values of the rows belonging to brand a in R0 and R1 in Table 2 to 0 to obtain R'0 and R'1, as shown in the table below. The table below shows the vectors (R'0, R'1) corresponding to the processed query vectors R1 and R2. Table 3 shows the contents corresponding to vectors R'0 and R'1.
[0064] R’0 R’1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1
[0065] Table 3
[0066] In Table 3, the processed query vectors R'0 and R'1 form the processed combined query matrix A, denoted as [R'0, R'1].
[0067] Step 203: Determine whether the rank of matrix A is the same as the rank of matrix R. If yes, proceed to step 204; otherwise, proceed to step 205.
[0068] The rank of matrix A is rank(A); the rank of matrix R is rank(R).
[0069] As shown in Tables 2 and 3, Rank(A) is full rank, meaning that R'0 and R'1 are linearly independent. Thus, for R0 and R1, the linear combination of R0 and R1 cannot leave only rows belonging to 'a'. Therefore, no individual privacy was leaked for brand A.
[0070] Step 204: Determine that the individual privacy of the stated entity has not been disclosed. End this process.
[0071] Step 205: Determine that the individual privacy of the entity has been leaked.
[0072] This completes the determination of whether individual privacy has been leaked.
[0073] Step 104: After anonymizing the current query results, the system will respond to the user.
[0074] Desensitization processing can be implemented, but is not limited to, the following: adding noise, generating signals and sending them as signals, deleting empty data in response to retrieved query data, etc.
[0075] In this embodiment, upon receiving a request from a user, the system combines the user's historical query results with the current query results. If a combination exists containing only one entity, it indicates a leak of the entity's individual privacy, necessitating desensitization of the query results corresponding to the current query request. This approach only desensitizes the query results and responds when it determines that the query results corresponding to the query request leak the entity's individual privacy; otherwise, it directly responds with the retrieved data. Therefore, it improves the usability of query results while ensuring data security.
[0076] Example 2
[0077] See Figure 3 , Figure 3 This is a schematic diagram of the request processing flow in Embodiment 2 of this application. The specific steps are as follows:
[0078] Step 301: Receive the query request sent by the user.
[0079] Step 302: Determine whether the user is sending a query request for the first time. If yes, proceed to step 305; otherwise, proceed to step 303.
[0080] Step 303: Obtain the user's historical query results and the current query result corresponding to the query request.
[0081] In this embodiment, query requests are processed on a user-by-user basis. When a query request is received from a user, the stored historical query results for that user are obtained. Here, the historical query results are the query results that are responded to the user without any de-identification processing. If the query results are responded to the user after de-identification processing, they are not stored in the historical query results.
[0082] The current query result corresponding to the current query request is obtained directly from the database.
[0083] If this is not the first time a query has been initiated, this embodiment of the application needs to determine whether the current query result will lead to privacy leakage based on the current query result corresponding to the current query request and the stored historical query results.
[0084] Step 304: If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0085] In this embodiment, it is necessary to determine whether the current query result will lead to privacy leakage based on historical query results and the current query result. Step 307 is executed.
[0086] The entities here can be various categories based on actual circumstances, such as brands, product categories, regions, etc., but are not limited to these categories. For example, if categorized by brand, then one brand corresponds to one entity.
[0087] In a specific implementation, this application embodiment can determine whether the individual privacy of an entity has been leaked by taking the rank of the matrix.
[0088] Step 305: Obtain the current query result corresponding to the query request.
[0089] The current query result corresponding to the current query request is obtained directly from the database.
[0090] If this is the first query, the current query results are used to determine whether the results of the current query request will lead to a privacy leak.
[0091] Step 306: If it is determined that the current query result contains only the data of one entity, then it is determined that the individual privacy of the entity has been leaked.
[0092] Step 307: After de-identifying the current query result, the response is sent to the user.
[0093] Desensitization processing can be implemented, but is not limited to, the following: adding noise, generating signals and sending them as signals, deleting empty data in response to retrieved query data, etc.
[0094] In this embodiment, upon receiving a user's request, if historical query results exist, the user's historical query results are combined with the current query results. If a combination containing only data of a single entity exists, it indicates a leak of the entity's individual privacy. If no historical query results exist, the current query result is directly checked to see if it contains only data of a single entity, indicating a leak of the entity's individual privacy. If an entity's individual privacy is determined to have been leaked, the current query result corresponding to the current query request needs to be anonymized before responding. This solution only anonymizes the query result and responds when it is determined that the query result corresponding to the query request leaks the entity's individual privacy; otherwise, it directly responds with the retrieved data. Therefore, it can improve the usability of query results while ensuring data security.
[0095] Example 3
[0096] See Figure 4 , Figure 4This is a schematic diagram of the query request processing flow in Embodiment 3 of this application. The specific steps are as follows:
[0097] Step 401: Receive the query request sent by the user.
[0098] Step 402: Obtain the user's historical query results and the current query results corresponding to the query request.
[0099] In this embodiment, query requests are processed on a user-by-user basis. When a query request is received from a user, the stored historical query results for that user are obtained. Here, the historical query results are the query results that are responded to the user without any de-identification processing. If the query results are responded to the user after de-identification processing, they are not stored in the historical query results.
[0100] The current query result corresponding to the current query request is obtained directly from the database.
[0101] Step 403: If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0102] The entities here can be various categories based on actual circumstances, such as brands, product categories, regions, etc., but are not limited to these categories. For example, if categorized by brand, then one brand corresponds to one entity.
[0103] In a specific implementation, this application embodiment can determine whether the individual privacy of an entity has been leaked by taking the rank of the matrix.
[0104] The specific steps in this process to determine whether an entity's individual privacy has been compromised are as follows:
[0105] The first step is to generate a combined query matrix R corresponding to the query result set based on the query vector of the query result set composed of historical query results and current query results.
[0106] The second step is to set all the values of the rows belonging to the entity in the combined query matrix R to 0, thereby obtaining the processed combined query matrix A.
[0107] The third step is to determine whether the rank of matrix A is the same as the rank of matrix R. If they are the same, it is determined that the individual privacy of the entity has not been disclosed; otherwise, it is determined that the individual privacy of the entity has been disclosed.
[0108] This completes the determination of whether individual privacy has been leaked.
[0109] Step 404: After anonymizing the current query results, the system will respond to the user. This process ends.
[0110] Desensitization processing can be implemented, but is not limited to, the following: adding noise, generating signals and sending them as signals, deleting empty data in response to retrieved query data, etc.
[0111] Step 405: If it is determined that the individual privacy of all entities has not been disclosed, the current query result is responded to the user.
[0112] This embodiment provides, but is not limited to, the following two implementation methods for ensuring that the privacy of individuals without disclosing all entities is not compromised:
[0113] The first type:
[0114] If it is determined that the query set consisting of the historical query results and the current query results contains data for at least two entities, then it is determined that the individual privacy of all entities has not been leaked.
[0115] The second type:
[0116] For each entity, determine whether individual privacy has been compromised;
[0117] If it is determined that the individual privacy of all entities has not been disclosed, then it is determined that the individual privacy of all entities has not been disclosed.
[0118] In this embodiment, when a user receives a request, the system combines the user's historical query results with the current query result for judgment. If a combination contains data of only one entity, it indicates that the entity's individual privacy has been leaked, and the current query result corresponding to the current query request needs to be anonymized. Otherwise, the current query result corresponding to the current query request is directly responded to the user. This scheme only anonymizes the query result and responds when it is determined that the query result corresponding to the query request leaks the entity's individual privacy; otherwise, it directly responds to the query result, without needing to process the query result each time before responding. Therefore, it can improve the usability of query results while ensuring data security.
[0119] Example 4
[0120] See Figure 5 , Figure 5 This is a schematic diagram of the query request processing flow in Embodiment 4 of this application. The specific steps are as follows:
[0121] Step 501: Receive the query request sent by the user.
[0122] Step 502: Obtain the user's historical query results and the current query results corresponding to the query request.
[0123] In this embodiment, query requests are processed on a user-by-user basis. When a query request is received from a user, the stored historical query results for that user are obtained. Here, the historical query results are the query results that are responded to the user without any de-identification processing. If the query results are responded to the user after de-identification processing, they are not stored in the historical query results.
[0124] The current query result corresponding to the current query request is obtained directly from the database.
[0125] Step 503: If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0126] The entities here can be various categories based on actual circumstances, such as brands, product categories, regions, etc., but are not limited to these categories. For example, if categorized by brand, then one brand corresponds to one entity.
[0127] In a specific implementation, this application embodiment can determine whether the individual privacy of an entity has been leaked by taking the rank of the matrix.
[0128] The specific steps in this process to determine whether an entity's individual privacy has been compromised are as follows:
[0129] The first step is to generate a combined query matrix R corresponding to the query result set based on the query vector of the query result set composed of historical query results and current query results.
[0130] The second step is to set all the values of the rows belonging to the entity in the combined query matrix R to 0, thereby obtaining the processed combined query matrix A.
[0131] The third step is to determine whether the rank of matrix A is the same as the rank of matrix R. If they are the same, it is determined that the individual privacy of the entity has not been disclosed; otherwise, it is determined that the individual privacy of the entity has been disclosed.
[0132] This completes the determination of whether individual privacy has been leaked.
[0133] Step 504: After anonymizing the current query results, send a response to the user. End this process.
[0134] Desensitization processing can be implemented, but is not limited to, the following: adding noise, generating signals and sending them as signals, deleting empty data in response to retrieved query data, etc.
[0135] If it is determined that an entity's individual privacy has been leaked, the query results corresponding to the current query request will not be recorded in the user's query results.
[0136] Step 505: If it is determined that the individual privacy of all entities has not been leaked, the current query result is responded to the user; and the current query result is stored in the user's historical query results.
[0137] This embodiment provides, but is not limited to, the following two implementation methods for ensuring that the privacy of individuals without disclosing all entities is not compromised:
[0138] The first type:
[0139] If it is determined that the query set consisting of the historical query results and the current query results contains data for at least two entities, then it is determined that the individual privacy of all entities has not been leaked.
[0140] The second type:
[0141] For each entity, determine whether individual privacy has been compromised;
[0142] If it is determined that the individual privacy of all entities has not been disclosed, then it is determined that the individual privacy of all entities has not been disclosed.
[0143] Example 5
[0144] See Figure 6 , Figure 6 This is a schematic diagram of query vector combination in Embodiment 5 of this application. Figure 6 In the combined query matrix R = [R1, R2, R3, R4, R5], assume that the rank of R is rank(R) = 3, where R1, R2, and R3 are linearly independent, and R4 and R5 can be linearly expressed by R1, R2, and R3.
[0145] R4 and R5 can be represented linearly using R1, R2, and R3 as follows:
[0146] R4 = x1×R1 + x2×R2 + x3×R3;
[0147] R5 = y1×R1 + y2×R2 + y3×R3.
[0148] Assume the row corresponding to brand a is Figure 6 Within the dashed box, the solid box below the dashed box represents the matrix R' remaining after removing the rows for brand 'a'. Let the three bounding vectors R1, R2, and R3 in the remaining matrix R' be denoted as R'1, R'2, and R'3, respectively. Then the rank of matrix R' is:
[0149] rank(R')=rank([R'1,R'2,R'3,x1R'1+x2R'2+x3R'3,y1R'1+y2R'2+y3R'3])
[0150] =rank([R'1,R'2,R'3]).
[0151] This demonstrates that, regardless of whether it's in R or R', the latter two vectors R4 and R5 can always be represented by the preceding three vectors. Therefore, if R4 and R5, along with R1, R2, and R3, can leak privacy, then it must be the combination of R1, R2, and R3 that leaks privacy. Thus, R4 and R5 can be disregarded. Only the combination of R1, R2, and R3 needs to be considered to determine if it leaks privacy.
[0152] If rank([R'1,R'2,R'3]) = 3 is full rank, then rank(R') = rank(R). Therefore, R'1, R'2, R'3 and R1, R2, R3 are combined linearly in the same way, for example, R1, R2, R3 are combined linearly as k1R1 + k2R2 + k3R3, and R'1, R'2, R'3 are also combined linearly as k1R'1 + k2R'2 + k3R'3. k1R'1 + k2R'2 + k3R'3 is never a vector of all zeros. That is, the part of k1R1 + k2R2 + k3R3 within the large green box is never all zeros. This ensures that k1R1 + k2R2 + k3R3 contains not only brand 'a' but also other brands, without revealing the privacy of 'a'. This proves that rank(A) = rank(R) indicates that the combined query is safe for brand 'a'.
[0153] If rank([R'1,R'2,R'3]) is not full rank, then rank(R') ≠ rank(R). Assume R'1 and R'2 are linearly independent, and R'3 can be linearly represented by R'1 and R'2. Then k1R'1 + k2R'2 can eliminate R'1 to 0, meaning k1R' + k2R2 can eliminate the portion of R3 within the large bounding box to 0. Therefore, the portion of R3 within the imaginary box only contains brand 'a', thus revealing the privacy of 'a'. This proves that rank(A) ≠ rank(R), indicating that the combined query reveals brand 'a', making the entire combined query insecure.
[0154] The specific implementation of this application's embodiments relies on the following theory:
[0155] If an m-dimensional vector set R0, R1, ..., Rn is linearly independent, then adding t zeros at the same position in each vector or deleting t zeros at the same position will result in a new vector set that is also linearly independent.
[0156] If an m-dimensional vector group R0, R1, ..., Rn is linearly dependent, then adding t zeros at the same position in each vector or deleting t zeros at the same position will result in a new vector group that is also linearly dependent.
[0157] Therefore, the disclosure determination method of this application is an accurate and feasible determination method.
[0158] Based on the same inventive concept, this application also provides a query request processing device in its embodiments. See also Figure 7 , Figure 7 This is a schematic diagram of the query request processing device structure in an embodiment of this application. The device includes: a storage unit 701, a receiving unit 702, an acquiring unit 703, a determining unit 704, a processing unit 705, and a sending unit 706;
[0159] Storage unit 701 is used to store the user's historical query results;
[0160] The receiving unit 702 is used to receive query requests sent by users;
[0161] The acquisition unit 703 is used to acquire historical query results for the user from the storage unit 701 and acquire the current query result corresponding to the query request from the database.
[0162] The determining unit 704 is used to determine that the individual privacy of the entity has been leaked if there is a combination of data containing only one entity in the query result set formed by the historical query results obtained by the determining unit 703 and the current query results.
[0163] The processing unit 705 is used to perform desensitization processing on the current query results obtained by the acquisition unit 703 when the determination unit 704 determines that the individual privacy of the entity has been leaked;
[0164] The sending unit 706 is used to send the de-identified current query result from the processing unit 705 to the user.
[0165] In another embodiment,
[0166] The sending unit 706 is further configured to respond to the user with the current query result if the determining unit 704 determines that the individual privacy of all entities has not been disclosed.
[0167] In another embodiment,
[0168] The determining unit 704 is further configured to determine that the individual privacy of all entities has not been disclosed if it is determined that there is data of at least two entities in the query set formed by the historical query results and the current query results.
[0169] In another embodiment,
[0170] The determination unit 704 is further used to determine whether individual privacy has been leaked for each entity; if it is determined that the individual privacy of all entities has not been leaked, then it is determined that the individual privacy of all entities has not been leaked.
[0171] In another embodiment,
[0172] The storage unit 701 is further configured to record the current query result into the historical query result after the determining unit 704 determines that the individual privacy of all entities has not been disclosed.
[0173] In another embodiment,
[0174] The determining unit 704 is specifically used to determine whether there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results. This includes: generating a combined query matrix R corresponding to the query result set based on the query vector of the query result set formed by the historical query results and the current query results; setting all values of the rows belonging to the entity in the combined query matrix R to 0 to obtain the processed combined query matrix A; determining whether the rank of matrix A is the same as the rank of matrix R. If they are the same, it is determined that the individual privacy of the entity has not been leaked; otherwise, it is determined that the individual privacy of the entity has been leaked.
[0175] The units in the above embodiments can be integrated into one unit or deployed separately; they can be merged into one unit or further divided into multiple sub-units.
[0176] In another embodiment, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the query request processing method.
[0177] In another embodiment, a computer-readable storage medium is also provided, on which computer instructions are stored, which, when executed by a processor, can implement the steps in the query request processing method.
[0178] Figure 8 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the following methods:
[0179] Receive query requests sent by users;
[0180] Obtain the user's historical query results and the current query result corresponding to the query request;
[0181] If it is determined that there is a combination of data containing only one entity in the query result set formed by the historical query results and the current query results, then it is determined that the individual privacy of the entity has been leaked.
[0182] The current query results are anonymized and then sent back to the user.
[0183] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0184] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0185] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0186] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A query request processing method characterized by comprising: The method comprises: receiving a query request sent by a user; obtaining a historical query result of the user and a current query result corresponding to the query request; determining whether there is a combination of data containing only one entity in a query result set constituted by the historical query result and the current query result; if it is determined that there is a combination of data containing only one entity in the query result set constituted by the historical query result and the current query result, it is determined that the individual privacy of the entity is leaked; responding to the user with the current query result after desensitization processing; determining whether there is a combination of data containing only one entity in a query result set constituted by the historical query result and the current query result, comprising: generating a combination query matrix R corresponding to the query result set based on the query vector of the query result set constituted by the historical query result and the current query result; setting the values of the rows belonging to the entity in the combination query matrix R to 0 to obtain a processed combination query matrix A; determining whether the rank of the matrix A is the same as the rank of the matrix R, if yes, determining that the individual privacy of the entity is not leaked; otherwise, determining that the individual privacy of the entity is leaked.
2. The method of claim 1, wherein, The method further comprises: if it is determined that the individual privacy of all entities is not leaked, responding to the user with the current query result.
3. The method of claim 2, wherein, The determination that the individual privacy of all entities is not leaked comprises: if it is determined that there is data of at least two entities in the query set constituted by the historical query result and the current query result, it is determined that the individual privacy of all entities is not leaked.
4. The method of claim 2, wherein, The determination that the individual privacy of all entities is not leaked comprises: determining whether the individual privacy of each entity is leaked respectively; if it is determined that the individual privacy of all entities is not leaked, it is determined that the individual privacy of all entities is not leaked.
5. The method of claim 2, wherein, After the determination that the individual privacy of all entities is not leaked, the method further comprises: recording the current query result into the historical query result.
6. A query request processing apparatus characterized by comprising: The device comprises a storage unit, a receiving unit, an obtaining unit, a determining unit, a processing unit and a sending unit; The storage unit is configured to store the historical query result of a user; The receiving unit is configured to receive a query request sent by a user; The obtaining unit is configured to obtain the historical query result of the user from the storage unit and obtain a current query result corresponding to the query request from a database; The determining unit is configured to determine whether there is a combination of data containing only one entity in a query result set constituted by the historical query result and the current query result; if it is determined that there is a combination of data containing only one entity in the query result set constituted by the historical query result and the current query result, it is determined that the individual privacy of the entity is leaked; The processing unit is configured to perform desensitization processing on the current query result obtained by the obtaining unit when the determining unit determines that the individual privacy of the entity is leaked; The sending unit is configured to respond to the user with the current query result desensitized by the processing unit. The determining unit is specifically configured to determine whether there is a combination of data containing only one entity in a query result set composed of the historical query result and the current query result, including: generating a combination query matrix R corresponding to the query result set based on a query vector of the query result set composed of the historical query result and the current query result; setting values of rows belonging to the entity in the combination query matrix R as 0 to obtain a processed combination query matrix A; and determining whether the rank of the matrix A is the same as the rank of the matrix R, if yes, determining that the individual privacy of the entity is not leaked; otherwise, determining that the individual privacy of the entity is leaked.
7. The apparatus of claim 6, wherein, The sending unit is further configured to send the current query result to the user if the determining unit determines that the individual privacy of all entities is not leaked.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method in any one of claims 1-5.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method in any one of claims 1-5. The program is executed by the processor to implement the method in any one of claims 1-5.
Citation Information
Patent Citations
Method for dynamically querying substation history matter databases
CN107463623A
Private data query method, system and device
CN110990681A