Query request processing method and apparatus

By generating query vectors and combining query matrices, and using augmented matrices to determine whether query results leak privacy, the problem of low data availability in e-commerce platform databases is solved, thereby improving the availability of response data while ensuring information security.

CN114490789BActive Publication Date: 2025-12-16BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210094735.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-12-16
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

Existing technologies result in low data availability and difficulty in providing response data while ensuring information security when querying data in e-commerce platform databases.

Method used

By generating query vectors and combining query matrices, the augmented matrix is ​​used to determine whether the query results leak privacy. If the result is of full rank, the system responds directly; otherwise, it performs de-identification processing, thus achieving a balance between data security and availability.

Benefits of technology

While ensuring data security, the availability of response data has been improved, and the efficiency and accuracy of data queries have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490789B_ABST
    Figure CN114490789B_ABST
Patent Text Reader

Abstract

The application provides a query request processing method and device, the method comprises the following steps: receiving a query request sent by a user; if it is determined that global total quantity privacy protection is set and no subdivided total quantity privacy protection is set, obtaining a first historical query result recorded for the user and a current query result corresponding to the query request; wherein the first historical query result is a query result recorded based on global total quantity privacy protection; generating a first combined query matrix based on the query vectors of the first historical query result and the current query result; obtaining a first augmented matrix by adding an augmented column of all 1s based on the first combined query matrix; determining whether the first augmented matrix is full rank, if yes, responding the current query result to the user; otherwise, responding the current query result to the user after desensitization processing. The method can improve the usability of the response data while ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, and in particular to a query request processing method and device. BACKGROUND

[0002] At present, there are a large amount of transaction data in the database of an e-commerce platform, and some independent software developers (ISVs) often need to query data from the database for statistical analysis. In order to protect the information security of the platform, the data of the platform big data is usually prohibited from being opened. For example, the total transaction amount (GMV) of the platform is prohibited from being opened, and the results not involving the big data information can be opened for query.

[0003] For global total judgment, the conventional method is to judge whether the current query is the aggregation result of all orders in the database. If it is the aggregation result of all orders, it is considered to be unsafe and needs to be desensitized output. If it is only the aggregation result of part of the orders, it is considered to be safe and can be normally output.

[0004] In the process of implementing the present application, the inventors found that this processing method leads to low data availability. SUMMARY

[0005] Therefore, the present application provides a query request processing method and device, which can improve the availability of response data while ensuring data security.

[0006] To solve the above technical problems, the technical scheme of the present application is as follows:

[0007] In one embodiment, a query request processing method is provided, which comprises:

[0008] receiving a query request sent by a user;

[0009] If it is determined that global total privacy protection is set and no sub-total privacy protection is set, a first historical query result corresponding to the user record and a current query result corresponding to the query request are obtained; wherein the first historical query result is a query result recorded based on global total privacy protection;

[0010] generating a first combined query matrix based on the query vectors of the first historical query result and the current query result;

[0011] obtaining a first augmented matrix based on the first combined query matrix by adding an augmented column of all 1s;

[0012] determining whether the first augmented matrix is full rank, and if so, responding the current query result to the user; otherwise, responding the current query result to the user after desensitization processing.

[0013] In another embodiment, a query request processing apparatus is provided, comprising a recording unit, a receiving unit, a first determining unit, an obtaining unit, a first generating unit, a second generating unit, a second determining unit and a responding unit;

[0014] The recording unit is configured to record a first historical query result, wherein the first historical query result is a query result recorded based on global total quantity privacy protection;

[0015] The receiving unit is configured to receive a query request sent by a user;

[0016] The first determining unit is configured to determine whether to set global total quantity privacy protection and whether to set subdivided total quantity privacy protection;

[0017] The obtaining unit is configured to, if the first determining unit determines to set global total quantity privacy protection and not to set subdivided total quantity privacy protection, obtain a first historical query result recorded for the user and a current query result corresponding to the query request;

[0018] The first generating unit is configured to generate a first combined query matrix based on query vectors of all query results obtained by the obtaining unit;

