WO2020034749A1 - Data compiling method and device - Google Patents

Data compiling method and device Download PDF

Info

Publication number
WO2020034749A1
WO2020034749A1 PCT/CN2019/092186 CN2019092186W WO2020034749A1 WO 2020034749 A1 WO2020034749 A1 WO 2020034749A1 CN 2019092186 W CN2019092186 W CN 2019092186W WO 2020034749 A1 WO2020034749 A1 WO 2020034749A1
Authority
WO
WIPO (PCT)
Prior art keywords
pseudo
random number
data
sequence
selection strategy
Prior art date
Application number
PCT/CN2019/092186
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 WO2020034749A1 publication Critical patent/WO2020034749A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators

Definitions

  • This specification relates to the field of Internet technologies, and in particular, to a data statistics method and device.
  • this specification provides a data statistics method and device.
  • a data statistics method which is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the method is applied to the data holder, include:
  • each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
  • N is a natural number of 2 or more.
  • a data statistics device is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the device is applied to the data holder, include:
  • a pair-by-two negotiation unit negotiates a common pseudo-random number sequence with other data holders in pairs, and obtains N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
  • the pseudo-random number selection unit selects pseudo-random numbers from each pseudo-random number sequence according to the same global selection strategy, and obtains N-1 pseudo-random numbers corresponding to the negotiation object one-to-one;
  • the participation value determination unit determines, according to an arrangement order between the N data holders, a participation value of a pseudorandom number corresponding to each negotiation object when participating in the operation, and the participation value is the pseudorandom number or all The opposite of the pseudo-random number;
  • a summation calculation unit that performs summation calculation on the held data and the participation value of the N-1 pseudo-random numbers
  • a result sending unit sending the summation result to the third party, so that the third party sums up and calculates the summation results of all data holders to obtain the statistical value;
  • N is a natural number of 2 or more.
  • a data statistics device includes:
  • Memory for storing machine-executable instructions corresponding to data statistics logic
  • the machine-executable instructions corresponding to the data statistics logic are applied to perform data statistics by combining data among N data holders, and the data holders hold data to be calculated,
  • the processor By reading and executing the machine-executable instructions corresponding to the data statistics logic, the processor is caused to:
  • each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
  • N is a natural number of 2 or more.
  • each data holder when performing data statistics in this specification, each data holder can sum up the participation values of the held data and the pseudo-random number, thereby hiding its own real data in the summation result. Ensure that data is not leaked.
  • each data holder regards other data holders as negotiation objects, and negotiates a common pseudo-random number sequence with the negotiation objects one by one.
  • the globally identical pseudo-random number selection strategy can also be adopted from the pseudo-random number sequence.
  • the pseudo-random number selection is performed in order to obtain the same pseudo-random number, and according to the permutation order, the participation value of the pseudo-random number when participating in the operation is determined, thereby ensuring that the third party can obtain the result of summing all data holders. Sum calculation is performed to obtain statistical values, and multi-party safe sum calculation is realized.
  • each data holder when performing data statistics, each data holder does not need to communicate with each other, which can effectively reduce the communication volume in the data statistics process and improve the calculation efficiency.
  • FIG. 1 is a schematic flowchart of a data statistics method according to an exemplary embodiment of the present specification.
  • Fig. 2 is a schematic structural diagram of a data statistics device according to an exemplary embodiment of the present specification.
  • Fig. 3 is a block diagram of a data statistics device according to an exemplary embodiment of the present specification.
  • first, second, third, etc. may be used in this specification to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” as used herein can be interpreted as “at” or "when” or "in response to determination”.
  • multiple data holders can hold data of the same statistical object.
  • multiple data holders may be involved and multiple data holders are required.
  • the respective data of the companies cannot be leaked in the statistical process.
  • the same natural person can borrow on different P2P (peer-to-peer, Internet financial point-to-point lending) platforms, and each P2P platform stores the amount of the natural person's borrowing on this platform.
  • P2P peer-to-peer, Internet financial point-to-point lending
  • the P2P platform is the data holder
  • the amount of borrowing by the natural person is data held by the data holder
  • the total borrowing amount of the natural person is the statistical value to be calculated.
  • each bicycle sharing platform can provide users with bicycle usage services, and each bicycle sharing platform stores the daily usage of bicycle sharing on the platform.
  • each bicycle sharing platform stores the daily usage of bicycle sharing on the platform.
  • the bike sharing platform is the data holder.
  • the usage of bike sharing on this day is the data held by the data holder.
  • the total usage of bike sharing on this day is the statistical value to be calculated.
  • FIG. 1 is a schematic flowchart of a data statistics method according to an exemplary embodiment of the present specification.
  • This embodiment is applied to perform data statistics by combining data among N data holders, where N is a natural number greater than or equal to 2.
  • the data statistics method can be applied to a data holder and includes the following steps:
  • Step 102 Negotiate a common pseudo-random number sequence with other data holders one by one to obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one.
  • each data holder can treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common pseudo-random number sequence.
  • the data holder may negotiate the N-1 pseudo-random number sequences with other data holders each time data statistics are performed. That is, each time data statistics are performed, the pseudo-random number sequence is updated, and the pseudo-random number sequence is only used for data statistics once.
  • the data holder may negotiate with other data holders in advance to obtain the N-1 pseudo random number sequences, and the N-1 pseudo random number sequences may be used for multiple data statistics.
  • step 104 pseudo-random numbers are selected from each pseudo-random number sequence according to the globally same selection strategy, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
  • the selection strategy may be used to select a pseudorandom number from a pseudorandom number sequence, and finally obtain a pseudorandom number corresponding to the pseudorandom number sequence, and the pseudorandom number also corresponds to the negotiation object.
  • the selection strategy may be a sequence number.
  • the sequence number may be used to indicate that a pseudo-random number corresponding to the sequence number in the pseudo-random number sequence is selected. Assuming the sequence number is 5, it means that the fifth random number in the pseudo-random number sequence is selected.
  • the sequence number may also be used to indicate that selection is started from a pseudo-random number corresponding to the sequence number in a pseudo-random number sequence. Still assuming that the sequence number is 5, it can mean starting from the 5th pseudorandom number in the pseudorandom number sequence, and selecting K pseudorandom numbers one by one; it can also mean that it starts from the 5th + Hth pseudorandom number in the pseudorandom number sequence. , Select K pseudo-random numbers one by one; it can also mean that starting from the 5th pseudo-random number in the pseudo-random number sequence, K pseudo-random numbers are selected according to the interval of J, etc. There is no special limitation on this in this specification. After selecting K pseudo-random numbers, the K pseudo-random numbers can be combined to obtain a combined pseudo-random number. Among them, K is a natural number of 2 or more, and J and H are natural numbers of 1 or more.
  • the selection strategy may also include several sequence numbers, which can be used to indicate that the pseudo-random numbers corresponding to the sequence numbers in the pseudo-random number sequence are selected, and then the selected pseudo-random numbers are combined to obtain a combined pseudo-random number .
  • the selection strategy may include a sequence number and a sorting rule.
  • the sorting rule may include: arranging from large to small, arranging from small to large, and the like.
  • a pseudo-random number can be selected from the sorted pseudo-random number sequence according to the sequence number.
  • Step 106 Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number. The opposite of a random number.
  • the arrangement order may be determined by the ID numbers of the data holders. For example, all data holders are sorted according to the ID numbers in ascending or descending order.
  • data holders can also be sorted based on other information, for example, algorithms based on IP addresses, etc. This specification does not specifically limit this.
  • each data holder can determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the ranking result.
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the pseudo-random number; when the negotiation When the object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the reverse of the pseudo-random number.
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the opposite of the pseudo-random number;
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the calculation may be determined as the pseudo-random number, and there is no special limitation on this in this specification.
  • Step 108 Sum the calculated data and the participation values of the N-1 pseudo-random numbers.
  • each data holder may perform a sum calculation on the data it holds and the participation value of the N-1 pseudorandom numbers obtained in the foregoing step 106, so as to hide its real data in the summation result. .
  • Step 110 Send the summation result to the third party, so that the third party performs summation calculation on the summation results of all data holders to obtain the statistical value.
  • the summation result may be sent to a third party, and the third party sums up the summation result of each data holder to obtain a statistical value.
  • each data holder in this specification can negotiate a common pseudo-random number sequence with other data holders in pairs, so that each data holder holds N-1 pseudo-random numbers. Sequence, you can also select pseudo-random numbers from each pseudo-random number sequence according to the globally same pseudo-random number selection strategy to obtain N-1 pseudo-random numbers corresponding to the negotiation object, and then determine each pseudo-random number The participation value when participating in the calculation is combined with the data held by the local end to perform the summation calculation to hide the real data of the local end in the summing result and ensure that the data is not leaked.
  • Each data holder can send the summation result to a third party, and the third party performs the summation calculation to obtain the statistical value, thereby achieving multi-party secure calculation.
  • the third party performs the summation calculation to obtain the statistical value, thereby achieving multi-party secure calculation.
  • there is no need for communication between the data holders which can greatly reduce the amount of communication during data statistics and improve computing efficiency.
  • each data holder before generating a pseudo-random number sequence, each data holder can treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common seed.
  • data holders which are data holder 1 to data holder 4.
  • data holder 1 can regard data holder 2 to data holder 4 as negotiation objects, and then negotiate with these three negotiation objects to determine the pseudo-randomness. Sequence of seeds.
  • Data holder 1 and data holder 2 negotiate to determine the common seed X 12 .
  • the data holder 1 negotiates with the data holder 3 to determine a common seed X 13 .
  • Data holder 1 negotiates with data holder 4 to determine a common seed X 14 .
  • X 12 corresponds to data holder 2
  • X 13 corresponds to data holder 3
  • X 14 corresponds to data holder 4.
  • Table 2 refer to the example, the data for the holders 2, which negotiate with the data common seed holders 1 is determined by X 12, and the data holders 3 negotiation may be determined together
  • the seed X 23 is determined in consultation with the data holder 4 to determine a common seed X 24 .
  • X 12 corresponds to data holder 1
  • X 23 corresponds to data holder 3
  • X 24 corresponds to data holder 4.
  • the data holder 1 to the data holder 4 can generate the seed examples shown in Table 3.
  • the seeds generated by each data holder correspond one-to-one with the other three data holders.
  • each data holder can generate in advance N-1 pseudo-random number sequences corresponding to the negotiation objects in a one-to-one manner, and the N-1 pseudo-random number sequences can be used for multiple data statistics.
  • each data holder may use a seed as the only input parameter to input a pseudo-random number generator to generate a pseudo-random number sequence, and the pseudo-random number sequence generated by the same seed is also the same.
  • the data holder 1 can generate three pseudo-random number sequences, which are R 12 , R 13, and R 14 respectively .
  • R 12 corresponds to data holder 2
  • R 13 corresponds to data holder 3
  • R 14 corresponds to data holder 4, and so on.
  • data holder 1 to data holder 4 all generate 3 pseudo-random number sequences, and each two data holders have a common pseudo-random number sequence, for example, the data holder 1 and data holder 2 have a common pseudo-random number sequence R 12 , data holder 1 and data holder 3 have a common pseudo-random number sequence R 13, and so on.
  • each data holder holds N-1 pseudo-random number sequences, and these N-1 pseudo-random number sequences are respectively different from other N-1 data holders.
  • N-1 pseudo-random number sequences are respectively different from other N-1 data holders.
  • One correspondence, and any two data holders will have a common pseudo-random number sequence.
  • the number of elements of the pseudo-random number sequence can be determined by the algorithm of the pseudo-random number generator.
  • the pseudo-random number sequence generated by the AES128 (Advanced Encryption Standard) algorithm has 128 elements, which is generated by the AES256 algorithm.
  • the pseudo-random number sequence has 256 elements, and the pseudo-random number sequence generated by the HMAC256 (Hash-based Message Authentication Code) algorithm also has 256 elements.
  • the data holders when they negotiate the seed, they can also negotiate a common count value with the negotiation object, and then input the seed and the count value into the pseudo-random number generator to generate a pseudo-random number sequence. Based on the same seed and the same count value, the same pseudo-random number sequence can also be generated.
  • the data holder can select pseudo-random numbers from each pseudo-random number sequence according to the globally same selection strategy, and obtain N-1 pseudo-random numbers corresponding to the negotiation object one-to-one.
  • the selection strategy may be specified by a third party every time data statistics are performed.
  • the third party is independent of each data holder, and can specify a count value for each data holder, and can also calculate a statistical value by combining the summation results of all data holders.
  • the above-mentioned functions provided by the third party may be implemented by one platform or by different platforms, for example, a designated platform may specify a count value for each data holder, and a computing platform may unite all data holders.
  • the summation result of the square can be used to calculate statistical values, etc., and there is no special restriction on this in this specification.
  • the foregoing data holder 1 to data holder 4 are still taken as an example.
  • the pseudo-random number selection strategy is sequence number 5, which indicates that the fifth pseudo-random number in the pseudo-random number sequence is selected.
  • Each data holder selects the 5th pseudorandom number from the 3 pseudorandom number sequences generated by itself as the pseudorandom number corresponding to the negotiation object.
  • Three of the data holders 1 to 4 are selected and negotiated. Pseudo-random number corresponding to the object one-to-one.
  • each data holder since each two data holders have a common pseudo-random number sequence, and for each pseudo-random number sequence, each data holder adopts the same global selection strategy The random number is selected, so after the pseudo-random number is selected, each of the two data holders has a common pseudo-random number. For example, data holder 1 and data holder 2 are selected to obtain a common pseudo-random number r 12 , data holder 1 and data holder 3 are selected to obtain a common pseudo-random number r 13, and so on.
  • each data holder and its negotiation object After each data holder and its negotiation object generate a common pseudo-random number sequence, they also select a common pseudo-random number from the pseudo-random number sequence.
  • the selection strategy is sequence number 5, which means that starting from the 5th pseudo-random number in the pseudo-random number sequence, K pseudo-random numbers are selected one by one, K is globally unique, and is pre-empted by the data holder. By convention, its value is 3.
  • Each data holder can select the 5th, 6th, and 7th pseudorandom numbers from the pseudorandom number sequence held by them, and then combine the 3 pseudorandom numbers selected and combine the results.
  • a pseudo-random number corresponding to the pseudo-random number sequence.
  • the three pseudo-random numbers can be stitched together in ascending order of sequence numbers to obtain the combined result 123456789, that is, r 12 is 123456789.
  • three pseudo-random numbers can also be stitched together in order from large to small to obtain a combined result of 789456123, that is, r 12 is 789456123.
  • the ID numbers are sorted from small to large, and the ranking results are: data holder 1, data holder 2, data holder 3, data holder Party 4.
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the pseudo-random number; when the negotiation object is arranged in the present Before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
  • the data holder 2 For the data holder 2, the data holder 1 whose negotiation object is ranked first, so the participation value of the pseudo-random number r 12 corresponding to the data holder 1 can be determined as the opposite number. -r 12 , the negotiation data holder 3 is arranged behind, so the participation value of the pseudo-random number r 23 corresponding to the data holder 3 can be determined as r 23 , and so on, the participation values shown in Table 6 can be obtained Examples.
  • each data holder may perform a check on the held data and the N-1 pseudo-random numbers. Participation values are summed to hide their true data in the summation results.
  • the summation result may be sent to a third party, and the third party sums up the summation result of each data holder to obtain a statistical value.
  • the third party sums up the summation results of the data holder 1 to the data holder 4, and obtains the statistical value X 1 + X 2 + X 3 + X 4 .
  • a third party can obtain a statistical value by performing a summation calculation on the summation result of each data holder, without other calculations, which is simple and fast.
  • the summation result may also be broadcast, and then the summation calculation is performed on the summation results of all data holders participating in the statistics to obtain Statistics.
  • a third party may specify a different global selection strategy each time the data statistics are performed. Still taking the selection strategy as sequence number as an example, a third party can specify a different sequence number for each data statistic, for example: the first time the sequence number is 1, the second time the sequence number is 2, and so on until the sequence number The value is the number of pseudo-random numbers in the pseudo-random number sequence.
  • sequence number value is the number of pseudo-random numbers in the pseudo-random number sequence
  • each data holder can re-negotiate pairwise to generate a new common pseudo-random number sequence, and the third party can reassign the sequence number to 1 , 2, ..., and so on.
  • the selection strategy can be verified on the data holder side. For example, each data holder may record the selection strategy. When a third-party-selected selection strategy is received again, it is determined whether the received selection strategy conflicts with the recorded selection strategy, and the conflict usually indicates that the received The selection strategy has been used.
  • an error message can be returned to a third party.
  • a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
  • the data holder can record the sequence number sent by the third party. When the sequence number sent by the third party is received again, it can be determined whether the received sequence number is greater than the recorded one. Sequence number.
  • the data holder can record the maximum order of the selected pseudo-random number Number, that is, the sequence number + K-1.
  • the sequence number sent by the third party is received again, it is determined whether the received sequence number is greater than the maximum sequence number recorded.
  • each time when data statistics are performed different pseudo-random numbers can be selected from the pseudo-random number sequence to participate in the summation calculation, so that the summation result has randomness, and it can effectively prevent an illegal person from taking multiple summation results. Analyze the real data held by the data holder to ensure data security and no leakage.
  • the implementation scheme of the third-party delivery selection strategy when a data holder goes offline, does not affect the data statistics of the online data holder, and the online data holder can still send based on the third party
  • the selection strategy performs steps such as pseudo-random number selection, summation calculation, etc. to obtain the statistical value of the data held by all online data holders.
  • each data holder before generating a pseudo-random number sequence, each data holder can also treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common seed. .
  • each time a third party performs data statistics the data holder can specify the globally same count value. After receiving the count value, each data holder can use the seed and the count value as The input parameter is a pseudo-random number generator to generate a pseudo-random number sequence.
  • a third party may specify a different count value each time the data statistics are performed.
  • a third party may specify the counting value sequentially from 1, that is, the first designated counting value is 1, the second designated counting value is 2, and so on, and so on.
  • the count value can be verified on the data holder side.
  • each data holder may record the count value, and when the count value specified by the third party is received again, it is determined whether the received count value is greater than the recorded count value.
  • the pseudo-random number sequence generation step can be performed, and the recorded count value can be updated after the pseudo-random number sequence is generated.
  • the count value will not be taken to infinity, and a cycle period can be set, such as three months, half a year, and so on.
  • a cycle period can be set, such as three months, half a year, and so on.
  • the implementation of a third-party-designated count value can effectively reduce frequent seed negotiation between data holders and reduce network traffic.
  • each data holder can also generate N-1 pseudo-random number sequences, and these N-1 pseudo-random number sequences respectively correspond to the other N-1 data holders, and any Both data holders will have a common pseudo-random number sequence.
  • the pseudo-random number sequence generated each time can be used for data statistics only once.
  • a globally same selection strategy may also be specified by a third party.
  • a third party For a specific implementation solution, refer to the foregoing first embodiment.
  • the selection strategy is a sequence number, it is relatively simple.
  • the count value specified by the third party can also be used as the sequence number of the selection strategy. .
  • each data holder regenerates a pseudo-random number sequence each time data statistics are performed
  • the globally same fixed selection strategy may also be adopted. For example, each time a pseudo-random number is selected, a 10- to 20-bit pseudo-random number is selected from the pseudo-random number sequence, and then these pseudo-random numbers are combined, and the combined result is used as the pseudo-random corresponding to the negotiation object. number.
  • the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation can be determined according to the arrangement order between the data holders. , And then perform a summation calculation on the held data and the participation values of the N-1 pseudo-random numbers, and send the summation result to the third party, and the third party sums up all the data holders. Sum the results and calculate to obtain the statistical value.
  • the processing and implementation of this part refer to the first embodiment described above, which will not be described in detail in this embodiment.
  • this specification also provides an embodiment of a data statistics device.
  • the embodiments of the data statistics apparatus in this specification may be applied to a server or a server cluster deployed by a data holder.
  • the device embodiments may be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the server where it is located.
  • FIG. 2 it is a hardware structure diagram of the server where the data statistics device of this specification is located.
  • the server where the device is located in the embodiment may generally include other hardware according to the actual function of the server, and details are not described herein again.
  • Fig. 3 is a block diagram of a data statistics device according to an exemplary embodiment of the present specification.
  • the data statistics device 200 may be applied to perform data statistics by combining data among N data holders, and the data holder holds data to be calculated, and the data statistics device 200 It includes: a pair of negotiation unit 201, a pseudo-random number selection unit 202, a participation value determination unit 203, a sum calculation unit 204, a result sending unit 205, a conflict determination unit 206, and a count value determination unit 207.
  • the pair-by-two negotiation unit 201 negotiates a common pseudo-random number sequence with other data holders in pairs, and obtains N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
  • the pseudo-random number selecting unit 202 selects pseudo-random numbers from each pseudo-random number sequence according to the globally same selection strategy, and obtains N-1 pseudo-random numbers corresponding to the negotiation object one-to-one;
  • the participation value determination unit 203 determines the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or An opposite number of the pseudo-random number;
  • a summation calculation unit 204 performs a summation calculation on the held data and the participation values of the N-1 pseudo-random numbers
  • a result sending unit 205 sending the summation result to the third party, so that the third party sums up and calculates the summation results of all data holders to obtain the statistical value;
  • N is a natural number of 2 or more.
  • the pairwise negotiation unit 201 the pairwise negotiation unit 201:
  • the selection strategy is specified by the third party each time data statistics are performed.
  • the conflict judging unit 206 records the selection strategy, and when a third-party-selected selection strategy is received again, determines whether the received selection strategy conflicts with the recorded selection strategy; if there is no conflict, the selection strategy based on the same global is executed Steps to select pseudo-random numbers from each pseudo-random number sequence, and update the record selection strategy.
  • the pairwise negotiation unit 201 the pairwise negotiation unit 201:
  • the count value judging unit 207 records the count value; when the count value designated by the third party is received again, it is judged whether the count value is greater than the recorded count value; if it is greater, the execution is performed according to the N-1 seeds and all The steps of generating counted N-1 pseudo-random number sequences are described, and the recorded count value is updated.
  • the selection strategy is fixed.
  • the selection strategy is a sequence number.
  • the pseudo-random number selecting unit 202 selects a pseudo-random number corresponding to a globally same sequence number from each pseudo-random number sequence.
  • the pseudo-random number selecting unit 202 selects a plurality of pseudo-random numbers for each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence; Several pseudo-random numbers, and the combined result is used as a pseudo-random number selected from the pseudo-random number sequence.
  • the pseudo-random number selecting unit 202 selects a fixed number of pseudo-random numbers one by one, and the fixed number is greater than one.
  • the participation value determination unit 203 determines whether the participation value is available.
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
  • the relevant part may refer to the description of the method embodiment.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, may be located One place, or it can be distributed across multiple network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
  • the system, device, module, or unit described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or a product with a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be 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 sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the present specification also provides a data statistics device.
  • the data statistics device includes a processor and a memory for storing machine-executable instructions corresponding to the data statistics logic. Wherein, the machine-executable instructions corresponding to the data statistics logic are applied to combine data among N data holders to perform data statistics, and the data holder holds data to be calculated.
  • the processor and the memory are usually interconnected by an internal bus. In other possible implementations, the device may further include an external interface to enable communication with other devices or components.
  • the processor by reading and executing machine-executable instructions corresponding to data statistics logic stored in the memory, the processor is caused to:
  • each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
  • N is a natural number of 2 or more.
  • the processor when negotiating a common pseudo-random number sequence with other data holders in pairs, the processor is caused to:
  • the selection strategy is specified by the third party each time data statistics are performed.
  • the processor is further caused to:
  • a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
  • the processor when negotiating a common pseudo-random number sequence with other data holders in pairs, the processor is caused to:
  • the processor is further caused to:
  • the step of generating N-1 pseudo-random number sequences according to the N-1 seeds and the count value is performed, and the recorded count value is updated.
  • the selection strategy is fixed.
  • the selection strategy is a sequence number.
  • the processor is further prompted:
  • a pseudo-random number corresponding to a globally identical sequence number is selected from each pseudo-random number sequence.
  • the processor is further prompted:
  • pseudo-random number sequence For each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence, selecting a plurality of pseudo-random numbers;
  • the selected pseudo-random numbers are combined, and the combined result is used as the pseudo-random number selected from the pseudo-random number sequence.
  • the processor when selecting several pseudo-random numbers, the processor is caused to:
  • a fixed number of pseudo-random numbers are selected one by one, and the fixed number is greater than one.
  • the processor when determining the participation value of the pseudo-random number corresponding to each negotiation object in the operation according to the arrangement order between the N data holders, the processor is caused to:
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
  • the present specification also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, the program being applied to unite N data holders.
  • the data is subjected to data statistics.
  • the data holder holds the data to be calculated.
  • each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
  • N is a natural number of 2 or more.
  • the negotiation of a common pseudo-random number sequence with other data holders includes:
  • the selection strategy is specified by the third party each time data statistics are performed.
  • Optional also includes:
  • a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
  • the negotiation of a common pseudo-random number sequence with other data holders includes:
  • Optional also includes:
  • the step of generating N-1 pseudo-random number sequences according to the N-1 seeds and the count value is performed, and the recorded count value is updated.
  • the selection strategy is fixed.
  • the selection strategy is a sequence number.
  • the step of selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy includes:
  • a pseudo-random number corresponding to a globally identical sequence number is selected from each pseudo-random number sequence.
  • the step of selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy includes:
  • pseudo-random number sequence For each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence, selecting a plurality of pseudo-random numbers;
  • the selected pseudo-random numbers are combined, and the combined result is used as the pseudo-random number selected from the pseudo-random number sequence.
  • the selecting a plurality of pseudo-random numbers includes:
  • a fixed number of pseudo-random numbers are selected one by one, and the fixed number is greater than one.
  • determining the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders includes:
  • the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.

