Data aggregation method and device, electronic equipment and storage medium

Generating encryption keys through interactions between participants solves the problem of privacy data leakage caused by insecure third-party servers, and improves privacy data security during the data aggregation process.

CN118802242APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311790075.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, third-party servers are not absolutely secure when generating encryption keys, which may lead to leakage of private data and affect data security.

Method used

Through the interaction between the participants, the key generation parameters provided by the first participant and its own key generation parameters are used to determine the encryption key by itself and encrypt the private data, avoiding the intervention of a third-party server.

Benefits of technology

It achieves encryption key generation without the assistance of a third-party server, simplifies the process, improves the security of private data, and avoids potential leak risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802242A_ABST
    Figure CN118802242A_ABST
Patent Text Reader

Abstract

The invention provides a data aggregation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a first key generation parameter sent by a first participant; wherein the first participant is a participant executing data aggregation operation before the current participant; determining an encryption key of the current participant based on the first key generation parameter and the second key generation parameter; encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data; determining a first data aggregation result of the current participant based on the first encrypted data; wherein the first data aggregation result is used for indicating the aggregation result of the encrypted data of the participant executing the data aggregation operation before the current participant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing, and in particular to a data aggregation method, device, electronic device and storage medium. Background Art

[0002] Data Aggregation refers to merging data from different data sources. Since data from different data sources contain private data, that is, confidential data that is not disclosed to the outside world, protecting private data from being leaked has always been a research hotspot in the field of applied cryptography.

[0003] At present, most of the private data provided by different data sources use third-party servers to generate keys through encryption methods and send the keys to the server where the data source is located. However, in actual applications, third-party servers are not absolutely secure and confidential, which may lead to the leakage of private data, thereby affecting the security of data. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a data aggregation method, device, electronic device and storage medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a data aggregation method, including:

[0006] Obtaining a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant;

[0007] Determine the encryption key of the current participant based on the first key generation parameter and the second key generation parameter;

[0008] Encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data;

[0009] Based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate an aggregation result of the encrypted data of a participant that performs a data aggregation operation before the current participant.

[0010] In an optional implementation manner, before determining the encryption key of the current participant based on the first key generation parameter and the second key generation parameter, the method further includes:

[0011] Determine the target shared values ​​for each participant;

[0012] Generate a first random number corresponding to the current participant;

[0013] According to a preset calculation formula, the first random number and the target shared value are calculated and processed to obtain the second key generation parameter of the current participant.

[0014] In an optional implementation manner, the method further includes:

[0015] After obtaining the second key generation parameter, the second key generation parameter is sent to the second participant, so that the second participant determines the encryption key of the second participant based on the second key generation parameter and the second participant's own key generation parameter; wherein,

[0016] In an optional implementation manner, determining the target sharing value of each participant includes:

[0017] Receiving the target shared value sent by a third party; wherein the third party is a party used to generate the target shared value;

[0018] or

[0019] A second random number is determined, and the second random number is calculated according to a preset calculation formula to obtain the target shared value.

[0020] In an optional implementation manner, determining the first data aggregation result of the current participant based on the first encrypted data includes:

[0021] Obtaining a second data aggregation result sent by the first participant; wherein the second data aggregation result is used to indicate an aggregation result of encrypted data of a participant that performs a data aggregation operation before the first participant;

[0022] According to a preset calculation algorithm, the second data aggregation result and the first encrypted data are calculated to obtain the first data aggregation result.

[0023] In an optional implementation manner, obtaining the first key generation parameter sent by the first party includes:

[0024] In a case where the current participant is the first participant to perform the data aggregation operation, the key generation parameter sent by the last participant to perform the data aggregation operation is determined as the first key generation parameter.

[0025] In an optional implementation manner, after determining the data aggregation result of the current participant based on the first encrypted data, the method further includes:

[0026] In a case where the current participant is not the last participant to perform the data aggregation operation, the first data aggregation result is sent to a second participant; wherein the second participant is a participant that performs the data aggregation operation after the current participant.

[0027] In an optional implementation manner, the method further includes:

[0028] After sending the first data aggregation result to the second participant, receiving the third data aggregation result sent by the last participant who performs the data aggregation operation; wherein the third data aggregation result is used to indicate the aggregation result of the encrypted data of all participants.

[0029] In an optional implementation, after receiving the third data aggregation result sent by the last participant performing the data aggregation operation, the method further includes:

[0030] Based on the third data aggregation result, the sum of the privacy data of each participant is determined.

