Federal packet mean query method, system, electronic device and readable medium

CN117453729BActive Publication Date: 2026-10-23HANGZHOU BODUN XIYAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311502300.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2026-10-23
Estimated Expiration
2043-11-09

AI Technical Summary

Technical Problem

[0003]但是,在实际查询过程中,由于参与方的数据表可能发生更新,如样本的增加、减少等,导致分组统计值也发生变化,在这种变化中可能会导致更新的特征值泄露,从而引起数据安全隐患

Benefits of technology

[0025]本公开提供的联邦分组均值查询方法,该方法可以应用于至少两个参与方,响应于其中查询方发起的分组均值查询请求,各参与方根据本地数据类型进行预处理,预处理包括对统计字段进行本地差分隐私处理获得第一向量,根据统计字段中空值与非空值的位置确定第二向量,以及对分组字段进行独热变换获得分组矩阵中的至少一种;各参与方基于第一向量与分组矩阵进行基于秘密分享的矩阵点积运算,分别获得总和矩阵碎片;各参与方基于第二向量与分组矩阵进行基于秘密分享的矩阵点积运算,分别获得计数矩阵碎片;各参与方基于总和矩阵碎片、计数矩阵碎片进行基于秘密分享的矩阵逐元素除法运算,分别获得均值矩阵碎片;查询方获得各均值矩阵碎片,并基于均值矩阵碎片确定分组均值。该方法对统计字段在各参与方本地采用本地差分隐私处理后,进行总和、计数、均值的统计计算,使查询方获得了与分组统计值相近的近似值,而无法得到真实值,在保护本地隐私数据的同时,也避免了样本发生变化时具体特征值从统计值的变化中泄露,进一步提高了数据安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117453729B_ABST
    Figure CN117453729B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a federal grouped mean query method, system, electronic device and readable medium, and relates to the technical field of privacy computing. The method can be applied to at least two participants, in response to a grouped mean query request initiated by a query party among them, each participant pre-processes according to local data types, which includes local differential privacy processing of statistical fields to obtain a first vector, determining a second vector according to the positions of null values and non-null values in the statistical fields, and one-hot transformation of the grouped fields to obtain a grouping matrix, etc., and further determining the sum value of the statistical fields within the group, the non-null count, and the grouped mean value by using a secret sharing algorithm. After the statistical fields are processed by local differential privacy at each participant, the statistical calculation is performed, so that the query party obtains an approximate value of the mean, but cannot obtain the true value. While protecting local privacy data, it also avoids leaking specific feature values from the change of statistical values when the sample changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of privacy computing technology, and more specifically, to a method for querying the mean of a federated group, a system for querying the mean of a federated group, an electronic device, and a computer-readable medium. Background Technology

[0002] When multiple parties hold data tables containing the same samples but with different feature values, a querying party can initiate a grouped statistical query to obtain grouped statistical values ​​of feature values ​​between itself and other parties. During the query process, intermediate results can be encrypted to prevent the leakage of privacy data from each party.

[0003] However, in actual querying, the data tables of the participating parties may be updated, such as the increase or decrease of samples, which may cause changes in the grouped statistical values. Such changes may lead to the leakage of updated feature values, thereby causing data security risks.

[0004] It should be noted that the data disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include data that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a method, apparatus, and electronic device for querying federated grouped mean, which can protect the security of the privacy data of the participants and avoid privacy leaks that may occur due to data table updates during the process of querying federated grouped mean.

[0006] According to a first aspect of this disclosure, a federated grouped mean query method is provided. This method is applied to at least two participants, including a querying party. The method may include: in response to a grouped mean query request initiated by the querying party, each participant performs preprocessing based on its local data type. The preprocessing includes performing local differential privacy processing on a statistical field to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical field, and performing a one-hot transformation on a grouped field to obtain at least one of the following grouped matrices: each participant performs a secret-sharing-based matrix dot product operation on the first vector and the grouped matrix to obtain sum matrix fragments; each participant performs a secret-sharing-based matrix dot product operation on the second vector and the grouped matrix to obtain counting matrix fragments; each participant performs a secret-sharing-based element-wise matrix division operation on the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments; the querying party obtains each mean matrix fragment and determines the grouped mean based on the mean matrix fragments.

[0007] Optionally, the participants also include at least one service provider. The queryer's local data type includes a grouping field, and the service provider's local data type includes a statistical field. In response to the queryer's request for a grouped mean query, each participant performs preprocessing based on its local data type, including: the service provider adds noise to the statistical field based on a local differential privacy algorithm and fills null values ​​with 0 to obtain a first vector; the service provider assigns 0 to the null values ​​in the statistical field and 1 to the non-null values ​​to obtain a second vector; and the queryer performs a one-hot transformation on the grouping field to obtain a grouping matrix.

[0008] Optionally, the participants also include at least one service provider. The local data type of the querying party includes a statistical field, and the local data type of the service provider includes a grouping field. In response to the grouping mean query request initiated by the querying party, each participant performs preprocessing based on its local data type, including: the querying party adds noise to the statistical field based on a local differential privacy algorithm and fills null values ​​with 0 to obtain a first vector; the querying party assigns 0 to the positions corresponding to null values ​​in the statistical field and assigns 1 to the positions corresponding to non-null values ​​to obtain a second vector; and the service provider performs a one-hot transformation on the grouping field to obtain a grouping matrix.

[0009] Optionally, the participants also include at least one service provider. The queryer's local data type includes a grouping field and a statistical field, and the service provider's local data type includes a grouping field. In response to the grouping mean query request initiated by the queryer, each participant performs preprocessing based on its local data type, including: the queryer adds noise to the statistical field based on a local differential privacy algorithm and fills null values ​​with 0 to obtain a first vector; the queryer assigns 0 to the null values ​​in the statistical field and 1 to the non-null values ​​to obtain a second vector; the queryer performs a one-hot transformation on the local grouping field to obtain a first matrix; the service provider performs a one-hot transformation on the local grouping field to obtain a second matrix; and the queryer and the service provider perform a secret sharing operation based on the first and second matrices to obtain a grouping matrix.

[0010] Optionally, the grouping matrix includes grouping matrix fragments. The querying party and the service party perform secret sharing operations based on the first matrix and the second matrix to obtain the grouping matrix, including: the querying party provides the service party with the first number of values ​​for the local grouping field; the service party provides the querying party with the second number of values ​​for the local grouping field; the querying party stacks the first matrix vertically based on the second number of values ​​to obtain the third matrix; the service party stacks the second matrix vertically based on the first number of values ​​to obtain the fourth matrix; the querying party and the service party perform element-wise matrix multiplication operations based on secret sharing based on the third matrix and the fourth matrix to obtain the grouping matrix fragments respectively.