Abstract

Disclosed by the present description are a data compiling method and device, which are applied to the compiling of data by combining data of N data holders, the method comprising: negotiating with other data holders one by one to determine a common pseudo-random number sequence and to obtain N-1 pseudo-random number sequences which correspond one-to-one with negotiation objects; selecting a pseudo-random number from each pseudo-random number sequence according to completely identical selection strategies, so as to obtain N-1 pseudo-random numbers in one-to-one correspondence with the negotiation objects; determining a participation value for the pseudo-random number corresponding to each negotiation object participating in an operation according to the sorting order of the N data holders, the participation value being the pseudo-random number or a number opposite thereto; performing summation calculation on the held data and the participation values of the N-1 pseudo-random numbers; and sending the summation result to a third party, so that the third party performs summation calculation for the summation results of all data holders to obtain a statistical value.

Description

数据统计方法和装置Data statistics method and device 技术领域Technical field
本说明书涉及互联网技术领域,尤其涉及一种数据统计方法和装置。This specification relates to the field of Internet technologies, and in particular, to a data statistics method and device.
背景技术Background technique
大数据时代,存在非常多的数据孤岛。例如,一个自然人的数据,可以分散存储于不同的企业中,而企业与企业之间由于竞争关系和用户隐私保护的考虑,并不是完全的互相信任,这就为涉及企业之间数据合作的统计工作造成了障碍。如何在充分保护企业核心数据隐私的前提下,既能够利用双方拥有的数据完成一些数据统计计算,又不会泄露企业各自的数据隐私安全,成为一个亟待解决的迫切问题。In the era of big data, there are many data islands. For example, the data of a natural person can be distributed and stored in different enterprises, and due to the consideration of competition and user privacy protection between enterprises, they do not completely trust each other. This is the statistics involving data cooperation between enterprises. Work created obstacles. Under the premise of fully protecting the core data privacy of the enterprise, it is an urgent problem to be solved that it can use some data owned by both parties to complete some statistical calculations without leaking the respective data privacy security of the enterprise.
发明内容Summary of the Invention
有鉴于此,本说明书提供一种数据统计方法和装置。In view of this, this specification provides a data statistics method and device.
具体地,本说明书是通过如下技术方案实现的:Specifically, this specification is implemented through the following technical solutions:
一种数据统计方法,应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,所述方法应用于所述数据持有方,包括:A data statistics method, which is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the method is applied to the data holder, include:
与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
一种数据统计装置,应用于联合N个数据持有方之间的数据进行数据统计,所述数 据持有方持有待计算统计值的数据,所述装置应用于所述数据持有方,包括:A data statistics device is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the device is applied to the data holder, include:
两两协商单元,与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;A pair-by-two negotiation unit negotiates a common pseudo-random number sequence with other data holders in pairs, and obtains N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
伪随机数选取单元,根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;The pseudo-random number selection unit selects pseudo-random numbers from each pseudo-random number sequence according to the same global selection strategy, and obtains N-1 pseudo-random numbers corresponding to the negotiation object one-to-one;
参与值确定单元,根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;The participation value determination unit determines, according to an arrangement order between the N data holders, a participation value of a pseudorandom number corresponding to each negotiation object when participating in the operation, and the participation value is the pseudorandom number or all The opposite of the pseudo-random number;
求和计算单元,对持有的数据和所述N-1个伪随机数的参与值进行求和计算;A summation calculation unit that performs summation calculation on the held data and the participation value of the N-1 pseudo-random numbers;
结果发送单元,将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;A result sending unit, sending the summation result to the third party, so that the third party sums up and calculates the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
一种数据统计装置,包括:A data statistics device includes:
处理器;processor;
用于存储与数据统计逻辑对应的机器可执行指令的存储器;Memory for storing machine-executable instructions corresponding to data statistics logic;
所述数据统计逻辑对应的机器可执行指令应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,The machine-executable instructions corresponding to the data statistics logic are applied to perform data statistics by combining data among N data holders, and the data holders hold data to be calculated,
通过读取并执行所述与数据统计逻辑对应的机器可执行指令,所述处理器被促使:By reading and executing the machine-executable instructions corresponding to the data statistics logic, the processor is caused to:
与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
由以上描述可以看出,本说明书在进行数据统计时,各数据持有方可对持有的数据和伪随机数的参与值进行求和,从而将自身真实的数据隐藏在求和结果中,确保数据不泄露。并且,各数据持有方将其他数据持有方看作协商对象,与协商对象两两协商出共同的伪随机数序列,还可采用全局相同的伪随机数选取策略从所述伪随机数序列中进行伪随机数选取,从而得到相同的伪随机数,并根据排列顺序,确定所述伪随机数在参与运算时的参与值,从而确保第三方可通过对所有数据持有方的求和结果进行求和计算得到统计值,实现多方安全求和计算。此外,在进行数据统计时,各个数据持有方之间无需相互通信,可有效减少数据统计过程中的通信量,提高计算效率。As can be seen from the above description, when performing data statistics in this specification, each data holder can sum up the participation values of the held data and the pseudo-random number, thereby hiding its own real data in the summation result. Ensure that data is not leaked. In addition, each data holder regards other data holders as negotiation objects, and negotiates a common pseudo-random number sequence with the negotiation objects one by one. The globally identical pseudo-random number selection strategy can also be adopted from the pseudo-random number sequence. The pseudo-random number selection is performed in order to obtain the same pseudo-random number, and according to the permutation order, the participation value of the pseudo-random number when participating in the operation is determined, thereby ensuring that the third party can obtain the result of summing all data holders. Sum calculation is performed to obtain statistical values, and multi-party safe sum calculation is realized. In addition, when performing data statistics, each data holder does not need to communicate with each other, which can effectively reduce the communication volume in the data statistics process and improve the calculation efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本说明书一示例性实施例示出的一种数据统计方法的流程示意图。FIG. 1 is a schematic flowchart of a data statistics method according to an exemplary embodiment of the present specification.
图2是本说明书一示例性实施例示出的一种用于数据统计装置的一结构示意图。Fig. 2 is a schematic structural diagram of a data statistics device according to an exemplary embodiment of the present specification.
图3是本说明书一示例性实施例示出的一种数据统计装置的框图。Fig. 3 is a block diagram of a data statistics device according to an exemplary embodiment of the present specification.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Rather, they are merely examples of devices and methods consistent with certain aspects of the specification, as detailed in the appended claims.
在本说明书使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the specification. As used in this specification and the appended claims, the singular forms "a", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at" or "when" or "in response to determination".
在大数据时代,多个数据持有方可以持有同一个统计对象的数据,在这种情况下,在对数据进行统计计算时,可能会涉及多个数据持有方,需要多个数据持有方合作完成数据统计。然而,由于不同企业之间的竞争关系或者隐私保护的考虑,在统计过程中不能泄露企业各自的数据。In the era of big data, multiple data holders can hold data of the same statistical object. In this case, when performing statistical calculations on data, multiple data holders may be involved and multiple data holders are required. Cooperate to complete statistics. However, due to the competition between different companies or the consideration of privacy protection, the respective data of the companies cannot be leaked in the statistical process.
例如,同一个自然人可以在不同的P2P(peer-to-peer,互联网金融点对点借贷)平台借款,各P2P平台存储有该自然人在本平台的借款数额。在统计该自然人总共的借款数额时,往往需要联合多个P2P平台合作完成统计计算。For example, the same natural person can borrow on different P2P (peer-to-peer, Internet financial point-to-point lending) platforms, and each P2P platform stores the amount of the natural person's borrowing on this platform. When counting the total borrowing amount of this natural person, it is often necessary to cooperate with multiple P2P platforms to complete statistical calculations.
在这个例子中,P2P平台是数据持有方,该自然人的借款数额是数据持有方持有的数据,该自然人总共的借款数额是待计算的统计值。In this example, the P2P platform is the data holder, the amount of borrowing by the natural person is data held by the data holder, and the total borrowing amount of the natural person is the statistical value to be calculated.
又例如,每个共享单车平台都可以为用户提供单车使用服务,各共享单车平台存储有该平台每天共享单车的使用量。在统计某一天共享单车的使用总量时,往往需要联合多个共享单车平台完成统计计算。As another example, each bicycle sharing platform can provide users with bicycle usage services, and each bicycle sharing platform stores the daily usage of bicycle sharing on the platform. When counting the total amount of shared bicycle use on a certain day, it is often necessary to combine multiple shared bicycle platforms to complete statistical calculations.
在这个例子中,共享单车平台是数据持有方,这一天共享单车的使用量是数据持有方持有的数据,这一天共享单车的使用总量是待计算的统计值。In this example, the bike sharing platform is the data holder. The usage of bike sharing on this day is the data held by the data holder. The total usage of bike sharing on this day is the statistical value to be calculated.
图1是本说明书一示例性实施例示出的一种数据统计方法的流程示意图。FIG. 1 is a schematic flowchart of a data statistics method according to an exemplary embodiment of the present specification.
本实施例应用于联合N个数据持有方之间的数据进行数据统计,N为大于等于2的自然数。This embodiment is applied to perform data statistics by combining data among N data holders, where N is a natural number greater than or equal to 2.
请参考图1,所述数据统计方法可以应用于数据持有方,包括有以下步骤:Please refer to FIG. 1. The data statistics method can be applied to a data holder and includes the following steps:
步骤102,与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列。Step 102: Negotiate a common pseudo-random number sequence with other data holders one by one to obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one.
在本实施例中,每个数据持有方可将其他数据持有方看作协商对象,然后分别与各个协商对象进行两两协商,协商出共同的伪随机数序列。In this embodiment, each data holder can treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common pseudo-random number sequence.
在一个例子中,数据持有方可在每次进行数据统计时与其他数据持有方协商出所述N-1个伪随机数序列。即,每次进行数据统计时,均会更新所述伪随机数序列,所述伪随机数序列仅用于一次数据统计。In one example, the data holder may negotiate the N-1 pseudo-random number sequences with other data holders each time data statistics are performed. That is, each time data statistics are performed, the pseudo-random number sequence is updated, and the pseudo-random number sequence is only used for data statistics once.
在另一个例子中,数据持有方也可以预先与其他数据持有方协商出所述N-1个伪随机数序列,所述N-1个伪随机数序列可用于多次数据统计。In another example, the data holder may negotiate with other data holders in advance to obtain the N-1 pseudo random number sequences, and the N-1 pseudo random number sequences may be used for multiple data statistics.
步骤104,根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得 到与协商对象一一对应的N-1个伪随机数。In step 104, pseudo-random numbers are selected from each pseudo-random number sequence according to the globally same selection strategy, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
在本实施例中,所述选取策略可用于从一个伪随机数序列中选取伪随机数,最终得到一个与该伪随机数序列对应的伪随机数,该伪随机数也与协商对象对应。In this embodiment, the selection strategy may be used to select a pseudorandom number from a pseudorandom number sequence, and finally obtain a pseudorandom number corresponding to the pseudorandom number sequence, and the pseudorandom number also corresponds to the negotiation object.
在一个例子中,所述选取策略可以是一个顺序号。所述顺序号可用于表示选取伪随机数序列中的该顺序号对应的伪随机数。假设顺序号是5,则表示选取伪随机数序列中第5位伪随机数。In one example, the selection strategy may be a sequence number. The sequence number may be used to indicate that a pseudo-random number corresponding to the sequence number in the pseudo-random number sequence is selected. Assuming the sequence number is 5, it means that the fifth random number in the pseudo-random number sequence is selected.
所述顺序号也可用于表示从伪随机数序列中的该顺序号对应的伪随机数开始进行选取。仍假设顺序号是5,则可表示从伪随机数序列中第5位伪随机数开始,逐个选取K个伪随机数;也可表示从伪随机数序列中第5+H位伪随机数开始,逐个选取K个伪随机数;还可表示从伪随机数序列中第5位伪随机数开始,按照J的间隔选取K个伪随机数等,本说明书对此不作特殊限制。在选取得到K个伪随机数后,可将这K个伪随机数进行组合,得到一个组合后的伪随机数。其中,K是大于等于2的自然数,J和H是大于等于1的自然数。The sequence number may also be used to indicate that selection is started from a pseudo-random number corresponding to the sequence number in a pseudo-random number sequence. Still assuming that the sequence number is 5, it can mean starting from the 5th pseudorandom number in the pseudorandom number sequence, and selecting K pseudorandom numbers one by one; it can also mean that it starts from the 5th + Hth pseudorandom number in the pseudorandom number sequence. , Select K pseudo-random numbers one by one; it can also mean that starting from the 5th pseudo-random number in the pseudo-random number sequence, K pseudo-random numbers are selected according to the interval of J, etc. There is no special limitation on this in this specification. After selecting K pseudo-random numbers, the K pseudo-random numbers can be combined to obtain a combined pseudo-random number. Among them, K is a natural number of 2 or more, and J and H are natural numbers of 1 or more.
当然,所述选取策略也可以包括若干个顺序号,可用于表示选取伪随机数序列中这些顺序号对应的伪随机数,然后对选取的伪随机数进行组合,得到一个组合后的伪随机数。Of course, the selection strategy may also include several sequence numbers, which can be used to indicate that the pseudo-random numbers corresponding to the sequence numbers in the pseudo-random number sequence are selected, and then the selected pseudo-random numbers are combined to obtain a combined pseudo-random number .
在另一个例子中,所述选取策略可以包括顺序号和排序规则。其中,所述排序规则可包括:从大到小进行排列、从小到大进行排列等。在本例中,可根据所述顺序号从排序后的伪随机数序列中选取伪随机数,具体的选取方法可参考前述描述,本实施例在此不再一一赘述。In another example, the selection strategy may include a sequence number and a sorting rule. The sorting rule may include: arranging from large to small, arranging from small to large, and the like. In this example, a pseudo-random number can be selected from the sorted pseudo-random number sequence according to the sequence number. For a specific selection method, refer to the foregoing description. This embodiment will not repeat them one by one here.
上述选取策略仅为示例性的说明,在实际应用中,还可以采用其他的选取策略,本说明书对此不作特殊限制。The above selection strategy is only an exemplary description. In actual applications, other selection strategies may also be adopted, and this specification does not specifically limit this.
步骤106,根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数。Step 106: Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number. The opposite of a random number.
在本实施例中,所述排列顺序可由数据持有方的ID号确定,例如,按照ID号从小到大,或从大到小的顺序对所有数据持有方进行排序。In this embodiment, the arrangement order may be determined by the ID numbers of the data holders. For example, all data holders are sorted according to the ID numbers in ascending or descending order.
当然,还可以基于其他信息对数据持有方进行排序,例如,基于IP地址的算法等,本说明书对此不作特殊限制。Of course, data holders can also be sorted based on other information, for example, algorithms based on IP addresses, etc. This specification does not specifically limit this.
在本实施例中,各数据持有方可根据排序结果确定每个协商对象对应的伪随机数在参与运算时的参与值。In this embodiment, each data holder can determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the ranking result.
在一个例子中,当所述协商对象排列在本数据持有方之后时,可将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;当所述协商对象排列在本数据持有方之前时,可将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。In one example, when the negotiation object is arranged behind the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the pseudo-random number; when the negotiation When the object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the reverse of the pseudo-random number.
在另一个例子中,当所述协商对象排列在本数据持有方之后时,可将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数;当所述协商对象排列在本数据持有方之前时,可将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数,本说明书对此不作特殊限制。In another example, when the negotiation object is arranged behind the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation may be determined as the opposite of the pseudo-random number; When the negotiation object is arranged in front of the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the calculation may be determined as the pseudo-random number, and there is no special limitation on this in this specification.
步骤108,对持有的数据和所述N-1个伪随机数的参与值进行求和计算。Step 108: Sum the calculated data and the participation values of the N-1 pseudo-random numbers.
在本实施例中,各个数据持有方可对其持有的数据和前述步骤106得到的N-1个伪随机数的参与值进行求和计算,以将其真实数据隐藏在求和结果中。In this embodiment, each data holder may perform a sum calculation on the data it holds and the participation value of the N-1 pseudorandom numbers obtained in the foregoing step 106, so as to hide its real data in the summation result. .
步骤110,将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值。Step 110: Send the summation result to the third party, so that the third party performs summation calculation on the summation results of all data holders to obtain the statistical value.
在本实施例中,各个数据持有方在计算得到求和结果后,可将求和结果发送给第三方,第三方对各个数据持有方的求和结果进行求和计算,以得到统计值。In this embodiment, after the data holder obtains the summation result, the summation result may be sent to a third party, and the third party sums up the summation result of each data holder to obtain a statistical value. .
由以上描述可以看出,本说明书每个数据持有方可与其他数据持有方两两协商出共同的伪随机数序列,以使得每个数据持有方持有N-1个伪随机数序列,还可根据全局相同的伪随机数选取策略分别从每个伪随机数序列中选取伪随机数,以得到N-1个与协商对象一一对应的伪随机数,然后确定各个伪随机数在参与运算时的参与值,并结合本端持有的数据进行求和计算,以将本端真实数据隐藏在求和结果中,确保数据不泄露。各数据持有方可将求和结果发送给第三方,由第三方进行求和计算,得到统计值,从而实现多方安全计算。并且,在数据统计时,各个数据持有方之间无需进行通信,可大大减少数据统计时的通信量,提高计算效率。As can be seen from the above description, each data holder in this specification can negotiate a common pseudo-random number sequence with other data holders in pairs, so that each data holder holds N-1 pseudo-random numbers. Sequence, you can also select pseudo-random numbers from each pseudo-random number sequence according to the globally same pseudo-random number selection strategy to obtain N-1 pseudo-random numbers corresponding to the negotiation object, and then determine each pseudo-random number The participation value when participating in the calculation is combined with the data held by the local end to perform the summation calculation to hide the real data of the local end in the summing result and ensure that the data is not leaked. Each data holder can send the summation result to a third party, and the third party performs the summation calculation to obtain the statistical value, thereby achieving multi-party secure calculation. In addition, during data statistics, there is no need for communication between the data holders, which can greatly reduce the amount of communication during data statistics and improve computing efficiency.
下面分别通过实施例一和实施例二两个实施例来描述本说明书的具体实现过程。The specific implementation process of this specification is described below through two embodiments, namely, the first embodiment and the second embodiment.
实施例一Example one
在本实施例中,在生成伪随机数序列之前,每个数据持有方可以将其他数据持有方 看作协商对象,然后分别与各个协商对象进行两两协商,以协商出共同的种子。In this embodiment, before generating a pseudo-random number sequence, each data holder can treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common seed.
举例来说,假设有4个数据持有方,分别为数据持有方1至数据持有方4。以数据持有方1为例,数据持有方1可将数据持有方2至数据持有方4看作协商对象,然后分别与这3个协商对象进行协商,以确定用于生成伪随机序列的种子。For example, suppose there are 4 data holders, which are data holder 1 to data holder 4. Taking data holder 1 as an example, data holder 1 can regard data holder 2 to data holder 4 as negotiation objects, and then negotiate with these three negotiation objects to determine the pseudo-randomness. Sequence of seeds.
Figure PCTCN2019092186-appb-000001
Figure PCTCN2019092186-appb-000001
表1Table 1
请参考表1的示例,数据持有方1与数据持有方2协商,可确定共同的种子X 12。数据持有方1与数据持有方3协商,可确定共同的种子X 13。数据持有方1与数据持有方4协商,可确定共同的种子X 14。对于数据持有方1而言,X 12与数据持有方2对应,X 13与数据持有方3对应,X 14与数据持有方4对应。 Please refer to the example in Table 1. Data holder 1 and data holder 2 negotiate to determine the common seed X 12 . The data holder 1 negotiates with the data holder 3 to determine a common seed X 13 . Data holder 1 negotiates with data holder 4 to determine a common seed X 14 . For data holder 1, X 12 corresponds to data holder 2, X 13 corresponds to data holder 3, and X 14 corresponds to data holder 4.
Figure PCTCN2019092186-appb-000002
Figure PCTCN2019092186-appb-000002
表2Table 2
在表1的基础上,请参考表2的示例,对于数据持有方2而言,其与数据持有方1协商确定的共同种子是X 12,与数据持有方3协商,可确定共同的种子X 23,与数据持有方4协商,可确定共同的种子X 24。其中,X 12与数据持有方1对应,X 23与数据持有方3对应,X 24与数据持有方4对应。 On the basis of Table 1, Table 2 refer to the example, the data for the holders 2, which negotiate with the data common seed holders 1 is determined by X 12, and the data holders 3 negotiation may be determined together The seed X 23 is determined in consultation with the data holder 4 to determine a common seed X 24 . Among them, X 12 corresponds to data holder 1, X 23 corresponds to data holder 3, and X 24 corresponds to data holder 4.
 Zh 种子seed