[0019] The second generating unit is configured to obtain a first augmented matrix by adding an augmented column of all 1s based on the first combined query matrix generated by the first generating unit;

[0020] The second determining unit is configured to determine whether the first augmented matrix generated by the second generating unit is full rank;

[0021] The responding unit is configured to, when the second determining unit determines that the first augmented matrix is full rank, respond the current query result to the user; otherwise, respond the current query result to the user after desensitization processing.

[0022] In another embodiment, an electronic device is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the query request processing method when executing the program.

[0023] In another embodiment, a computer readable storage medium is provided, which stores a computer program executable by a processor, wherein the program implements the steps of the query request processing method when executed by the processor.

[0024] From the above technical solution, it can be seen that in the above embodiments, the privacy protection range is set according to the application requirement, and it is judged whether the query result corresponding to the current query request leaks the privacy to be protected according to the current query result and the historical query result corresponding to the query request, and then it is determined whether the query result is desensitized to respond to the query of the user. The scheme can improve the availability of the response data under the premise of ensuring data security. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0026] Figure 1 The figure is a query request processing flowchart in the privacy protection setting of an embodiment of the present application.

[0027] Figure 2 The figure is a query request processing flowchart in the privacy protection setting of another embodiment of the present application.

[0028] Figure 3 The figure is a query request processing flowchart in the privacy protection setting of another embodiment of the present application.

[0029] Figure 4 The figure is a query request processing flowchart in the privacy protection setting of another embodiment of the present application.

[0030] Figure 5 The figure is a query request processing flowchart in the privacy protection setting of another embodiment of the present application.

[0031] Figure 6 The figure is a physical structure diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0033] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-mentioned drawings, if any, are used to distinguish between similar objects and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of the terms so-termed, where appropriate, can be interchanged with each other to the extent that embodiments of the application described herein can be carried out in other than the order described or illustrated herein. Furthermore, the terms "comprising" and "including" and any of their derivatives, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that comprises a list of steps or units is not necessarily limited to those steps or units that are clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products, or apparatuses.

[0034] The technical solutions of the present application will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described in some examples.

[0035] The application provides a query request processing method, which sets a privacy protection range (global total privacy protection and / or subdivided total privacy protection) according to application needs, and determines whether the query result corresponding to the current query request leaks the privacy to be protected according to the query result corresponding to the current request and the historical query result, and then determines whether to perform desensitization processing on the query result to respond to the user's query. The scheme can improve the availability of the response data on the premise of ensuring data security.

[0036] The following are explanations of terms in the embodiments of the present application:

[0037] Query vector: Assuming that a database has 10 rows, the operation involved in a grouping in a certain SQL is R = r1 + 2r2 + 3r5, then R = [1, 2, 0, 0, 3, 0, 0, 0, 0, 0] T is the query vector.

[0038] Query matrix: A matrix composed of query vectors represented by each grouping in SQL.

[0039] Combined query matrix: A matrix obtained by concatenating query matrices represented by multiple SQLs in the column direction

[0040] The query request processing process in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0041] In the embodiments of the present application, the global total privacy protection is set, and the subdivided total privacy protection is not set, for example, as shown in Figure 1 .

[0042] Figure 1A query request processing flowchart in a privacy protection case is provided in an embodiment of the present application. The specific steps are as follows:

[0043] In step 101, a query request sent by a user is received.

[0044] In step 102, a first historical query result corresponding to the user record and a current query result corresponding to the query request are obtained.

[0045] The first historical query result is a query result based on a global total quantity privacy protection record.

[0046] In the embodiment of the present application, the processing of the query request is performed in units of users. When the query request sent by the user is received, the first historical query result corresponding to the historical query of the user based on the global total quantity privacy protection record is obtained. Here, the first historical query result is directly responded to the user without desensitization processing. If the query result responded to the user after desensitization processing is not added to the record.

[0047] The current query result corresponding to the query request is directly obtained from the database.

[0048] In step 103, a first combined query matrix is generated based on the query vectors of the first historical query result and the current query result.