[0031] In an optional implementation manner, after determining the first data aggregation result of the current participant based on the first encrypted data, the method further includes:

[0032] When the current participant is the last participant to perform the data aggregation operation, the first data aggregation result is sent to the fourth participant, so that the fourth participant determines the sum of the privacy data of each participant based on the first data aggregation result; wherein the fourth participant is the remaining participant other than the current participant.

[0033] In a second aspect, an embodiment of the present disclosure further provides a data aggregation device, including:

[0034] An acquisition module, used to acquire a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant;

[0035] A first determination module, configured to determine an encryption key of a current participant based on the first key generation parameter and the second key generation parameter;

[0036] An encryption module, used for encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data;

[0037] The second determination module is used to determine the first data aggregation result of the current participant based on the first encrypted data; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant who performed the data aggregation operation before the current participant.

[0038] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0039] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.

[0040] In an embodiment of the present disclosure, first, a first key generation parameter sent by a first participant is obtained; wherein the first participant is a participant that performs a data aggregation operation before the current participant; then, based on the first key generation parameter and the second key generation parameter, an encryption key of the current participant is determined; then, based on the encryption key, the private data of the current participant is encrypted to obtain first encrypted data; finally, based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant that performs a data aggregation operation before the current participant.

[0041] In the above implementation, the current participant uses the first key generation parameter provided by the first participant and its own second key generation parameter to determine the encryption key of the current participant, and then uses the encryption key to encrypt the private data, so that the encryption key can be generated through the interaction between the participants. This processing method does not require any third-party server to assist the participants in generating encryption keys. Therefore, the technical solution is simpler, faster, more practical, and can avoid the problem of easy leakage of the private data of the participants due to the access of the third-party server, thereby improving the security of the private data of the participants.

[0042] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0044] Figure 1 A flow chart of a data aggregation method provided by an embodiment of the present disclosure is shown;

[0045] Figure 2 A schematic diagram of generating an encryption key provided by an embodiment of the present disclosure is shown;

[0046] Figure 3 A schematic diagram of generating data aggregation results provided by an embodiment of the present disclosure is shown;

[0047] Figure 4 A schematic diagram of a data aggregation device provided by an embodiment of the present disclosure is shown;

[0048] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0050] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0051] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0052] Data Aggregation refers to merging data from different data sources. Since data from different data sources contain private data, that is, confidential data that is not disclosed to the outside world, protecting private data from being leaked has always been a research hotspot in the field of applied cryptography.

[0053] At present, most of the private data provided by different data sources use third-party servers to generate keys through encryption methods and send the keys to the server where the data source is located. However, in actual applications, third-party servers are not absolutely secure and confidential, which may lead to the leakage of private data, thereby affecting the security of data.

[0054] Based on the above research, the present disclosure provides a data aggregation method, first, obtaining a first key generation parameter sent by a first participant; wherein the first participant is a participant who performs a data aggregation operation before the current participant; then, based on the first key generation parameter and the second key generation parameter, determining the encryption key of the current participant; then, encrypting the private data of the current participant based on the encryption key to obtain first encrypted data; finally, based on the first encrypted data, determining a first data aggregation result of the current participant; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant who performs the data aggregation operation before the current participant.

[0055] In the above implementation, the current participant uses the first key generation parameter provided by the first participant and its own second key generation parameter to determine the encryption key of the current participant, and then uses the encryption key to encrypt the private data, so that the encryption key can be generated through the interaction between the participants. This processing method does not require any third-party server to assist the participants in generating encryption keys. Therefore, the technical solution is simpler, faster, more practical, and can avoid the problem of easy leakage of the private data of the participants due to the access of the third-party server, thereby improving the security of the private data of the participants.

[0056] To facilitate understanding of this embodiment, a data aggregation method disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the data aggregation method provided in the embodiment of the present disclosure is generally an electronic device with certain computing capabilities. In some possible implementations, the data aggregation method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0057] See also Figure 1 FIG. 1 is a flowchart of a data aggregation method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S104, wherein:

[0058] S101. Obtain a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant.

[0059] Here, it is assumed that the data aggregation process involves multiple participants, where the multiple participants are located in the same aggregation network, for example Figure 2 and Figure 3 As shown, the data aggregation process involves m participants, namely the first participant, the second participant, ..., the mth participant. The first participant to the mth participant are located in the same aggregation network.