数据持有方1Data Holder 1 X 12、X 13、X 14 X 12 , X 13 , X 14
数据持有方2Data holder 2 X 12、X 23、X 24 X 12 , X 23 , X 24
数据持有方3Data Holder 3 X 13、X 23、X 34 X 13 , X 23 , X 34
数据持有方4Data Holder 4 X 14、X 24、X 34 X 14 , X 24 , X 34
表3table 3
依次类推,数据持有方1至数据持有方4可生成表3所示的种子示例。由此,每个 数据持有方生成的种子分别与其他3个数据持有方一一对应。By analogy, the data holder 1 to the data holder 4 can generate the seed examples shown in Table 3. As a result, the seeds generated by each data holder correspond one-to-one with the other three data holders.
在本实施例中,各数据持有方可预先生成与协商对象一一对应的N-1个伪随机数序列,所述N-1个伪随机数序列可用于多次数据统计。In this embodiment, each data holder can generate in advance N-1 pseudo-random number sequences corresponding to the negotiation objects in a one-to-one manner, and the N-1 pseudo-random number sequences can be used for multiple data statistics.
在一个例子中,各数据持有方可将种子作为唯一入参输入伪随机数发生器以生成伪随机数序列,相同种子生成的伪随机数序列也相同。In one example, each data holder may use a seed as the only input parameter to input a pseudo-random number generator to generate a pseudo-random number sequence, and the pseudo-random number sequence generated by the same seed is also the same.
Figure PCTCN2019092186-appb-000003
Figure PCTCN2019092186-appb-000003
表4Table 4
仍以表3所示的种子示例为例,请参考表4的示例,数据持有方1可生成3个伪随机数序列,分别为R 12、R 13和R 14。其中,R 12与数据持有方2对应,R 13与数据持有方3对应,R 14与数据持有方4对应等。 Taking the seed example shown in Table 3 as an example, please refer to the example in Table 4. The data holder 1 can generate three pseudo-random number sequences, which are R 12 , R 13, and R 14 respectively . Among them, R 12 corresponds to data holder 2, R 13 corresponds to data holder 3, R 14 corresponds to data holder 4, and so on.
至此,数据持有方1至数据持有方4均生成3个伪随机数序列,并且,每两个数据持有方之间均具有1个共同的伪随机数序列,例如,数据持有方1和数据持有方2具有共同的伪随机数序列R 12,数据持有方1和数据持有方3具有共同的伪随机数序列R 13等。 So far, data holder 1 to data holder 4 all generate 3 pseudo-random number sequences, and each two data holders have a common pseudo-random number sequence, for example, the data holder 1 and data holder 2 have a common pseudo-random number sequence R 12 , data holder 1 and data holder 3 have a common pseudo-random number sequence R 13, and so on.
在N个数据持有方的应用场景中,每个数据持有方持有N-1个伪随机数序列,这N-1个伪随机数序列分别与其他N-1个数据持有方一一对应,且任意两个数据持有方会具有一个共同的伪随机数序列。In the application scenario of N data holders, each data holder holds N-1 pseudo-random number sequences, and these N-1 pseudo-random number sequences are respectively different from other N-1 data holders. One correspondence, and any two data holders will have a common pseudo-random number sequence.
在本实施例中,伪随机数序列的元素数量可由伪随机数发生器的算法确定,例如, AES128(Advanced Encryption Standard,高级加密标准)算法生成的伪随机数序列有128个元素,AES256算法生成的伪随机数序列有256个元素,HMAC256(Hash-based Message Authentication Code,哈希消息认证码)算法生成的伪随机数序列也有256个元素等。In this embodiment, the number of elements of the pseudo-random number sequence can be determined by the algorithm of the pseudo-random number generator. For example, the pseudo-random number sequence generated by the AES128 (Advanced Encryption Standard) algorithm has 128 elements, which is generated by the AES256 algorithm. The pseudo-random number sequence has 256 elements, and the pseudo-random number sequence generated by the HMAC256 (Hash-based Message Authentication Code) algorithm also has 256 elements.
在另一个例子中,在生成伪随机数序列时,除种子之外,还可以存在其他入参,例如计数值等。In another example, when generating a pseudo-random number sequence, in addition to seeds, there may be other input parameters, such as a count value and the like.
以计数值为例,各数据持有方在协商种子时,还可与协商对象协商出共同的计数值,然后将种子和计数值输入伪随机数发生器,以生成伪随机数序列。基于相同的种子和相同的计数值,也可以生成相同的伪随机数序列。Taking the count value as an example, when the data holders negotiate the seed, they can also negotiate a common count value with the negotiation object, and then input the seed and the count value into the pseudo-random number generator to generate a pseudo-random number sequence. Based on the same seed and the same count value, the same pseudo-random number sequence can also be generated.
在生成伪随机数序列之后,数据持有方可根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数。After generating the pseudo-random number sequence, the data holder can select pseudo-random numbers from each pseudo-random number sequence according to the globally same selection strategy, and obtain N-1 pseudo-random numbers corresponding to the negotiation object one-to-one.
在本实施例中,所述选取策略可由第三方在每次进行数据统计时指定。In this embodiment, the selection strategy may be specified by a third party every time data statistics are performed.
所述第三方独立于各个数据持有方,可为各个数据持有方指定计数值,还可以联合所有数据持有方的求和结果计算统计值。The third party is independent of each data holder, and can specify a count value for each data holder, and can also calculate a statistical value by combining the summation results of all data holders.
在实际实现中,所述第三方提供的上述功能可由一个平台来实现,也可由不同的平台来实现,例如:由指定平台为各个数据持有方指定计数值,由计算平台以联合所有数据持有方的求和结果计算统计值等,本说明书对此不作特殊限制。In actual implementation, the above-mentioned functions provided by the third party may be implemented by one platform or by different platforms, for example, a designated platform may specify a count value for each data holder, and a computing platform may unite all data holders. The summation result of the square can be used to calculate statistical values, etc., and there is no special restriction on this in this specification.
在一个例子中,仍以前述数据持有方1至数据持有方4为例,假设所述伪随机数选取策略是顺序号5,表示选取伪随机数序列中第5位伪随机数,则各个数据持有方分别从自身生成的3个伪随机数序列中选取第5位伪随机数作为与协商对象对应的伪随机数。In one example, the foregoing data holder 1 to data holder 4 are still taken as an example. Assuming that the pseudo-random number selection strategy is sequence number 5, which indicates that the fifth pseudo-random number in the pseudo-random number sequence is selected, then Each data holder selects the 5th pseudorandom number from the 3 pseudorandom number sequences generated by itself as the pseudorandom number corresponding to the negotiation object.
Figure PCTCN2019092186-appb-000004
Figure PCTCN2019092186-appb-000004
表5table 5
基于表4的示例,数据持有方1从伪随机数序列R 12中选取第5位伪随机数,假设该第5位伪随机数是r 12,从伪随机数序列R 13中选取第5位伪随机数,假设该第5位伪随机数是r 13,依次类推,可得到表5所示的伪随机数示例,数据持有方1至数据持有方4均选出3个与协商对象一一对应的伪随机数。 Based on the example of Table 4, a selection data holding section 5 side pseudo-random number from the pseudo random number sequence R 12, assuming that the pseudo-random number bit 5 is r 12, selected from the first pseudo random number sequence 5 R 13, Bit pseudo-random number, assuming that the fifth bit pseudo-random number is r 13 , and so on, the pseudo-random number examples shown in Table 5 can be obtained. Three of the data holders 1 to 4 are selected and negotiated. Pseudo-random number corresponding to the object one-to-one.
在本实施例中,由于每两个数据持有方之间均具有1个共同的伪随机数序列,并且,针对每个伪随机数序列,各个数据持有方采用全局相同的选取策略进行伪随机数选取,所以在选取得到伪随机数后,每两个数据持有方之间均具有1个共同的伪随机数。例如,数据持有方1和数据持有方2之间选取得到共同的伪随机数r 12,数据持有方1和数据持有方3之间选取得到共同的伪随机数r 13等。 In this embodiment, since each two data holders have a common pseudo-random number sequence, and for each pseudo-random number sequence, each data holder adopts the same global selection strategy The random number is selected, so after the pseudo-random number is selected, each of the two data holders has a common pseudo-random number. For example, data holder 1 and data holder 2 are selected to obtain a common pseudo-random number r 12 , data holder 1 and data holder 3 are selected to obtain a common pseudo-random number r 13, and so on.
由此,各数据持有方与其协商对象在生成共同的伪随机数序列后,还会从所述伪随机数序列中选取得到共同的伪随机数。Therefore, after each data holder and its negotiation object generate a common pseudo-random number sequence, they also select a common pseudo-random number from the pseudo-random number sequence.
在另一个例子中,假设所述选取策略是顺序号5,表示从伪随机数序列中第5位伪随机数开始,逐个选取K个伪随机数,K是全局唯一,由数据持有方预先约定,其取值是3。各数据持有方可分别从其持有的伪随机数序列中选取第5位、第6位和第7位伪随机数,然后对选取得到的3个伪随机数进行组合,并将组合结果作为与所述伪随机数序列对应的伪随机数。In another example, it is assumed that the selection strategy is sequence number 5, which means that starting from the 5th pseudo-random number in the pseudo-random number sequence, K pseudo-random numbers are selected one by one, K is globally unique, and is pre-empted by the data holder. By convention, its value is 3. Each data holder can select the 5th, 6th, and 7th pseudorandom numbers from the pseudorandom number sequence held by them, and then combine the 3 pseudorandom numbers selected and combine the results. As a pseudo-random number corresponding to the pseudo-random number sequence.
以数据持有方1为例,假设从伪随机数序列R 12中选取的第5位伪随机数是123,第6位伪随机数是456,第7位伪随机数是789,则可以将123、456和789进行组合。 Taking data holder 1 as an example, assuming that the fifth pseudorandom number selected from the pseudorandom number sequence R 12 is 123, the sixth pseudorandom number is 456, and the seventh pseudorandom number is 789, then 123, 456 and 789 are combined.
例如,可将这3个伪随机数按照顺序号从小到大的顺序拼接在一起,得到组合结果123456789,即r 12是123456789。 For example, the three pseudo-random numbers can be stitched together in ascending order of sequence numbers to obtain the combined result 123456789, that is, r 12 is 123456789.
再例如,还可将3个伪随机数按照顺序号从大到小的顺序拼接在一起,得到组合结果789456123,即r 12是789456123。 For another example, three pseudo-random numbers can also be stitched together in order from large to small to obtain a combined result of 789456123, that is, r 12 is 789456123.
当然还可以采用其他的组合方案,或者对选取的3个伪随机数进行设定的运算等,本说明书对此不作特殊限制。Of course, other combination schemes can also be adopted, or the selected three pseudo-random numbers can be set for calculation, etc. This specification does not make any special restrictions on this.
在本实施例中,在选取得到与协商对象一一对应的N-1个伪随机数后,可确定每个伪随机数在参与运算时的参与值。In this embodiment, after N-1 pseudo-random numbers corresponding to the negotiation object are selected and obtained, the participation value of each pseudo-random number when participating in the operation can be determined.
仍以表5所示的4个数据持有方为例,按照ID号从小到大进行排序,排序结果为:数据持有方1、数据持有方2、数据持有方3、数据持有方4。Taking the four data holders shown in Table 5 as an example, the ID numbers are sorted from small to large, and the ranking results are: data holder 1, data holder 2, data holder 3, data holder Party 4.
假设,当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。It is assumed that when the negotiation object is arranged behind the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the pseudo-random number; when the negotiation object is arranged in the present Before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
Figure PCTCN2019092186-appb-000005
Figure PCTCN2019092186-appb-000005
表6Table 6
请继续参考表5,对于数据持有方2而言,其协商对象数据持有方1排列在前,因而可将数据持有方1对应的伪随机数r 12的参与值确定为其相反数-r 12,协商对象数据持有方3排列在后,因而可将数据持有方3对应的伪随机数r 23的参与值确定为r 23,依次类推,可得到表6所示的参与值示例。 Please continue to refer to Table 5. For the data holder 2, the data holder 1 whose negotiation object is ranked first, so the participation value of the pseudo-random number r 12 corresponding to the data holder 1 can be determined as the opposite number. -r 12 , the negotiation data holder 3 is arranged behind, so the participation value of the pseudo-random number r 23 corresponding to the data holder 3 can be determined as r 23 , and so on, the participation values shown in Table 6 can be obtained Examples.
在本实施例中,各数据持有方在确定N-1个协商对象对应的N-1个伪随机数的参与值后,可对持有的数据和所述N-1个伪随机数的参与值进行求和计算,以将其真实数据隐藏在求和结果中。In this embodiment, after determining the participation values of the N-1 pseudo-random numbers corresponding to the N-1 negotiation objects, each data holder may perform a check on the held data and the N-1 pseudo-random numbers. Participation values are summed to hide their true data in the summation results.
Figure PCTCN2019092186-appb-000006
Figure PCTCN2019092186-appb-000006
表7Table 7
请继续参考表6,假设数据持有方1持有的数据是X 1,数据持有方2持有的数据是X 2,依次类推,在进行求和后,可得到表7所示的求和结果。 Please continue to refer to Table 6. Assume that the data held by data holder 1 is X 1 , the data held by data holder 2 is X 2 , and so on. After performing the summation, you can get the requirements shown in Table 7. And results.
在本实施例中,各个数据持有方在计算得到求和结果后,可将求和结果发送给第三方,第三方对各个数据持有方的求和结果进行求和计算,以得到统计值。In this embodiment, after the data holder obtains the summation result, the summation result may be sent to a third party, and the third party sums up the summation result of each data holder to obtain a statistical value. .
请继续参考表7,第三方对数据持有方1至数据持有方4的求和结果进行求和计算,得到统计值X 1+X 2+X 3+X 4Please continue to refer to Table 7. The third party sums up the summation results of the data holder 1 to the data holder 4, and obtains the statistical value X 1 + X 2 + X 3 + X 4 .
在本实施例中,第三方对各个数据持有方的求和结果进行求和计算即可得到统 计值,无需其他运算,简单快捷。In this embodiment, a third party can obtain a statistical value by performing a summation calculation on the summation result of each data holder, without other calculations, which is simple and fast.
可选的,在另一个例子中,各个数据持有方在计算得到求和结果后,也可以广播求和结果,然后对所有参与统计的数据持有方的求和结果进行求和计算,得到统计值。Optionally, in another example, after each data holder calculates and obtains a summation result, the summation result may also be broadcast, and then the summation calculation is performed on the summation results of all data holders participating in the statistics to obtain Statistics.
可选的,为确保数据持有方求和结果的随机性,第三方可在每次进行数据统计时,指定不同的全局选取策略。仍以选取策略是顺序号为例,第三方可为每次数据统计指定不同的顺序号,例如:第一次指定顺序号是1,第二次指定顺序号是2,依次类推,直到顺序号取值为伪随机数序列中伪随机数的数量。当顺序号取值为伪随机数序列中伪随机数的数量时,各个数据持有方可重新进行两两协商,以生成新的共同伪随机数序列,第三方可重新将顺序号指定为1、2、…,依次类推。Optionally, in order to ensure the randomness of the summing result of the data holder, a third party may specify a different global selection strategy each time the data statistics are performed. Still taking the selection strategy as sequence number as an example, a third party can specify a different sequence number for each data statistic, for example: the first time the sequence number is 1, the second time the sequence number is 2, and so on until the sequence number The value is the number of pseudo-random numbers in the pseudo-random number sequence. When the sequence number value is the number of pseudo-random numbers in the pseudo-random number sequence, each data holder can re-negotiate pairwise to generate a new common pseudo-random number sequence, and the third party can reassign the sequence number to 1 , 2, ..., and so on.
采用这样的实现方式,可在数据持有方侧对所述选取策略进行校验。例如,各个数据持有方可对所述选取策略进行记录,当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突,所述冲突通常表示接收到的选取策略已被使用过。With such an implementation manner, the selection strategy can be verified on the data holder side. For example, each data holder may record the selection strategy. When a third-party-selected selection strategy is received again, it is determined whether the received selection strategy conflicts with the recorded selection strategy, and the conflict usually indicates that the received The selection strategy has been used.
若冲突,可向第三方返回错误提示。In case of conflict, an error message can be returned to a third party.
若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。If there is no conflict, a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
仍以第三方从1开始顺序指定顺序号为例,数据持有方可以记录第三方发送的顺序号,当再次接收到第三方发送的顺序号时,可判断接收到的顺序号是否大于记录的顺序号。Taking the sequence number assigned by the third party from 1 as an example, the data holder can record the sequence number sent by the third party. When the sequence number sent by the third party is received again, it can be determined whether the received sequence number is greater than the recorded one. Sequence number.
若大于,则可说明该顺序号对应的伪随机数尚未被使用过,可以根据接收到的顺序号从每个伪随机数序列中选取伪随机数,并可在选取结束后对记录的顺序号进行更新。If it is greater than that, it indicates that the pseudo-random number corresponding to the sequence number has not been used. You can select a pseudo-random number from each pseudo-random number sequence according to the received sequence number, and you can record the sequence number after the selection is completed. Update.
若小于等于,则可说明该顺序号对应的伪随机数已经被使用过,可以向第三方返回错误提示。If it is less than or equal to, it can indicate that the pseudo-random number corresponding to the sequence number has been used, and an error prompt can be returned to a third party.
类似的,当顺序号表示从伪随机数序列中的该顺序号对应的伪随机数开始逐个选取K个伪随机数再进行组合时,数据持有方可记录选出的伪随机数的最大顺序号,即顺序号+K-1。当再次接收到第三方发送的顺序号时,判断接收到的顺序号是否大于记录的所述最大顺序号。Similarly, when the sequence number indicates that K pseudo-random numbers are selected one by one from the pseudo-random number corresponding to the sequence number in the pseudo-random number sequence and then combined, the data holder can record the maximum order of the selected pseudo-random number Number, that is, the sequence number + K-1. When the sequence number sent by the third party is received again, it is determined whether the received sequence number is greater than the maximum sequence number recorded.
在本实施例中,可基于选取策略制定不同的策略记录、冲突判断方案,本说明书在此不再一一赘述。In this embodiment, different strategy records and conflict judgment schemes can be formulated based on the selected strategy, which will not be described in detail in this specification.
本实施例在每次进行数据统计时,可从伪随机数序列中选取得到不同的伪随机数参与求和计算,使得求和结果具有随机性,可有效防止不法人员从多次求和结果中分析出数据持有方持有的真实数据,从而确保数据安全、不泄露。In this embodiment, each time when data statistics are performed, different pseudo-random numbers can be selected from the pseudo-random number sequence to participate in the summation calculation, so that the summation result has randomness, and it can effectively prevent an illegal person from taking multiple summation results. Analyze the real data held by the data holder to ensure data security and no leakage.
值得注意的是,采用第三方下发选取策略的实现方案,当有数据持有方掉线时,并不影响在线数据持有方的数据统计,在线的数据持有方仍可基于第三方发送的选取策略进行伪随机数选取、求和计算等步骤,以得到所有在线数据持有方持有数据的统计值。It is worth noting that the implementation scheme of the third-party delivery selection strategy, when a data holder goes offline, does not affect the data statistics of the online data holder, and the online data holder can still send based on the third party The selection strategy performs steps such as pseudo-random number selection, summation calculation, etc. to obtain the statistical value of the data held by all online data holders.
实施例二Example two
在本实施例中,在生成伪随机数序列之前,每个数据持有方也可以将其他数据持有方看作协商对象,然后分别与各个协商对象进行两两协商,以协商出共同的种子。In this embodiment, before generating a pseudo-random number sequence, each data holder can also treat other data holders as negotiation objects, and then negotiate with each negotiation object in pairs to negotiate a common seed. .
种子协商的过程可以参考前述实施例一,在此不再一一赘述。For the process of seed negotiation, reference may be made to the foregoing Embodiment 1, and details are not described herein again.
在本实施例中,第三方可在每次进行数据统计时,为数据持有方指定全局相同的计数值,各个数据持有方在接收到所述计数值后,可将种子和计数值作为入参输入伪随机数生成器,以生成伪随机数序列。In this embodiment, each time a third party performs data statistics, the data holder can specify the globally same count value. After receiving the count value, each data holder can use the seed and the count value as The input parameter is a pseudo-random number generator to generate a pseudo-random number sequence.
为避免数据持有方在多次数据统计时生成相同的伪随机数序列,第三方可在每次进行数据统计时,指定不同的计数值。In order to prevent the data holder from generating the same pseudo-random number sequence during multiple data statistics, a third party may specify a different count value each time the data statistics are performed.
例如,第三方可从1开始顺序指定计数值,即第一次指定计数值是1,第二次指定计数值是2等,依次类推。For example, a third party may specify the counting value sequentially from 1, that is, the first designated counting value is 1, the second designated counting value is 2, and so on, and so on.
在本实施例中,可在数据持有方侧对计数值进行校验。例如,各个数据持有方可记录所述计数值,当再次接收到第三方指定的计数值时,判断该接收到的计数值是否大于记录的计数值。In this embodiment, the count value can be verified on the data holder side. For example, each data holder may record the count value, and when the count value specified by the third party is received again, it is determined whether the received count value is greater than the recorded count value.
若大于,则可说明该计数值尚未被使用过,可执行伪随机数序列的生成步骤,并可在生成伪随机数序列后对记录的计数值进行更新。If it is larger than that, it can be said that the count value has not been used, the pseudo-random number sequence generation step can be performed, and the recorded count value can be updated after the pseudo-random number sequence is generated.
若小于等于,则可说明该计数值已经被使用过,可以向第三方返回错误提示。If it is less than or equal to, it can indicate that the count value has been used, and an error prompt can be returned to a third party.
当然,在实际实现中,计数值也不会一直取到无限大,可以设定一个循环周期,例如三个月、半年等。在到达该周期时,各个数据持有方可重新进行种子协商,第三方也可重新将计数值的取值设置为1。Of course, in actual implementation, the count value will not be taken to infinity, and a cycle period can be set, such as three months, half a year, and so on. When this cycle is reached, each data holder can re-seed the seed, and the third party can also reset the value of the count to 1.
采用第三方指定计数值的实现方案,可有效减少数据持有方之间频繁进行种子协商,减少网络通信量。The implementation of a third-party-designated count value can effectively reduce frequent seed negotiation between data holders and reduce network traffic.
在本实施例中,每个数据持有方也可生成N-1个伪随机数序列,这N-1个伪随机数序列分别与其他N-1个数据持有方一一对应,且任意两个数据持有方会具有一个共同的伪随机数序列。In this embodiment, each data holder can also generate N-1 pseudo-random number sequences, and these N-1 pseudo-random number sequences respectively correspond to the other N-1 data holders, and any Both data holders will have a common pseudo-random number sequence.
每次生成的伪随机数序列可仅用于一次数据统计。The pseudo-random number sequence generated each time can be used for data statistics only once.
在本实施例中,全局相同的选取策略也可由第三方指定,其具体实现方案可参考前述实施例一。In this embodiment, a globally same selection strategy may also be specified by a third party. For a specific implementation solution, refer to the foregoing first embodiment.
若所述选取策略是顺序号,较为简单的,当计数值未超出伪随机数序列元素的数量时,也可将第三方指定的计数值作为选取策略的顺序号,本说明书对此不作特殊限制。If the selection strategy is a sequence number, it is relatively simple. When the count value does not exceed the number of elements of the pseudo-random number sequence, the count value specified by the third party can also be used as the sequence number of the selection strategy. .
可选的,在本实施例中,由于在每次进行数据统计时,各个数据持有方均会重新生成伪随机数序列,所以也可以采用全局相同的固定选取策略。例如,每次进行伪随机数选取时,均从伪随机数序列中选取第10位至20位伪随机数,然后对这些伪随机数进行组合,并将组合结果作为与协商对象对应的伪随机数。Optionally, in this embodiment, since each data holder regenerates a pseudo-random number sequence each time data statistics are performed, the globally same fixed selection strategy may also be adopted. For example, each time a pseudo-random number is selected, a 10- to 20-bit pseudo-random number is selected from the pseudo-random number sequence, and then these pseudo-random numbers are combined, and the combined result is used as the pseudo-random corresponding to the negotiation object. number.
在本实施例中,在选取得到与协商对象一一对应的伪随机数后,可根据数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,然后对持有的数据和所述N-1个伪随机数的参与值进行求和计算,并将所述求和结果发送给所述第三方,由第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值,这部分的处理与实现可以参照前述实施例一,本实施例在此不再一一赘述。In this embodiment, after a pseudo-random number corresponding to the negotiation object is selected, the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation can be determined according to the arrangement order between the data holders. , And then perform a summation calculation on the held data and the participation values of the N-1 pseudo-random numbers, and send the summation result to the third party, and the third party sums up all the data holders. Sum the results and calculate to obtain the statistical value. For the processing and implementation of this part, refer to the first embodiment described above, which will not be described in detail in this embodiment.
与前述数据统计方法的实施例相对应,本说明书还提供了数据统计装置的实施例。Corresponding to the foregoing embodiment of the data statistics method, this specification also provides an embodiment of a data statistics device.
本说明书数据统计装置的实施例可以应用在数据持有方部署的服务器或者服务器集群上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在服务器的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图2所示,为本说明书数据统计装置所在服务器的一种硬件结构图,除了图2所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的服务器通常根据该服务器的实际功能,还可以包括其他硬件,对此不再赘述。The embodiments of the data statistics apparatus in this specification may be applied to a server or a server cluster deployed by a data holder. The device embodiments may be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the server where it is located. In terms of hardware, as shown in FIG. 2, it is a hardware structure diagram of the server where the data statistics device of this specification is located. In addition to the processor, memory, network interface, and non-volatile memory shown in FIG. 2, The server where the device is located in the embodiment may generally include other hardware according to the actual function of the server, and details are not described herein again.
图3是本说明书一示例性实施例示出的一种数据统计装置的框图。Fig. 3 is a block diagram of a data statistics device according to an exemplary embodiment of the present specification.
请参考图3,所述数据统计装置200可以应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,所述数据统计装置200包括有:两两协商单元201、伪随机数选取单元202、参与值确定单元203、求和计算单元204、结果发送单元205、冲突判断单元206和计数值判断单元207。Referring to FIG. 3, the data statistics device 200 may be applied to perform data statistics by combining data among N data holders, and the data holder holds data to be calculated, and the data statistics device 200 It includes: a pair of negotiation unit 201, a pseudo-random number selection unit 202, a participation value determination unit 203, a sum calculation unit 204, a result sending unit 205, a conflict determination unit 206, and a count value determination unit 207.
其中,两两协商单元201,与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Among them, the pair-by-two negotiation unit 201 negotiates a common pseudo-random number sequence with other data holders in pairs, and obtains N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
伪随机数选取单元202,根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;The pseudo-random number selecting unit 202 selects pseudo-random numbers from each pseudo-random number sequence according to the globally same selection strategy, and obtains N-1 pseudo-random numbers corresponding to the negotiation object one-to-one;
参与值确定单元203,根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;The participation value determination unit 203 determines the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or An opposite number of the pseudo-random number;
求和计算单元204,对持有的数据和所述N-1个伪随机数的参与值进行求和计算;A summation calculation unit 204 performs a summation calculation on the held data and the participation values of the N-1 pseudo-random numbers;
结果发送单元205,将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;A result sending unit 205, sending the summation result to the third party, so that the third party sums up and calculates the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
可选的,所述两两协商单元201:Optionally, the pairwise negotiation unit 201:
与其他数据持有方两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate common seeds with other data holders one by one, and get N-1 seeds corresponding to the negotiation object one-to-one;
根据所述N-1个种子生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds.
可选的,所述选取策略由所述第三方在每次进行数据统计时指定。Optionally, the selection strategy is specified by the third party each time data statistics are performed.
冲突判断单元206,记录所述选取策略,当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突;若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。The conflict judging unit 206 records the selection strategy, and when a third-party-selected selection strategy is received again, determines whether the received selection strategy conflicts with the recorded selection strategy; if there is no conflict, the selection strategy based on the same global is executed Steps to select pseudo-random numbers from each pseudo-random number sequence, and update the record selection strategy.
可选的,所述两两协商单元201:Optionally, the pairwise negotiation unit 201:
与其他数据持有方预先两两协商出共同的种子,得到与协商对象一一对应的N-1 个种子;Negotiate a common seed with other data holders in advance, and get N-1 seeds corresponding to the object of negotiation;
接收所述第三方在每次进行数据统计时指定的全局相同的计数值;Receiving the globally same count value specified by the third party every time data statistics are performed;
根据所述N-1个种子和所述计数值生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds and the count value.
计数值判断单元207,记录所述计数值;当再次接收到第三方指定的计数值时,判断该计数值是否大于记录的计数值;若大于,则执行根据所述N-1个种子和所述计数值生成N-1个伪随机数序列的步骤,并更新记录的计数值。The count value judging unit 207 records the count value; when the count value designated by the third party is received again, it is judged whether the count value is greater than the recorded count value; if it is greater, the execution is performed according to the N-1 seeds and all The steps of generating counted N-1 pseudo-random number sequences are described, and the recorded count value is updated.
可选的,所述选取策略是固定的。Optionally, the selection strategy is fixed.
可选的,所述选取策略是顺序号。Optionally, the selection strategy is a sequence number.
可选的,所述伪随机数选取单元202,从每个伪随机数序列中选取全局相同的顺序号对应的伪随机数。Optionally, the pseudo-random number selecting unit 202 selects a pseudo-random number corresponding to a globally same sequence number from each pseudo-random number sequence.
可选的,所述伪随机数选取单元202,针对每个伪随机数序列,从所述伪随机数序列中全局相同的顺序号对应的伪随机数开始,选取若干个伪随机数;组合选取的若干个伪随机数,并将组合结果作为从所述伪随机数序列中选取的伪随机数。Optionally, the pseudo-random number selecting unit 202 selects a plurality of pseudo-random numbers for each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence; Several pseudo-random numbers, and the combined result is used as a pseudo-random number selected from the pseudo-random number sequence.
可选的,所述伪随机数选取单元202,逐个选取固定数量的伪随机数,所述固定数量大于1。Optionally, the pseudo-random number selecting unit 202 selects a fixed number of pseudo-random numbers one by one, and the fixed number is greater than one.
可选的,所述参与值确定单元203:Optionally, the participation value determination unit 203:
当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;When the negotiation object is arranged behind the data holder, determining the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation as the pseudo-random number;
当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。When the negotiation object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For details about the implementation process of the functions and functions of the units in the foregoing device, see the implementation process of the corresponding steps in the foregoing method for details, and details are not described herein again.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, the relevant part may refer to the description of the method embodiment. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, may be located One place, or it can be distributed across multiple network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module, or unit described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or a product with a certain function. A typical implementation device is a computer, and the specific form of the computer may be 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 sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
与前述数据统计方法的实施例相对应,本说明书还提供一种数据统计装置,该数据统计装置包括:处理器以及用于存储与数据统计逻辑对应的机器可执行指令的存储器。其中,所述数据统计逻辑对应的机器可执行指令应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据。所述处理器和所述存储器通常借由内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。Corresponding to the foregoing embodiment of the data statistics method, the present specification also provides a data statistics device. The data statistics device includes a processor and a memory for storing machine-executable instructions corresponding to the data statistics logic. Wherein, the machine-executable instructions corresponding to the data statistics logic are applied to combine data among N data holders to perform data statistics, and the data holder holds data to be calculated. The processor and the memory are usually interconnected by an internal bus. In other possible implementations, the device may further include an external interface to enable communication with other devices or components.
在本实施例中,通过读取并执行所述存储器存储的与数据统计逻辑对应的机器可执行指令,所述处理器被促使:In this embodiment, by reading and executing machine-executable instructions corresponding to data statistics logic stored in the memory, the processor is caused to:
与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
可选的,在与其他数据持有方两两协商出共同的伪随机数序列时,所述处理器被促使:Optionally, when negotiating a common pseudo-random number sequence with other data holders in pairs, the processor is caused to:
与其他数据持有方两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate common seeds with other data holders one by one, and get N-1 seeds corresponding to the negotiation object one-to-one;
根据所述N-1个种子生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds.
可选的,所述选取策略由所述第三方在每次进行数据统计时指定。Optionally, the selection strategy is specified by the third party each time data statistics are performed.
可选的,所述处理器还被促使:Optionally, the processor is further caused to:
记录所述选取策略;Record the selection strategy;
当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突;When a third-party selection strategy is received again, determine whether the received selection strategy conflicts with the recorded selection strategy;
若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。If there is no conflict, a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
可选的,在与其他数据持有方两两协商出共同的伪随机数序列时,所述处理器被促使:Optionally, when negotiating a common pseudo-random number sequence with other data holders in pairs, the processor is caused to:
与其他数据持有方预先两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate a common seed with other data holders in advance, and get N-1 seeds corresponding to the negotiation object one-to-one;
接收所述第三方在每次进行数据统计时指定的全局相同的计数值;Receiving the globally same count value specified by the third party every time data statistics are performed;
根据所述N-1个种子和所述计数值生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds and the count value.
可选的,所述处理器还被促使:Optionally, the processor is further caused to:
记录所述计数值;Recording said count value;
当再次接收到第三方指定的计数值时,判断该计数值是否大于记录的计数值;When the count value specified by the third party is received again, determine whether the count value is greater than the recorded count value;
若大于,则执行根据所述N-1个种子和所述计数值生成N-1个伪随机数序列的步骤,并更新记录的计数值。If it is greater than that, the step of generating N-1 pseudo-random number sequences according to the N-1 seeds and the count value is performed, and the recorded count value is updated.
可选的,所述选取策略是固定的。Optionally, the selection strategy is fixed.
可选的,所述选取策略是顺序号。Optionally, the selection strategy is a sequence number.
可选的,在根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数时,所述处理器还被促使:Optionally, when a pseudo-random number is selected from each pseudo-random number sequence separately according to a globally same selection strategy, the processor is further prompted:
从每个伪随机数序列中选取全局相同的顺序号对应的伪随机数。A pseudo-random number corresponding to a globally identical sequence number is selected from each pseudo-random number sequence.
可选的,在根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数时,所述处理器还被促使:Optionally, when a pseudo-random number is selected from each pseudo-random number sequence separately according to a globally same selection strategy, the processor is further prompted:
针对每个伪随机数序列,从所述伪随机数序列中全局相同的顺序号对应的伪随 机数开始,选取若干个伪随机数;For each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence, selecting a plurality of pseudo-random numbers;
组合选取的若干个伪随机数,并将组合结果作为从所述伪随机数序列中选取的伪随机数。The selected pseudo-random numbers are combined, and the combined result is used as the pseudo-random number selected from the pseudo-random number sequence.
可选的,在选取若干个伪随机数时,所述处理器被促使:Optionally, when selecting several pseudo-random numbers, the processor is caused to:
逐个选取固定数量的伪随机数,所述固定数量大于1。A fixed number of pseudo-random numbers are selected one by one, and the fixed number is greater than one.
可选的,在根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值时,所述处理器被促使:Optionally, when determining the participation value of the pseudo-random number corresponding to each negotiation object in the operation according to the arrangement order between the N data holders, the processor is caused to:
当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;When the negotiation object is arranged behind the data holder, determining the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation as the pseudo-random number;
当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。When the negotiation object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
与前述数据统计方法的实施例相对应,本说明书还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该程序应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,该程序被处理器执行时实现以下步骤:Corresponding to the foregoing embodiment of the data statistics method, the present specification also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, the program being applied to unite N data holders. The data is subjected to data statistics. The data holder holds the data to be calculated. When the program is executed by the processor, the following steps are implemented:
与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
可选的,所述与其他数据持有方两两协商出共同的伪随机数序列,包括:Optionally, the negotiation of a common pseudo-random number sequence with other data holders includes:
与其他数据持有方两两协商出共同的种子,得到与协商对象一一对应的N-1个 种子;Negotiate common seeds with other data holders one by one, and get N-1 seeds corresponding to the negotiation object one-to-one;
根据所述N-1个种子生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds.
可选的,所述选取策略由所述第三方在每次进行数据统计时指定。Optionally, the selection strategy is specified by the third party each time data statistics are performed.
可选的,还包括:Optional, also includes:
记录所述选取策略;Record the selection strategy;
当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突;When a third-party selection strategy is received again, determine whether the received selection strategy conflicts with the recorded selection strategy;
若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。If there is no conflict, a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
可选的,所述与其他数据持有方两两协商出共同的伪随机数序列,包括:Optionally, the negotiation of a common pseudo-random number sequence with other data holders includes:
与其他数据持有方预先两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate a common seed with other data holders in advance, and get N-1 seeds corresponding to the negotiation object one-to-one;
接收所述第三方在每次进行数据统计时指定的全局相同的计数值;Receiving the globally same count value specified by the third party every time data statistics are performed;
根据所述N-1个种子和所述计数值生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds and the count value.
可选的,还包括:Optional, also includes:
记录所述计数值;Recording said count value;
当再次接收到第三方指定的计数值时,判断该计数值是否大于记录的计数值;When the count value specified by the third party is received again, determine whether the count value is greater than the recorded count value;
若大于,则执行根据所述N-1个种子和所述计数值生成N-1个伪随机数序列的步骤,并更新记录的计数值。If it is greater than that, the step of generating N-1 pseudo-random number sequences according to the N-1 seeds and the count value is performed, and the recorded count value is updated.
可选的,所述选取策略是固定的。Optionally, the selection strategy is fixed.
可选的,所述选取策略是顺序号。Optionally, the selection strategy is a sequence number.
可选的,所述根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,包括:Optionally, the step of selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy includes:
从每个伪随机数序列中选取全局相同的顺序号对应的伪随机数。A pseudo-random number corresponding to a globally identical sequence number is selected from each pseudo-random number sequence.
可选的,所述根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,包括:Optionally, the step of selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy includes:
针对每个伪随机数序列,从所述伪随机数序列中全局相同的顺序号对应的伪随机数开始,选取若干个伪随机数;For each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence, selecting a plurality of pseudo-random numbers;
组合选取的若干个伪随机数,并将组合结果作为从所述伪随机数序列中选取的伪随机数。The selected pseudo-random numbers are combined, and the combined result is used as the pseudo-random number selected from the pseudo-random number sequence.
可选的,所述选取若干个伪随机数,包括:Optionally, the selecting a plurality of pseudo-random numbers includes:
逐个选取固定数量的伪随机数,所述固定数量大于1。A fixed number of pseudo-random numbers are selected one by one, and the fixed number is greater than one.
可选的,所述根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,包括:Optionally, determining the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders includes:
当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;When the negotiation object is arranged behind the data holder, determining the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation as the pseudo-random number;
当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。When the negotiation object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The specific embodiments of the present specification have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and the desired result may still be achieved. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。The above is only a preferred embodiment of this specification, and is not intended to limit the specification. Any modification, equivalent replacement, or improvement made within the spirit and principles of this specification shall be included in this specification. Within the scope of protection.