[0049] It is assumed that the global row_id space of the database is [r0, r1, r2, r3, r4].

[0050] If the first historical query result includes two query results R0 and R1, see Table 1 for details. Table 1 is the content corresponding to the first historical query result.

[0051] row_id R0 R1 r0 1 0 r1 1 1 r2 1 1 r3 0 1

[0052] Table 1

[0053] If the query result corresponding to the current query request is R2, and R2 = r2 + r3 + r4, then outer join is performed according to the row_id column, and then the null values are filled by fillna(0). All query results are shown in Table 2. Table 2 is the content corresponding to the first historical query result and the current query result.

[0054] row_id R0 R1 R2 r0 1 0 0 r1 1 1 0 r2 1 1 1 r3 0 1 1 r4 0 0 1

[0055] Table 2

[0056] The first combined query matrix R is denoted as: [R0 R1 R2].

[0057] Step 104, obtaining a first augmented matrix by adding an augmented column of all 1s based on the first combined query matrix.

[0058] The content of the augmented column based on Table 2 is shown in Table 3, which is the content corresponding to the first augmented matrix.

[0059] row_id Augmented column (RN) R0 R1 R2 r0 1 1 0 0 r1 1 1 1 0 r2 1 1 1 1 r3 1 0 1 1 r4 1 0 0 1

[0060] Table 3

[0061] The augmented column RN is [1 1 1 1] T Then the first augmented matrix is denoted as: [RN R0 R1 R2].

[0062] Step 105, determining whether the first augmented matrix is full rank, if yes, executing step 106; otherwise, executing step 107.

[0063] In the embodiment of the present application, whether the first augmented matrix is full rank is determined, including:

[0064] Performing Gaussian elimination on the first augmented matrix;

[0065] Determining whether a column of all 0s can be obtained after Gaussian elimination, if yes, determining that the first augmented matrix is not full rank; otherwise, determining that the first augmented matrix is full rank.

[0066] In the embodiment of the present application, the specific process of performing Gaussian elimination on the first augmented matrix corresponding to Table 3 can be but is not limited to the following process:

[0067] First step, for the augmented column, find a nonzero row, such as "r0";

[0068] Record the nonzero row and the coefficient (recording the coefficient is convenient for subsequent elimination operation) in Elimination_R, and Elimination_R is a dictionary.

[0069] Elimination_R[‘r0’:1]

[0070] Second step, R0 column: first eliminate the value of the row recorded in Elimination_R to 0, and the elimination result is shown in Table 4, which is the content corresponding to the elimination based on R0.

[0071] row_id Augmented column R0 r0 1 0 r1 1 0 r2 1 0 r3 1 -1 r4 1 -1

[0072] Table 4

[0073] Then find the nonzero row and the coefficient, Elimination_R[‘r3’:-1]

[0074] Third step, R1: first, the value of the row recorded in Elimination_R is eliminated to 0, and the elimination result is shown in Table 5, which is the corresponding content after elimination based on R1.

[0075] row_id Augmented column R0 R1 r0 1 0 0 r1 1 0 1 r2 1 0 1 r3 1 -1 0 r4 1 -1 -1

[0076] Table 5

[0077] Then find the non-zero row and coefficient, Elimination_R['r1':1]

[0078] Fourth step, R2: first, the value of the row recorded in Elimination_R is eliminated to 0, and the elimination result is shown in Table 6, which is the corresponding content after elimination based on R2.

[0079] row_id Augmented column R0 R1 R2 r0 1 0 0 0 r1 1 0 1 0 r2 1 0 1 1 r3 1 -1 0 0 r4 1 -1 -1 0

[0080] Table 6

[0081] At this point, it is determined that there is no all-zero column, and it is determined that the first augmented matrix is full rank.

[0082] If one more query request is added, the corresponding query result R3 = [2, 1, 0, 1, 2], and the elimination result obtained by Gaussian elimination is shown in Table 7, which is the corresponding content after Gaussian elimination based on R3.