[0060] In the embodiment of the present application, the data aggregation process refers to summing the private data of m participants. Therefore, here, the m participants can perform the data aggregation operation in sequence, for example, starting from the first participant and ending with the mth participant, and performing the data aggregation operation in sequence to obtain the corresponding aggregation result.

[0061] In the embodiments of the present disclosure, the current participant can be understood as the participant who performs the data aggregation operation at the current moment, and the first participant can be the participant who performs the data aggregation operation before the current participant. For example, if the current participant is the second participant, then the first participant can be the first participant.

[0062] Here, the first party may determine a first key generation parameter; then, the first party may send the first key generation parameter to the current party.

[0063] S102. Determine the encryption key of the current participant based on the first key generation parameter and the second key generation parameter.

[0064] In the embodiments of the present disclosure, the first key generation parameter and the second key generation parameter may be calculated and processed according to a preset calculation formula to obtain the encryption key of the current participant.

[0065] Here, assuming that the current participant is the i-th participant in the aggregation network, the ratio of the second key generation parameter to the first key generation parameter can be used as the encryption key of the current participant, denoted as Ki. Where i ranges from 1 to m, and m is the last participant in the aggregation network to perform data aggregation operations, that is, Figure 2 and Figure 3 As shown, the mth participant is the last participant in the aggregated network.

[0066] S103: Encrypt the private data of the current participant based on the encryption key to obtain first encrypted data.

[0067] In an embodiment of the present disclosure, the encryption key and the privacy data of the current participant may be calculated and processed according to a preset calculation formula to obtain the first encrypted data of the current participant.

[0068] Here, the first encrypted data E of the current participant i It can be determined by the following formula:

[0069] E i =(1+d(i)p)Ki mod p 2 ;

[0070] Among them, d(i) is the private data of the current participant, and p is the first prime number.

[0071] Here, the first prime number p may be generated according to a probability-based primality test algorithm, which is not specifically limited in the present disclosure.

[0072] S104. Determine a first data aggregation result of the current participant based on the first encrypted data; wherein the first data aggregation result is used to indicate an aggregation result of the encrypted data of a participant that performs a data aggregation operation before the current participant.

[0073] First, the data aggregation result sent by the first participant can be received (that is, the second data aggregation result in the following implementation); then, the data aggregation result sent by the first participant and the first encrypted data can be calculated and processed according to a preset calculation formula to obtain the first data aggregation result of the current participant.

[0074] For example, Figure 3 As shown, assuming that the current participant is the second participant, the first participant may be the first participant; the second data aggregation result sent by the first participant may be E1. According to the preset calculation formula, after calculating and processing the second data aggregation result E1 sent by the first participant and the first encrypted data, the first data aggregation result can be obtained, which is recorded as E2. After obtaining the first data aggregation result E2, the first data aggregation result E2 can be sent to the next participant.

[0075] By determining the first data aggregation result based on the first encrypted data, the aggregation result of the encrypted data of the participants in the data aggregation operation before the current participant can be obtained. For example, the aggregation result of the encrypted data of the first participant and the second participant can be determined through E2.

[0076] In an embodiment of the present disclosure, first, a first key generation parameter sent by a first participant is obtained; wherein the first participant is a participant that performs a data aggregation operation before the current participant; then, based on the first key generation parameter and the second key generation parameter, an encryption key of the current participant is determined; then, based on the encryption key, the private data of the current participant is encrypted to obtain first encrypted data; finally, based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant that performs a data aggregation operation before the current participant.

[0077] In the above implementation, the current participant uses the first key generation parameter provided by the first participant and its own second key generation parameter to determine the encryption key of the current participant, and then uses the encryption key to encrypt the private data, so that the encryption key can be generated through the interaction between the participants. This processing method does not require any third-party server to assist the participants in generating encryption keys. Therefore, the technical solution is simpler, faster, more practical, and can avoid the problem of easy leakage of the private data of the participants due to the access of the third-party server, thereby improving the security of the private data of the participants.

[0078] In an optional implementation, before determining the encryption key of the current participant based on the first key generation parameter and the second key generation parameter, the following steps are also included:

[0079] First, determine the target shared value for each participant;

[0080] Secondly, generate the first random number corresponding to the current participant;

[0081] Finally, according to a preset calculation formula, the first random number and the target shared value are calculated and processed to obtain the second key generation parameter of the current participant.

[0082] In an embodiment of the present disclosure, a target shared value of each participant is determined. Here, the target shared value can be generated by any participant in the same aggregation network, and then the participant can disclose the target shared value to each participant in the aggregation network, that is, the participant who generates the target shared value sends the target shared value to other participants in the same aggregation network.