Claims (25)

  1. 一种数据统计方法,应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,所述方法应用于所述数据持有方,包括:A data statistics method, which is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the method is applied to the data holder, include:
    与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
    根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
    根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
    对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
    将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
    其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
  2. 根据权利要求1所述的方法,所述与其他数据持有方两两协商出共同的伪随机数序列,包括:The method according to claim 1, wherein said negotiating a common pseudo-random number sequence with other data holders includes:
    与其他数据持有方两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate common seeds with other data holders one by one, and get N-1 seeds corresponding to the negotiation object one-to-one;
    根据所述N-1个种子生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds.
  3. 根据权利要求2所述的方法,The method according to claim 2,
    所述选取策略由所述第三方在每次进行数据统计时指定。The selection strategy is specified by the third party every time data statistics are performed.
  4. 根据权利要求3所述的方法,还包括:The method of claim 3, further comprising:
    记录所述选取策略;Record the selection strategy;
    当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突;When a third-party selection strategy is received again, determine whether the received selection strategy conflicts with the recorded selection strategy;
    若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。If there is no conflict, a step of selecting a pseudo-random number from each pseudo-random number sequence according to the globally same selection strategy is performed, and the record selection strategy is updated.
  5. 根据权利要求1所述的方法,所述与其他数据持有方两两协商出共同的伪随机数序列,包括:The method according to claim 1, wherein said negotiating a common pseudo-random number sequence with other data holders includes:
    与其他数据持有方预先两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate a common seed with other data holders in advance, and get N-1 seeds corresponding to the negotiation object one-to-one;
    接收所述第三方在每次进行数据统计时指定的全局相同的计数值;Receiving the globally same count value specified by the third party every time data statistics are performed;
    根据所述N-1个种子和所述计数值生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds and the count value.
  6. 根据权利要求5所述的方法,还包括:The method of claim 5, further comprising:
    记录所述计数值;Recording said count value;
    当再次接收到第三方指定的计数值时,判断该计数值是否大于记录的计数值;When the count value specified by the third party is received again, determine whether the count value is greater than the recorded count value;
    若大于,则执行根据所述N-1个种子和所述计数值生成N-1个伪随机数序列的步骤,并更新记录的计数值。If it is greater than that, the step of generating N-1 pseudo-random number sequences according to the N-1 seeds and the count value is performed, and the recorded count value is updated.
  7. 根据权利要求5所述的方法,The method according to claim 5,
    所述选取策略是固定的。The selection strategy is fixed.
  8. 根据权利要求1所述的方法,The method according to claim 1,
    所述选取策略是顺序号。The selection strategy is a sequence number.
  9. 根据权利要求8所述的方法,所述根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,包括:The method according to claim 8, wherein the selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy comprises:
    从每个伪随机数序列中选取全局相同的顺序号对应的伪随机数。A pseudo-random number corresponding to a globally identical sequence number is selected from each pseudo-random number sequence.
  10. 根据权利要求8所述的方法,所述根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,包括:The method according to claim 8, wherein the selecting a pseudo-random number from each pseudo-random number sequence according to a globally same selection strategy comprises:
    针对每个伪随机数序列,从所述伪随机数序列中全局相同的顺序号对应的伪随机数开始,选取若干个伪随机数;For each pseudo-random number sequence, starting from a pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence, selecting a plurality of pseudo-random numbers;
    组合选取的若干个伪随机数,并将组合结果作为从所述伪随机数序列中选取的伪随机数。The selected pseudo-random numbers are combined, and the combined result is used as the pseudo-random number selected from the pseudo-random number sequence.
  11. 根据权利要求10所述的方法,所述选取若干个伪随机数,包括:The method according to claim 10, wherein the selecting a plurality of pseudo-random numbers comprises:
    逐个选取固定数量的伪随机数,所述固定数量大于1。A fixed number of pseudo-random numbers are selected one by one, and the fixed number is greater than one.
  12. 根据权利要求1所述的方法,所述根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,包括:The method according to claim 1, wherein determining a participation value of a pseudo-random number corresponding to each negotiation object when participating in an operation according to an arrangement order between the N data holders comprises:
    当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;When the negotiation object is arranged behind the data holder, determining the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation as the pseudo-random number;
    当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。When the negotiation object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
  13. 一种数据统计装置,应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,所述装置应用于所述数据持有方,包括:A data statistics device is applied to perform data statistics by combining data among N data holders, the data holder holds data to be calculated, and the device is applied to the data holder, include:
    两两协商单元,与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;A pair-by-two negotiation unit negotiates a common pseudo-random number sequence with other data holders in pairs, and obtains N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
    伪随机数选取单元,根据全局相同的选取策略分别从每个伪随机数序列中选取伪随 机数,得到与协商对象一一对应的N-1个伪随机数;The pseudo-random number selection unit selects pseudo-random numbers from each pseudo-random number sequence according to the same global selection strategy, and obtains N-1 pseudo-random numbers corresponding to the negotiation object one-to-one;
    参与值确定单元,根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;The participation value determination unit determines, according to an arrangement order between the N data holders, a participation value of a pseudorandom number corresponding to each negotiation object when participating in the operation, and the participation value is the pseudorandom number or all The opposite of the pseudo-random number;
    求和计算单元,对持有的数据和所述N-1个伪随机数的参与值进行求和计算;A summation calculation unit that performs summation calculation on the held data and the participation value of the N-1 pseudo-random numbers;
    结果发送单元,将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;A result sending unit, sending the summation result to the third party, so that the third party sums up and calculates the summation results of all data holders to obtain the statistical value;
    其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
  14. 根据权利要求13所述的装置,所述两两协商单元:The apparatus according to claim 13, the pair of negotiation units:
    与其他数据持有方两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate common seeds with other data holders one by one, and get N-1 seeds corresponding to the negotiation object one-to-one;
    根据所述N-1个种子生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds.
  15. 根据权利要求14所述的装置,The device according to claim 14,
    所述选取策略由所述第三方在每次进行数据统计时指定。The selection strategy is specified by the third party every time data statistics are performed.
  16. 根据权利要求15所述的装置,还包括:The apparatus according to claim 15, further comprising:
    冲突判断单元,记录所述选取策略,当再次接收到第三方指定的选取策略时,判断该接收到的选取策略是否与记录的选取策略冲突;若不冲突,则执行根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数的步骤,并更新记录的选取策略。The conflict judgment unit records the selection strategy, and when a third-party-selected selection strategy is received again, determines whether the received selection strategy conflicts with the recorded selection strategy; if there is no conflict, it executes the same selection strategy according to the global Steps to select a pseudo-random number from each pseudo-random number sequence, and update the record selection strategy.
  17. 根据权利要求13所述的装置,所述两两协商单元:The apparatus according to claim 13, the pair of negotiation units:
    与其他数据持有方预先两两协商出共同的种子,得到与协商对象一一对应的N-1个种子;Negotiate a common seed with other data holders in advance, and get N-1 seeds corresponding to the negotiation object one-to-one;
    接收所述第三方在每次进行数据统计时指定的全局相同的计数值;Receiving the globally same count value specified by the third party every time data statistics are performed;
    根据所述N-1个种子和所述计数值生成N-1个伪随机数序列。Generate N-1 pseudo-random number sequences according to the N-1 seeds and the count value.
  18. 根据权利要求17所述的装置,还包括:The apparatus according to claim 17, further comprising:
    计数值判断单元,记录所述计数值;当再次接收到第三方指定的计数值时,判断该计数值是否大于记录的计数值;若大于,则执行根据所述N-1个种子和所述计数值生成N-1个伪随机数序列的步骤,并更新记录的计数值。The count value judging unit records the count value; when a count value designated by a third party is received again, it is judged whether the count value is greater than the recorded count value; if it is greater, execution is performed according to the N-1 seeds and the The step of generating the count value of N-1 pseudo-random number sequences and updating the recorded count value.
  19. 根据权利要求17所述的装置,The device according to claim 17,
    所述选取策略是固定的。The selection strategy is fixed.
  20. 根据权利要求13所述的装置,The device according to claim 13,
    所述选取策略是顺序号。The selection strategy is a sequence number.
  21. 根据权利要求20所述的装置,The device according to claim 20,
    所述伪随机数选取单元,从每个伪随机数序列中选取全局相同的顺序号对应的伪随机数。The pseudo-random number selecting unit selects a pseudo-random number corresponding to a globally same sequence number from each pseudo-random number sequence.
  22. 根据权利要求20所述的装置,The device according to claim 20,
    所述伪随机数选取单元,针对每个伪随机数序列,从所述伪随机数序列中全局相同的顺序号对应的伪随机数开始,选取若干个伪随机数;组合选取的若干个伪随机数,并将组合结果作为从所述伪随机数序列中选取的伪随机数。The pseudo-random number selecting unit selects, for each pseudo-random number sequence, a plurality of pseudo-random numbers starting from the pseudo-random number corresponding to a globally identical sequence number in the pseudo-random number sequence; And use the combination result as a pseudo-random number selected from the pseudo-random number sequence.
  23. 根据权利要求22所述的装置,The device according to claim 22,
    所述伪随机数选取单元,逐个选取固定数量的伪随机数,所述固定数量大于1。The pseudo-random number selecting unit selects a fixed number of pseudo-random numbers one by one, and the fixed number is greater than one.
  24. 根据权利要求13所述的装置,所述参与值确定单元:The apparatus according to claim 13, the participation value determination unit:
    当所述协商对象排列在本数据持有方之后时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数;When the negotiation object is arranged behind the data holder, determining the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation as the pseudo-random number;
    当所述协商对象排列在本数据持有方之前时,将所述协商对象对应的伪随机数在参与运算时的参与值确定为所述伪随机数的相反数。When the negotiation object is arranged before the data holder, the participation value of the pseudo-random number corresponding to the negotiation object when participating in the operation is determined as the reverse of the pseudo-random number.
  25. 一种数据统计装置,包括:A data statistics device includes:
    处理器;processor;
    用于存储与数据统计逻辑对应的机器可执行指令的存储器;Memory for storing machine-executable instructions corresponding to data statistics logic;
    所述数据统计逻辑对应的机器可执行指令应用于联合N个数据持有方之间的数据进行数据统计,所述数据持有方持有待计算统计值的数据,The machine-executable instructions corresponding to the data statistics logic are applied to perform data statistics by combining data among N data holders, and the data holders hold data to be calculated,
    通过读取并执行所述与数据统计逻辑对应的机器可执行指令,所述处理器被促使:By reading and executing the machine-executable instructions corresponding to the data statistics logic, the processor is caused to:
    与其他数据持有方两两协商出共同的伪随机数序列,得到与协商对象一一对应的N-1个伪随机数序列;Negotiate a common pseudo-random number sequence with other data holders one by one, and obtain N-1 pseudo-random number sequences corresponding to the negotiation object one-to-one;
    根据全局相同的选取策略分别从每个伪随机数序列中选取伪随机数,得到与协商对象一一对应的N-1个伪随机数;According to the globally same selection strategy, each pseudo-random number is selected from each pseudo-random number sequence, and N-1 pseudo-random numbers corresponding to the negotiation object are obtained.
    根据所述N个数据持有方之间的排列顺序,确定每个协商对象对应的伪随机数在参与运算时的参与值,所述参与值是所述伪随机数或所述伪随机数的相反数;Determine the participation value of the pseudo-random number corresponding to each negotiation object when participating in the operation according to the arrangement order between the N data holders, and the participation value is the pseudo-random number or the pseudo-random number Opposite number;
    对持有的数据和所述N-1个伪随机数的参与值进行求和计算;Performing summation calculation on the held data and the participating values of the N-1 pseudo-random numbers;
    将所述求和结果发送给所述第三方,以供第三方对所有数据持有方的求和结果进行求和计算,得到所述统计值;Sending the summation result to the third party for the third party to perform summation calculation on the summation results of all data holders to obtain the statistical value;
    其中,N是大于等于2的自然数。Here, N is a natural number of 2 or more.