[0083] row_id Augmented column R0 R1 R2 R3 r0 1 0 0 0 0 r1 1 0 1 0 0 r2 1 0 1 1 0 r3 1 -1 0 0 0 r4 1 -1 -1 0 0

[0084] Table 7

[0085] As can be seen from Table 7, the final R3 column is all-zero column, so the augmented matrix is not full rank, that is, the query result R3 is not safe, which leaks global total privacy.

[0086] Step 106, respond to the user with the current query result. End the process.

[0087] When it is determined that the first augmented matrix is full rank, record the current query result in the first historical query result of the user, which is used to further determine whether to directly respond to a new query request sent subsequently.

[0088] Step 107, respond to the user after desensitizing the current query result.

[0089] Desensitization can be but is not limited to the following implementations: noise processing, signal generation for signal transmission, deletion of obtained query data response null data, etc.

[0090] When it is determined that the first augmented matrix is not full rank, the current query result needs to be desensitized before being responded to, and at this time, since the response is after desensitization, the current query result is also not stored into the first historical query result in the local storage.

[0091] In the embodiment, when the global total quantity privacy protection is set and the subdivided total quantity privacy protection is not set, whether the query result corresponding to the current request leaks the global total quantity privacy protection is determined according to the query result corresponding to the current request and the historical query result, and then it is determined whether the query result is desensitized to respond to the query of the user. The scheme can improve the availability of the response data on the premise of ensuring data security.

[0092] In the next embodiment, the global total quantity privacy protection is not set and the subdivided total quantity privacy protection is set, and the specific steps are shown in Figure 2 .

[0093] Figure 2 The flowchart of the query request processing process in the case of setting the privacy protection in another embodiment of the application is shown. The specific steps are as follows:

[0094] In step 201, the query request sent by the user is received.

[0095] In step 202, the second historical query result corresponding to the user record and the current query result corresponding to the query request are obtained.

[0096] The second historical query result is the query result recorded based on the subdivided total quantity privacy protection.

[0097] In the embodiment of the application, the user is taken as a unit to process the query request. When the query request sent by the user is received, the second historical query result corresponding to the historical query of the user recorded based on the subdivided total quantity privacy protection is obtained. Here, the second historical query result recorded is the query result responded to the user without desensitization, and the query result responded to the user after desensitization is not added to the record.

[0098] The current query result corresponding to the query request is directly obtained from the database.

[0099] In step 203, the second combined query matrix is generated based on the query vectors of the second historical query result and the current query result.

[0100] It is assumed that the global row_id space of the database is [r0, r1, r2, r3, r4, r5], the global row_id space of brand a is [r0, r1], the global row_id space of brand b is [r2, r3], and the global row_id space of brand c is [r4, r5].

[0101] Suppose the content corresponding to the second historical query result is shown in Table 8, which is the content corresponding to the second historical query result.

[0102] row_id brand R0 r0 a 1 r1 a 1 r2 b 1 r3 b 1 r4 c 1

[0103] Table 8

[0104] The query result corresponding to the current query request is obtained by inner join, R1 = r0 + r1 + r4; the second combined query matrix corresponding content is obtained by combining the second historical query result and the current query result R1 through outer join, see Table 9, which is the content corresponding to the second combined query matrix.

[0105] row_id brand R0 R1 r0 a 1 1 r1 a 1 1 r2 b 1 0 r3 b 1 0 r4 c 1 1

[0106] Table 9

[0107] In step 204, a second augmented matrix is generated for each entity by adding an augmented column corresponding to the second combined query matrix, wherein the augmented column corresponding to any entity is a sequence of 1 corresponding to the behavior of the entity and 0 for other behaviors.

[0108] In this embodiment, a second augmented matrix needs to be generated for each entity. Taking the generation of a second augmented matrix for brand a as an example:

[0109] The content of the augmented column RM based on Table 2 is shown in Table 10, which is the content corresponding to the second augmented matrix generated for brand a.

[0110] row_id Augmented column RM R0 R1 r0 1 1 1 r1 1 1 1 r2 0 1 0 r3 0 1 0 r4 0 1 1