[0011] Optionally, the participants also include at least one service provider. The queryer's local data type includes a grouping field, and the service provider's local data type includes a grouping field and a statistical field. In response to the queryer's request for a grouped mean query, each participant performs preprocessing based on its local data type, including: the service provider adds noise to the statistical field using a local differential privacy algorithm and fills null values ​​with 0 to obtain a first vector; the service provider assigns 0 to the null values ​​and 1 to the non-null values ​​in the statistical field to obtain a second vector; the queryer performs a one-hot transformation on its local grouping field to obtain a fifth matrix; the service provider performs a one-hot transformation on its local grouping field to obtain a sixth matrix; and the queryer and the service provider perform a secret sharing operation based on the fifth and sixth matrices to obtain a grouping matrix.

[0012] Optionally, the grouping matrix includes grouping matrix fragments. The querying party and the service party perform secret sharing operations based on the fifth and sixth matrices to obtain the grouping matrix, including: the querying party provides the service party with the third number of local grouping fields; the service party provides the querying party with the fourth number of local grouping fields; the querying party stacks the fifth matrix vertically based on the fourth number of values ​​to obtain the seventh matrix; the service party stacks the sixth matrix vertically based on the third number of values ​​to obtain the eighth matrix; the querying party and the service party perform element-wise matrix multiplication operations based on secret sharing based on the seventh and eighth matrices to obtain the grouping matrix fragments respectively.

[0013] According to a second aspect of this disclosure, a federated grouped mean query system is provided. This system may include at least two participants, one of which is a querying party. The participating party includes: a data preprocessing module, configured to, in response to a grouped mean query request initiated by the querying party, perform preprocessing based on local data types. The preprocessing includes performing local differential privacy processing on statistical fields to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical fields, and performing one-hot transformation on grouped fields to obtain at least one of the following grouped matrices: a sum matrix sharing module, configured to perform a secret-sharing matrix dot product operation on the first vector and the grouped matrices to obtain sum matrix fragments; a counting matrix sharing module, configured to perform a secret-sharing matrix dot product operation on the second vector and the grouped matrices to obtain counting matrix fragments; and a mean matrix sharing module, configured to perform secret-sharing element-wise matrix division operations on the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments. When the participating party is the querying party, the participating party further includes: a secret recovery module, configured to obtain each mean matrix fragment and determine the grouped mean based on the mean matrix fragments.

[0014] Optionally, the participants also include at least one service provider. The query provider's local data type includes a grouping field, and the service provider's local data type includes a statistical field. The service provider's data preprocessing module is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The service provider's data preprocessing module is specifically used to assign 0 to the null value positions and 1 to the non-null value positions in the statistical field to obtain a second vector. The query provider's data preprocessing module is specifically used to perform a one-hot transformation on the grouping field to obtain a grouping matrix.

[0015] Optionally, the participants also include at least one service provider. The query provider's local data type includes a statistical field, and the service provider's local data type includes a grouping field. The query provider's data preprocessing module is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The query provider's data preprocessing module is specifically used to assign 0 to the null value positions and 1 to the non-null value positions in the statistical field to obtain a second vector. The service provider's data preprocessing module is specifically used to perform a one-hot transformation on the grouping field to obtain a grouping matrix.

[0016] Optionally, the participants also include at least one service provider. The query party's local data type includes a grouping field and a statistical field, and the service provider's local data type includes a grouping field. The query party's data preprocessing module is specifically used to add noise to the statistical field using a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The query party's data preprocessing module is specifically used to assign 0 to the null values ​​in the statistical field and 1 to the non-null values ​​to obtain a second vector. The query party's data preprocessing module is specifically used to perform a one-hot transformation on the local grouping field to obtain a first matrix. The service provider's data preprocessing module is specifically used to perform a one-hot transformation on the local grouping field to obtain a second matrix. The query party's and service provider's data preprocessing modules are specifically used to perform a secret sharing operation based on the first matrix and the second matrix to obtain a grouping matrix.

[0017] Optionally, the grouping matrix includes grouping matrix fragments, a query-side data preprocessing module specifically used to provide the service provider with the first number of values ​​for the local grouping field; a service-side data preprocessing module specifically used to provide the query-side with the second number of values ​​for the local grouping field; a query-side data preprocessing module specifically used to stack the first matrix vertically based on the second matrix to obtain a third matrix; a service-side data preprocessing module specifically used to stack the second matrix vertically based on the first matrix to obtain a fourth matrix; and data preprocessing modules from both the query-side and service-side specifically used to perform element-wise matrix multiplication based on the third and fourth matrices using secret sharing to obtain grouping matrix fragments respectively.

[0018] Optionally, the participants also include at least one service provider. The query party's local data type includes a grouping field, and the service provider's local data type includes a grouping field and a statistical field. The service provider's data preprocessing module is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The service provider's data preprocessing module is specifically used to assign 0 to the null value positions and 1 to the non-null value positions in the statistical field to obtain a second vector. The query party's data preprocessing module is specifically used to perform a one-hot transformation on the local grouping field to obtain a fifth matrix. The service provider's data preprocessing module is specifically used to perform a one-hot transformation on the local grouping field to obtain a sixth matrix. The query party's data preprocessing module is specifically used to perform a secret sharing operation with the service provider based on the fifth and sixth matrices to obtain a grouping matrix.

[0019] Optionally, the grouping matrix includes grouping matrix fragments. The query party's data preprocessing module is specifically used to provide a fifth matrix to the service party; the service party provides the query party with the fourth value of the local grouping field; the query party's data preprocessing module is specifically used to stack the fifth matrix vertically based on the fourth value to obtain a seventh matrix; the service party's data preprocessing module is specifically used to stack the sixth matrix vertically based on the third value to obtain an eighth matrix; the query party's data preprocessing module is specifically used to perform element-wise matrix multiplication with the service party based on the seventh and eighth matrices using secret sharing, to obtain grouping matrix fragments respectively.

[0020] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the federated grouped mean lookup method of the first aspect described above.

[0021] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:

[0022] Processor; and

[0023] Memory, used to store computer programs for the processor;

[0024] The processor is configured to implement the federated grouped mean query method of the first aspect above by executing a computer program.

[0025] The federated grouped mean query method disclosed herein can be applied to at least two participants. In response to a grouped mean query request initiated by one of the querying parties, each participant performs preprocessing based on its local data type. The preprocessing includes performing local differential privacy processing on a statistical field to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical field, and performing one-hot transformation on a grouped field to obtain at least one of the following grouped matrices: Each participant performs a matrix dot product operation based on secret sharing between the first vector and the grouped matrix to obtain sum matrix fragments; Each participant performs a matrix dot product operation based on secret sharing between the second vector and the grouped matrix to obtain counting matrix fragments; Each participant performs element-wise matrix division operation based on secret sharing between the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments; The querying party obtains each mean matrix fragment and determines the grouped mean based on the mean matrix fragments. This method performs local differential privacy processing on the statistical fields at each participant's local end, and then performs statistical calculations such as summation, count, and mean. This allows the querying party to obtain an approximate value that is close to the grouped statistical value, but not the true value. While protecting local privacy data, it also avoids the leakage of specific feature values ​​from changes in statistical values ​​when the sample changes, thus further improving data security.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0028] Figure 1 This is one of the flowcharts of a federal grouped mean query method provided in an embodiment of this disclosure.