PCT/CN2019/092186 2018-08-14 2019-06-21 Data compiling method and device WO2020034749A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810924945.0 2018-08-14
CN201810924945.0A CN110825922B (en) 2018-08-14 2018-08-14 Data statistical method and device

Publications (1)

Publication Number Publication Date
WO2020034749A1 true WO2020034749A1 (en) 2020-02-20

Family

ID=69525091

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092186 WO2020034749A1 (en) 2018-08-14 2019-06-21 Data compiling method and device

Country Status (3)

Country Link
CN (1) CN110825922B (en)
TW (1) TWI706370B (en)
WO (1) WO2020034749A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060067527A1 (en) * 2004-09-27 2006-03-30 Urivskiy Alexey V Method for making seed value used in pseudo random number generator and device thereof
CN102521910A (en) * 2011-12-16 2012-06-27 河海大学 Vote-hiding type electronic voting method
CN104580174A (en) * 2014-12-26 2015-04-29 中国科学院信息工程研究所 Sensitive data computation outsourcing service method capable of preventing malicious server attacks
CN105450394A (en) * 2015-12-30 2016-03-30 中国农业大学 Share updating method and device based on threshold secret sharing
CN106972930A (en) * 2017-05-24 2017-07-21 武汉理工大学 Unconditional security can verify that random digit generation method

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007288480A (en) * 2006-04-17 2007-11-01 Mitsubishi Electric Corp Statistical processing method and system, and data providing device
US7860244B2 (en) * 2006-12-18 2010-12-28 Sap Ag Secure computation of private values
US10146958B2 (en) * 2013-03-14 2018-12-04 Mitsubishi Electric Research Laboratories, Inc. Privacy preserving statistical analysis on distributed databases
KR101813481B1 (en) * 2013-12-23 2017-12-29 인텔 코포레이션 Apparatus, storage medium and method for anonymizing user data
SG10201502401XA (en) * 2015-03-26 2016-10-28 Huawei Internat Pte Ltd Method of obfuscating data
CN105376240B (en) * 2015-11-26 2018-07-06 合肥高维数据技术有限公司 A kind of anonymous submission system for being not required to trusted third party
US10608817B2 (en) * 2016-07-06 2020-03-31 Masimo Corporation Secure and zero knowledge data sharing for cloud applications
GB201611948D0 (en) * 2016-07-08 2016-08-24 Kalypton Int Ltd Distributed transcation processing and authentication system
CN106255038B (en) * 2016-08-04 2019-10-08 南京邮电大学 A kind of wireless sensor network security data fusion method
BR112019003128A2 (en) * 2016-09-15 2019-05-21 Nuts Holdings, Llc transit and storage of encrypted user data
CN107017985A (en) * 2017-05-10 2017-08-04 河南工业大学 A kind of vehicular ad hoc network method for protecting track privacy and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060067527A1 (en) * 2004-09-27 2006-03-30 Urivskiy Alexey V Method for making seed value used in pseudo random number generator and device thereof
CN102521910A (en) * 2011-12-16 2012-06-27 河海大学 Vote-hiding type electronic voting method
CN104580174A (en) * 2014-12-26 2015-04-29 中国科学院信息工程研究所 Sensitive data computation outsourcing service method capable of preventing malicious server attacks
CN105450394A (en) * 2015-12-30 2016-03-30 中国农业大学 Share updating method and device based on threshold secret sharing
CN106972930A (en) * 2017-05-24 2017-07-21 武汉理工大学 Unconditional security can verify that random digit generation method