[0111] Table 10

[0112] The augmented column RM is [1 1 0 0 0] T Then the second augmented matrix is denoted as: [RM R0 R1].

[0113] Since the rows r0 and r1 correspond to brand a, the coefficients corresponding to these two rows are 1, and the coefficients corresponding to other rows are 0.

[0114] In step 205, it is determined whether the ranks of the second combined query matrix and the second augmented matrix are the same.

[0115] There is a second augmented matrix for each brand; it is determined whether the rank of the second augmented matrix of each brand and the second combined query matrix is the same.

[0116] Step 206, if it is determined that the rank of the second combined query matrix and all second augmented matrices is the same, the current query result is responded to the user; otherwise, the current query result is desensitized and then responded to the user.

[0117] When the rank of the second combined query matrix and the second augmented matrix corresponding to all entities involved in the second combined query matrix are the same, it indicates that the total quantity privacy of all entities involved is not leaked, and the query result corresponding to the query request is safe; at least one entity's total quantity privacy is leaked, which indicates that the query result corresponding to the current query is unsafe.

[0118] In the embodiment, if it is determined that the rank of the second combined query matrix and all second augmented matrices is the same, the current query result is recorded in the second historical query result of the user; otherwise, the current query result is not recorded in the second historical query result of the user.

[0119] In the embodiment, when the global total quantity privacy protection is not set and the subdivided total quantity privacy protection is set, whether the query result corresponding to the current query request leaks the subdivided total quantity privacy protection is judged according to the query result corresponding to the current request and the historical query result, and then it is determined whether the query result is desensitized to respond to the user's query, which can improve the availability of the response data on the premise of ensuring data security.

[0120] In the next embodiment, the global total quantity privacy protection is set, and the subdivided total quantity privacy protection is set as an example, which is specifically shown in Figure 3 .

[0121] Figure 3 The query request processing flowchart in the case of setting privacy protection in another embodiment of the application is shown. The specific steps are as follows:

[0122] Step 301, receiving a query request sent by a user.

[0123] Step 302, determining whether the global total quantity privacy is leaked and whether the subdivided total quantity privacy is leaked.

[0124] In this step, whether the global total quantity privacy is leaked is determined, including:

[0125] Obtaining the first historical query result recorded for the user and the current query result corresponding to the query request; wherein the first historical query result is a query result recorded based on global total quantity privacy protection;

[0126] Generating a first combined query matrix based on the query vectors of the first historical query result and the current query result;

[0127] obtaining a first augmented matrix based on the first combined query matrix by adding an augmented column of all 1s;

[0128] determining whether the first augmented matrix is full rank, and if so, determining that global total quantity privacy is not leaked; otherwise, determining that global total quantity privacy is leaked.

[0129] The determination of whether the first augmented matrix is full rank includes:

[0130] performing Gaussian elimination on the first augmented matrix;

[0131] determining whether a column of all 0s can be obtained after Gaussian elimination, and if so, determining that the first augmented matrix is not full rank; otherwise, determining that the first augmented matrix is full rank.

[0132] The determination of whether the global total quantity privacy is leaked includes:

[0133] obtaining a second historical query result for the user record and a current query result corresponding to the query request; the second historical query result is a query result based on a subdivided total quantity privacy-protected record;

[0134] generating a second combined query matrix based on query vectors of the second historical query result and the current query result;

[0135] generating a second augmented matrix for each entity based on the second combined query matrix by adding a corresponding augmented column; the augmented column corresponding to any entity is a number sequence in which the entity corresponds to a behavior of 1 and other behaviors of 0;

[0136] determining whether the ranks of the second combined query matrix and the second augmented matrices are the same, respectively;

[0137] if it is determined that the ranks of the second combined query matrix and all second augmented matrices are the same, it is determined that subdivided total quantity privacy is not leaked; otherwise, it is determined that subdivided total quantity privacy is leaked.

[0138] Step 303, if it is determined that global total quantity privacy is not leaked and subdivided total quantity privacy is not leaked, the current query result is responded to the user. End the flow.