[0083] Here, the current participant may be a participant that generates a target shared value, or may be a participant that receives a target shared value sent by other participants in the aggregation network. In the case where the current participant is a participant that generates a target shared value, after generating the target shared value, the target shared value is sent to each participant in the aggregation network, that is, the target shared data is disclosed to each participant in the aggregation network. In the case where the current participant is not a participant that generates a target shared value, the current participant may receive a target shared value generated by other participants in the same aggregation network.

[0084] Here, the target shared value g2 can be determined by the following formula:

[0085] g2=g1 p mod p 2 .

[0086] Among them, g1 is a shared value generation parameter, which can be determined by the following formula:

[0087] g1=s (p-1) / q mod p.

[0088] Wherein, s is the second random number, and q is the second prime number.

[0089] Here, the second prime number q is generated in the same way as the first prime number p, and will not be described in detail herein.

[0090] Here, the first prime number p and the second prime number q have the same number of digits. For example, when the first prime number p has x digits, the second prime number q also has x digits.

[0091] Here, the second random number s can be any integer, and the present disclosure does not make any specific limitation on this.

[0092] In an embodiment of the present disclosure, the current participant may generate the first random number before determining the target shared value, or may generate the first random number after determining the target shared value, which is not specifically limited in the present disclosure. Here, the current participant may randomly select an integer as the first random number.

[0093] Here, the first random number corresponding to each participant in the same aggregation network may be different from each other, and the first random number of each participant is not disclosed to other participants.

[0094] After obtaining the target shared value and the first random number in the manner described above, the first random number and the target shared value may be calculated and processed according to a preset calculation formula to obtain the second key generation parameter of the current participant.

[0095] Here, the preset calculation formula may be to perform an exponential operation on the target shared value based on the first random number. For example, the preset calculation formula may be g2 ni ; At this time, the second key generation parameter can be g2 ni ; Where ni is the first random number of the current participant.

[0096] It should be understood that the first key generation parameter of the first party can be expressed as g2 n(i-1) ; Wherein, n(i-1) is the first random number corresponding to the first participant.

[0097] Here, the first random number can be understood as the random number used by each participant when generating the corresponding key generation parameters, that is, each participant can generate a corresponding first random number.

[0098] In the above implementation, by calculating the second key generation parameter through the target shared value and the first random number, the complexity of the encryption key can be improved, thereby making the encryption key more difficult to crack, thereby increasing the randomness and security of the encryption key.

[0099] In an optional embodiment, based on the above embodiment, the technical solution of the present disclosure further includes the following steps:

[0100] After obtaining the second key generation parameter, the second key generation parameter is sent to the second participant so that the second participant determines the encryption key of the second participant based on the second key generation parameter and the second participant's own key generation parameter; wherein the second participant is the participant who performs the data aggregation operation after the current participant.

[0101] In an embodiment of the present disclosure, the second participant may be a participant that performs the data aggregation operation after the current participant. Figure 2 or Figure 3 As shown, assuming that the current participant is the second participant, the second participant may be the third participant.

[0102] In an embodiment of the present disclosure, after obtaining the second key generation parameters, the current participant needs to pass the second key generation parameters to the next participant (i.e., the second participant) who performs the data aggregation operation, so that the second participant can determine the encryption key of the second participant based on the second key generation parameters and the second participant's own key generation parameters.

[0103] Here, the second key generation parameter and the key generation parameter of the second party may be calculated and processed according to a preset calculation formula to obtain the encryption key of the second party.

[0104] In an embodiment of the present application, an encryption unit is pre-installed in the device of each participant, through which the second key generation parameter and the key generation parameter of the second participant can be calculated and processed to obtain the encryption key of the second participant.

[0105] Here, it is assumed that the current participant is the i-th participant in the aggregation network, and the second participant is the i+1-th participant in the aggregation network. At this time, the ratio of the key generation parameter of the second participant to the second key generation parameter can be used as the encryption key K(i+1) of the second participant.

[0106] Here, the encryption key K(i+1) of the second participant can be determined by the following formula:

[0107] K(i+1)=g2 n(i+1) / g2 ni ;

[0108] Among them, n(i+1) is the first random number corresponding to the second participant, g2 n(i+1) Generate key parameters for the second party.

[0109] In the above implementation, by sending the second key generation parameter to the next participant in the same aggregation network, the continuous transmission of the encryption key is achieved, thereby ensuring the security and continuity of the entire data aggregation process.

