WO2019085677A1 - Garbled circuit-based data calculation method, apparatus, and device - Google Patents

Garbled circuit-based data calculation method, apparatus, and device Download PDF

Info

Publication number
WO2019085677A1
WO2019085677A1 PCT/CN2018/106963 CN2018106963W WO2019085677A1 WO 2019085677 A1 WO2019085677 A1 WO 2019085677A1 CN 2018106963 W CN2018106963 W CN 2018106963W WO 2019085677 A1 WO2019085677 A1 WO 2019085677A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
group
data
random number
statistical
Prior art date
Application number
PCT/CN2018/106963
Other languages
French (fr)
Chinese (zh)
Inventor
李艺
徐崴
刘正
Original Assignee
清华大学
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 清华大学, 阿里巴巴集团控股有限公司 filed Critical 清华大学
Publication of WO2019085677A1 publication Critical patent/WO2019085677A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators

Definitions

  • the present specification relates to the field of computer software technology, and in particular, to a data statistics method, apparatus and device based on an obfuscation circuit.
  • Some of the services require multiple service provider collaboration statistics, such as the risk control business in a long-term lending scenario.
  • the service provider is a financial institution, and the loan applicant may borrow from one or more financial institutions.
  • risk control of loan applicants it is often necessary for multiple financial institutions to participate in statistics.
  • the nodes of the multiple service providers respectively provide service data for statistics, such as maximizing, minimizing, summing, or averaging the service data.
  • the specific loan amount of the loan applicant in a single financial institution may be counted, or the sum of the loan amount of the loan applicant in a plurality of financial institutions may be counted, and the like.
  • the embodiments of the present specification provide a data statistics method, apparatus, and device based on an obfuscation circuit, to solve the following technical problem: a statistical solution that better protects data privacy of a service provider is needed.
  • each node to obtain a plurality of node groups including at most two nodes
  • the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
  • a grouping module grouping each node to obtain a plurality of node groups including at most two nodes
  • the intra-group statistical module performs partial service data exchange between nodes in the node group, and obtains statistical data in the group according to the exchanged data and the obfuscated circuit statistical service data, wherein the obfuscating circuit is used to confuse the statistical process, and Hide statistical results based on random numbers;
  • the inter-group statistics module performs statistics between the node groups according to the statistical data in the group, and obtains statistical data between the groups;
  • the restoration module restores the statistical data between the groups by using a corresponding random number to obtain a final statistical result.
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
  • each node to obtain a plurality of node groups including at most two nodes
  • the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
  • each service provider corresponds to each node, and the data exchanged and the obfuscated circuit between the nodes can not only hide the data held by the node, but also hide the statistics.
  • FIG. 1 is a schematic diagram of an overall architecture involved in an implementation scenario of the present specification
  • FIG. 2 is a schematic flowchart of a data statistics method based on an obfuscation circuit according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of an anonymous statistical circuit according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of performing statistics on four nodes by using the method of FIG. 2 according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of performing statistics on three nodes by using the method of FIG. 2 according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an obfuscation circuit-based data statistics apparatus corresponding to FIG. 2 according to an embodiment of the present disclosure.
  • Embodiments of the present specification provide a data statistics method, apparatus, and device based on an obfuscation circuit.
  • the service data statistics for each node is a multi-party secure computing process
  • the multi-party secure computing realizes multi-party collaborative computing under the requirement that one party data is not leaked to other parties, and can guarantee the calculation result. Correctness.
  • the scheme of the present specification can also hide the identity of the node providing data in the statistical process and the relative statistical relationship between the data of the two nodes.
  • data exchange and obfuscation circuits between nodes are utilized, and data exchange includes partial service data exchange and/or random number exchange between nodes, and the obfuscated circuit utilized is improved on the basis of the prior art.
  • the obfuscation circuit is a secure computing protocol based on encryption.
  • Two mutually untrusted data holders can cooperatively calculate the result of a certain function f, and f uses a circuit to represent the input, and the input is the data held by the two parties.
  • the circuit needs to be confused.
  • the confusing circuit protocol ensures the correctness of the calculation result, and neither party can obtain information other than the function result from the protocol.
  • the obfuscation circuit utilized in the present invention increases the random number input, and uses the random number to mask the result while completing the statistical calculation, thereby preventing any one from restoring the result. Not only that, but also data exchange between nodes before the data input obfuscation circuit. Therefore, it is advantageous to hide the identity of both parties and the relative statistical relationship between the two parties. For example, for the statistics of the most value, the relative size of the two parties can be hidden.
  • the confusing circuits referred to below refer to such improved confusing circuits in this paragraph.
  • FIG. 1 is a schematic diagram of an overall architecture involved in an implementation scenario of the present specification.
  • the overall architecture there are mainly three parts: user (terminal), agent and multiple nodes.
  • the agent directly interacts with the user and coordinates each node to achieve multi-party statistics.
  • the service provider is a financial institution
  • the node is, for example, a financial institution server
  • each financial institution may correspond to one node respectively
  • the financial institution may be a bank, an insurance company, or a third-party payment institution.
  • the service provider may not be limited to financial institutions, but may also be government, schools, shops, other institutions, or companies.
  • a workflow of the overall architecture includes: the user sends a data request to the agent, the agent notifies the plurality of nodes, and the plurality of nodes perform statistics based on the data exchange and the obfuscation circuit between the nodes, and obtain the final statistical result and return.
  • FIG. 2 is a schematic flowchart diagram of a data statistics method based on an obfuscation circuit according to an embodiment of the present disclosure.
  • the execution body of the process includes a plurality of nodes participating in the statistics, and may also include a proxy.
  • the process in Figure 2 can include the following steps:
  • S202 Group each node to obtain a plurality of node groups including at most two nodes.
  • each node in order to speed up the statistical speed, each node may be grouped into two groups, and then counted in the node group first, and then counted among the node groups. Thus, the final statistical result is obtained through multiple rounds of statistics.
  • the node group may also include only one node, and the node group may not perform statistics and participate in the statistics of the node groups.
  • S204 Perform partial service data exchange between nodes in the node group, and obtain statistical data in the group according to the exchanged data and the confusion circuit statistical service data, wherein the obfuscation circuit is used to confuse the statistical process, and based on the random number Hide statistics.
  • the service data is data required for performing statistics, which affects the statistical data in the group, thereby affecting the statistical data between the groups and the final statistical result.
  • the service data of each node may refer to the loan amount of the target object at the financial institution to which the node belongs
  • the final statistical result may refer to the total amount of the loan of the target institution at the financial institution to which the node belongs (summed Statistics) or the maximum loan amount (statistics for the maximum value), etc., which specific statistics can be determined according to actual needs.
  • the real content of the service data held by the node can be hidden by the partial service data exchange between the nodes.
  • the service data owned by the node is split.
  • the service data is a value, for example, the secret sharing protocol can be used.
  • Splitting if the service data is one or more data records, for example, the data records can be split, of course, the single data record itself can be further split; and so on.
  • the obfuscation circuit has a random number input which can be generated by a node.
  • the obfuscated circuit itself can also be generated by the node.
  • the generated obfuscated circuit uses the input random number to mask the result while completing the statistical calculation, which can prevent any party from restoring the result.
  • circuit may be just a computer processing logic, and is not necessarily a real circuit.
  • S206 Perform inter-node group statistics according to the statistical data in the group, and obtain inter-group statistics.
  • the statistics between the node groups can also be performed between the two node groups, and the statistical process between the node groups also utilizes the confusion circuit accordingly. If there are more than two node groups, the inter-node group statistics can be performed iteratively. In this case, the inter-group statistical data described in step S206 refers to the inter-group statistical data finally obtained after the iteration is completed.
  • the representative nodes of each node group may be regrouped, and then statistics are performed in the re-divided group, thereby implementing the above-mentioned node group statistics.
  • the original statistical data is not directly presented, but is composed of at least two different nodes. Holding some, but not all, through the exchange of data between nodes, the joint parts can restore the original statistics, not only that, but the intermediate statistical process is confused.
  • the corresponding random number is a part of the inter-group statistical data held by the node, and is used to restore other inter-group statistical data held by other nodes to obtain a final statistical result.
  • each service provider corresponds to each node, and the data exchange and the obfuscation circuit between the nodes can not only hide the data held by the node, but also hide the identity of the node providing the data in the statistical process, and The relative statistical relationship between the data of the two nodes, therefore, the privacy of the data of the service provider is more guaranteed.
  • the embodiments of the present specification further provide some specific implementations of the method, and an extended solution, which will be described below.
  • the performing the inter-node partial service data exchange in the node group may specifically include:
  • the service data of each node in the node group is split into two parts, wherein the service data before the splitting can be restored according to the XOR result of the two parts; if the node group contains the first node And the second node, the part of the data split by the two nodes are exchanged.
  • the inter-node partial service data exchange performed in the node group includes, for example, the first node exchanges b1 of the second node with a2; after the exchange, the first node holds (a1, b1), and the second node holds (a2) , b2).
  • each node group contains two nodes, and for distinguishing, one of the nodes is referred to as a first node, and the other node is referred to as a second node.
  • the first node of another node group is referred to as a third node, and another node group is The second node is renamed to the fourth node;
  • a node group may also contain only one node, and then a node included in such a node group is also referred to as a third node;
  • the statistical data of the group is obtained according to the data of the exchanged data and the confusing circuit, and the specific data may include:
  • the obfuscating circuit takes the exchanged data and the random number as input; according to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the intra-group statistical data is obtained.
  • the random number is generated by a node or a proxy, taking node generation as an example.
  • the first node generates and holds the first random number, denoted as r1
  • the second node generates and holds the second random number, denoted as r2.
  • FIG. 3 is a schematic diagram of an anonymous statistical circuit according to an embodiment of the present disclosure.
  • the statistics are specifically a maximum value calculation, which involves comparison of service data between nodes. Therefore, the anonymous statistical circuit may also be referred to as an anonymous comparison circuit.
  • comparison gate circuit can be composed of several simple gate circuits.
  • R1 and r2 are the random numbers entered.
  • the input to the anonymous statistical circuit includes: (a1, a2, b1, b2, r1, r2), that is, the input of the aliasing circuit.
  • a is restored by a1 and a2
  • b is restored by b1 and b2
  • the larger value max(a, b) among a and b is obtained by statistics, and further, using r1 and
  • the XOR result of r2 is XORed with max(a,b), and the result is:
  • the output of the obfuscation circuit is Equation 1.
  • (a1, b1, r1) is input based on data transmission of the first node
  • (a2, b2, r2) is input based on data transmission of the second node
  • the data transmission is based on the confusion circuit.
  • the Oblivious Transfer protocol can be used. Due to confusion, the first node and the second node transmit not the original value but the obfuscated value.
  • the first node or the second node may partially restore the formula 1 according to the random number held by itself. Before the final statistical result is obtained, it is necessary to avoid exposing max(a, b) directly. Based on this, for example, the first node can partially restore the formula 1 according to the r1 held by the first node. And hold, while the second node holds Further reduced r2, in this way, the first node or the second node can not obtain max(a, b) by itself, thereby ensuring the secrecy of max(a, b).
  • the first node may generate and hold the first random number, and the second node generates and holds the second random number; further, according to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the statistics in the group are obtained, which may specifically include:
  • the first node Passing the interaction between the first node and the second node, the first node inputs the first random number and its own exchanged data, and the second node inputs the second random number and its own exchanged data into the Converging the circuit statistical service data, and obtaining statistical data in the group; wherein the statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; The second random number is held by the second node.
  • the first output result is counted for the first node and the second node.
  • the obtaining the statistics in the group may specifically include:
  • the second node obtains the first output result of the obfuscation circuit, and sends the result to the first node; the first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a hidden state.
  • Corresponding statistical result which is numerically equal to the XOR result of the corresponding statistical result and the second random number.
  • the statistics between the groups are further performed.
  • the result of the statistics in the group is in a hidden state, and can be continuously used in the process of counting between groups without Exposing hidden results allows random numbers used to restore hidden results to be exchanged between groups of nodes.
  • another node group includes a third node corresponding to the first node and a fourth node corresponding to the second node; for intra-group statistics, the third node generates a third random number, and the fourth node generates a third node Four random numbers. Then, the random number exchange may be performed before the inter-group statistics: the second node sends the second random number to the third node, and the fourth node sends the corresponding fourth random number to the first node. Further, the first node and the third node respectively perform the inter-group statistics as the representative nodes of the node group to which they belong.
  • the node performs the node according to the statistics in the group for step S206.
  • Statistics between groups can be obtained from the statistics of the group. The details can include:
  • the first node and the third node are respectively used as representative nodes of the node group to which they belong, and perform random number exchange; according to the post-exchange random number, the representative group corresponding to the intra-group statistical data and the confusion circuit, the interaction between the representative nodes is performed.
  • the representative node Similar to the intra-group statistics, in the inter-group statistics, the representative node also needs to generate a random number again to hide the results of the inter-group statistics. It is assumed that the first node generates a fifth random number for the inter-node group statistics, and the third node. A sixth random number is generated.
  • the inter-group statistical data may include: an exclusive OR result of the second output result of the obfuscation circuit and the second output result of the obfuscation circuit and the fifth random number statistically generated by the first node between the node groups, The first node holds; the third node is a sixth random number that is generated and held by the node group.
  • the second output result is counted for the first node, the second node, the third node, and the fourth node.
  • the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result, which may be specifically include:
  • the third node sends the sixth random number to the first node; the first node performs an exclusive-OR operation on the sixth random number and the statistical data of the group, and restores the hidden corresponding statistical result, as a final statistic result.
  • the using the corresponding random number to restore the statistical data between the groups to obtain the final statistical result may also be performed:
  • FIG. 4 is a schematic flowchart of performing statistics on four nodes by using the method of FIG. 2 according to an embodiment of the present disclosure. Some of the steps in Figure 4 have been described in the above examples, and these steps are only briefly described herein.
  • the output function of the obfuscated circuit be denoted by f.
  • the first node and the second node belong to one node group
  • the third node and the fourth node belong to another node group
  • a, b, c, and d are service data of the corresponding node, respectively.
  • the output of the obfuscated circuit is counted as fab for the statistics of a and b
  • the output of the obfuscated circuit is recorded as fcd for the statistics of c and d
  • the output of the obfuscated circuit is recorded for the statistics of a, b, c, and d.
  • Fabcd the output function of the obfuscated circuit
  • the first node and the second node split the service data based on the Secret Sharing protocol before performing the first round of statistics.
  • the first node holds (a1, a2), and the second node Holding (b1, b2); the first node performs partial service data exchange with the second node, after the exchange, the first node holds (a1, b1), and the second node holds (a2, b2);
  • the first node generates an obfuscation circuit, and the input is (a1, a2, b1, b2, r1, r2), and the state of the first node and the second node is state 1 at this time, and the state 1 indicates that the current confusion circuit is calculated before;
  • the second node obtains the output result fab of the obfuscated circuit, and sends it to the first node, and the first node uses the r1 to perform an exclusive OR operation and holds The second node holds r2, and the statistical result is in a hidden state.
  • the fab is numerically equal to the formula 1, and it can be seen that the statistical result max(a, b) is in a hidden state.
  • the state of the first node and the second node is state 2, and the state 2 indicates that the current confusion circuit is calculated;
  • the first node and the second node respectively hold a part of the statistical data in the group: maskab, r2; the first node is taken as the representative node of the first node group; similarly, for the other node group, the group is completed.
  • the third node holds The fourth node holds r4 and the third node is a representative node of another node group;
  • the random number exchange is performed between the node groups, the second node sends r2 to the third node, and the fourth node sends r4 to the first node; after the random number is exchanged, as the representative node, the first node holds (maskab, r4) The third node holds (maskcd, r2), and the state of the first node and the third node is restored to state 1;
  • the first node and the third node perform the next round of statistics, that is, the inter-group statistics; the first node generates a fifth random number r11, and the third node generates a sixth random number r22;
  • the input of the obfuscated circuit is (maskab, r2, maskcd, r4, r11, r22), the obfuscated circuit calculation process is performed, the obfuscated circuit outputs fabcd; after further performing the exclusive OR operation, the first node holds The third node holds r22, and the state of the first node and the third node is restored to state 2;
  • the third node sends r22 to the first node, and the first node performs an exclusive OR operation with r22 and maskabcd to restore the final statistical result, which is recorded as final. And can send the final back to the agent, and then return to the user by the agent; for the specific calculation of the maximum value as an example, final is equal to max(a, b, c, d).
  • a node group may also contain only one node.
  • two node groups that perform inter-group statistics it is possible for two node groups that perform inter-group statistics to have a total of three nodes.
  • the statistics in the group can be referred to the above description, and for the node group containing only one node, there is no need to perform intra-group statistics, and the specific implementation scheme of the statistics between the groups and the above The description is also different.
  • the step-synthesis is performed according to the statistical data in the group, and the inter-group statistics are obtained, which may include:
  • the first node and the third node are respectively used as representative nodes of the node group to which they belong, and data exchange is performed; according to the exchanged data, the intra-group statistical data corresponding to the representative nodes, and the obfuscation circuit, the interaction between the representative nodes is performed.
  • the inter-group statistics are obtained, and the inter-group statistics are obtained.
  • the obfuscating circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node will use the second random number Sending to the third node, the third node sends a part of its own data split based on the secret sharing protocol to the first node.
  • the inter-group statistical data includes: an XOR result of the third output result of the obfuscation circuit and a fifth random number generated by the first node for the statistically generated between the node groups, by A node holds; the third node is a sixth random number generated and held by the node group.
  • the third output result is counted for the first node, the second node, and the third node. The following steps are similar to the case where four nodes participate in statistics, and will not be described again.
  • FIG. 5 Part of the steps in Fig. 5 can be referred to Fig. 4, and the main steps are explained here.
  • the first node and the second node belong to one node group, and the third node belongs to another node group.
  • the output of the obfuscated circuit when counting for a, b, and c is recorded as fabc.
  • the third node splits the service data c to get (c1, c2);
  • the second node sends r2 to the third node, and the third node sends c2 to the first node; then, as the proxy node, the first node holds (maskab, c2), Three nodes hold (c1, r2);
  • the first node and the third node perform a lower round comparison, that is, inter-group statistics; the first node generates a fifth random number r11, and the third node generates a sixth random number r22;
  • the input of the obfuscated circuit is (maskab, r2, c1, c2, r11, r22), the obfuscated circuit calculation process is performed, the obfuscated circuit outputs fabc; after further performing the exclusive OR operation, the first node holds The third node holds r22;
  • the third node sends r22 to the first node.
  • the first node performs an exclusive OR operation with the maskabc by r22, restores the final, and can send the final.
  • final is equal to max(a, b, c).
  • the embodiment of the present specification further provides a device corresponding to the above method, as shown in FIG. 6.
  • FIG. 6 is a schematic structural diagram of an obfuscation circuit-based data statistic apparatus corresponding to FIG. 2 according to an embodiment of the present disclosure.
  • the apparatus may be located on an execution body of the process in FIG. 2, and includes:
  • the grouping module 601 groups each node to obtain a plurality of node groups including at most two nodes;
  • the intra-group statistic module 602 performs partial service data exchange between the nodes in the node group, and obtains statistical data in the group according to the exchanged data and the confusing circuit statistical service data, wherein the obfuscation circuit is used to confuse the statistical process. And hiding statistical results based on random numbers;
  • the inter-group statistics module 603 performs statistics between the node groups according to the statistical data in the group, and obtains statistics between the groups;
  • the restoration module 604 restores the statistical data between the groups by using a corresponding random number to obtain a final statistical result.
  • the intra-group statistic module 602 performs part-service data exchange between the nodes in the node group, and specifically includes:
  • the in-group statistic module 602 splits the service data of each node in the node group into two parts based on the secret sharing protocol, wherein the pre-split service data can be restored according to the XOR result of the two parts;
  • the node group includes the first node and the second node, a part of the data split by the two nodes is exchanged.
  • the in-group statistics module 602 obtains the statistics in the group according to the data after the exchange and the statistics data of the obfuscation circuit, and specifically includes:
  • the intra-group statistic module 602 generates an obfuscation circuit that takes the exchanged data and the random number as input; according to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node. , get the statistics within the group.
  • the intra-group statistics module 602 obtains the intra-group statistics, the first node generates and holds the first random number, and the second node generates and holds the second random number;
  • the in-group statistic module 602 collects statistical data of the group by using the interaction between the first node and the second node, and the statistic data includes:
  • the intra-group statistic module 602 passes the interaction between the first node and the second node, the first node will use the first random number and its own post-exchange data, and the second node will use the second random number and the second node. After the exchange of data, enter the confusion circuit statistical service data to obtain statistical data within the group;
  • the statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; and the second random number is held by the second node .
  • the in-group statistics module 602 obtains the statistics in the group, and specifically includes:
  • the second node obtains the first output result of the obfuscation circuit and sends the result to the first node;
  • the first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a corresponding statistical result in a hidden state, which is numerically equal to the corresponding statistical result and the second random number The XOR result of the number.
  • another node group includes a third node corresponding to the first node, and a fourth node corresponding to the second node,
  • the inter-group statistic module 603 performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
  • the inter-group statistic module 603 takes the first node and the third node as representative nodes of the node group to which it belongs, and performs random number exchange;
  • the inter-group statistics are obtained by the interaction between the representative nodes, and the inter-group statistical data is obtained;
  • the obfuscation circuit takes the post-exchange random number and the statistical data of the partial group corresponding to the representative node as input, and the random number exchange includes: the second node sends the second random number to the third node, and the fourth node Sending the corresponding fourth random number to the first node.
  • the inter-group statistic data includes: an XOR result of the second output result of the obfuscation circuit and a fifth random number generated by the first node between the node groups, and is held by the first node;
  • the third node is a sixth random number generated and held by the node group.
  • the restoring module 604 uses the corresponding random number to restore the statistical data of the group to obtain a final statistical result, which specifically includes:
  • the third node sends the sixth random number to the first node
  • the first node performs an exclusive-OR operation on the sixth random number and the statistical data between the groups, and restores the hidden corresponding statistical result as a final statistical result.
  • the restoring module 604 uses the corresponding random number to restore the statistical data between the groups to obtain statistics before the final statistical result.
  • the module 603 continues to iterate the statistics until: the inter-group statistics obtained after the statistics of all the nodes are completed are used for the restoration to obtain the final statistical result.
  • the inter-group statistic module 603 performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
  • the inter-group statistic module 603 takes the first node and the third node as representative nodes of the node group to which it belongs, and performs data exchange;
  • the statistical data of the group corresponding to the representative nodes, and the obfuscation circuit the statistics between the nodes are performed by the interaction between the representative nodes, and the statistical data between the groups is obtained;
  • the obfuscation circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node sends the second random number to the third node, and the third node is based on A part of the data split by the secret sharing protocol is sent to the first node.
  • the inter-group statistical data includes: an XOR result of the third output result of the obfuscation circuit and a fifth random number generated by the first node between the node groups, and is held by the first node;
  • the third node is a sixth random number generated and held by the node group.
  • the node comprises a financial institution server.
  • the embodiment of the present specification further provides an obfuscation circuit-based data statistics device corresponding to FIG. 2, including:
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
  • each node to obtain a plurality of node groups including at most two nodes
  • the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
  • the embodiment of the present specification further provides a non-volatile computer storage medium corresponding to FIG. 2, which stores computer executable instructions, and the computer executable instructions are set as:
  • each node to obtain a plurality of node groups including at most two nodes
  • the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
  • the device, the device, the non-volatile computer storage medium and the method provided by the embodiments of the present specification are corresponding, and therefore, the device, the device, and the non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method, since The beneficial technical effects of the method are described in detail, and therefore, the beneficial technical effects of the corresponding device, device, and non-volatile computer storage medium are not described herein.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding.
  • Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the specification can be provided as a method, system, or computer program product.
  • embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • embodiments of the present specification can take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiments of the present specification disclose a garbled circuit-based data calculation method, apparatus, and device. The method comprises: on the basis of data exchange between nodes, and a garbled circuit, performing service data calculation on nodes in groups of two; further performing calculation on the obtained data in groups of two; and continuing in the same manner to obtain the final calculation result.