[0139] If it is determined that global total quantity privacy is not leaked and subdivided total quantity privacy is not leaked, the current query result is recorded in the first query record and the second query record.

[0140] Step 304, if it is determined that global total quantity privacy is leaked and / or subdivided total quantity privacy is leaked, the current query result is desensitized and responded to the user.

[0141] If it is determined that the global total quantity privacy is leaked and / or the sub-total quantity privacy is leaked, the current query result is not recorded in the first query record and is not recorded in the second query record.

[0142] In the embodiment, when the global total quantity privacy protection is set and the sub-total quantity privacy protection is set, whether the query result corresponding to the current request leaks the global total quantity privacy protection and whether the query result leaks the sub-total quantity privacy protection are determined according to the query result corresponding to the current request and the historical query result, and then it is determined whether the query result is desensitized to respond to the query of the user. The scheme can improve the availability of the response data on the premise of ensuring data security.

[0143] In the next embodiment, the global total quantity privacy protection is not set and the sub-total quantity privacy protection is not set, and specific steps are shown in Figure 4 .

[0144] Figure 4 The figure is a query request processing flowchart in the embodiment of the application, in which the privacy protection is not set. The specific steps are as follows:

[0145] In step 401, a query request sent by a user is received.

[0146] In step 402, a current query result corresponding to the query request is obtained.

[0147] In step 403, the current query result is responded to the user.

[0148] In the embodiment, when the global total quantity privacy protection is not set and the sub-total quantity privacy protection is not set, the current query result is directly responded to the query of the user.

[0149] In the embodiment of the application, whether the single query or the multiple queries leak the global total quantity privacy is converted into a solvability judgment problem of a linear equation set.

[0150] Whether the single query or the multiple queries leak the sub-total quantity privacy is converted into a solvability judgment problem of a linear equation set.

[0151] Under the big data processing framework spark, how to use the Gaussian elimination or matrix rank method to determine whether the linear equation set has a solution, so as to determine whether there is a global total quantity privacy or sub-total quantity privacy leakage.

[0152] Based on the same inventive concept, the application also provides a query request processing device. See Figure 5 , Figure 5A structure schematic diagram of a query request processing apparatus in an embodiment of the present application is shown in FIG. 5. The apparatus includes a recording unit 501, a receiving unit 502, a first determining unit 503, an obtaining unit 504, a first generating unit 505, a second generating unit 506, a second determining unit 507, and a responding unit 508.

[0153] The recording unit 501 is configured to store a first historical query result, wherein the first historical query result is a query result recorded based on global total quantity privacy protection.

[0154] The receiving unit 502 is configured to receive a query request sent by a user.

[0155] The first determining unit 503 is configured to determine whether global total quantity privacy protection is set and whether sub-total quantity privacy protection is set when the receiving unit 502 receives the query request.

[0156] The obtaining unit 504 is configured to obtain a first historical query result recorded by the recording unit 501 for the user and a current query result corresponding to the query request if the first determining unit 503 determines that the global total quantity privacy protection is set and the sub-total quantity privacy protection is not set.

[0157] The first generating unit 505 is configured to generate a first combined query matrix based on query vectors of the first historical query result and the current query result obtained by the obtaining unit 504.

[0158] The second generating unit 506 is configured to obtain a first augmented matrix by adding an augmented column of all 1s based on the first combined query matrix generated by the first generating unit 505.

[0159] The second determining unit 507 is configured to determine whether the first augmented matrix generated by the second generating unit 506 is full rank.

[0160] The responding unit 508 is configured to respond to the user with the current query result when the second determining unit 507 determines that the first augmented matrix is full rank, or respond to the user with the current query result after desensitization processing.

[0161] In another embodiment,

[0162] The second determining unit 507 is specifically configured to perform Gaussian elimination on the first augmented matrix when determining whether the first augmented matrix is full rank, and determine whether a column of all 0s can be obtained after the Gaussian elimination. If yes, it is determined that the first augmented matrix is not full rank. Otherwise, it is determined that the first augmented matrix is full rank.