[0110] In an optional implementation, the above step of obtaining the first key generation parameter sent by the first party specifically includes the following steps:

[0111] In the case where the current participant is the first participant to perform the data aggregation operation, the key generation parameter sent by the last participant to perform the data aggregation operation is determined as the first key generation parameter.

[0112] In the embodiment of the present disclosure, when the current participant is the first participant to perform a data aggregation operation, that is, the current participant is the first participant in the aggregation network.

[0113] In the embodiment of the present disclosure, the last participant to perform the data aggregation operation may be the last participant in the aggregation network, for example, Figure 2 and Figure 3 As shown, the last participant is the mth participant in the aggregated network.

[0114] Here, the key generation parameter sent by the last participant to perform the data aggregation operation is determined as the first key generation parameter. At this time, the first participant is the last participant to perform the data aggregation operation. For example, Figure 2 and Figure 3As shown, the key generation parameter sent by the mth participant in the aggregation network can be determined as the first key generation parameter.

[0115] Reference Figure 2 , is a schematic diagram of encryption key generation provided by an embodiment of the present disclosure, wherein:

[0116] Each participant in the aggregation network can receive the key generation parameters sent by the previous participant and send the key generation parameters to the next participant of the participant. For example, the second participant can receive the key generation parameter g2 sent by the first participant. n1 , and sends the key generation parameter g2 of the second participant to the third participant n2 .

[0117] Here, after the current participant receives the first key generation parameter, the encryption unit of the participant can generate the encryption key of the current participant according to the second key generation parameter of the current participant and the received first key generation parameter. For example, assuming that the current participant is the second participant, the second participant can generate the encryption key of the current participant according to the key generation parameter g2 of the second participant itself. n2 and the key generation parameter g2 received from the first participant n1 , generate the encryption key of the second participant.

[0118] Here, when the current participant is the first participant, the parameter g2 can be generated according to the key of the mth participant received. nm and the first participant's own key generation parameter g2 n1 , generate the encryption key of the first participant.

[0119] In the above implementation, the data aggregation result of the previous participant in the aggregation network and the encrypted data of the current participant are combined, so that the data aggregation result can be continuously and securely generated, ensuring data integrity and security.

[0120] In an optional implementation, the target sharing value of each participant is determined in the following ways:

[0121] Method 1:

[0122] Receiving a target shared value sent by a third party; wherein the third party is a party used to generate the target shared value;

[0123] In the embodiment of the present disclosure, the third participant may be any participant in the aggregation network for generating a target shared value.

[0124] Here, the third party may determine the first prime number, the second prime number, and the second random number, and calculate the first prime number, the second prime number, and the second random number according to a preset calculation formula to obtain a target shared value.

[0125] For example, according to the preset calculation formula g2 = g1 p mod p 2 And the preset calculation formula g1 = s (p-1) / q mod p generates the target shared value g2.

[0126] Here, after the third participant calculates the target shared value, the target shared value may be sent to other participants in the same aggregation network.

[0127] Method 2:

[0128] In an embodiment of the present disclosure, the current participant may determine a first prime number, a second prime number, and a second random number, and calculate the first prime number, the second prime number, and the second random number according to a preset calculation formula to obtain a target shared value.

[0129] For example, according to the preset calculation formula g2 = g1 p mod p 2 And the preset calculation formula g1 = s (p-1) / q mod p generates the target shared value g2.

[0130] Here, after the current participant calculates the target shared value, the target shared value may be sent to other participants in the same aggregation network.

[0131] In an optional implementation, determining the first data aggregation result of the current participant based on the first encrypted data specifically includes the following steps:

[0132] First, a second data aggregation result sent by the first participant is obtained; wherein the second data aggregation result is used to indicate an aggregation result of encrypted data of a participant who performs a data aggregation operation before the first participant;

[0133] Then, according to a preset calculation algorithm, the second data aggregation result and the first encrypted data are calculated to obtain the first data aggregation result.

[0134] For example, Figure 3 As shown, the first participant is the first participant, and the current participant is the second participant. Assume that the second data aggregation result is recorded as E1, and the first encrypted data is recorded as E2. By calculating the second data aggregation result E1 and the first encrypted data E2, the first data aggregation result can be obtained, which is recorded as E2.

[0135] In an embodiment of the present disclosure, the second data aggregation result may be the product of all encrypted data of the participants who performed the data aggregation operation before the current participant in the aggregation network, and may also be understood as the aggregation result output by the previous participant of the current participant.