[0029] Figure 2 This is the second flowchart of a federal grouped mean query method provided in an embodiment of the present disclosure.

[0030] Figure 3 The third step of a federal grouped mean query method provided in this embodiment of the disclosure is shown in the flowchart below.

[0031] Figure 4 The fourth step of a federal grouped mean query method provided in this embodiment of the disclosure is shown in the flowchart below.

[0032] Figure 5The fifth step of a federal grouped mean query method provided in this embodiment of the disclosure is shown in the flowchart.

[0033] Figure 6 This is a flowchart illustrating a federal grouped mean query provided in an embodiment of the present disclosure.

[0034] Figure 7 This is a schematic diagram of the structure of a federated grouped mean query system provided in an embodiment of this disclosure.

[0035] Figure 8 A schematic diagram illustrating the structure of an electronic device according to an embodiment of the present disclosure is provided. Detailed Implementation

[0036] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0037] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0038] It should be noted that the data obtained in this public disclosure, including grouping fields, statistical fields, etc., are accessed, collected, stored, and used for subsequent analysis and processing after the user or relevant data owner has been clearly informed of the content of the data collection, the purpose of the data, the processing method, etc., and with the consent and authorization of the user or relevant data owner. Furthermore, the public can send the user or relevant data owner access, correction, and deletion of the data, as well as the method to revoke consent and authorization.

[0039] The specific details are explained below with reference to the attached diagram:

[0040] Figure 1 This is one of the flowcharts of a federated grouped mean query method provided in this embodiment of the disclosure. The method can be applied to at least two parties, including the querying party. The method may include steps 101 to 105 as shown below.

[0041] Step 101: In response to the group mean query request initiated by the querying party, each participating party performs preprocessing according to its local data type. The preprocessing includes performing local differential privacy processing on the statistical field to obtain a first vector, determining a second vector based on the position of null and non-null values ​​in the statistical field, and performing one-hot transformation on the grouping field to obtain at least one of the grouping matrices.

[0042] In this context, "federation" refers to a collaborative data processing method involving multiple participants. Each participant can hold at least some of the same samples, and each sample can correspond to different feature values ​​in different participants. These feature values ​​can be used as statistical fields in statistical queries, such as age, income, expenditure, score, registration time, number of transactions, and other feature values.

[0043] Based on this, any participating party can initiate a group mean query request as the querying party. The group mean query request is used to query the mean query results of statistical fields in different groups of the sample. The group can be based on the group field definition. For example, when the sample is a user, the group field can be user gender, occupation, place of residence, etc.; or when the sample is a company, the group field can be company type, company registration location, etc.

[0044] The local data types may differ among the participants. A local data type may hold only the grouping field, only the statistical field, some of the grouping fields, and some of the statistical fields; it may also hold only one of the grouping and statistical fields, or both. Each participant can preprocess the grouping and statistical fields it holds based on its local data type for subsequent averaging.

[0045] In this embodiment, preprocessing may include local differential privacy processing of statistical fields. By adding random noise to the statistical fields locally, the restrictions of third-party data centers can be bypassed while still interfering with the statistical fields. The noise perturbation mechanism can be a random response. In local differential privacy, the protection strength for statistical fields can be determined based on a single privacy budget. The smaller the single privacy budget, the greater the difference between the preprocessed output and the original data, and the greater the impact of adding or deleting a sample on the statistical value, resulting in higher privacy protection but lower data availability, and vice versa. In practical applications, a total privacy budget can be set for the querying party. Each time the querying party makes a query, the single privacy budget is consumed for local differential privacy processing, and data access is restricted for queries that reach the total privacy budget. Those skilled in the art can choose an appropriate total privacy budget and single privacy budget for preprocessing based on the balance between actual data availability and privacy security requirements.

[0046] Preprocessing may also include determining a second vector based on the positions of null and non-null values ​​in the statistical field. That is, the second vector indicates the positions of null and non-null values ​​in the statistical field. The second vector can usually be used to count the non-null values ​​in the statistical field to facilitate the calculation of statistical values ​​such as count queries and mean queries.

[0047] Preprocessing may also include performing one-hot transformations on the grouping fields. Since the grouping fields are discontinuous discrete features, one-hot transformations can be used for vectorization. After the one-hot transformation, the values ​​of the discrete features can be extended to Euclidean space, facilitating subsequent calculations of statistical values.

[0048] Based on the aforementioned preprocessing, this embodiment of the disclosure can further perform statistical calculations among the participating parties based on secret sharing. Secret sharing is a fundamental application technology in multi-party secure computation, enabling the sharing of secrets among multiple participating parties, and requiring a specific number of participating parties to recover the secret, thereby protecting privacy information and preventing loss, damage, tampering, and leakage. Secret sharing possesses homomorphic properties; when the shared secret is used for operations such as summation and multiplication, it is equivalent to operations on the original state data, eliminating the need for repeated encryption and decryption processing in statistical calculations, thus protecting data privacy and simplifying the interaction process. Specifically, refer to steps 102 to 105 below:

[0049] Step 102: Each participant performs a matrix dot product operation based on the first vector and the group matrix using secret sharing, and obtains the sum matrix fragments respectively.

[0050] In this embodiment of the disclosure, based on preprocessing, each participant can perform a matrix dot product operation based on secret sharing using a first vector and a grouping matrix. The first vector includes perturbed statistical fields. By performing a dot product operation on the first vector using the grouping matrix, a sum matrix of perturbed statistical fields under different groups can be obtained. Based on the secret sharing algorithm, each participant can obtain the corresponding sum matrix fragments.

[0051] Step 103: Each participant performs a matrix dot product operation based on the second vector and the grouping matrix using secret sharing to obtain counting matrix fragments.

[0052] In this embodiment of the disclosure, based on preprocessing, each participant can perform a matrix dot product operation based on secret sharing using a second vector and a grouping matrix. The second vector can indicate the non-null values ​​in the statistical fields. By performing a dot product operation on the second vector using the grouping matrix, a counting matrix of the non-null value statistical fields under different groups can be obtained, and the corresponding counting matrix fragments can be obtained by different participants based on the secret sharing algorithm.

[0053] Step 104: Each participant performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment.

[0054] In this embodiment of the disclosure, each participating party, having obtained the sum matrix fragments and counting matrix fragments under the group, can perform a secret element-wise matrix division operation based on these fragments to obtain the mean matrix fragments of the group.

[0055] Step 105: The querying party obtains each mean matrix fragment and determines the group mean based on the mean matrix fragments.

[0056] Furthermore, in response to the query party's request for grouped mean values, each participating party obtains a fragment of the mean matrix for each group. At this point, the query party can obtain mean matrix fragments not held by itself from other participating parties, and aggregate and secretly recover these fragments to obtain the grouped mean of the statistical field. This grouped mean may deviate somewhat from the true grouped mean of the statistical field, but it can still be used for subsequent tasks such as statistical analysis, risk decision-making, and model training. However, when the query party initiates the same grouped mean query request before or after adding or removing a sample, it cannot actually infer the feature values ​​corresponding to the added or removed sample based on the obtained grouped mean query results.