[0163] In another embodiment,

[0164] The recording unit 501 is further configured to record the current query result into the first historical query result of the user when the second determination unit 507 determines that the first augmented matrix is full rank.

[0165] In another embodiment,

[0166] The recording unit 501 is further configured to record the second historical query result.

[0167] The obtaining unit 504 is further configured to obtain the second historical query result recorded by the recording unit 501 for the user and the current query result corresponding to the query request if the first determination unit 503 determines that the total amount privacy protection of subdivision is set and the total amount privacy protection of the whole is not set, wherein the second historical query result is a query result recorded based on the total amount privacy protection of subdivision.

[0168] The first generation unit 505 is further configured to generate a second combined query matrix based on the query vectors of the second historical query result and the current query result obtained by the obtaining unit 504.

[0169] The second generation unit 506 is further configured to generate a second augmented matrix for each entity by increasing a corresponding augmented column based on the second combined query matrix generated by the first generation unit 505, wherein the augmented column corresponding to any entity is a sequence of 1 corresponding to the entity and 0 corresponding to other behaviors.

[0170] The second determination unit 507 is further configured to determine whether the ranks of the second combined query matrix and the second augmented matrix are the same, respectively.

[0171] The response unit 508 is further configured to respond to the user with the current query result if the second determination unit 507 determines that the ranks of the second combined query matrix and all second augmented matrices are the same, or to respond to the user with the current query result after desensitization processing.

[0172] In another embodiment,

[0173] The recording unit 501 is further configured to record the current query result into the second historical query result of the user if the second determination unit 507 determines that the ranks of the second combined query matrix and all second augmented matrices are the same.

[0174] In another embodiment,

[0175] The second determination unit 507 is further configured to determine whether the global total amount privacy is leaked and whether the total amount privacy of subdivision is leaked if the first determination unit 503 sets the total amount privacy protection of the whole and sets the total amount privacy protection of subdivision.

[0176] The response unit 508 is further configured to, if the second determination unit 507 determines that the global total quantity privacy is not leaked and the subdivided total quantity privacy is not leaked, respond to the user with the current query result; otherwise, respond to the user with the current query result after desensitization processing.

[0177] In another embodiment,

[0178] The response unit 508 is further configured to, if the first determination unit 503 does not set the global total quantity privacy protection and does not set the subdivided total quantity privacy protection, respond to the user with the current query result corresponding to the query request.

[0179] The units in the above embodiments can be integrated or deployed separately, and can be combined into one unit or further split into multiple sub-units.

[0180] In another embodiment, an electronic device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the query request processing method when executing the program.

[0181] In another embodiment, a computer readable storage medium is also provided, which stores computer instructions, and the instructions can implement the steps of the query request processing method when executed by a processor.

[0182] Figure 6 The electronic device provided by the embodiment of the present application is shown in the entity structure diagram. As shown in the figure, Figure 6 The electronic device can include a processor (Processor) 610, a communication interface (Communications Interface) 620, a memory (Memory) 630, and a communication bus 640. The processor 610, the communication interface 620, and the memory 630 can communicate with each other through the communication bus 640. The processor 610 can invoke the logical instructions in the memory 630 to execute the following method:

[0183] Receiving a query request sent by a user;

[0184] If it is determined that the global total quantity privacy protection is set and the subdivided total quantity privacy protection is not set, obtaining a first historical query result for the user record and a current query result corresponding to the query request; wherein the first historical query result is a query result recorded based on global total quantity privacy protection;

[0185] Generating a first combined query matrix based on the query vectors of the first historical query result and the current query result;

[0186] obtaining a first augmented matrix by adding an augmented column of all 1s based on the first combined query matrix;

[0187] determining whether the first augmented matrix is full rank, if yes, responding the current query result to the user, otherwise, responding the current query result to the user after desensitization processing.

[0188] In addition, the logic instructions in the memory 630 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0189] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0190] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software and the necessary general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions essentially or the parts that contribute to the prior art can be embodied in the form of a software product. The 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 make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