[0136] Here, the first participant may send the second data aggregation result to the current participant. After the current participant receives the second data aggregation result sent by the first participant, the second data aggregation result and the first encrypted data may be calculated according to a preset calculation algorithm to obtain the first data aggregation result.

[0137] Here, the second data aggregation result may be multiplied by the first encrypted data, and the calculated product may be determined as the first data aggregation result.

[0138] Here, when the current participant is the i-th participant in the aggregation network, the first data aggregation result Ei can be determined by the following formula:

[0139] Ei=E(i-1)*E i ;

[0140] Among them, E(i-1) is the second data aggregation result, E i The first encrypted data.

[0141] In an optional implementation, after determining the first data aggregation result of the current participant based on the first encrypted data, the following steps are also included:

[0142] When the current participant is not the last participant to perform the data aggregation operation, the first data aggregation result is sent to the second participant; wherein the second participant is a participant that performs the data aggregation operation after the current participant.

[0143] In an embodiment of the present disclosure, when the current participant is not the last participant to perform the data aggregation operation, the first data aggregation result needs to be sent to the second participant. That is, when the current participant is not the last participant to perform the data aggregation operation, the first data aggregation result is sent to the next participant in the same aggregation network.

[0144] Here, in the case where the current participant is the first participant in the aggregation network, the first encrypted data of the current participant is sent to the second participant as the first data aggregation result of the current participant.

[0145] Reference Figure 3 , which is a schematic diagram of generating data aggregation results provided by an embodiment of the present disclosure, wherein:

[0146] The current participant receives the data aggregation result sent by the previous participant, and sends the first data aggregation result of the current participant to the next participant of the current participant. For example, assuming that the current participant is the second participant, the second participant receives the data aggregation result E1 sent by the first participant, and sends the data aggregation result E2 of the second participant to the third participant. Among them, the data aggregation result of the first participant is the first encrypted data E1 of the first participant, that is, E1=E1.

[0147] Here, after any participant receives the data aggregation result sent by the previous participant in the same aggregation network, the encryption unit of the participant can generate the data aggregation result of the participant according to the first encrypted data of the participant and the received data aggregation result. For example, the second participant can generate the data aggregation result E2 of the second participant according to the first encrypted data E2 of the second participant and the data aggregation result E1 sent by the first participant, and send it to the third participant in the same aggregation network.

[0148] Here, when the participant is the first participant, only the data aggregation result Em sent by the mth participant in the same aggregation network will be received, and no aggregation operation will be performed.

[0149] Here, the data aggregation result Em sent by the mth participant can be determined by the following formula:

[0150]

[0151]

[0152]

[0153]

[0154] Among them, d(i) is the private data of the i-th participant in the aggregation network.

[0155] In the above implementation, the data aggregation result of the previous participant in the aggregation network and the encrypted data of the current participant are combined, so that the data aggregation result can be continuously and securely generated, ensuring data integrity and security.

[0156] In an optional embodiment, the method further comprises the following steps:

[0157] After sending the first data aggregation result to the second participant, a third data aggregation result sent by the last participant who performs the data aggregation operation is received; wherein the third data aggregation result is used to indicate the aggregation result of the encrypted data of all participants.

[0158] In an embodiment of the present disclosure, after the last participant performing the data aggregation operation receives the data aggregation result sent by the previous participant in the same aggregation network, a third data aggregation result is obtained based on the data aggregation result sent by the previous participant and its own first encrypted data.

[0159] Here, after obtaining the third data aggregation result, the last participant who performs the data aggregation operation may send the third data aggregation result to other participants in the same aggregation network.

[0160] Here, after the participants in the aggregation network receive the third data aggregation result, they can calculate and process the third data aggregation result according to a preset calculation formula to obtain the sum of the privacy data of each participant.

[0161] Here, the preset calculation formula is described as follows: (Em-1) / p=D mod p.

[0162] In an optional implementation, after receiving the third data aggregation result sent by the last participant performing the data aggregation operation, the following steps are further included:

[0163] Based on the third data aggregation result, the sum result of the privacy data of each participant is determined.

[0164] In the embodiment of the present disclosure, after obtaining the third data aggregation result, the last participant to perform the data aggregation operation can calculate and process the third data aggregation result according to the preset calculation formula described above to obtain the sum of the privacy data of each participant. Figure 3 As shown, the last participant to perform the data aggregation operation is the mth participant, and the third data aggregation result obtained by the last participant to perform the data aggregation operation can be taken as Em.