[0057] The federated grouped mean query method disclosed herein can be applied to at least two participants. In response to a grouped mean query request initiated by one of the querying parties, each participant performs preprocessing based on its local data type. The preprocessing includes performing local differential privacy processing on a statistical field to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical field, and performing one-hot transformation on a grouped field to obtain at least one of the following grouped matrices: Each participant performs a matrix dot product operation based on secret sharing between the first vector and the grouped matrix to obtain sum matrix fragments; Each participant performs a matrix dot product operation based on secret sharing between the second vector and the grouped matrix to obtain counting matrix fragments; Each participant performs element-wise matrix division operation based on secret sharing between the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments; The querying party obtains each mean matrix fragment and determines the grouped mean based on the mean matrix fragments. This method performs local differential privacy processing on the statistical fields at each participant's local end, and then performs statistical calculations such as summation, count, and mean. This allows the querying party to obtain an approximate value that is close to the grouped statistical value, but not the true value. While protecting local privacy data, it also avoids the leakage of specific feature values ​​from changes in statistical values ​​when the sample changes, thus further improving data security.

[0058] In this embodiment of the disclosure, different processing flows can be executed depending on the source of the grouping field and the statistical field, such as the following: Figures 2 to 5 Different scenarios exist. For example, the participants include Bank A and Bank B. Bank A holds data table t1, which stores fields such as user mobile phone number (ID), annual bonus (bonus), total expenditure (cost), and gender (gender). Bank B holds data table t2, which stores fields such as user mobile phone number (ID), annual salary (salary), and years of service (work_years).

[0059] Figure 2 The second flowchart of a federated grouped mean query method provided in this embodiment of the disclosure is shown. The method can be applied to at least two parties, including a query party and at least one service party. The query party's local data type includes a grouping field, and the service party's local data type includes a statistical field.

[0060] Taking Bank A and Bank B as examples, suppose Bank A initiates a grouped average query request, requesting the average annual salary of users of different genders. We can see that the grouping field is the `gender` field, originating only from Bank A (the querying party); the statistical field is the `salary` field, originating only from Bank B (the service provider). Therefore, this method can include steps 201 to 207 as shown below.

[0061] Step 201: The service provider adds noise to the statistical field based on the local differential privacy algorithm and fills the null values ​​with 0 to obtain the first vector.

[0062] For example, assuming the number of IDs is n, Bank B adds noise to the salary field based on a local differential privacy algorithm and fills null values ​​with 0 to obtain the first vector F. n*1 .

[0063] Step 202: The service provider assigns 0 to the position corresponding to null values ​​and 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector.

[0064] For example, bank B generates a second vector A based on the salary field. (n,1) The salary field has a value of 0 for empty positions and a value of 1 for non-empty positions.

[0065] Step 203: The querying party performs a one-hot transformation on the grouping fields to obtain the grouping matrix.

[0066] For example, if Bank A performs a one-hot transformation on the gender field, assuming the gender field has k possible values, then it will obtain a grouping matrix K. k*n That is, n rows and k columns, with each column corresponding to one value of the gender field.

[0067] Step 204: Each participant performs a matrix dot product operation based on the first vector and the group matrix using secret sharing, and obtains the sum matrix fragments respectively.

[0068] For example, Bank A's K k*n F with Bank B n*1 Perform matrix dot product operations based on secret sharing to obtain sum matrix fragments S_share. k*1 .

[0069] Step 205: Each participant performs a matrix dot product operation based on the second vector and the grouping matrix using secret sharing to obtain counting matrix fragments.

[0070] For example, Bank A's K k*n A (with Bank B) n,1 Perform a matrix dot product operation based on secret sharing to obtain counting matrix fragments C_share. k*1 .

[0071] Step 206: Each participant performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment.

[0072] For example, using S_share k*1 and C_share k*1As input, Bank A and Bank B perform element-wise matrix division based on secret sharing to obtain mean matrix fragments M_share. k*1 .

[0073] Step 207: The querying party obtains each mean matrix fragment and determines the group mean based on the mean matrix fragments.

[0074] For example, Bank B will transfer its M_shares k*1 Provided to Bank A, Bank A combines its own M_share k*1 Perform a secret recovery to obtain the grouped mean M of the salary field, grouped by the gender field. k*1 .

[0075] Figure 3 The third step of the flowchart of a federated grouped mean query method provided in this embodiment of the disclosure is as follows: the method can be applied to at least two parties, including a query party and at least one service party. The local data type of the query party includes a statistical field, and the local data type of the service party includes a grouping field.

[0076] Taking Bank A and Bank B as examples, suppose Bank A initiates a grouped average query request to query the average annual bonus of users with different years of service. We can see that the grouping field is the `work_years` field, which comes only from Bank B, the service provider; the statistical field is the `bonus` field, which comes only from Bank A, the querying party. Therefore, this method can include steps 301 to 307 as shown below.

[0077] Step 301: The querying party adds noise to the statistical field based on the local differential privacy algorithm and fills the null values ​​with 0 to obtain the first vector.

[0078] For example, assuming the number of IDs is n, bank A adds noise to the bonus field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector F. n*1 .

[0079] Step 302: The querying party assigns 0 to the position corresponding to null values ​​and 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector.

[0080] For example, bank A generates a second vector A based on the bonus field. (n,1) The bonus field has a value of 0 for empty positions and a value of 1 for non-empty positions.

[0081] Step 303: The service provider performs a one-hot transformation on the grouping field to obtain the grouping matrix.

[0082] For example, if Bank B performs a one-hot transformation on the work_years field, assuming the work_years field has k possible values, then the resulting grouping matrix K is obtained. k*n That is, n rows and k columns, with each column corresponding to one value of the work_years field.

[0083] Step 304: Each participant performs a matrix dot product operation based on the first vector and the group matrix, and obtains a sum matrix fragment respectively.

[0084] For example, Bank B's K k*n With Bank A's F n*1 Perform matrix dot product operations based on secret sharing to obtain sum matrix fragments S_share. k*1 .

[0085] Step 305: Each participant performs a matrix dot product operation based on the second vector and the grouping matrix using secret sharing to obtain counting matrix fragments.