[0191] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A query request processing method, characterized in that, The method includes: Receive query requests sent by users; If global total privacy protection is set and no granular total privacy protection is set, then the first historical query result for the user record and the current query result corresponding to the query request are obtained; wherein, the first historical query result is the query result based on the global total privacy protection record; A first combined query matrix is ​​generated based on the query vectors of the first historical query result and the current query result; The first augmented matrix is ​​obtained by adding an augmented column of all 1s based on the first combined query matrix; Determine whether the first augmented matrix is ​​full rank. If it is, respond to the user with the current query result; otherwise, respond to the user with the current query result after de-identification processing.

2. The method according to claim 1, characterized in that, Determining whether the first augmented matrix is ​​full rank includes: Gaussian elimination is performed on the first augmented matrix; Determine whether Gaussian elimination results in a column of all zeros. If so, determine that the first augmented matrix is ​​not of full rank; otherwise, determine that the first augmented matrix is ​​of full rank.

3. The method according to claim 1, characterized in that, When determining that the first augmented matrix is ​​full rank, the method further includes: The current query result is recorded in the user's first historical query result.

4. The method according to claim 1, characterized in that, The method further includes: If it is determined that segmented total privacy protection is set, and global total privacy protection is not set, then the second historical query result for the user record and the current query result corresponding to the query request are obtained; wherein, the second historical query result is the query result based on the segmented total privacy protection record; A second combined query matrix is ​​generated based on the query vectors of the second historical query result and the current query result; Based on the second combined query matrix, a second augmented matrix is ​​generated for each entity by adding a corresponding augmented column. In any augmented column corresponding to an entity, the row corresponding to the entity is 1, and the other rows outside the row corresponding to the entity are 0. Determine whether the ranks of the second combined query matrix and the second augmented matrix are the same; If it is determined that the rank of the second combined query matrix is ​​the same as that of all second augmented matrices, then the current query result is responded to the user; otherwise, the current query result is anonymized and then responded to the user.

5. The method according to claim 4, characterized in that, If it is determined that the rank of the second combined query matrix is ​​the same as that of all second augmented matrices, the method further includes: The current query result is recorded in the user's second historical query result.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: If global total privacy protection is set, and sub-total privacy protection is also set, then determine whether global total privacy has been leaked; and whether sub-total privacy has been leaked. If it is determined that neither the overall total privacy nor the subdivided total privacy has been leaked, then the current query result is returned to the user; otherwise, the current query result is anonymized and returned to the user.

7. The method according to any one of claims 1-5, characterized in that, The method further includes: If no global total privacy protection is set, and no granular total privacy protection is set, then the current query result corresponding to the query request will be responded to the user.

8. A query request processing apparatus, characterized in that, The device includes: a recording unit, a receiving unit, a first determining unit, an acquiring unit, a first generating unit, a second generating unit, a second determining unit, and a response unit; The recording unit is used to record the first historical query result, wherein the first historical query result is a query result based on the global total privacy protection record; The receiving unit is used to receive query requests sent by users; The first determining unit is used to determine whether to set global total privacy protection and whether to set subdivided total privacy protection; The acquisition unit is configured to acquire, if the first determining unit determines that global total privacy protection is set and no subdivided total privacy protection is set, the first historical query result of the recording unit for the user record and the current query result corresponding to the query request. The first generation unit is used to generate a first combined query matrix based on the query vector of the first historical query result obtained by the acquisition unit and the current query result; The second generation unit is used to obtain a first augmented matrix based on the first combined query matrix generated by the first generation unit by adding an augmented column of all 1s; The second determining unit is used to determine whether the first augmented matrix generated by the second generating unit is full rank; The response unit is configured to respond to the user with the current query result when the second determining unit determines that the first augmented matrix is ​​full rank; otherwise, respond to the user with the current query result after de-identification processing.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Secret communication transmission method and device and electronic equipment

    CN112311775A

  • Data query method and system supporting sensitive information protection, terminal and medium

    CN113886874A