[0165] Here, after the last participant that performs the data aggregation operation obtains the summation result, the summation result may be sent to other participants in the same aggregation network.

[0166] In the above implementation, the sum of the data of each participant in the aggregation network, that is, the sum result, is determined based on the data aggregation result calculated by the last participant performing the data aggregation operation, while protecting the privacy data of each participant from being leaked.

[0167] In an optional implementation, after determining the first data aggregation result of the current participant based on the first encrypted data, the following steps are also included:

[0168] When the current participant is the last participant to perform the data aggregation operation, the first data aggregation result is sent to the fourth participant, so that the fourth participant determines the sum of the privacy data of each participant based on the first data aggregation result; wherein the fourth participant is the remaining participant other than the current participant.

[0169] In an embodiment of the present disclosure, when the current participant is the last participant to perform a data aggregation operation, the first data aggregation result may be used to indicate the aggregation result of the encrypted data of all participants.

[0170] Here, the current participant may send the first data aggregation result to the fourth participant, that is, other participants in the same aggregation network. Figure 3 As shown, the last participant to perform the data aggregation operation is the mth participant, so the first data aggregation result obtained by the last participant to perform the data aggregation operation may be Em, and the mth participant may send Em to other participants in the same aggregation network, that is, to the 1st participant to the m-1th participant.

[0171] Here, after the fourth participant receives the first data aggregation result sent by the current participant, it can calculate and process the first data aggregation result according to a preset calculation formula to obtain the sum result D of the privacy data of each participant.

[0172] Here, the sum D of the private data of each participant can be determined as follows:

[0173] (Em-1) / p=D mod p.

[0174] Among them, D can be determined by the following formula: D = ∑ m i=1 d(i).

[0175] In the above implementation, when the current participant is the last one to perform the data aggregation operation, the result is sent to the fourth participant to complete the final aggregation calculation, which ensures the correctness of the final result and the protection of the privacy of the participants.

[0176] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0177] Based on the same inventive concept, a data aggregation device corresponding to the data aggregation method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data aggregation method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0178] Reference Figure 4 As shown, it is a schematic diagram of a data aggregation provided by an embodiment of the present disclosure, the device comprises: an acquisition module 11, a first determination module 12, an encryption module 13, and a second determination module 14; wherein,

[0179] An acquisition module, used to acquire a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant;

[0180] A first determination module, configured to determine an encryption key of a current participant based on the first key generation parameter and the second key generation parameter;

[0181] An encryption module, used for encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data;

[0182] The second determination module is used to determine the first data aggregation result of the current participant based on the first encrypted data; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant who performed the data aggregation operation before the current participant.

[0183] In an embodiment of the present disclosure, first, a first key generation parameter sent by a first participant is obtained; wherein the first participant is a participant that performs a data aggregation operation before the current participant; then, based on the first key generation parameter and the second key generation parameter, an encryption key of the current participant is determined; then, based on the encryption key, the private data of the current participant is encrypted to obtain first encrypted data; finally, based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant that performs a data aggregation operation before the current participant.

[0184] In the above implementation, the current participant determines the encryption key of the current participant through the first key generation parameter provided by the first participant and its own second key generation parameter. Since the encryption key is generated by the first key generation parameter and its own second key generation parameter in this embodiment, instead of receiving the key generated by the third-party server for the current participant, there is no need to establish a data transmission channel between the third-party server and the current participant to transmit the key. The problem of the current participant's private data leakage caused by the third-party server is avoided. The security of the current participant's private data is improved.

[0185] In a possible implementation manner, the second determination module is further used to: obtain a second data aggregation result sent by the first participant; wherein the second data aggregation result is used to indicate an aggregation result of encrypted data of a participant that performs a data aggregation operation before the first participant;

[0186] According to a preset calculation algorithm, the second data aggregation result and the first encrypted data are calculated to obtain the first data aggregation result.

[0187] In a possible implementation, the acquisition module is specifically used to: when the current participant is the first participant to perform the data aggregation operation, determine the key generation parameter sent by the last participant to perform the data aggregation operation as the first key generation parameter.

[0188] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0189] Corresponds to Figure 1 The data aggregation method in the present disclosure also provides an electronic device 500, such as Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present disclosure, including:

[0190] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including memory 521 and external memory 522; memory 521 here is also called internal memory, which is used to temporarily store operation data in processor 51 and data exchanged with external memory 522 such as hard disk. Processor 51 exchanges data with external memory 522 through memory 521. When the electronic device 500 is running, the processor 51 communicates with the memory 52 through bus 53, so that the processor 51 executes the following instructions:

[0191] Obtaining a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant;

[0192] Determine the encryption key of the current participant based on the first key generation parameter and the second key generation parameter;

[0193] Encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data;

[0194] Based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate an aggregation result of the encrypted data of a participant that performs a data aggregation operation before the current participant.

[0195] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data aggregation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0196] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the data aggregation method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0197] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0198] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0199] 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, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0200] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0201] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0202] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A data aggregation method, characterized in that: include: Obtaining a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant; Determine the encryption key of the current participant based on the first key generation parameter and the second key generation parameter; Encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data; Based on the first encrypted data, a first data aggregation result of the current participant is determined; wherein the first data aggregation result is used to indicate an aggregation result of the encrypted data of a participant that performs a data aggregation operation before the current participant.

2. The method according to claim 1, characterized in that Before determining the encryption key of the current participant based on the first key generation parameter and the second key generation parameter, the method further includes: Determine the target shared values ​​for each participant; Generate a first random number corresponding to the current participant; According to a preset calculation formula, the first random number and the target shared value are calculated and processed to obtain the second key generation parameter of the current participant.

3. The method according to claim 2, characterized in that The method further comprises: After obtaining the second key generation parameter, the second key generation parameter is sent to the second participant so that the second participant determines the encryption key of the second participant based on the second key generation parameter and the second participant's own key generation parameter; wherein the second participant is the participant who performs the data aggregation operation after the current participant.

4. The method according to claim 2, characterized in that Determining the target shared value of each participant includes: Receiving the target shared value sent by a third party; wherein the third party is a party used to generate the target shared value; or A second random number is determined, and the second random number is calculated according to a preset calculation formula to obtain the target shared value.

5. The method according to claim 1, characterized in that The determining, based on the first encrypted data, a first data aggregation result of the current participant includes: Obtaining a second data aggregation result sent by the first participant; wherein the second data aggregation result is used to indicate an aggregation result of encrypted data of a participant that performs a data aggregation operation before the first participant; According to a preset calculation algorithm, the second data aggregation result and the first encrypted data are calculated to obtain the first data aggregation result.

6. The method according to claim 1, characterized in that The obtaining of a first key generation parameter sent by the first participant includes: In a case where the current participant is the first participant to perform the data aggregation operation, the key generation parameter sent by the last participant to perform the data aggregation operation is determined as the first key generation parameter.

7. The method according to claim 1, characterized in that After determining the first data aggregation result of the current participant based on the first encrypted data, the method further includes: In a case where the current participant is not the last participant to perform the data aggregation operation, the first data aggregation result is sent to a second participant; wherein the second participant is a participant that performs the data aggregation operation after the current participant.

8. The method according to claim 7, characterized in that The method further comprises: After sending the first data aggregation result to the second participant, receiving the third data aggregation result sent by the last participant who performs the data aggregation operation; wherein the third data aggregation result is used to indicate the aggregation result of the encrypted data of all participants.

9. The method according to claim 8, characterized in that After receiving the third data aggregation result sent by the last participant performing the data aggregation operation, the method further includes: Based on the third data aggregation result, the sum of the privacy data of each participant is determined.

10. The method according to claim 1, characterized in that After determining the first data aggregation result of the current participant based on the first encrypted data, the method further includes: When the current participant is the last participant to perform the data aggregation operation, the first data aggregation result is sent to the fourth participant, so that the fourth participant determines the sum of the privacy data of each participant based on the first data aggregation result; wherein the fourth participant is the remaining participant other than the current participant.

11. A data aggregation device, characterized in that: include: An acquisition module, used to acquire a first key generation parameter sent by a first participant; wherein the first participant is a participant that performed a data aggregation operation before the current participant; A first determination module, configured to determine an encryption key of a current participant based on the first key generation parameter and the second key generation parameter; An encryption module, used for encrypting the private data of the current participant based on the encryption key to obtain the first encrypted data; The second determination module is used to determine the first data aggregation result of the current participant based on the first encrypted data; wherein the first data aggregation result is used to indicate the aggregation result of the encrypted data of the participant who performed the data aggregation operation before the current participant.

12. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the data aggregation method as described in any one of claims 1 to 10 are performed.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data aggregation method according to any one of claims 1 to 10 are executed.