[0086] For example, Bank B's K k*n With Bank A's A ( n,1 Perform a matrix dot product operation based on secret sharing to obtain counting matrix fragments C_share. k*1 .

[0087] Step 306: Each participant performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment.

[0088] For example, using S_share k*1 and C_share k*1 As input, Bank A and Bank B perform element-wise division based on secret sharing to obtain mean matrix fragments M_share. k*1 .

[0089] Step 307: The querying party obtains each mean matrix fragment and determines the group mean based on the mean matrix fragments.

[0090] For example, Bank B will transfer its M_shares k*1 Provided to Bank A, Bank A combines its own M_share k*1 Perform a secret recovery to obtain the grouped mean M of the bonus field, grouped by the work_years field. k*1 .

[0091] Figure 4The fourth step of the flowchart of a federated grouped mean query method provided in this embodiment of the disclosure is as follows: the method can be applied to at least two parties, including a query party and at least one service party. The local data type of the query party includes a grouping field and a statistical field, and the local data type of the service party includes a grouping field.

[0092] Taking Bank A and Bank B as examples, suppose Bank A initiates a grouped mean query request, requesting the average annual bonus for users with different years of service and different genders. We can see that the grouping fields include the `gender` field and the `work_years` field, originating from Bank A and Bank B respectively (i.e., the querying party and the service provider); the statistical field is the `bonus` field, originating only from Bank A (i.e., the querying party). Therefore, this method can include steps 401 to 409 as shown below.

[0093] Step 401: The querying party adds noise to the statistical field based on the local differential privacy algorithm and fills the null values ​​with 0 to obtain the first vector.

[0094] For example, assuming the number of IDs is n, bank A adds noise to the bonus field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector F. n*1 .

[0095] Step 402: The querying party assigns 0 to the position corresponding to null values ​​and 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector.

[0096] For example, bank A generates a second vector A based on the bonus field. (n,1) The bonus field has a value of 0 for empty positions and a value of 1 for non-empty positions.

[0097] Step 403: The querying party performs a one-hot transformation on the local grouping field to obtain the first matrix.

[0098] For example, if Bank A performs a one-hot transformation on the gender field, assuming the gender field has k1 possible values, then the first matrix is ​​obtained. That is, k1 rows and n columns, with each column corresponding to one value of the gender field.

[0099] Step 404: The service provider performs a one-hot transformation on the local grouping field to obtain the second matrix.

[0100] For example, if Bank B performs a one-hot transformation on the `work_years` field, assuming the `work_years` field has k² possible values, then the second matrix will be obtained. That is, k2 rows and n columns, with each column corresponding to one value of the work_years field.

[0101] Step 405: The querying party and the service provider perform a secret sharing operation based on the first matrix and the second matrix to obtain the grouping matrix.

[0102] In this embodiment, when the querying party and the service provider each hold grouping fields, a grouping matrix can be determined based on the first matrix determined by the querying party's grouping fields and the second matrix determined by the service provider's grouping fields. The grouping matrix should include all grouping types of the grouping field values. For example, if the `gender` field has two values ​​and the `work_years` field has two values, the grouping matrix can be determined through secret sharing operations, including four grouping cases (2x2). This embodiment does not impose specific limitations on the specific calculation method; those skilled in the art can choose according to actual needs, such as performing a Cartesian product operation on the first and second matrices.

[0103] In an optional embodiment of the method disclosed herein, the grouping matrix may include grouping matrix fragments, and step 405 may include steps A1 to A5 as follows.

[0104] Step A1: The query provider provides the service provider with the first number of values ​​for the local grouping field.

[0105] For example, Bank A provides Bank B with the first possible value k1 for the gender field.

[0106] Step A2: The service provider provides the querying party with the second number of values ​​for the local grouping field.

[0107] For example, Bank B provides Bank A with the second value k2 of the work_years field.

[0108] Step A3: The querying party stacks the first matrix vertically based on the second number of values ​​to obtain the third matrix.

[0109] For example, if k = k1 * k2, then bank A will... Stack the matrices k2 times vertically to obtain the third matrix K′. 1k*n .

[0110] Step A4: The service provider stacks the second matrix vertically based on the first number of values ​​to obtain the fourth matrix.

[0111] For example, Bank B will Stack the matrices k1 times vertically to obtain the fourth matrix K. ′2k*n .

[0112] Step A5: The querying party and the service party perform element-wise matrix multiplication based on secret sharing using the third and fourth matrices to obtain grouped matrix fragments respectively.

[0113] For example, K′ of bank A 1k*nK′ with Bank B 2k*n Perform element-wise matrix multiplication based on secret sharing to obtain grouped matrix fragments K_share. k*n .

[0114] Step 406: Each participant performs a matrix dot product operation based on the first vector and the grouping matrix using secret sharing, and obtains a sum matrix fragment respectively.

[0115] For example, the K_share of Bank A and Bank B k*n With Bank A's F n*1 Perform matrix dot product operations based on secret sharing to obtain sum matrix fragments S_share. k*1 .

[0116] Step 407: Each participant performs a matrix dot product operation based on the second vector and the grouping matrix using secret sharing to obtain counting matrix fragments.

[0117] For example, the K_share of Bank A and Bank B k*n With Bank A's A( n,1 Perform a matrix dot product operation based on secret sharing to obtain counting matrix fragments C_share. k*1 .

[0118] Step 408: Each participant performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment.

[0119] For example, using S_share k*1 and C_share k*1 As input, Bank A and Bank B perform element-wise division based on secret sharing to obtain mean matrix fragments M_share. k*1 .

[0120] Step 409: The querying party obtains each mean matrix fragment and determines the group mean based on the mean matrix fragments.

[0121] For example, Bank B will transfer its M_shares k*1 Provided to Bank A, Bank A combines its own M_share k*1 Perform a secret recovery to obtain the grouped mean M of the bonus field, grouped by the work_years field and the gender field. k*1 .

[0122] Figure 5The fifth step of the flowchart of a federated grouped mean query method provided in this embodiment of the disclosure is as follows: the method can be applied to at least two parties, including a query party and at least one service party. The local data type of the query party includes a grouping field, and the local data type of the service party includes a grouping field and a statistical field.

[0123] Taking Bank A and Bank B as examples, suppose Bank A initiates a grouped average query request, requesting the average annual bonus for users with different years of service and different genders. We can see that the grouping fields include the `gender` field and the `work_years` field, originating from Bank A and Bank B respectively (i.e., the querying party and the service provider); the statistical field is the `salary` field, originating only from Bank B (i.e., the service provider). Therefore, this method can include steps 501 to 509 as shown below.

[0124] Step 501: The service provider adds noise to the statistical field based on the local differential privacy algorithm and fills the null values ​​with 0 to obtain the first vector.

[0125] For example, assuming the number of IDs is n, Bank B adds noise to the salary field based on a local differential privacy algorithm and fills null values ​​with 0 to obtain the first vector F. n*1 .

[0126] Step 502: The service provider assigns 0 to the position corresponding to null values ​​and 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector.

[0127] For example, bank B generates a second vector A based on the salary field. (n,1) The salary field has a value of 0 for empty positions and a value of 1 for non-empty positions.

[0128] Step 503: The querying party performs a one-hot transformation on the local grouping fields to obtain the fifth matrix.

[0129] For example, if Bank A performs a one-hot transformation on the gender field, assuming the gender field has k1 possible values, then the fifth matrix is ​​obtained. That is, k1 rows and n columns, with each column corresponding to one value of the gender field.

[0130] Step 504: The service provider performs a one-hot transformation on the local grouping field to obtain the sixth matrix.

[0131] For example, if Bank B performs a one-hot transformation on the `work_years` field, assuming the `work_years` field has k² possible values, then the sixth matrix will be obtained. That is, k2 rows and n columns, with each column corresponding to one value of the work_years field.

[0132] Step 505: The querying party and the service provider perform a secret sharing operation based on the fifth and sixth matrices to obtain the grouping matrix.

[0133] In this embodiment of the disclosure, step 505 can be referred to the relevant description of step 405 above. To avoid repetition, it will not be repeated here.

[0134] In an optional embodiment of the method disclosed herein, the grouping matrix may include grouping matrix fragments, and step 505 may include steps B1 to B5 as follows.

[0135] Step B1: The query provider provides the third value of the local grouping field to the service provider.

[0136] For example, Bank A provides Bank B with the third possible value k1 for the gender field.

[0137] Step B2: The service provider provides the querying party with the fourth possible value of the local grouping field.

[0138] For example, Bank B provides Bank A with the fourth value k2 of the work_years field.

[0139] Step B3: The querying party stacks the fifth matrix vertically based on the fourth value number to obtain the seventh matrix.

[0140] For example, if k = k1 * k2, then bank A will... Stack the matrices k2 times vertically to obtain the seventh matrix K′. 1k*n .

[0141] Step B4: The service provider stacks the sixth matrix vertically based on the third value to obtain the eighth matrix.

[0142] For example, Bank B will Stack the matrix k1 times vertically to obtain the eighth matrix K′. 2k*n .

[0143] Step B5: The querying party and the service party perform element-wise matrix multiplication based on secret sharing using the seventh and eighth matrices to obtain grouped matrix fragments respectively.

[0144] For example, K′ of bank A 1k*n K′ with Bank B 2k*n Perform element-wise matrix multiplication based on secret sharing to obtain grouped matrix fragments K_share. k*n .

[0145] Step 506: Each participant performs a matrix dot product operation based on the first vector and the grouping matrix using secret sharing, and obtains a sum matrix fragment respectively.

[0146] For example, the K_share of Bank A and Bank B k*n F with Bank B n*1 Perform matrix dot product operations based on secret sharing to obtain sum matrix fragments S_share. k*1 .

[0147] Step 507: Each participant performs a matrix dot product operation based on the second vector and the grouping matrix using secret sharing to obtain counting matrix fragments.

[0148] For example, the K_share of Bank A and Bank B k*n A with Bank B (n,1) Perform a matrix dot product operation based on secret sharing to obtain counting matrix fragments C_share. k*1 .

[0149] Step 508: Each participant performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment.

[0150] For example, using S_share k*1 and C_share k*1 As input, Bank A and Bank B perform element-wise division based on secret sharing to obtain mean matrix fragments M_share. k*1 .

[0151] Step 509: The querying party obtains each mean matrix fragment and determines the group mean based on the mean matrix fragments.

[0152] For example, Bank B will transfer its M_shares k*1 Provided to Bank A, Bank A combines its own M_share k*1 Perform a secret recovery to obtain the grouped mean M of the salary field, grouped by the work_years and gender fields. k*1 .

[0153] Figure 6 This is a flowchart illustrating a federated grouped mean query provided in an embodiment of this disclosure. The process includes a querying party and a service provider, and the local data types of the querying party and the service provider are referenced. Figure 5 As shown, the querying party holds the grouping field "gender", and the service provider holds the grouping field "work_years" and the statistical field "salary". The process example is as follows: steps 601 to 613.

[0154] Step 601: The service provider adds noise to the salary field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector F. n*1 .

[0155] Step 602: The service provider sets the value to 0 for null values ​​and 1 for non-null values ​​in the salary field, generating the second vector A. (n,1) .

[0156] Step 603: The querying party performs a one-hot transformation on the gender field. Assuming the gender field has k1 possible values, the fifth matrix is ​​obtained. That is, k1 rows and n columns, with each column corresponding to one value of the gender field.

[0157] Step 604: The service provider performs a one-hot transformation on the work_years field. Assuming the work_years field has k2 possible values, the sixth matrix is ​​obtained. That is, k2 rows and n columns, with each column corresponding to one value of the work_years field.

[0158] Step 605: The query direction provides the service provider with the third possible value k1 for the gender field.

[0159] Step 606: The service provider provides the querying party with the fourth possible value k2 for the work_years field.

[0160] Step 607, the querying party will Stack the matrix k2 times vertically to obtain the seventh matrix K′. 1k*n , where k = k1 * k2.

[0161] Step 608, the service provider will Stack the matrix k1 times vertically to obtain the eighth matrix K′. 2k*n .

[0162] Step 609, K′ of the querying party 1k*n K′ of the service provider 2k*n Perform element-wise matrix multiplication based on secret sharing to obtain grouped matrix fragments K_share. k*n .

[0163] Step 610, K_share of the querying party and the service provider k*n With the service provider's F n*1 Perform matrix dot product operations based on secret sharing to obtain sum matrix fragments S_share. k*1 .

[0164] Step 611, K_share of the querying party and the service party k*n With service provider A (n,1) Perform a matrix dot product operation based on secret sharing to obtain counting matrix fragments C_share. k*1 .

[0165] Step 612, using S_share k*1 and C_share k*1 As input, the querying party and the service party perform element-wise division based on secret sharing to obtain the mean matrix fragment M_share. k*1 .

[0166] Step 613: The service provider will transfer the M_share it holds. k*1 Provided to the querying party, which combines its own M_share k*1 Perform a secret recovery to obtain the grouped mean M of the salary field, grouped by the work_years and gender fields. k*1 .

[0167] The federated grouped mean query method disclosed herein can be applied to at least two participating parties. In response to a grouped mean query request initiated by one of the querying parties, each participating party performs preprocessing based on its local data type. The preprocessing includes performing local differential privacy processing on a statistical field to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical field, and performing one-hot transformation on a grouped field to obtain at least one of the following grouped matrices: Each participating party performs a matrix dot product operation based on secret sharing between the first vector and the grouped matrix to obtain sum matrix fragments; Each participating party performs a matrix dot product operation based on secret sharing between the second vector and the grouped matrix to obtain counting matrix fragments; Each participating party performs element-wise matrix division operation based on secret sharing between the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments; The querying party obtains each mean matrix fragment and determines the grouped mean based on the mean matrix fragments. This method performs local differential privacy processing on the statistical fields at each participant's local end, and then performs statistical calculations such as summation, count, and mean. This allows the querying party to obtain an approximate value that is close to the grouped statistical value, but not the true value. While protecting local privacy data, it also avoids the leakage of specific feature values ​​from changes in statistical values ​​when the sample changes, thus further improving data security.

[0168] Figure 7This is a schematic diagram of a federated grouped mean query system 700 provided in an embodiment of the present disclosure. The system may include at least two participants 710, including a querying party A. Participating party 710 includes: a data preprocessing module 711, used to respond to a grouped mean query request initiated by the querying party, perform preprocessing according to local data types, the preprocessing including performing local differential privacy processing on statistical fields to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical fields, and performing one-hot transformation on grouped fields to obtain at least one of the grouped matrices; and a summation matrix sharing module 712, used to share the summation matrix based on the first vector. The second vector and the grouping matrix are used to perform a matrix dot product operation based on secret sharing to obtain sum matrix fragments; the counting matrix sharing module 713 is used to perform a matrix dot product operation based on secret sharing with the grouping matrix to obtain counting matrix fragments; the mean matrix sharing module 714 is used to perform element-wise matrix division operation based on secret sharing based on the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments; when the participant 710 is the query party A, the participant 710A also includes: a secret recovery module 715a, used to obtain each mean matrix fragment and determine the group mean based on the mean matrix fragments.

[0169] In an optional system embodiment of this disclosure, the participants further include at least one service provider B. The local data type of the querying party includes a grouping field, and the local data type of the service provider includes a statistical field. The data preprocessing module 711b of the service provider is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The data preprocessing module 711b of the service provider is specifically used to assign 0 to the position corresponding to null value in the statistical field and assign 1 to the position corresponding to non-null value to obtain a second vector. The data preprocessing module 711a of the querying party is specifically used to perform a one-hot transformation on the grouping field to obtain a grouping matrix.

[0170] In an optional system embodiment of this disclosure, the participants further include at least one service provider B. The local data type of the querying party includes a statistical field, and the local data type of the service provider includes a grouping field. The data preprocessing module 711a of the querying party is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The data preprocessing module 711a of the querying party is specifically used to assign 0 to the position corresponding to null value in the statistical field and assign 1 to the position corresponding to non-null value to obtain a second vector. The data preprocessing module 711b of the service provider is specifically used to perform a one-hot transformation on the grouping field to obtain a grouping matrix.

[0171] In an optional system embodiment of this disclosure, the participating parties further include at least one service provider B. The query party's local data type includes a grouping field and a statistical field, and the service provider's local data type includes a grouping field. The query party's data preprocessing module 711a is specifically used to add noise to the statistical field using a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The query party's data preprocessing module 711a is specifically used to assign 0 to the null value positions and 1 to the non-null value positions in the statistical field to obtain a second vector. The query party's data preprocessing module 711a is specifically used to perform a one-hot transformation on the local grouping field to obtain a first matrix. The service provider's data preprocessing module 711b is specifically used to perform a one-hot transformation on the local grouping field to obtain a second matrix. The query party's data processing module 711a and the service provider's data preprocessing module 711b are specifically used to perform a secret sharing operation based on the first matrix and the second matrix to obtain a grouping matrix.

[0172] In an optional system embodiment of this disclosure, the grouping matrix includes grouping matrix fragments. The query party's data preprocessing module 711a is specifically used to provide the service party with a first number of values ​​for the local grouping field. The service party's data preprocessing module 711b is specifically used to provide the query party with a second number of values ​​for the local grouping field. The query party's data preprocessing module 711a is specifically used to stack the first matrix vertically based on the second matrix to obtain a third matrix. The service party's data preprocessing module 711b is specifically used to stack the second matrix vertically based on the first matrix to obtain a fourth matrix. The query party's data preprocessing module 711a and the service party's data preprocessing module 711b are specifically used to perform element-wise matrix multiplication based on secret sharing on the third and fourth matrices to obtain grouping matrix fragments respectively.

[0173] In an optional system embodiment of this disclosure, the participating parties further include at least one service provider B. The local data type of the querying party includes a grouping field, and the local data type of the service provider includes a grouping field and a statistical field. The data preprocessing module 711b of the service provider is specifically used to add noise to the statistical field based on a local differential privacy algorithm and fill null values ​​with 0 to obtain a first vector. The data preprocessing module 711b of the service provider is specifically used to assign 0 to the position corresponding to null value in the statistical field and assign 1 to the position corresponding to non-null value to obtain a second vector. The data preprocessing module 711a of the querying party is specifically used to perform a one-hot transformation on the local grouping field to obtain a fifth matrix. The data preprocessing module 711b of the service provider is specifically used to perform a one-hot transformation on the local grouping field to obtain a sixth matrix. The data preprocessing module 711a of the querying party is specifically used to perform a secret sharing operation with the service provider based on the fifth matrix and the sixth matrix to obtain a grouping matrix.

[0174] In an optional system embodiment of this disclosure, the grouping matrix includes grouping matrix fragments. The query party's data preprocessing module 711a is specifically used to provide a fifth matrix to the service party; the service party provides the query party with the fourth value of the local grouping field; the query party's data preprocessing module 711 is specifically used to stack the fifth matrix vertically based on the fourth value to obtain a seventh matrix; the service party's data preprocessing module 711b is specifically used to stack the sixth matrix vertically based on the third value to obtain an eighth matrix; the query party's data preprocessing module 711a is specifically used to perform element-wise matrix multiplication with the service party based on the seventh and eighth matrices using secret sharing to obtain grouping matrix fragments respectively.

[0175] It should be noted that the terms "query party A" and "service party B" are only used to distinguish the participants 710 that initiate the request and respond in each query. In different query batches, the same participant 710 may be either query party A or service party B. Therefore, based on the above explanation, when participant 710 is query party A, participant 710A applies the data preprocessing module 711a, the sum matrix sharing module 712a, the counting matrix sharing module 713a, the mean matrix sharing module 714a, and the secret recovery module 715a in this query; when participant 710 is service party B, participant 710B applies the data preprocessing module 711b, the sum matrix sharing module 712b, the counting matrix sharing module 713b, and the mean matrix sharing module 714b in this query. Based on this, depending on the services provided by the participants 710 in the query, each participant 710 may act as only query party A, or only as a service provider, or both query party A and query party B. The division of its corresponding functional modules can also be set according to service requirements. This disclosure embodiment does not impose specific restrictions on this.

[0176] The federated grouped mean query system disclosed herein may include at least two participants. In response to a grouped mean query request initiated by one of the participants, each participant performs preprocessing based on its local data type. The preprocessing includes performing local differential privacy processing on a statistical field to obtain a first vector, determining a second vector based on the positions of null and non-null values ​​in the statistical field, and performing one-hot transformation on a grouped field to obtain at least one of the following: a grouped matrix. Each participant performs a matrix dot product operation based on secret sharing between the first vector and the grouped matrix to obtain sum matrix fragments. Each participant performs a matrix dot product operation based on secret sharing between the second vector and the grouped matrix to obtain counting matrix fragments. Each participant performs element-wise matrix division operation based on secret sharing between the sum matrix fragments and the counting matrix fragments to obtain mean matrix fragments. The querying party obtains each mean matrix fragment and determines the grouped mean based on the mean matrix fragments. This method performs local differential privacy processing on the statistical fields at each participant's local end, and then performs statistical calculations such as summation, count, and mean. This allows the querying party to obtain an approximate value that is close to the grouped statistical value, but not the true value. While protecting local privacy data, it also avoids the leakage of specific feature values ​​from changes in statistical values ​​when the sample changes, thus further improving data security.

[0177] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0178] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0179] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0180] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0181] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0182] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0183] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).