Description

基于混淆电路的数据统计方法、装置以及设备Data statistics method, device and device based on confusion circuit 技术领域Technical field
本说明书涉及计算机软件技术领域,尤其涉及基于混淆电路的数据统计方法、装置以及设备。The present specification relates to the field of computer software technology, and in particular, to a data statistics method, apparatus and device based on an obfuscation circuit.
背景技术Background technique
随着计算机和互联网技术的迅速发展,很多业务可以在网上进行,给用户带来了便利。其中,有的业务需要多个服务提供方协作统计,比如,多头借贷场景下的风控业务,在该场景下,服务提供方为金融机构,贷款申请者可能向其中一家或者多家金融机构借贷,在对贷款申请者进行风控时,往往需要多家金融机构参与统计。With the rapid development of computer and Internet technologies, many businesses can be carried out online, bringing convenience to users. Some of the services require multiple service provider collaboration statistics, such as the risk control business in a long-term lending scenario. In this scenario, the service provider is a financial institution, and the loan applicant may borrow from one or more financial institutions. In the case of risk control of loan applicants, it is often necessary for multiple financial institutions to participate in statistics.
在现有技术中,多个服务提供方的节点分别对外提供服务数据用于统计,比如针对服务数据求最大值、求最小值、求和、或者求平均值等。在上一段的例子中,具体可以是统计该贷款申请者在单家金融机构的最高贷款金额,或者也可以是统计该贷款申请者在多家金融机构的贷款金额之和,等等。In the prior art, the nodes of the multiple service providers respectively provide service data for statistics, such as maximizing, minimizing, summing, or averaging the service data. In the example of the previous paragraph, the specific loan amount of the loan applicant in a single financial institution may be counted, or the sum of the loan amount of the loan applicant in a plurality of financial institutions may be counted, and the like.
基于现有技术,需要更能保障服务提供方数据隐私性的统计方案。Based on the prior art, there is a need for a statistical solution that more secures the data privacy of the service provider.
发明内容Summary of the invention
本说明书实施例提供基于混淆电路的数据统计方法、装置以及设备,用以解决如下技术问题:需要更能保障服务提供方数据隐私性的统计方案。The embodiments of the present specification provide a data statistics method, apparatus, and device based on an obfuscation circuit, to solve the following technical problem: a statistical solution that better protects data privacy of a service provider is needed.
为解决上述技术问题,本说明书实施例是这样实现的:In order to solve the above technical problem, the embodiment of the present specification is implemented as follows:
本说明书实施例提供的一种基于混淆电路的数据统计方法,包括:A data statistics method based on an obfuscation circuit provided by an embodiment of the present specification includes:
对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
本说明书实施例提供的一种基于混淆电路的数据统计装置,包括:A data statistics device based on an obfuscation circuit provided by an embodiment of the present specification includes:
分组模块,对各节点进行分组,得到多个包含至多两个节点的节点组;a grouping module, grouping each node to obtain a plurality of node groups including at most two nodes;
组内统计模块,在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;The intra-group statistical module performs partial service data exchange between nodes in the node group, and obtains statistical data in the group according to the exchanged data and the obfuscated circuit statistical service data, wherein the obfuscating circuit is used to confuse the statistical process, and Hide statistical results based on random numbers;
组间统计模块,根据所述组内统计数据进行节点组间统计,得到组间统计数据;The inter-group statistics module performs statistics between the node groups according to the statistical data in the group, and obtains statistical data between the groups;
还原模块,利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The restoration module restores the statistical data between the groups by using a corresponding random number to obtain a final statistical result.
本说明书实施例提供的一种基于混淆电路的数据统计设备,包括:A data statistics device based on an obfuscation circuit provided by an embodiment of the present specification includes:
至少一个处理器;以及,At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
本说明书实施例采用的上述至少一个技术方案能够达到以下有益效果:各服务提供方分别对应于各节点,通过节点间数据交换和混淆电路,不仅可以隐藏节点具体持有的数据,也可以隐藏统计过程中提供数据的节点的身份,以及两两节点的数据之间的相对统计关系,因此,更能保障服务提供方数据隐私性。The above at least one technical solution adopted by the embodiments of the present specification can achieve the following beneficial effects: each service provider corresponds to each node, and the data exchanged and the obfuscated circuit between the nodes can not only hide the data held by the node, but also hide the statistics. The identity of the node that provides the data in the process, as well as the relative statistical relationship between the data of the two nodes, therefore, the service provider data privacy is more guaranteed.
附图说明DRAWINGS
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性 的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a few embodiments described in the present specification, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本说明书的方案在一种实际应用场景下涉及的一种整体架构示意图;FIG. 1 is a schematic diagram of an overall architecture involved in an implementation scenario of the present specification;
图2为本说明书实施例提供的一种基于混淆电路的数据统计方法的流程示意图;2 is a schematic flowchart of a data statistics method based on an obfuscation circuit according to an embodiment of the present disclosure;
图3为本说明书实施例提供的一种匿名统计电路的示意图;FIG. 3 is a schematic diagram of an anonymous statistical circuit according to an embodiment of the present disclosure; FIG.
图4为本说明书实施例提供的利用图2的方法对四个节点进行统计的流程示意图;FIG. 4 is a schematic flowchart of performing statistics on four nodes by using the method of FIG. 2 according to an embodiment of the present disclosure;
图5为本说明书实施例提供的利用图2的方法对三个节点进行统计的流程示意图;FIG. 5 is a schematic flowchart of performing statistics on three nodes by using the method of FIG. 2 according to an embodiment of the present disclosure;
图6为本说明书实施例提供的对应于图2的一种基于混淆电路的数据统计装置的结构示意图。FIG. 6 is a schematic structural diagram of an obfuscation circuit-based data statistics apparatus corresponding to FIG. 2 according to an embodiment of the present disclosure.
具体实施方式Detailed ways
本说明书实施例提供基于混淆电路的数据统计方法、装置以及设备。Embodiments of the present specification provide a data statistics method, apparatus, and device based on an obfuscation circuit.
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本说明书实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the specification. The embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present specification without departing from the inventive scope shall fall within the scope of the application.
在本说明书的方案中,针对各节点的服务数据统计是一种多方安全计算过程,多方安全计算在满足任一方数据不泄露给其他方的需求下,实现多方协作计算,并且能够保障计算结果的正确性。不仅如此,本说明书的方案还能够隐藏统计过程中提供数据的节点的身份,以及两两节点的数据之间的相对统计关系。In the solution of the present specification, the service data statistics for each node is a multi-party secure computing process, and the multi-party secure computing realizes multi-party collaborative computing under the requirement that one party data is not leaked to other parties, and can guarantee the calculation result. Correctness. Moreover, the scheme of the present specification can also hide the identity of the node providing data in the statistical process and the relative statistical relationship between the data of the two nodes.
为了达到上述效果,利用了节点间数据交换和混淆电路,数据交换包括节点间部分服务数据交换和/或随机数交换等,所利用的混淆电路是在现有技术基础上改进过的。In order to achieve the above effects, data exchange and obfuscation circuits between nodes are utilized, and data exchange includes partial service data exchange and/or random number exchange between nodes, and the obfuscated circuit utilized is improved on the basis of the prior art.
混淆电路是一种基于加密的安全计算协议,两个互不信任的数据持有方,可以协作计算出某一个函数f的结果,而f使用电路进行表示,其输入为两方持有的数据,为了保证计算过程中双方数据不暴露,需要对电路进行混淆,混淆电路协议保证了计算结果的正确性,同时双方也不能从协议中获取除了函数结果以外的信息。The obfuscation circuit is a secure computing protocol based on encryption. Two mutually untrusted data holders can cooperatively calculate the result of a certain function f, and f uses a circuit to represent the input, and the input is the data held by the two parties. In order to ensure that the data is not exposed during the calculation process, the circuit needs to be confused. The confusing circuit protocol ensures the correctness of the calculation result, and neither party can obtain information other than the function result from the protocol.
本发明中利用的混淆电路增加了随机数输入,在完成统计计算的同时,使用随机数掩盖了结果,可以防止任何一方复原结果。不仅如此,还可以在数据输入混淆电路前, 进行节点间数据交换。从而,有利于隐藏双方身份以及双方数据的相对统计关系,比如,对于求最值的统计,可以隐藏两方数据的相对大小等。以下所称混淆电路均指本段中这种改进过的混淆电路。The obfuscation circuit utilized in the present invention increases the random number input, and uses the random number to mask the result while completing the statistical calculation, thereby preventing any one from restoring the result. Not only that, but also data exchange between nodes before the data input obfuscation circuit. Therefore, it is advantageous to hide the identity of both parties and the relative statistical relationship between the two parties. For example, for the statistics of the most value, the relative size of the two parties can be hidden. The confusing circuits referred to below refer to such improved confusing circuits in this paragraph.
图1为本说明书的方案在一种实际应用场景下涉及的一种整体架构示意图。该整体架构中,主要涉及三部分:用户(终端)、代理端和多个节点,代理端直接与用户交互,并协调各节点以实现多方统计。FIG. 1 is a schematic diagram of an overall architecture involved in an implementation scenario of the present specification. In the overall architecture, there are mainly three parts: user (terminal), agent and multiple nodes. The agent directly interacts with the user and coordinates each node to achieve multi-party statistics.
以背景技术的场景为例,服务提供方是金融机构,则节点比如是金融机构服务器,每个金融机构可以分别对应一个节点,金融机构可以是银行、保险公司、或者第三方支付机构等。在另一些适用场景下,服务提供方未必限于金融机构,也可能是政府、学校、商铺、其他机构或者公司等。Taking the scenario of the background art as an example, if the service provider is a financial institution, the node is, for example, a financial institution server, and each financial institution may correspond to one node respectively, and the financial institution may be a bank, an insurance company, or a third-party payment institution. In other applicable scenarios, the service provider may not be limited to financial institutions, but may also be government, schools, shops, other institutions, or companies.
该整体架构的一种工作流程包括:用户向代理端发送数据请求,代理端通知多个节点,多个节点基于节点间数据交换和混淆电路进行统计,得到最终统计结果并返回。A workflow of the overall architecture includes: the user sends a data request to the agent, the agent notifies the plurality of nodes, and the plurality of nodes perform statistics based on the data exchange and the obfuscation circuit between the nodes, and obtain the final statistical result and return.
本说明书的方案重点在于多个节点的统计过程,下面进行详细说明。The program of this specification focuses on the statistical process of multiple nodes, which are described in detail below.
图2为本说明书实施例提供的一种基于混淆电路的数据统计方法的流程示意图。该流程的执行主体包括参与统计的多个节点,还可以包括代理端。FIG. 2 is a schematic flowchart diagram of a data statistics method based on an obfuscation circuit according to an embodiment of the present disclosure. The execution body of the process includes a plurality of nodes participating in the statistics, and may also include a proxy.
图2中的流程可以包括以下步骤:The process in Figure 2 can include the following steps:
S202:对各节点进行分组,得到多个包含至多两个节点的节点组。S202: Group each node to obtain a plurality of node groups including at most two nodes.
在本说明书实施例中,为了加快统计速度,可以对各节点两两分组,进而先在节点组内统计,再在节点组间统计,如此,通过多轮统计得到最终统计结果。需要说明的是,节点组也可以只包含一个节点,这种节点组内可以不进行统计,参与节点组间统计即可。In the embodiment of the present specification, in order to speed up the statistical speed, each node may be grouped into two groups, and then counted in the node group first, and then counted among the node groups. Thus, the final statistical result is obtained through multiple rounds of statistics. It should be noted that the node group may also include only one node, and the node group may not perform statistics and participate in the statistics of the node groups.
S204:在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果。S204: Perform partial service data exchange between nodes in the node group, and obtain statistical data in the group according to the exchanged data and the confusion circuit statistical service data, wherein the obfuscation circuit is used to confuse the statistical process, and based on the random number Hide statistics.
在本说明书实施例中,服务数据是进行统计所需要的数据,其会影响组内统计数据,进而影响组间统计数据以及最终统计结果。In the embodiment of the present specification, the service data is data required for performing statistics, which affects the statistical data in the group, thereby affecting the statistical data between the groups and the final statistical result.
例如,在背景技术的例子中,每个节点的服务数据可以指目标对象在该节点所属金融机构的贷款金额,最终统计结果可以指目标对象在各节点所属金融机构的贷款总金额(求和的统计)或者最大贷款金额(求最大值的统计)等,具体采用哪种统计可以根据 实际需求确定。For example, in the example of the background art, the service data of each node may refer to the loan amount of the target object at the financial institution to which the node belongs, and the final statistical result may refer to the total amount of the loan of the target institution at the financial institution to which the node belongs (summed Statistics) or the maximum loan amount (statistics for the maximum value), etc., which specific statistics can be determined according to actual needs.
在本说明书实施例中,通过节点间部分服务数据交换,能够隐藏节点持有的服务数据的真实内容。在交换前,对节点拥有的服务数据进行拆分,所有拆分可以有多种方式,列举两种作为示例:若服务数据为一个数值,比如可以利用秘密共享(Secret Sharing)协议,对该数值进行拆分;若服务数据为一条或者多条数据记录,比如可以将这些数据记录拆分,当然,还可以进一步地将单条数据记录本身也进行拆分;等等。In the embodiment of the present specification, the real content of the service data held by the node can be hidden by the partial service data exchange between the nodes. Before the exchange, the service data owned by the node is split. There are many ways to split the data. Two examples are given: if the service data is a value, for example, the secret sharing protocol can be used. Splitting; if the service data is one or more data records, for example, the data records can be split, of course, the single data record itself can be further split; and so on.
以下各实施例主要基于上面列举的第一种拆分方式进行说明,在这种拆分方式下,同时也能够便利地实现对拆分前数据的加密,从而更有利于数据隐私性。The following embodiments are mainly described based on the first splitting method listed above. In this splitting mode, the encryption of the data before the splitting can also be conveniently realized, thereby facilitating data privacy.
在本说明书实施例中,前面已经提到,混淆电路具有随机数输入,该随机数可以由节点生成。混淆电路本身也可以由节点生成,生成的混淆电路在完成统计计算的同时,使用输入的随机数掩盖了结果,可以防止任何一方还原结果。In the embodiments of the present specification, it has been mentioned above that the obfuscation circuit has a random number input which can be generated by a node. The obfuscated circuit itself can also be generated by the node. The generated obfuscated circuit uses the input random number to mask the result while completing the statistical calculation, which can prevent any party from restoring the result.
需要说明的是,上述的电路可以只是一种计算机处理逻辑,而未必是真实的电路。It should be noted that the above circuit may be just a computer processing logic, and is not necessarily a real circuit.
S206:根据所述组内统计数据进行节点组间统计,得到组间统计数据。S206: Perform inter-node group statistics according to the statistical data in the group, and obtain inter-group statistics.
在本说明书实施例中,与节点组内统计类似,节点组间统计也可以分别在两两节点组之间进行,节点组间统计过程相应地也利用了混淆电路。若节点组不止两个,则节点组间统计可以迭代地进行,在这种情况下,步骤S206中所述的组间统计数据指迭代完毕后最终得到的组间统计数据。In the embodiment of the present specification, similar to the statistics in the node group, the statistics between the node groups can also be performed between the two node groups, and the statistical process between the node groups also utilizes the confusion circuit accordingly. If there are more than two node groups, the inter-node group statistics can be performed iteratively. In this case, the inter-group statistical data described in step S206 refers to the inter-group statistical data finally obtained after the iteration is completed.
需要说明的是,若需要迭代统计,则可以将各节点组的代表节点重新分组,然后在重新分出的组内进行统计,从而实现上述的节点组间统计。It should be noted that if iterative statistics are required, the representative nodes of each node group may be regrouped, and then statistics are performed in the re-divided group, thereby implementing the above-mentioned node group statistics.
在本说明书实施例中,为了保证数据隐私性,在得到最终统计结果之前,无论是组内统计数据还是组间统计数据,并未直接呈现原始统计数据,而是由至少两个不同的节点分别持有一部分而非全部,通过节点间数据交换,联合各部分才能够还原出原始统计数据,不仅如此,中间的统计过程都是进行了混淆的。In the embodiment of the present specification, in order to ensure data privacy, before the final statistical result is obtained, whether it is intra-group statistical data or inter-group statistical data, the original statistical data is not directly presented, but is composed of at least two different nodes. Holding some, but not all, through the exchange of data between nodes, the joint parts can restore the original statistics, not only that, but the intermediate statistical process is confused.
S208:利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。S208: Restore the statistical data of the group by using a corresponding random number to obtain a final statistical result.
在本说明书实施例中,所述对应的随机数为节点持有的一部分组间统计数据,用于还原其他节点持有的另外部分组间统计数据,得到最终统计结果。In the embodiment of the present specification, the corresponding random number is a part of the inter-group statistical data held by the node, and is used to restore other inter-group statistical data held by other nodes to obtain a final statistical result.
通过图2的方法,各服务提供方分别对应于各节点,通过节点间数据交换和混淆电路,不仅可以隐藏节点具体持有的数据,也可以隐藏统计过程中提供数据的节点的身份, 以及两两节点的数据之间的相对统计关系,因此,更能保障服务提供方数据隐私性。Through the method of FIG. 2, each service provider corresponds to each node, and the data exchange and the obfuscation circuit between the nodes can not only hide the data held by the node, but also hide the identity of the node providing the data in the statistical process, and The relative statistical relationship between the data of the two nodes, therefore, the privacy of the data of the service provider is more guaranteed.
基于图2的方法,本说明书实施例还提供了该方法的一些具体实施方案,以及扩展方案,下面进行说明。Based on the method of FIG. 2, the embodiments of the present specification further provide some specific implementations of the method, and an extended solution, which will be described below.
在本说明书实施例中,对于步骤S204,所述在节点组内进行节点间部分服务数据交换,具体可以包括:In the embodiment of the present specification, for the step S204, the performing the inter-node partial service data exchange in the node group may specifically include:
基于Secret Sharing协议,分别将节点组内每个节点的服务数据拆分为两部分,其中,拆分前的服务数据能够根据所述两部分的异或结果还原;若节点组内包含第一节点和第二节点,则将这两个节点分别拆分出的一部分数据进行交换。Based on the Secret Sharing protocol, the service data of each node in the node group is split into two parts, wherein the service data before the splitting can be restored according to the XOR result of the two parts; if the node group contains the first node And the second node, the part of the data split by the two nodes are exchanged.
例如,假定某节点组的第一节点的服务数据为a,基于Secret Sharing协议,能够将a拆分为a1和a2这两部分,并且满足
Figure PCTCN2018106963-appb-000001
类似地,假定该节点组的第二节点的服务数据为b,将b拆分为b1和b2这两部分,并且满足
Figure PCTCN2018106963-appb-000002
在该节点组内进行的节点间部分服务数据交换比如包括:第一节点用a2交换第二节点的b1;在交换后,第一节点持有(a1,b1),第二节点持有(a2,b2)。
For example, assuming that the service data of the first node of a node group is a, based on the Secret Sharing protocol, a can be split into two parts, a1 and a2, and satisfied.
Figure PCTCN2018106963-appb-000001
Similarly, assuming that the service data of the second node of the node group is b, split b into two parts b1 and b2, and satisfy
Figure PCTCN2018106963-appb-000002
The inter-node partial service data exchange performed in the node group includes, for example, the first node exchanges b1 of the second node with a2; after the exchange, the first node holds (a1, b1), and the second node holds (a2) , b2).
为了便于理解,对本说明书中使用的节点名称进行说明:For the sake of understanding, the node names used in this specification are explained:
一般地,每个节点组分别包含两个节点,为了区分,将其中一个节点称为第一节点,另一个节点称为第二节点。Generally, each node group contains two nodes, and for distinguishing, one of the nodes is referred to as a first node, and the other node is referred to as a second node.
进一步地,当涉及到同时描述两个节点组(某个节点组和另一个节点组)时,为了避免混淆,将另一个节点组的第一节点改称为第三节点,以及将另一个节点组的第二节点改称为第四节点;Further, when it comes to describing two node groups (a certain node group and another node group) at the same time, in order to avoid confusion, the first node of another node group is referred to as a third node, and another node group is The second node is renamed to the fourth node;
另外,前面也有提到,节点组也可能只包含一个节点,那么,将这种节点组包含的一个节点也称为第三节点;In addition, as mentioned above, a node group may also contain only one node, and then a node included in such a node group is also referred to as a third node;
这些节点名称都是为了便于描述,并非对本申请的限定。These node names are for convenience of description and are not intended to limit the application.
在本说明书实施例中,对于步骤S204,所述根据交换后数据和混淆电路统计服务数据,得到组内统计数据,具体可以包括:In the embodiment of the present specification, for the step S204, the statistical data of the group is obtained according to the data of the exchanged data and the confusing circuit, and the specific data may include:
生成混淆电路,该混淆电路以交换后数据和随机数为输入;根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据。Generating an obfuscating circuit, the obfuscating circuit takes the exchanged data and the random number as input; according to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the intra-group statistical data is obtained.
所述随机数由节点或者代理端生成,以节点生成为例。比如,在得到组内统计数据前,由第一节点生成并持有第一随机数,记作r1,由第二节点生成并持有第二随机数, 记作r2。The random number is generated by a node or a proxy, taking node generation as an example. For example, before the intra-group statistics are obtained, the first node generates and holds the first random number, denoted as r1, and the second node generates and holds the second random number, denoted as r2.
下面对混淆电路的随机数输入进一步地说明,直观地,结合图3,对一种匿名统计电路进行说明。图3为本说明书实施例提供的一种匿名统计电路的示意图。The following is a further description of the random number input of the obfuscation circuit. Intuitively, an anonymous statistical circuit will be described in conjunction with FIG. FIG. 3 is a schematic diagram of an anonymous statistical circuit according to an embodiment of the present disclosure.
在图3中,所述统计具体是求最大值计算,涉及节点间服务数据的比较,因此,该匿名统计电路也可以称为匿名比较电路。In FIG. 3, the statistics are specifically a maximum value calculation, which involves comparison of service data between nodes. Therefore, the anonymous statistical circuit may also be referred to as an anonymous comparison circuit.
其中,“XOR”表示异或门电路、“AND”表示与门电路、“>”表示比较门电路,比较门电路可以由若干个简单的门电路组合而成。Among them, "XOR" means XOR gate circuit, "AND" means AND gate circuit, ">" means comparison gate circuit, and comparison gate circuit can be composed of several simple gate circuits.
r1和r2即为输入的随机数。匿名统计电路的输入包括:(a1,a2,b1,b2,r1,r2),也即混淆电路的输入。在匿名统计电路的处理过程中,由a1、a2还原a,由b1、b2还原b,通过比较,统计得到a与b之中的较大值max(a,b),进一步地,利用r1与r2的异或结果对max(a,b)进行异或运算,得到结果为:R1 and r2 are the random numbers entered. The input to the anonymous statistical circuit includes: (a1, a2, b1, b2, r1, r2), that is, the input of the aliasing circuit. In the process of the anonymous statistical circuit, a is restored by a1 and a2, b is restored by b1 and b2, and by comparison, the larger value max(a, b) among a and b is obtained by statistics, and further, using r1 and The XOR result of r2 is XORed with max(a,b), and the result is:
Figure PCTCN2018106963-appb-000003
Figure PCTCN2018106963-appb-000003
从而实现对max(a,b)的隐藏。当然,过程中还会进行混淆,以隐藏节点身份,在该例中,混淆电路的输出结果为式1。Thereby hiding the max(a, b). Of course, there will be confusion in the process to hide the node identity. In this example, the output of the obfuscation circuit is Equation 1.
需要说明的是,对于上述输入,(a1,b1,r1)基于第一节点的数据传输而输入,(a2,b2,r2)基于第二节点的数据传输而输入,这些数据传输基于混淆电路,可以使用不经意传输(Oblivious Transfer)协议。由于进行了混淆,所以第一节点、第二节点传输的并非原始值,而是混淆值。It should be noted that, for the above input, (a1, b1, r1) is input based on data transmission of the first node, and (a2, b2, r2) is input based on data transmission of the second node, and the data transmission is based on the confusion circuit. The Oblivious Transfer protocol can be used. Due to confusion, the first node and the second node transmit not the original value but the obfuscated value.
进一步地,第一节点或者第二节点根据自己持有的随机数,可以分别对式1部分地还原。在得到最终统计结果之前,要避免将max(a,b)直接暴露,基于此,比如可以由第一节点根据自己持有的r1对式1部分地还原,得到
Figure PCTCN2018106963-appb-000004
并持有,而第二节点则持有能够对
Figure PCTCN2018106963-appb-000005
进一步还原的r2,如此,第一节点或者第二节点仅凭自己均无法得到max(a,b),从而确保了max(a,b)的秘密性。
Further, the first node or the second node may partially restore the formula 1 according to the random number held by itself. Before the final statistical result is obtained, it is necessary to avoid exposing max(a, b) directly. Based on this, for example, the first node can partially restore the formula 1 according to the r1 held by the first node.
Figure PCTCN2018106963-appb-000004
And hold, while the second node holds
Figure PCTCN2018106963-appb-000005
Further reduced r2, in this way, the first node or the second node can not obtain max(a, b) by itself, thereby ensuring the secrecy of max(a, b).
根据上例进行总结,对于步骤S204,所述得到组内统计数据前,还可以执行:第一节点生成并持有第一随机数,第二节点生成并持有第二随机数;进一步地,所述根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据,具体可以包括:According to the above example, in step S204, before the obtaining the intra-group statistical data, the first node may generate and hold the first random number, and the second node generates and holds the second random number; further, According to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the statistics in the group are obtained, which may specifically include:
通过第一节点与第二节点之间的交互,第一节点将所述第一随机数和自己的交换后 数据,以及第二节点将所述第二随机数和自己的交换后数据,输入该混淆电路统计服务数据,得到组内统计数据;其中,所述组内统计数据包括:该混淆电路的第一输出结果与所述第一随机数的异或结果,由第一节点持有;所述第二随机数,由第二节点持有。Passing the interaction between the first node and the second node, the first node inputs the first random number and its own exchanged data, and the second node inputs the second random number and its own exchanged data into the Converging the circuit statistical service data, and obtaining statistical data in the group; wherein the statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; The second random number is held by the second node.
所述第一输出结果是针对第一节点和第二节点统计的。The first output result is counted for the first node and the second node.
进一步地,所述得到组内统计数据,具体可以包括:Further, the obtaining the statistics in the group may specifically include:
第二节点得到该混淆电路的第一输出结果,并发送给第一节点;第一节点对所述第一随机数与接收的该混淆电路的第一输出结果进行异或运算,得到处于隐藏状态的对应统计结果,其在数值上等于该对应统计结果与所述第二随机数的异或结果。The second node obtains the first output result of the obfuscation circuit, and sends the result to the first node; the first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a hidden state. Corresponding statistical result, which is numerically equal to the XOR result of the corresponding statistical result and the second random number.
在本说明书实施例中,组内统计完毕后,再进行组间统计,根据前面的说明可知,组内统计的结果是处于隐藏状态的,为了在组间统计的过程中能够继续利用且又不暴露被隐藏的结果,可以将用于还原被隐藏的结果的随机数在节点组间进行交换。In the embodiment of the present specification, after the statistics in the group are completed, the statistics between the groups are further performed. According to the foregoing description, the result of the statistics in the group is in a hidden state, and can be continuously used in the process of counting between groups without Exposing hidden results allows random numbers used to restore hidden results to be exchanged between groups of nodes.
例如,假定另一节点组包含对应于第一节点的第三节点,以及对应于第二节点的第四节点;对于组内统计,第三节点生成了第三随机数,第四节点生成了第四随机数。则在组间统计前可以进行随机数交换:第二节点将第二随机数发送给第三节点,第四节点将其对应持有的第四随机数发送给第一节点。进而,由第一节点、第三节点分别作为其所属节点组的代表节点,进行组间统计。For example, assume that another node group includes a third node corresponding to the first node and a fourth node corresponding to the second node; for intra-group statistics, the third node generates a third random number, and the fourth node generates a third node Four random numbers. Then, the random number exchange may be performed before the inter-group statistics: the second node sends the second random number to the third node, and the fourth node sends the corresponding fourth random number to the first node. Further, the first node and the third node respectively perform the inter-group statistics as the representative nodes of the node group to which they belong.
根据上面两段的分析,若另一节点组包含对应于第一节点的第三节点,以及对应于第二节点的第四节点,则对于步骤S206,所述根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体可以包括:According to the analysis of the above two segments, if another node group includes a third node corresponding to the first node, and a fourth node corresponding to the second node, the node performs the node according to the statistics in the group for step S206. Statistics between groups can be obtained from the statistics of the group. The details can include:
将第一节点、第三节点分别作为其所属节点组的代表节点,并进行随机数交换;根据交换后随机数、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;其中,该混淆电路以该交换后随机数和所述代表节点分别对应的部分组内统计数据为输入,该随机数交换包括:第二节点将第二随机数发送给第三节点,第四节点将其对应持有的第四随机数发送给第一节点。The first node and the third node are respectively used as representative nodes of the node group to which they belong, and perform random number exchange; according to the post-exchange random number, the representative group corresponding to the intra-group statistical data and the confusion circuit, the interaction between the representative nodes is performed. Performing inter-node group statistics to obtain inter-group statistics; wherein the obfuscation circuit takes the post-exchange random number and the statistical data of the partial group corresponding to the representative node as input, and the random number exchange includes: the second node will The second random number is sent to the third node, and the fourth node sends its corresponding fourth random number to the first node.
类似于组内统计,在组间统计时,代表节点也需要再次生成随机数,以用于隐藏组间统计的结果,假定第一节点为节点组间统计生成了第五随机数,第三节点生成了第六随机数。Similar to the intra-group statistics, in the inter-group statistics, the representative node also needs to generate a random number again to hide the results of the inter-group statistics. It is assumed that the first node generates a fifth random number for the inter-node group statistics, and the third node. A sixth random number is generated.
则所述组间统计数据可以包括:该混淆电路的第二输出结果与该混淆电路的第二输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有; 所述第三节点为所述节点组间统计生成并持有的第六随机数。The inter-group statistical data may include: an exclusive OR result of the second output result of the obfuscation circuit and the second output result of the obfuscation circuit and the fifth random number statistically generated by the first node between the node groups, The first node holds; the third node is a sixth random number that is generated and held by the node group.
所述第二输出结果是针对第一节点、第二节点、第三节点和第四节点统计的。The second output result is counted for the first node, the second node, the third node, and the fourth node.
在本说明书实施例中,若所述第二输出结果是针对全部节点统计的,对于步骤S208,所述利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果,具体可以包括:In the embodiment of the present specification, if the second output result is calculated for all nodes, for step S208, the statistical data of the group is restored by using the corresponding random number to obtain a final statistical result, which may be specifically include:
第三节点将所述第六随机数发送给第一节点;第一节点对所述第六随机数与所述组间统计数据进行异或运算,还原出被隐藏的对应统计结果,作为最终统计结果。The third node sends the sixth random number to the first node; the first node performs an exclusive-OR operation on the sixth random number and the statistical data of the group, and restores the hidden corresponding statistical result, as a final statistic result.
在本说明书实施例中,若所述第二输出结果并非针对全部节点统计的,所述利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果前,还可以执行:In the embodiment of the present specification, if the second output result is not calculated for all the nodes, the using the corresponding random number to restore the statistical data between the groups to obtain the final statistical result may also be performed:
继续迭代统计直至得到:针对全部节点统计完毕后得到的组间统计数据,用于还原得到最终统计结果。Continue to iterate the statistics until you get: the statistics between the groups obtained after the statistics of all the nodes are completed, and are used to restore the final statistical results.
为了便于理解,结合图4,用一个更完整的实例对整个统计过程进行说明。图4为本说明书实施例提供的利用图2的方法对四个节点进行统计的流程示意图。图4中部分步骤已经在上面的例子中进行了说明,这里对这些步骤仅简单说明。For ease of understanding, the entire statistical process is illustrated with a more complete example in conjunction with FIG. FIG. 4 is a schematic flowchart of performing statistics on four nodes by using the method of FIG. 2 according to an embodiment of the present disclosure. Some of the steps in Figure 4 have been described in the above examples, and these steps are only briefly described herein.
将混淆电路的输出函数记作f。在图4中,第一节点和第二节点属于一个节点组,第三节点和第四节点属于另一个节点组,a、b、c、d分别为对应节点的服务数据。针对a和b进行统计时混淆电路的输出结果记作fab,针对c和d进行统计时混淆电路的输出结果记作fcd,针对a、b、c、d进行统计时混淆电路的输出结果记作fabcd。Let the output function of the obfuscated circuit be denoted by f. In FIG. 4, the first node and the second node belong to one node group, the third node and the fourth node belong to another node group, and a, b, c, and d are service data of the corresponding node, respectively. The output of the obfuscated circuit is counted as fab for the statistics of a and b, and the output of the obfuscated circuit is recorded as fcd for the statistics of c and d, and the output of the obfuscated circuit is recorded for the statistics of a, b, c, and d. Fabcd.
对于前一个节点组,第一节点与第二节点在进行第一轮统计之前,先基于Secret Sharing协议,拆分服务数据,拆分后,第一节点持有(a1,a2),第二节点持有(b1,b2);第一节点与第二节点进行部分服务数据交换,交换后,第一节点持有(a1,b1),第二节点持有(a2,b2);For the previous node group, the first node and the second node split the service data based on the Secret Sharing protocol before performing the first round of statistics. After the split, the first node holds (a1, a2), and the second node Holding (b1, b2); the first node performs partial service data exchange with the second node, after the exchange, the first node holds (a1, b1), and the second node holds (a2, b2);
第一节点生成混淆电路,输入为(a1,a2,b1,b2,r1,r2),记此时第一节点、第二节点的状态为状态1,状态1表示本次混淆电路计算前;The first node generates an obfuscation circuit, and the input is (a1, a2, b1, b2, r1, r2), and the state of the first node and the second node is state 1 at this time, and the state 1 indicates that the current confusion circuit is calculated before;
执行混淆电路计算过程,第二节点得到混淆电路的输出结果fab,并发送给第一节点,第一节点利用r1进行异或运算得到并持有
Figure PCTCN2018106963-appb-000006
第二节点持有r2,统计结果处于隐藏状态,以统计具体为求最大值运算为例,fab在数值上等于式1,可以看到统计结果max(a,b)是处于隐藏状态的,记此时第一节点、第二节点的状态为状态2, 状态2表示本次混淆电路计算后;
Execute the obfuscation circuit calculation process, the second node obtains the output result fab of the obfuscated circuit, and sends it to the first node, and the first node uses the r1 to perform an exclusive OR operation and holds
Figure PCTCN2018106963-appb-000006
The second node holds r2, and the statistical result is in a hidden state. Taking the statistics as the maximum value calculation as an example, the fab is numerically equal to the formula 1, and it can be seen that the statistical result max(a, b) is in a hidden state. At this time, the state of the first node and the second node is state 2, and the state 2 indicates that the current confusion circuit is calculated;
此时,第一节点和第二节点分别持有组内统计数据的一部分:maskab、r2;将第一节点作为第一个节点组的代表节点;类似地,对于另一个节点组,完成组内统计后,第三节点持有
Figure PCTCN2018106963-appb-000007
第四节点持有r4,将第三节点作为另一个节点组的代表节点;
At this time, the first node and the second node respectively hold a part of the statistical data in the group: maskab, r2; the first node is taken as the representative node of the first node group; similarly, for the other node group, the group is completed. After the statistics, the third node holds
Figure PCTCN2018106963-appb-000007
The fourth node holds r4 and the third node is a representative node of another node group;
在节点组间进行随机数交换,第二节点将r2发送给第三节点,第四节点将r4发送给第一节点;随机数交换后,作为代表节点,第一节点持有(maskab,r4),第三节点持有(maskcd,r2),此时第一节点、第三节点的状态恢复到状态1;The random number exchange is performed between the node groups, the second node sends r2 to the third node, and the fourth node sends r4 to the first node; after the random number is exchanged, as the representative node, the first node holds (maskab, r4) The third node holds (maskcd, r2), and the state of the first node and the third node is restored to state 1;
第一节点与第三节点进行下轮统计,也即,组间统计;第一节点生成第五随机数r11,第三节点生成第六随机数r22;The first node and the third node perform the next round of statistics, that is, the inter-group statistics; the first node generates a fifth random number r11, and the third node generates a sixth random number r22;
类似于组内统计,混淆电路的输入为(maskab,r2,maskcd,r4,r11,r22),执行混淆电路计算过程,混淆电路输出fabcd;进一步地进行异或运算后,第一节点持有
Figure PCTCN2018106963-appb-000008
第三节点持有r22,此时第一节点、第三节点的状态恢复到状态2;
Similar to the statistics in the group, the input of the obfuscated circuit is (maskab, r2, maskcd, r4, r11, r22), the obfuscated circuit calculation process is performed, the obfuscated circuit outputs fabcd; after further performing the exclusive OR operation, the first node holds
Figure PCTCN2018106963-appb-000008
The third node holds r22, and the state of the first node and the third node is restored to state 2;
若没有更多的节点,则可以直接执行虚线方框中的流程,第三节点将r22发送给第一节点,第一节点用r22与maskabcd进行异或运算,还原出最终统计结果,记作final,并可以将final发送回代理端,进而由代理端返回给用户;以统计具体为求最大值运算为例,final等于max(a,b,c,d)。If there are no more nodes, the flow in the dashed box can be directly executed. The third node sends r22 to the first node, and the first node performs an exclusive OR operation with r22 and maskabcd to restore the final statistical result, which is recorded as final. And can send the final back to the agent, and then return to the user by the agent; for the specific calculation of the maximum value as an example, final is equal to max(a, b, c, d).
而若有更多的节点,则以此类推迭代统计,直到全部节点统计完毕后,再还原出最终统计结果。If there are more nodes, iteratively counts the statistics until the statistics of all the nodes are completed, and then the final statistics are restored.
在本说明书实施例中,前面已经提到,一个节点组也可能只包含一个节点。在这种情况下,进行组间统计的两个节点组有可能一共包含三个节点。对于包含两个节点的节点组而言,组内统计参照上面的说明进行即可,而对于只包含一个节点的节点组而言,无需进行组内统计,而且组间统计的具体实施方案与上面的说明也有区别。下面继续说明。In the embodiment of the present specification, as mentioned above, a node group may also contain only one node. In this case, it is possible for two node groups that perform inter-group statistics to have a total of three nodes. For a node group consisting of two nodes, the statistics in the group can be referred to the above description, and for the node group containing only one node, there is no need to perform intra-group statistics, and the specific implementation scheme of the statistics between the groups and the above The description is also different. Continue to explain below.
在本说明书实施例中,若另一节点组只包含第三节点,则对于步骤S206,所述根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体可以包括:In the embodiment of the present disclosure, if the other node group only includes the third node, the step-synthesis is performed according to the statistical data in the group, and the inter-group statistics are obtained, which may include:
将第一节点、第三节点分别作为其所属节点组的代表节点,并进行数据交换; 根据交换后数据、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;其中,该混淆电路以该交换后数据和所述代表节点分别对应的部分组内统计数据为输入,该数据交换包括:第二节点将第二随机数发送给第三节点,第三节点将基于秘密共享协议拆分出的自己的一部分数据发送给第一节点。The first node and the third node are respectively used as representative nodes of the node group to which they belong, and data exchange is performed; according to the exchanged data, the intra-group statistical data corresponding to the representative nodes, and the obfuscation circuit, the interaction between the representative nodes is performed. The inter-group statistics are obtained, and the inter-group statistics are obtained. The obfuscating circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node will use the second random number Sending to the third node, the third node sends a part of its own data split based on the secret sharing protocol to the first node.
进一步地,在上一段的情况下,所述组间统计数据包括:该混淆电路的第三输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。Further, in the case of the previous segment, the inter-group statistical data includes: an XOR result of the third output result of the obfuscation circuit and a fifth random number generated by the first node for the statistically generated between the node groups, by A node holds; the third node is a sixth random number generated and held by the node group.
所述第三输出结果是针对第一节点、第二节点和第三节点统计的。后面的步骤与四个节点参与统计的情况类似,不再赘述。The third output result is counted for the first node, the second node, and the third node. The following steps are similar to the case where four nodes participate in statistics, and will not be described again.
为了便于理解,用一个更完整的示例对利用图2的方法对三个节点进行统计的流程进行说明,如图5所示。图5中的部分步骤参照图4即可,这里主要对区别步骤说明。For ease of understanding, a more complete example is used to illustrate the flow of counting three nodes using the method of FIG. 2, as shown in FIG. 5. Part of the steps in Fig. 5 can be referred to Fig. 4, and the main steps are explained here.
在图5中,第一节点和第二节点属于一个节点组,第三节点属于另一个节点组。针对a、b、c进行统计时混淆电路的输出结果记作fabc。In FIG. 5, the first node and the second node belong to one node group, and the third node belongs to another node group. The output of the obfuscated circuit when counting for a, b, and c is recorded as fabc.
对于另一个节点组,第三节点拆分服务数据c得到(c1,c2);For another node group, the third node splits the service data c to get (c1, c2);
在第一个节点组的组内统计完毕后,第二节点发送r2给第三节点,第三节点发送c2给第一节点;则作为代理节点,第一节点持有(maskab,c2),第三节点持有(c1,r2);After the statistics in the group of the first node group are completed, the second node sends r2 to the third node, and the third node sends c2 to the first node; then, as the proxy node, the first node holds (maskab, c2), Three nodes hold (c1, r2);
第一节点与第三节点进行下轮比较,也即,组间统计;第一节点生成第五随机数r11,第三节点生成第六随机数r22;The first node and the third node perform a lower round comparison, that is, inter-group statistics; the first node generates a fifth random number r11, and the third node generates a sixth random number r22;
类似于组内统计,混淆电路的输入为(maskab,r2,c1,c2,r11,r22),执行混淆电路计算过程,混淆电路输出fabc;进一步地进行异或运算后,第一节点持有
Figure PCTCN2018106963-appb-000009
第三节点持有r22;
Similar to the statistics in the group, the input of the obfuscated circuit is (maskab, r2, c1, c2, r11, r22), the obfuscated circuit calculation process is performed, the obfuscated circuit outputs fabc; after further performing the exclusive OR operation, the first node holds
Figure PCTCN2018106963-appb-000009
The third node holds r22;
若没有更多的节点,则可以直接执行虚线方框中的流程,第三节点将r22发送给第一节点,第一节点用r22与maskabc进行异或运算,还原出final,并可以将final发送回代理端,进而由代理端返回给用户;以统计具体为求最大值运算为例,final等于max(a,b,c)。If there are no more nodes, the flow in the dashed box can be directly executed. The third node sends r22 to the first node. The first node performs an exclusive OR operation with the maskabc by r22, restores the final, and can send the final. Returning to the agent, and then returning to the user by the agent; taking the statistics as the maximum value operation as an example, final is equal to max(a, b, c).
而若有更多的节点,则以此类推迭代统计,直到全部节点统计完毕后,再还原 出最终统计结果。If there are more nodes, iteratively counts the statistics until the statistics of all the nodes are completed, and then the final statistics are restored.
基于同样的思路,本说明书实施例还提供了对应于上述方法的装置,如图6所示。Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method, as shown in FIG. 6.
图6为本说明书实施例提供的对应于图2的一种基于混淆电路的数据统计装置的结构示意图,该装置可以位于图2中流程的执行主体上,包括:FIG. 6 is a schematic structural diagram of an obfuscation circuit-based data statistic apparatus corresponding to FIG. 2 according to an embodiment of the present disclosure. The apparatus may be located on an execution body of the process in FIG. 2, and includes:
分组模块601,对各节点进行分组,得到多个包含至多两个节点的节点组;The grouping module 601 groups each node to obtain a plurality of node groups including at most two nodes;
组内统计模块602,在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;The intra-group statistic module 602 performs partial service data exchange between the nodes in the node group, and obtains statistical data in the group according to the exchanged data and the confusing circuit statistical service data, wherein the obfuscation circuit is used to confuse the statistical process. And hiding statistical results based on random numbers;
组间统计模块603,根据所述组内统计数据进行节点组间统计,得到组间统计数据;The inter-group statistics module 603 performs statistics between the node groups according to the statistical data in the group, and obtains statistics between the groups;
还原模块604,利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The restoration module 604 restores the statistical data between the groups by using a corresponding random number to obtain a final statistical result.
可选地,所述组内统计模块602在节点组内进行节点间部分服务数据交换,具体包括:Optionally, the intra-group statistic module 602 performs part-service data exchange between the nodes in the node group, and specifically includes:
所述组内统计模块602基于秘密共享协议,分别将节点组内每个节点的服务数据拆分为两部分,其中,拆分前的服务数据能够根据所述两部分的异或结果还原;The in-group statistic module 602 splits the service data of each node in the node group into two parts based on the secret sharing protocol, wherein the pre-split service data can be restored according to the XOR result of the two parts;
若节点组内包含第一节点和第二节点,则将这两个节点分别拆分出的一部分数据进行交换。If the node group includes the first node and the second node, a part of the data split by the two nodes is exchanged.
可选地,所述组内统计模块602根据交换后数据和混淆电路统计服务数据,得到组内统计数据,具体包括:Optionally, the in-group statistics module 602 obtains the statistics in the group according to the data after the exchange and the statistics data of the obfuscation circuit, and specifically includes:
所述组内统计模块602生成混淆电路,该混淆电路以交换后数据和随机数为输入;根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据。The intra-group statistic module 602 generates an obfuscation circuit that takes the exchanged data and the random number as input; according to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node. , get the statistics within the group.
可选地,所述组内统计模块602得到组内统计数据前,第一节点生成并持有第一随机数,第二节点生成并持有第二随机数;Optionally, before the intra-group statistics module 602 obtains the intra-group statistics, the first node generates and holds the first random number, and the second node generates and holds the second random number;
所述组内统计模块602根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据,具体包括:The in-group statistic module 602, according to the exchanged data and the obfuscation circuit, collects statistical data of the group by using the interaction between the first node and the second node, and the statistic data includes:
所述组内统计模块602通过第一节点与第二节点之间的交互,第一节点将所述第一随机数和自己的交换后数据,以及第二节点将所述第二随机数和自己的交换后数据,输入该混淆电路统计服务数据,得到组内统计数据;The intra-group statistic module 602 passes the interaction between the first node and the second node, the first node will use the first random number and its own post-exchange data, and the second node will use the second random number and the second node. After the exchange of data, enter the confusion circuit statistical service data to obtain statistical data within the group;
其中,所述组内统计数据包括:该混淆电路的第一输出结果与所述第一随机数的异或结果,由第一节点持有;所述第二随机数,由第二节点持有。The statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; and the second random number is held by the second node .
可选地,所述组内统计模块602得到组内统计数据,具体包括:Optionally, the in-group statistics module 602 obtains the statistics in the group, and specifically includes:
第二节点得到该混淆电路的第一输出结果,并发送给第一节点;The second node obtains the first output result of the obfuscation circuit and sends the result to the first node;
第一节点对所述第一随机数与接收的该混淆电路的第一输出结果进行异或运算,得到处于隐藏状态的对应统计结果,其在数值上等于该对应统计结果与所述第二随机数的异或结果。The first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a corresponding statistical result in a hidden state, which is numerically equal to the corresponding statistical result and the second random number The XOR result of the number.
可选地,若另一节点组包含对应于第一节点的第三节点,以及对应于第二节点的第四节点,Optionally, if another node group includes a third node corresponding to the first node, and a fourth node corresponding to the second node,
所述组间统计模块603根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:The inter-group statistic module 603 performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
所述组间统计模块603将第一节点、第三节点分别作为其所属节点组的代表节点,并进行随机数交换;The inter-group statistic module 603 takes the first node and the third node as representative nodes of the node group to which it belongs, and performs random number exchange;
根据交换后随机数、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the post-exchange random number, the corresponding intra-group statistical data and the obfuscation circuit, the inter-group statistics are obtained by the interaction between the representative nodes, and the inter-group statistical data is obtained;
其中,该混淆电路以该交换后随机数和所述代表节点分别对应的部分组内统计数据为输入,该随机数交换包括:第二节点将第二随机数发送给第三节点,第四节点将其对应持有的第四随机数发送给第一节点。The obfuscation circuit takes the post-exchange random number and the statistical data of the partial group corresponding to the representative node as input, and the random number exchange includes: the second node sends the second random number to the third node, and the fourth node Sending the corresponding fourth random number to the first node.
可选地,所述组间统计数据包括:该混淆电路的第二输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。Optionally, the inter-group statistic data includes: an XOR result of the second output result of the obfuscation circuit and a fifth random number generated by the first node between the node groups, and is held by the first node; The third node is a sixth random number generated and held by the node group.
可选地,若所述第二输出结果是针对全部节点统计的,所述还原模块604利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果,具体包括:Optionally, if the second output is statistic for all the nodes, the restoring module 604 uses the corresponding random number to restore the statistical data of the group to obtain a final statistical result, which specifically includes:
第三节点将所述第六随机数发送给第一节点;The third node sends the sixth random number to the first node;
第一节点对所述第六随机数与所述组间统计数据进行异或运算,还原出被隐藏 的对应统计结果,作为最终统计结果。The first node performs an exclusive-OR operation on the sixth random number and the statistical data between the groups, and restores the hidden corresponding statistical result as a final statistical result.
可选地,若所述第二输出结果并非针对全部节点统计的,所述还原模块604利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果前,所述组间统计模块603继续迭代统计直至得到:针对全部节点统计完毕后得到的组间统计数据,用于还原得到最终统计结果。Optionally, if the second output result is not calculated for all nodes, the restoring module 604 uses the corresponding random number to restore the statistical data between the groups to obtain statistics before the final statistical result. The module 603 continues to iterate the statistics until: the inter-group statistics obtained after the statistics of all the nodes are completed are used for the restoration to obtain the final statistical result.
可选地,若另一节点组只包含第三节点,Optionally, if another node group only includes the third node,
所述组间统计模块603根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:The inter-group statistic module 603 performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
所述组间统计模块603将第一节点、第三节点分别作为其所属节点组的代表节点,并进行数据交换;The inter-group statistic module 603 takes the first node and the third node as representative nodes of the node group to which it belongs, and performs data exchange;
根据交换后数据、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the data after the exchange, the statistical data of the group corresponding to the representative nodes, and the obfuscation circuit, the statistics between the nodes are performed by the interaction between the representative nodes, and the statistical data between the groups is obtained;
其中,该混淆电路以该交换后数据和所述代表节点分别对应的部分组内统计数据为输入,该数据交换包括:第二节点将第二随机数发送给第三节点,第三节点将基于秘密共享协议拆分出的自己的一部分数据发送给第一节点。The obfuscation circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node sends the second random number to the third node, and the third node is based on A part of the data split by the secret sharing protocol is sent to the first node.
可选地,所述组间统计数据包括:该混淆电路的第三输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。Optionally, the inter-group statistical data includes: an XOR result of the third output result of the obfuscation circuit and a fifth random number generated by the first node between the node groups, and is held by the first node; The third node is a sixth random number generated and held by the node group.
可选地,所述节点包括金融机构服务器。Optionally, the node comprises a financial institution server.
基于同样的思路,本说明书实施例还提供了对应于图2的一种基于混淆电路的数据统计设备,包括:Based on the same idea, the embodiment of the present specification further provides an obfuscation circuit-based data statistics device corresponding to FIG. 2, including:
至少一个处理器;以及,At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计 服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
基于同样的思路,本说明书实施例还提供了对应于图2的一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:Based on the same idea, the embodiment of the present specification further provides a non-volatile computer storage medium corresponding to FIG. 2, which stores computer executable instructions, and the computer executable instructions are set as:
对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing description of the specific embodiments of the specification has been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the embodiments and still achieve the desired results. In addition, the processes depicted in the figures are not necessarily in a particular order or in a sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备、非易失性计算机存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for a device, device, non-volatile computer storage medium embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本说明书实施例提供的装置、设备、非易失性计算机存储介质与方法是对应的,因此,装置、设备、非易失性计算机存储介质也具有与对应方法类似的有益技术效果,由于上面已经对方法的有益技术效果进行了详细说明,因此,这里不再赘述对应装置、设备、非易失性计算机存储介质的有益技术效果。The device, the device, the non-volatile computer storage medium and the method provided by the embodiments of the present specification are corresponding, and therefore, the device, the device, and the non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method, since The beneficial technical effects of the method are described in detail, and therefore, the beneficial technical effects of the corresponding device, device, and non-volatile computer storage medium are not described herein.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结 构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, improvements to a technology could clearly distinguish between hardware improvements (eg, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (for process flow improvements). However, as technology advances, many of today's method flow improvements can be seen as direct improvements in hardware circuit architecture. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented by hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers program themselves to "integrate" a digital system on a single PLD without having to ask the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, today, instead of manually making integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in programming development, but before compiling The original code has to be written in a specific programming language. This is called the Hardware Description Language (HDL). HDL is not the only one, but there are many kinds, such as ABEL (Advanced Boolean Expression Language). AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., are currently the most commonly used VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be apparent to those skilled in the art that the hardware flow for implementing the logic method flow can be easily obtained by simply programming the method flow into the integrated circuit with a few hardware description languages.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. In the form of logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic. Those skilled in the art will also appreciate that in addition to implementing the controller in purely computer readable program code, the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding. The form of a microcontroller or the like to achieve the same function. Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component. Or even a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字 助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of the various units may be implemented in one or more software and/or hardware in the implementation of the present specification.
本领域内的技术人员应明白,本说明书实施例可提供为方法、系统、或计算机程序产品。因此,本说明书实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the specification can be provided as a method, system, or computer program product. Thus, embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, embodiments of the present specification can take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present specification. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.
本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This description can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述仅为本说明书实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above description is only for the embodiments of the present specification, and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (25)

  1. 一种基于混淆电路的数据统计方法,包括:A data statistics method based on an obfuscated circuit, comprising:
    对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
    在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
    根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
    利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
  2. 如权利要求1所述的方法,所述在节点组内进行节点间部分服务数据交换,具体包括:The method of claim 1, wherein the performing inter-node partial service data exchange in the node group comprises:
    基于秘密共享协议,分别将节点组内每个节点的服务数据拆分为两部分,其中,拆分前的服务数据能够根据所述两部分的异或结果还原;Separating the service data of each node in the node group into two parts according to the secret sharing protocol, wherein the service data before the splitting can be restored according to the XOR result of the two parts;
    若节点组内包含第一节点和第二节点,则将这两个节点分别拆分出的一部分数据进行交换。If the node group includes the first node and the second node, a part of the data split by the two nodes is exchanged.
  3. 如权利要求2所述的方法,所述根据交换后数据和混淆电路统计服务数据,得到组内统计数据,具体包括:The method according to claim 2, wherein the statistical data of the group is obtained according to the data after the exchange and the data of the obfuscation circuit, which specifically includes:
    生成混淆电路,该混淆电路以交换后数据和随机数为输入;Generating an obfuscating circuit that takes the exchanged data and the random number as input;
    根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据。According to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the statistical data in the group is obtained.
  4. 如权利要求3所述的方法,所述得到组内统计数据前,所述方法还包括:The method of claim 3, before the obtaining the intra-group statistical data, the method further comprises:
    第一节点生成并持有第一随机数,第二节点生成并持有第二随机数;The first node generates and holds a first random number, and the second node generates and holds a second random number;
    所述根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据,具体包括:According to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the statistical data in the group is obtained, which specifically includes:
    通过第一节点与第二节点之间的交互,第一节点将所述第一随机数和自己的交换后数据,以及第二节点将所述第二随机数和自己的交换后数据,输入该混淆电路统计服务数据,得到组内统计数据;Passing the interaction between the first node and the second node, the first node inputs the first random number and its own exchanged data, and the second node inputs the second random number and its own exchanged data into the Confusing the circuit statistics service data to obtain statistical data within the group;
    其中,所述组内统计数据包括:该混淆电路的第一输出结果与所述第一随机数的异或结果,由第一节点持有;所述第二随机数,由第二节点持有。The statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; and the second random number is held by the second node .
  5. 如权利要求4所述的方法,所述得到组内统计数据,具体包括:The method of claim 4, wherein the obtaining the statistical data in the group comprises:
    第二节点得到该混淆电路的第一输出结果,并发送给第一节点;The second node obtains the first output result of the obfuscation circuit and sends the result to the first node;
    第一节点对所述第一随机数与接收的该混淆电路的第一输出结果进行异或运算,得 到处于隐藏状态的对应统计结果,其在数值上等于该对应统计结果与所述第二随机数的异或结果。The first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a corresponding statistical result in a hidden state, which is numerically equal to the corresponding statistical result and the second random number The XOR result of the number.
  6. 如权利要求4所述的方法,若另一节点组包含对应于第一节点的第三节点,以及对应于第二节点的第四节点,The method of claim 4, if the other node group includes a third node corresponding to the first node and a fourth node corresponding to the second node,
    所述根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:Performing statistics on the inter-node groups according to the statistical data in the group, and obtaining statistical data between the groups, specifically including:
    将第一节点、第三节点分别作为其所属节点组的代表节点,并进行随机数交换;The first node and the third node are respectively used as representative nodes of the node group to which they belong, and random number exchange is performed;
    根据交换后随机数、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the post-exchange random number, the corresponding intra-group statistical data and the obfuscation circuit, the inter-group statistics are obtained by the interaction between the representative nodes, and the inter-group statistical data is obtained;
    其中,该混淆电路以该交换后随机数和所述代表节点分别对应的部分组内统计数据为输入,该随机数交换包括:第二节点将第二随机数发送给第三节点,第四节点将其对应持有的第四随机数发送给第一节点。The obfuscation circuit takes the post-exchange random number and the statistical data of the partial group corresponding to the representative node as input, and the random number exchange includes: the second node sends the second random number to the third node, and the fourth node Sending the corresponding fourth random number to the first node.
  7. 如权利要求6所述的方法,所述组间统计数据包括:该混淆电路的第二输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。The method according to claim 6, wherein the inter-group statistical data comprises: an exclusive OR result of the second output result of the obfuscation circuit and a fifth random number generated by the first node between the node groups, by the first The node holds; the third node is a sixth random number generated and held by the node group.
  8. 如权利要求7所述的方法,若所述第二输出结果是针对全部节点统计的,所述利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果,具体包括:The method of claim 7, wherein if the second output is statistic for all nodes, the statistic data is restored by using the corresponding random number to obtain a final statistical result, which specifically includes:
    第三节点将所述第六随机数发送给第一节点;The third node sends the sixth random number to the first node;
    第一节点对所述第六随机数与所述组间统计数据进行异或运算,还原出被隐藏的对应统计结果,作为最终统计结果。The first node performs an exclusive-OR operation on the sixth random number and the statistical data between the groups, and restores the hidden corresponding statistical result as a final statistical result.
  9. 如权利要求7所述的方法,若所述第二输出结果并非针对全部节点统计的,所述利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果前,所述方法还包括:The method according to claim 7, wherein if the second output result is not calculated for all nodes, the method uses the corresponding random number to restore the statistical data between the groups to obtain a final statistical result. Also includes:
    继续迭代统计直至得到:针对全部节点统计完毕后得到的组间统计数据,用于还原得到最终统计结果。Continue to iterate the statistics until you get: the statistics between the groups obtained after the statistics of all the nodes are completed, and are used to restore the final statistical results.
  10. 如权利要求4所述的方法,若另一节点组只包含第三节点,The method of claim 4, if another node group only includes the third node,
    所述根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:Performing statistics on the inter-node groups according to the statistical data in the group, and obtaining statistical data between the groups, specifically including:
    将第一节点、第三节点分别作为其所属节点组的代表节点,并进行数据交换;The first node and the third node are respectively used as representative nodes of the node group to which they belong, and data is exchanged;
    根据交换后数据、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the data after the exchange, the statistical data of the group corresponding to the representative nodes, and the obfuscation circuit, the statistics between the nodes are performed by the interaction between the representative nodes, and the statistical data between the groups is obtained;
    其中,该混淆电路以该交换后数据和所述代表节点分别对应的部分组内统计数据为输入,该数据交换包括:第二节点将第二随机数发送给第三节点,第三节点将基于秘密 共享协议拆分出的自己的一部分数据发送给第一节点。The obfuscation circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node sends the second random number to the third node, and the third node is based on A part of the data split by the secret sharing protocol is sent to the first node.
  11. 如权利要求10所述的方法,所述组间统计数据包括:该混淆电路的第三输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。The method according to claim 10, wherein the inter-group statistical data comprises: an exclusive OR result of the third output result of the obfuscation circuit and a fifth random number statistically generated by the first node between the node groups, by the first The node holds; the third node is a sixth random number generated and held by the node group.
  12. 如权利要求1~11任一项所述的方法,所述节点包括金融机构服务器。The method of any one of claims 1 to 11, the node comprising a financial institution server.
  13. 一种基于混淆电路的数据统计装置,包括:A data statistics device based on an obfuscated circuit, comprising:
    分组模块,对各节点进行分组,得到多个包含至多两个节点的节点组;a grouping module, grouping each node to obtain a plurality of node groups including at most two nodes;
    组内统计模块,在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;The intra-group statistical module performs partial service data exchange between nodes in the node group, and obtains statistical data in the group according to the exchanged data and the obfuscated circuit statistical service data, wherein the obfuscating circuit is used to confuse the statistical process, and Hide statistical results based on random numbers;
    组间统计模块,根据所述组内统计数据进行节点组间统计,得到组间统计数据;The inter-group statistics module performs statistics between the node groups according to the statistical data in the group, and obtains statistical data between the groups;
    还原模块,利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The restoration module restores the statistical data between the groups by using a corresponding random number to obtain a final statistical result.
  14. 如权利要求13所述的装置,所述组内统计模块在节点组内进行节点间部分服务数据交换,具体包括:The apparatus according to claim 13, wherein the intra-group statistic module performs part-to-node service data exchange between the node groups, and specifically includes:
    所述组内统计模块基于秘密共享协议,分别将节点组内每个节点的服务数据拆分为两部分,其中,拆分前的服务数据能够根据所述两部分的异或结果还原;The intra-group statistic module splits the service data of each node in the node group into two parts based on the secret sharing protocol, wherein the service data before the splitting can be restored according to the XOR result of the two parts;
    若节点组内包含第一节点和第二节点,则将这两个节点分别拆分出的一部分数据进行交换。If the node group includes the first node and the second node, a part of the data split by the two nodes is exchanged.
  15. 如权利要求14所述的装置,所述组内统计模块根据交换后数据和混淆电路统计服务数据,得到组内统计数据,具体包括:The apparatus according to claim 14, wherein the in-group statistic module obtains statistical data in the group according to the exchanged data and the confusing circuit statistical service data, and specifically includes:
    所述组内统计模块生成混淆电路,该混淆电路以交换后数据和随机数为输入;The intra-group statistic module generates an obfuscating circuit that takes the exchanged data and the random number as input;
    根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据。According to the exchanged data and the obfuscation circuit, the service data is collected through the interaction between the first node and the second node, and the statistical data in the group is obtained.
  16. 如权利要求15所述的装置,所述组内统计模块得到组内统计数据前,第一节点生成并持有第一随机数,第二节点生成并持有第二随机数;The apparatus according to claim 15, wherein the first node generates and holds a first random number, and the second node generates and holds a second random number before the intra-group statistical module obtains the intra-group statistical data;
    所述组内统计模块根据该交换后数据和该混淆电路,通过第一节点与第二节点之间的交互,统计服务数据,得到组内统计数据,具体包括:The intra-group statistic module obtains statistical data of the group by using the exchanged data and the obfuscation circuit, and the statistical data is obtained by the interaction between the first node and the second node, and specifically includes:
    所述组内统计模块通过第一节点与第二节点之间的交互,第一节点将所述第一随机数和自己的交换后数据,以及第二节点将所述第二随机数和自己的交换后数据,输入该混淆电路统计服务数据,得到组内统计数据;The intra-group statistic module passes the interaction between the first node and the second node, the first node will use the first random number and its own post-exchange data, and the second node will use the second random number and its own After exchanging data, input the confusing circuit statistical service data to obtain statistical data in the group;
    其中,所述组内统计数据包括:该混淆电路的第一输出结果与所述第一随机数的异 或结果,由第一节点持有;所述第二随机数,由第二节点持有。The statistical data in the group includes: an XOR result of the first output result of the obfuscation circuit and the first random number, which is held by the first node; and the second random number is held by the second node .
  17. 如权利要求16所述的装置,所述组内统计模块得到组内统计数据,具体包括:The apparatus according to claim 16, wherein the in-group statistic module obtains intra-group statistics, and specifically includes:
    第二节点得到该混淆电路的第一输出结果,并发送给第一节点;The second node obtains the first output result of the obfuscation circuit and sends the result to the first node;
    第一节点对所述第一随机数与接收的该混淆电路的第一输出结果进行异或运算,得到处于隐藏状态的对应统计结果,其在数值上等于该对应统计结果与所述第二随机数的异或结果。The first node performs an exclusive-OR operation on the first random number and the received first output result of the obfuscation circuit to obtain a corresponding statistical result in a hidden state, which is numerically equal to the corresponding statistical result and the second random number The XOR result of the number.
  18. 如权利要求16所述的装置,若另一节点组包含对应于第一节点的第三节点,以及对应于第二节点的第四节点,The apparatus according to claim 16, wherein another node group includes a third node corresponding to the first node, and a fourth node corresponding to the second node,
    所述组间统计模块根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:The inter-group statistic module performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
    所述组间统计模块将第一节点、第三节点分别作为其所属节点组的代表节点,并进行随机数交换;The inter-group statistic module uses the first node and the third node as representative nodes of the node group to which they belong, and performs random number exchange;
    根据交换后随机数、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the post-exchange random number, the corresponding intra-group statistical data and the obfuscation circuit, the inter-group statistics are obtained by the interaction between the representative nodes, and the inter-group statistical data is obtained;
    其中,该混淆电路以该交换后随机数和所述代表节点分别对应的部分组内统计数据为输入,该随机数交换包括:第二节点将第二随机数发送给第三节点,第四节点将其对应持有的第四随机数发送给第一节点。The obfuscation circuit takes the post-exchange random number and the statistical data of the partial group corresponding to the representative node as input, and the random number exchange includes: the second node sends the second random number to the third node, and the fourth node Sending the corresponding fourth random number to the first node.
  19. 如权利要求18所述的装置,所述组间统计数据包括:该混淆电路的第二输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。The apparatus according to claim 18, wherein the inter-group statistical data comprises: an exclusive OR result of the second output result of the obfuscation circuit and a fifth random number statistically generated by the first node between the node groups, by the first The node holds; the third node is a sixth random number generated and held by the node group.
  20. 如权利要求19所述的装置,若所述第二输出结果是针对全部节点统计的,所述还原模块利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果,具体包括:The apparatus according to claim 19, wherein if the second output result is calculated for all nodes, the restoring module uses the corresponding random number to restore the statistical data between the groups to obtain a final statistical result, which specifically includes :
    第三节点将所述第六随机数发送给第一节点;The third node sends the sixth random number to the first node;
    第一节点对所述第六随机数与所述组间统计数据进行异或运算,还原出被隐藏的对应统计结果,作为最终统计结果。The first node performs an exclusive-OR operation on the sixth random number and the statistical data between the groups, and restores the hidden corresponding statistical result as a final statistical result.
  21. 如权利要求19所述的装置,若所述第二输出结果并非针对全部节点统计的,所述还原模块利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果前,所述组间统计模块继续迭代统计直至得到:针对全部节点统计完毕后得到的组间统计数据,用于还原得到最终统计结果。The apparatus according to claim 19, wherein if the second output result is not counted for all nodes, the restoring module uses the corresponding random number to restore the statistical data between the groups to obtain a final statistical result. The inter-group statistics module continues to iterate the statistics until it is obtained: the inter-group statistics obtained after the statistics of all the nodes are completed, and are used to restore the final statistical results.
  22. 如权利要求16所述的装置,若另一节点组只包含第三节点,The apparatus according to claim 16, if the other node group only includes the third node,
    所述组间统计模块根据所述组内统计数据进行节点组间统计,得到组间统计数据,具体包括:The inter-group statistic module performs inter-node group statistics according to the statistical data in the group, and obtains inter-group statistic data, which specifically includes:
    所述组间统计模块将第一节点、第三节点分别作为其所属节点组的代表节点,并进行数据交换;The inter-group statistic module uses the first node and the third node as representative nodes of the node group to which it belongs, and performs data exchange;
    根据交换后数据、代表节点分别对应的组内统计数据和混淆电路,通过代表节点之间的交互,进行节点组间统计,得到组间统计数据;According to the data after the exchange, the statistical data of the group corresponding to the representative nodes, and the obfuscation circuit, the statistics between the nodes are performed by the interaction between the representative nodes, and the statistical data between the groups is obtained;
    其中,该混淆电路以该交换后数据和所述代表节点分别对应的部分组内统计数据为输入,该数据交换包括:第二节点将第二随机数发送给第三节点,第三节点将基于秘密共享协议拆分出的自己的一部分数据发送给第一节点。The obfuscation circuit takes the post-exchange data and the statistical data of the partial group corresponding to the representative node as input, and the data exchange includes: the second node sends the second random number to the third node, and the third node is based on A part of the data split by the secret sharing protocol is sent to the first node.
  23. 如权利要求22所述的装置,所述组间统计数据包括:该混淆电路的第三输出结果与第一节点为所述节点组间统计生成的第五随机数的异或结果,由第一节点持有;所述第三节点为所述节点组间统计生成并持有的第六随机数。The apparatus according to claim 22, wherein the inter-group statistical data comprises: an XOR result of the third output result of the obfuscation circuit and a fifth random number statistically generated by the first node between the node groups, by the first The node holds; the third node is a sixth random number generated and held by the node group.
  24. 如权利要求13~23任一项所述的装置,所述节点包括金融机构服务器。The apparatus of any one of claims 13 to 23, said node comprising a financial institution server.
  25. 一种基于混淆电路的数据统计设备,包括:A data statistics device based on an obfuscated circuit, comprising:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
    对各节点进行分组,得到多个包含至多两个节点的节点组;Grouping each node to obtain a plurality of node groups including at most two nodes;
    在节点组内进行节点间部分服务数据交换,并根据交换后数据和混淆电路统计服务数据,得到组内统计数据,其中,所述混淆电路用于对统计过程进行混淆,以及基于随机数隐藏统计结果;Performing partial service data exchange between nodes in the node group, and obtaining statistical data in the group according to the data after the exchange and the statistical data of the obfuscation circuit, wherein the obfuscation circuit is used for confusing the statistical process and hiding statistics based on the random number result;
    根据所述组内统计数据进行节点组间统计,得到组间统计数据;Performing inter-node group statistics according to the statistical data in the group, and obtaining inter-group statistical data;
    利用对应的随机数,对所述组间统计数据进行还原,得到最终统计结果。The statistical data of the group is restored by using the corresponding random number to obtain a final statistical result.
PCT/CN2018/106963 2017-11-01 2018-09-21 Garbled circuit-based data calculation method, apparatus, and device WO2019085677A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711055327.9A CN109756442B (en) 2017-11-01 2017-11-01 Data statistics method, device and equipment based on garbled circuit
CN201711055327.9 2017-11-01

Publications (1)

Publication Number Publication Date
WO2019085677A1 true WO2019085677A1 (en) 2019-05-09

Family

ID=66331338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106963 WO2019085677A1 (en) 2017-11-01 2018-09-21 Garbled circuit-based data calculation method, apparatus, and device

Country Status (3)

Country Link
CN (1) CN109756442B (en)
TW (1) TWI686712B (en)
WO (1) WO2019085677A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711744A (en) * 2020-06-23 2021-04-27 华控清交信息科技(北京)有限公司 Processing method and device for computing task and processing device for computing task

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569227B (en) * 2019-08-09 2020-08-14 阿里巴巴集团控股有限公司 Model parameter determination method and device and electronic equipment
CN112084384B (en) * 2020-09-11 2023-10-27 支付宝(杭州)信息技术有限公司 Method and device for carrying out security statistics by combining multiple parties
CN113591146B (en) * 2021-07-29 2024-02-13 北京航空航天大学 Efficient and safe two-party computing system and computing method based on cooperation
CN113343283B (en) * 2021-07-30 2021-10-15 深圳前海微众银行股份有限公司 Data processing method
CN113821826A (en) * 2021-09-30 2021-12-21 支付宝(杭州)信息技术有限公司 Boolean circuit, method and system for realizing XOR slicing input and output
CN115801253B (en) * 2023-02-03 2023-04-18 蓝象智联(杭州)科技有限公司 Multi-party secret sharing method for secure multi-party calculation and electronic equipment
CN117827805B (en) * 2024-03-06 2024-05-24 四川中城智建系统集成科技有限公司 Data processing operation and maintenance system of digital twin platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090175443A1 (en) * 2008-01-08 2009-07-09 Vladimir Kolesnikov Secure function evaluation techniques for circuits containing XOR gates with applications to universal circuits
CN103326822A (en) * 2013-07-18 2013-09-25 上海交通大学 Data-fragment-based method and system for protecting privacy of participatory perception system
CN106170943A (en) * 2013-09-25 2016-11-30 汤姆逊许可公司 Use the secret protection ridge regression of part homomorphic cryptography and mask
WO2017001872A1 (en) * 2015-07-01 2017-01-05 Barclays Bank Plc Secure computation

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793803B2 (en) * 2008-05-24 2014-07-29 Via Technologies, Inc. Termination of secure execution mode in a microprocessor providing for execution of secure code
US9077539B2 (en) * 2011-03-09 2015-07-07 Microsoft Technology Licensing, Llc Server-aided multi-party protocols
KR20160002697A (en) * 2013-03-04 2016-01-08 톰슨 라이센싱 Privacy-preserving ridge regression using partially homomorphic encryption and masks
CN105009505A (en) * 2013-08-09 2015-10-28 汤姆逊许可公司 A method and system for privacy-preserving recommendation based on matrix factorization and ridge regression
JP5957120B1 (en) * 2015-05-12 2016-07-27 日本電信電話株式会社 Secret sharing method, secret sharing system, distribution apparatus, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090175443A1 (en) * 2008-01-08 2009-07-09 Vladimir Kolesnikov Secure function evaluation techniques for circuits containing XOR gates with applications to universal circuits
CN103326822A (en) * 2013-07-18 2013-09-25 上海交通大学 Data-fragment-based method and system for protecting privacy of participatory perception system
CN106170943A (en) * 2013-09-25 2016-11-30 汤姆逊许可公司 Use the secret protection ridge regression of part homomorphic cryptography and mask
WO2017001872A1 (en) * 2015-07-01 2017-01-05 Barclays Bank Plc Secure computation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711744A (en) * 2020-06-23 2021-04-27 华控清交信息科技(北京)有限公司 Processing method and device for computing task and processing device for computing task

Also Published As

Publication number Publication date
TWI686712B (en) 2020-03-01
CN109756442B (en) 2020-04-24
CN109756442A (en) 2019-05-14
TW201923619A (en) 2019-06-16

Similar Documents

Publication Publication Date Title
WO2019085677A1 (en) Garbled circuit-based data calculation method, apparatus, and device
US11295381B2 (en) Data auditing method and device
TWI682304B (en) Abnormal account prevention and control method, device and equipment based on graph structure model
TWI671699B (en) Method and device for processing transaction request
TWI745861B (en) Data processing method, device and electronic equipment
TWI730622B (en) Data processing method, device and electronic equipment
TW201832100A (en) Block chain system, and data storage method and apparatus
TWI729698B (en) Data processing method, device and electronic equipment
TWI705686B (en) Method, device and equipment for data statistics
TWI740375B (en) Data interaction method, device and electronic equipment
EP3961453B1 (en) Method and apparatus for invoking smart contract, electronic device, and storage medium
TW202040399A (en) Data processing method and apparatus, and electronic device
CN110472974A (en) Assets transfer method, apparatus and system based on block chain intelligence contract
WO2019095854A1 (en) Traceable multi-party data processing method, apparatus and device
TWI737164B (en) Data interaction method, device, server and electronic equipment
TWI686758B (en) Data request processing, inquiry message processing method, device and equipment
CN116340897A (en) Digital asset processing method and device based on blockchain
CN110349021A (en) The method and device of secret transaction is realized in block chain
WO2020211075A1 (en) Decentralized secure multi-party data processing method and device, and storage medium
US10924273B2 (en) Data exchange for multi-party computation
WO2020211073A1 (en) Blockchain and secure multi-party computation-based transaction method and apparatus, and storage medium
CN111460514B (en) Data matching method and device and electronic equipment
CN111460515B (en) Data matching method and device and electronic equipment
CN115757571A (en) Multi-party computing method and device based on graph computation
Anusuya et al. A Review on Big Data Analytics Via Social Media

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18873670

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18873670

Country of ref document: EP

Kind code of ref document: A1