Also Published As

Publication number Publication date
CN110825922B (en) 2020-08-04
CN110825922A (en) 2020-02-21
TW202009864A (en) 2020-03-01
TWI706370B (en) 2020-10-01

Similar Documents

Publication Publication Date Title
Wu et al. Detecting mixing services via mining bitcoin transaction network with hybrid motifs
TWI706279B (en) Multi-party safe calculation method and device, electronic equipment
US8700906B2 (en) Secure computing in multi-tenant data centers
Li et al. Lass: Local-activity and social-similarity based data forwarding in mobile social networks
WO2019085650A1 (en) Data statistics method and apparatus
TWI686712B (en) Data statistic method, device and equipment based on obfuscation circuit
CN110427969B (en) Data processing method and device and electronic equipment
CN110009349A (en) The method and device of linkable ring signature is generated and verified in block chain
US20140082191A1 (en) Verifying work performed by untrusted computing nodes
CN110460435B (en) Data interaction method and device, server and electronic equipment
US11792173B2 (en) Methods and devices for increasing entropy of a blockchain using blinded outcome diversification
TWI740375B (en) Data interaction method, device and electronic equipment
WO2021118413A2 (en) Data processing method, comprising secure multilateral computing and data analysis methods
CN110349021A (en) The method and device of secret transaction is realized in block chain
WO2020034749A1 (en) Data compiling method and device
CN110851487A (en) Data statistical method and device
US10924273B2 (en) Data exchange for multi-party computation
WO2019085665A1 (en) Data statistics method and apparatus
CN111628862A (en) Multi-party participating random number generation method and device
WO2020038098A1 (en) Data query method and apparatus
CN111125753A (en) Credit data determination method and device
CN105959327A (en) Member information processing system
CN115758441A (en) Method and device for determining private data intersection of multiple parties
CN115357393A (en) Task processing method and device, computer equipment, storage medium and product
CN116383876A (en) Privacy security calculation method based on careless random access

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: 19850635

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: 19850635

Country of ref document: EP

Kind code of ref document: A1