[0184] The storage unit stores program code, which can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.

[0185] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.

[0186] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0187] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0188] Electronic device 800 can also communicate with one or more external devices (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 800, and / or any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed through display unit 840 and input / output (I / O) interface 850 connected to display unit 840. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0189] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0190] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0191] In embodiments of this disclosure, a program product for implementing the above-described methods is also provided. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0192] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0193] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0194] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0195] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0196] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0197] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for querying the mean of federated groups, characterized in that, The method is applied to at least two parties, including a querying party, and the method includes: In response to the group mean query request initiated by the querying party, each of the participating parties performs preprocessing according to the local data type. The preprocessing includes performing local differential privacy processing on the statistical field to obtain a first vector, determining a second vector according to the position of null and non-null values ​​in the statistical field, and performing one-hot transformation on the grouping field to obtain a grouping matrix. Each of the participating parties performs a matrix dot product operation based on secret sharing between the first vector and the grouping matrix to obtain a sum matrix fragment respectively; Each of the participating parties performs a matrix dot product operation based on secret sharing between the second vector and the grouping matrix to obtain counting matrix fragments respectively; Each of the participating parties performs element-wise matrix division based on secret sharing, using the sum matrix fragment and the counting matrix fragment, to obtain the mean matrix fragment respectively; The querying party obtains each of the mean matrix fragments and determines the group mean based on the mean matrix fragments.

2. The method according to claim 1, characterized in that, The participants also include at least one service provider. The local data type of the querying party includes a grouping field, and the local data type of the service provider includes a statistical field. In response to the grouped mean query request initiated by the querying party, each of the participants performs preprocessing based on its local data type, including: The service provider adds noise to the statistical field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector. The service provider assigns a value of 0 to the position corresponding to null values ​​and a value of 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector; The querying party performs a one-hot transformation on the grouping field to obtain the grouping matrix.

3. The method according to claim 1, characterized in that, The participants also include at least one service provider. The local data type of the querying party includes a statistical field, and the local data type of the service provider includes a grouping field. In response to the grouped mean query request initiated by the querying party, each of the participants performs preprocessing based on its local data type, including: The querying party adds noise to the statistical field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector. The querying party assigns a value of 0 to the position corresponding to the null value in the statistical field and a value of 1 to the position corresponding to the non-null value, thereby obtaining the second vector; The service provider performs a one-hot transformation on the grouping field to obtain the grouping matrix.

4. The method according to claim 1, characterized in that, The participants also include at least one service provider. The local data type of the querying party includes a grouping field and a statistical field. The local data type of the service provider includes a grouping field. In response to the grouped average query request initiated by the querying party, each of the participants performs preprocessing based on its local data type, including: The querying party adds noise to the statistical field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector. The querying party assigns a value of 0 to the position corresponding to the null value in the statistical field and a value of 1 to the position corresponding to the non-null value, thereby obtaining the second vector; The querying party performs a one-hot transformation on the local grouping field to obtain a first matrix; The service provider performs a one-hot transformation on the local grouping field to obtain a second matrix; The querying party and the service provider perform a secret sharing operation based on the first matrix and the second matrix to obtain the grouping matrix.

5. The method according to claim 4, characterized in that, The grouping matrix includes grouping matrix fragments. The querying party and the service provider perform a secret sharing operation based on the first matrix and the second matrix to obtain the grouping matrix, including: The query direction provides the service provider with the first number of possible values ​​for the local grouping field; The service provider provides the querying party with a second number of values ​​for the local grouping field; The querying party stacks the first matrix vertically based on the second number of values ​​to obtain a third matrix; The service provider stacks the second matrix vertically based on the first number of values ​​to obtain a fourth matrix; The querying party and the service provider perform element-wise matrix multiplication based on secret sharing using the third matrix and the fourth matrix to obtain grouped matrix fragments respectively.

6. The method according to claim 1, characterized in that, The participants also include at least one service provider. The local data type of the querying party includes a grouping field, and the local data type of the service provider includes a grouping field and a statistical field. In response to the grouped mean query request initiated by the querying party, each of the participants performs preprocessing based on its local data type, including: The service provider adds noise to the statistical field based on a local differential privacy algorithm and fills empty values ​​with 0 to obtain the first vector. The service provider assigns a value of 0 to the position corresponding to null values ​​and a value of 1 to the position corresponding to non-null values ​​in the statistical field to obtain the second vector; The querying party performs a one-hot transformation on the local grouping field to obtain the fifth matrix; The service provider performs a one-hot transformation on the local grouping field to obtain the sixth matrix; The querying party and the service provider perform a secret sharing operation based on the fifth matrix and the sixth matrix to obtain the grouping matrix.

7. The method according to claim 6, characterized in that, The grouping matrix includes grouping matrix fragments. The querying party and the service provider perform a secret sharing operation based on the fifth matrix and the sixth matrix to obtain the grouping matrix, including: The query direction provides the service provider with a third possible value for the local grouping field; The service provider provides the querying party with a fourth possible value for the local grouping field; The querying party stacks the fifth matrix vertically based on the fourth value number to obtain the seventh matrix; The service provider stacks the sixth matrix vertically based on the third value to obtain the eighth matrix; The querying party and the service provider perform element-wise matrix multiplication based on secret sharing using the seventh matrix and the eighth matrix to obtain grouped matrix fragments respectively.

8. A federated grouped mean query system, characterized in that, The system includes at least two participants, one of which is a querying party. The participants include: The data preprocessing module is used to respond to the grouped mean query request initiated by the querying party, and perform preprocessing according to the local data type. The preprocessing includes performing local differential privacy processing on the statistical field to obtain a first vector, determining a second vector according to the position of null and non-null values ​​in the statistical field, and performing one-hot transformation on the grouping field to obtain a grouping matrix. The sum matrix sharing module is used to perform a matrix dot product operation based on secret sharing between the first vector and the grouping matrix to obtain sum matrix fragments respectively; The counting matrix sharing module is used to perform a matrix dot product operation based on secret sharing between the second vector and the grouping matrix to obtain counting matrix fragments respectively; The mean matrix sharing module is used to perform element-wise matrix division based on secret sharing on the sum matrix fragments and the counting matrix fragments to obtain the mean matrix fragments respectively. In the case where the participant is the querying party, the participant also includes: The secret recovery module is used to obtain each of the mean matrix fragments and determine the group mean based on the mean matrix fragments.

9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the federated grouped mean lookup method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable medium, wherein a computer program is stored on the computer-readable storage medium, characterized in that, When the computer program is executed by the processor, it implements the federal grouped mean query method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data storage method, querying method and device

    CN101968806A

  • Federal statistical query method and device based on privacy set intersection and electronic equipment

    CN115982245A