Data aggregation method and system
Through group key management and blockchain technology, group keys are established for sensors, which solves the problem that traditional data encryption methods cannot meet data security requirements, realizes secure aggregation and rapid replacement of data, reduces computing and transmission overhead, and ensures information security.
Patent Information
- Application Number
- CN202411862489.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the existing technology, traditional data encryption methods cannot meet the needs of data security, resulting in high risks of data leakage, difficulty in replacing damaged sensors, and lack of data processing methods.
A group key management method is adopted to establish a group key for each sensor. The encryption information is determined by a trusted third party. The sensor establishes group key information with the sensors before and after it. Various operations and encryption are performed on the encrypted data, and a ciphertext report is generated. The data is verified and decrypted through the blockchain and the control center to achieve secure data aggregation.
It improves the effectiveness and reliability of data encryption, avoids information leakage, ensures information security, realizes the rapid replacement of sensors and the scalability of the system, and reduces the computing and transmission overhead of data processing.
Smart Images

Figure CN119728225B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data security technology, and in particular to a data aggregation method and system. Background Art
[0002] As the Internet becomes more and more in-depth, how to ensure the security of data of individuals, groups, enterprises, etc. has become a focus of attention.
[0003] In existing technologies, data can be processed through encryption and decryption to minimize data leakage. However, traditional data encryption methods can no longer meet data security requirements.
[0004] Therefore, providing a secure data processing method has become a technical problem that needs to be solved urgently.
[0005] The content of the background technology section is merely information known to the inventor personally, and does not mean that the above information has entered the public domain before the application date of this disclosure, nor does it mean that it can become the prior art of the present disclosure. Summary of the Invention
[0006] The present disclosure provides a data aggregation method and system to solve at least one of the above technical problems.
[0007] In a first aspect, the present disclosure provides a data aggregation method, which is applied to a data aggregation system, wherein the data aggregation system includes a trusted third party, multiple aggregation nodes, and multiple sensors, wherein each aggregation node includes multiple sensors. The method includes:
[0008] The trusted third party determines and sends encryption information for encrypting the data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among the multiple aggregation nodes, and the encryption information includes encrypted information corresponding to the target sensor and adjacent sensors before and after the target sensor;
[0009] The target sensor establishes group key information with the front and rear adjacent sensors based on the encrypted information sent by the trusted third party;
[0010] The target sensor performs multiple operations on the data to be encrypted, and encrypts the data obtained by the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext;
[0011] The target sensor generates a signature of the ciphertext according to the ciphertext, the first timestamp, and the identifier of the target sensor, and generates a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor.
[0012] In some embodiments, the data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes:
[0013] Map the original floating-point data into integers based on a linear function;
[0014] The mapped integers are processed according to the remainder theorem to obtain the data to be encrypted.
[0015] In some embodiments, the data aggregation system further includes a control center; and the method further includes:
[0016] When the target aggregation node receives the ciphertext reports sent by each sensor within the target interval, checking the first timestamp in the received ciphertext reports to determine the validity of the received ciphertext reports;
[0017] When it is determined that the received ciphertext report is valid, the target aggregation node performs batch verification on the signature in the received ciphertext report;
[0018] When the signature in the received ciphertext report is verified to be valid, the target aggregation node aggregates the received ciphertext to obtain an aggregated ciphertext;
[0019] The target aggregation node generates a signature of the aggregation ciphertext according to the aggregation ciphertext, the obtained second timestamp, and the identifier of the target aggregation node;
[0020] The target aggregation node packages the aggregation ciphertext, the signature of the aggregation ciphertext, the second timestamp, and the identifier of the target aggregation node, and sends the packaged data to the control center.
[0021] In some embodiments, the data aggregation system further includes a blockchain; and the method further includes:
[0022] The target aggregation node generates a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and the first timestamp;
[0023] The target aggregation node creates a new block and records the transaction in the new block;
[0024] The target aggregation node broadcasts the new block within the target interval;
[0025] Each sensor in the target area verifies its corresponding data and broadcasts the verification result;
[0026] When at least a preset number of verification results indicating that the verification is correct are obtained, the blockchain determines that the new block is a valid block and adds the new block to the blockchain.
[0027] In some embodiments, the method further comprises:
[0028] The control center performs batch verification on the obtained signatures of the packaged data;
[0029] If the verification is successful, the control center decrypts the aggregated ciphertext to obtain the aggregated plaintext.
[0030] In some embodiments, the method further comprises:
[0031] The control center recovers multi-dimensional components from the aggregate plaintext based on the remainder theorem and determines multifunctional analysis information of the aggregate plaintext;
[0032] The multifunctional analysis information includes at least two of the following: linear sum, arithmetic mean, quadratic mean, harmonic mean, variance, and standard deviation.
[0033] In some embodiments, the method further comprises:
[0034] When the target sensor is damaged and replaced with a new sensor, the new sensor obtains the updated encrypted information sent by the trusted third party;
[0035] The new sensor determines, based on the updated encryption information, and sends a key parameter for encryption to the front and rear adjacent sensors;
[0036] The front and rear adjacent sensors update the encryption key according to the obtained encryption key parameter.
[0037] In some embodiments, the method further comprises:
[0038] The trusted third party obtains registration information corresponding to each sensor and groups the sensors according to the registration information;
[0039] In response to the newly added sensor, if the number of the newly added sensors is less than the number of sensors in the last group, the trusted third party adds the newly added sensor to the last group;
[0040] If the number of newly added sensors reaches the number of the last group of sensors, the trusted third party determines the first preset number of sensors in the last group as a new sensor group, and determines the other sensors in the last group and the newly added sensors as a new last group.
[0041] In some embodiments, the method further comprises:
[0042] The trusted third party obtains the total number of sensors and the number of sensor groupings;
[0043] If the total number and the number of groups meet the preset conditions, the trusted third party will split and supplement the sensors in the latter group according to the number of missing sensors in the former group.
[0044] In a second aspect, the present disclosure provides a data aggregation system, which includes a trusted third party, multiple aggregation nodes, and multiple sensors, wherein each aggregation node includes multiple sensors;
[0045] The trusted third party is configured to determine and send encryption information for encrypting the data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among the multiple aggregation nodes, and the encryption information includes encrypted information corresponding to the target sensor and adjacent sensors before and after the target sensor;
[0046] The target sensor is used to establish group key information with the front and rear adjacent sensors based on the encrypted information sent by the trusted third party;
[0047] The target sensor is further configured to perform multiple operations on the data to be encrypted, and encrypt the data obtained by the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext;
[0048] The target sensor is further configured to generate a signature of the ciphertext based on the ciphertext, the first timestamp, and the identifier of the target sensor, and to generate a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor.
[0049] In some embodiments, the data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes:
[0050] Map the original floating-point data into integers based on a linear function;
[0051] The mapped integers are processed according to the remainder theorem to obtain the data to be encrypted.
[0052] In some embodiments, the data aggregation system further includes a control center;
[0053] The target aggregation node is further configured to, upon receiving the ciphertext report sent by each sensor within the target interval, check the first timestamp in the received ciphertext report to determine the validity of the received ciphertext report;
[0054] In the case where it is determined that the received ciphertext report is valid, the target aggregation node is further configured to perform batch verification on the signature in the received ciphertext report;
[0055] When the signature in the received ciphertext report is verified to be valid, the target aggregation node is further configured to aggregate the received ciphertext to obtain an aggregated ciphertext;
[0056] The target aggregation node is further configured to generate a signature of the aggregated ciphertext according to the aggregated ciphertext, the obtained second timestamp, and the identifier of the target aggregation node;
[0057] The target aggregation node is further configured to package the aggregation ciphertext, the signature of the aggregation ciphertext, the second timestamp, and the identifier of the target aggregation node, and send the packaged data to the control center.
[0058] In some embodiments, the data aggregation system further comprises a blockchain;
[0059] The target aggregation node is further configured to generate a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and the first timestamp;
[0060] The target aggregation node is further configured to create a new block and record the transaction in the new block;
[0061] The target aggregation node is further configured to broadcast the new block within the target interval;
[0062] Each sensor in the target area is further used to verify the corresponding data and broadcast the verification results;
[0063] When at least a preset number of verification results indicating that the verification is correct are obtained, the blockchain is used to determine that the new block is a valid block and add the new block to the blockchain.
[0064] In some embodiments, the control center is used to perform batch verification on the obtained signatures of the packaged data;
[0065] When the verification is passed, the control center is further configured to decrypt the aggregated ciphertext to obtain aggregated plaintext.
[0066] In some embodiments, the control center is further configured to recover multi-dimensional components from the aggregate plaintext based on the remainder theorem and determine multifunctional analysis information of the aggregate plaintext;
[0067] The multifunctional analysis information includes at least two of the following: linear sum, arithmetic mean, quadratic mean, harmonic mean, variance, and standard deviation.
[0068] In some embodiments, when the target sensor is damaged and replaced with a new sensor, the new sensor is used to obtain the updated encrypted information sent by the trusted third party;
[0069] The new sensor is further configured to determine and send encryption key parameters to the front and rear adjacent sensors based on the updated encryption information;
[0070] The front and rear adjacent sensors are used to update the encryption key according to the obtained encryption key parameters.
[0071] In some embodiments, the trusted third party is further configured to obtain registration information corresponding to each sensor, and group the sensors according to the registration information;
[0072] In response to the newly added sensor, if the number of the newly added sensors is less than the number of sensors in the last group, the trusted third party is further configured to add the newly added sensor to the last group;
[0073] If the number of newly added sensors reaches the number of the last group of sensors, the trusted third party is further configured to determine the previously preset number of sensors in the last group as a new sensor group, and determine the other sensors in the last group and the newly added sensors as a new last group.
[0074] In some embodiments, the trusted third party is further configured to obtain the total number of sensors and the number of sensor groupings;
[0075] If the total number and the number of groups meet a preset condition, the trusted third party is further configured to split and supplement the sensors in the latter group according to the number of missing sensors in the former group.
[0076] The data aggregation method and system disclosed herein include: a trusted third party determines and sends encryption information for encrypting data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among multiple aggregation nodes. The encryption information includes encrypted information corresponding to the target sensor and its preceding and following adjacent sensors. The target sensor establishes group key information with its preceding and following adjacent sensors based on the encryption information sent by the trusted third party. The target sensor performs multiple operations on the data to be encrypted and, based on the group key information and a first timestamp, encrypts the data obtained from the multiple operations to obtain a ciphertext. The target sensor generates a signature for the ciphertext based on the ciphertext, the first timestamp, and the target sensor's identifier, and generates a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the target sensor's identifier. In this embodiment, a group key management approach is adopted, establishing a group key for each sensor for data encryption. This improves the effectiveness and reliability of data encryption, prevents information leakage, and ensures information security. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0078] Figure 1 A flowchart of the data aggregation method provided by the present disclosure;
[0079] Figure 2 A schematic diagram of the principle of the data aggregation method provided by the present disclosure;
[0080] Figure 3 This is a structural diagram of the data aggregation system provided by the present disclosure.
[0081] The above drawings illustrate specific embodiments of the present disclosure, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0082] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0083] It should be understood that the terms "including" and "having" and any variations thereof in the embodiments of the present disclosure are intended to cover but not exclude inclusion. For example, a product or device that includes a series of components is not necessarily limited to those components explicitly listed, but may include other components not explicitly listed or inherent to these products or devices.
[0084] In the embodiments of the present disclosure, the term "and / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0085] In the embodiments of the present disclosure, the term "plurality" refers to two or more than two, and other quantifiers are similar thereto.
[0086] The terms "first," "second," "third," and the like in this disclosure are used to distinguish between similar or similar objects or entities and are not necessarily intended to limit a particular order or precedence, unless otherwise indicated. It should be understood that the terms used in this manner are interchangeable where appropriate, e.g., capable of being implemented in an order other than that given in the illustrations or descriptions of the embodiments of this disclosure.
[0087] The term "unit / module" as used in this disclosure refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0088] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure and not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0089] According to one aspect of the present disclosure, a data aggregation method is provided. The data aggregation method is applied to a data aggregation system, which includes a trusted third party (TA), multiple aggregation nodes, multiple sensors, a blockchain, and a control center (CC), wherein each aggregation node includes multiple sensors.
[0090] The data aggregation method provided in the present disclosure can be applied to scenarios where data is protected to prevent data leakage. For example, the data aggregation method provided in the present disclosure can be applied in commercial scenarios as well as in medical scenarios.
[0091] Take the medical scenario as an example:
[0092] With accelerating urbanization and increased travel, infectious diseases are spreading more diversely and rapidly. This makes infectious diseases an unprecedented threat to human society, not only harming individual health but also potentially causing social panic, economic volatility, and even national security concerns. Therefore, effectively preventing, controlling, and responding to the challenges of infectious diseases has become a pressing task in global public health.
[0093] To address this issue, we need to strengthen infectious disease monitoring and research. Faced with massive amounts of infectious disease data, data aggregation is a convenient method for integrating and analyzing it. In the field of infectious diseases, this means aggregating and analyzing multi-dimensional data such as patient physical data, medical records, epidemiological survey results, laboratory test data, and population migration information. This private patient data could be leaked due to inadequate security measures, or even stolen by malicious third parties, posing a threat to user privacy and security.
[0094] In response to the problems of personal privacy information leakage, damaged sensors that are difficult to replace, difficulty in maintaining data integrity, and lack of data processing methods during infectious disease data monitoring, the present disclosure proposes a group-managed multi-dimensional and multi-functional data aggregation method. By establishing a group key, the information of a single user is difficult to obtain, effectively protecting the user's identity privacy. Group management technology is used to achieve rapid replacement of sensors, making the system more scalable. Linear functions are used to pre-process the data, and the remainder theorem is used to convert multi-dimensional data into one-dimensional data, which reduces the restrictions on data input and reduces the overhead of information processing and transmission. Multiple functions are used to perform multi-functional analysis on aggregation to provide more reference data information for infectious disease monitoring. The present disclosure alleviates to a certain extent the problems of information leakage, damaged sensors that are difficult to replace, difficulty in maintaining data integrity, and lack of data processing methods encountered in the transmission and communication of private information during infectious disease data monitoring and analysis.
[0095] See also Figure 1 , Figure 1 This is a flow chart of the data aggregation method provided by the present disclosure. Figure 1 As shown, the method includes:
[0096] S101: A trusted third party determines and sends encryption information for encrypting data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among multiple aggregation nodes. The encryption information includes encrypted information corresponding to the target sensor and adjacent sensors before and after the target sensor.
[0097] For example, combined Figure 2As can be seen, during the system initialization phase, the trusted third party can generate public parameters and information related to the keys corresponding to each entity in the system. Correspondingly, the trusted third party can publish the public parameters and distribute information related to the keys corresponding to each entity.
[0098] For example, a trusted third party can choose a security parameter k to calculate two secure large prime numbers |p1|=|q1|=k, and calculate N0=p1q1 as the public key for homomorphic encryption, and λ0=lcm(p1-1,q1-1) as the private key for homomorphic encryption.
[0099] At the same time, the trusted third party can choose and calculate Let g0=N0+1, and define the function as The trusted third party randomly selects P as the generator of the multiplication group G0 and selects a secure cryptographic hash function
[0100] In this embodiment, the target aggregation node is aggregation node A. j 、The target sensor is U ij Take this as an example to illustrate.
[0101] The control center sends its ID {ID c}To a trusted third party, aggregation node A j Send its ID {ID j}To a trusted third party.
[0102] The trusted third party is aggregation node A j Choose a random prime number x j As aggregation node A j The public key of , and calculate based on the public key and the homomorphically encrypted public key As aggregation node A j The signing key.
[0103] Sensor U within the aggregation node interval ij Choose a random number d ij , and calculate V i =d ij P, and {ID ij ,V i} is sent to a trusted third party as registration information.
[0104] Trusted third party for sensor U ij Choose a random prime number x ij As sensor U ij The public key of sensor U is calculated based on the public key and the homomorphic encryption public key ij Signature key
[0105] For all the generated parameters (λ0,N0,s0,H0,H1,x ij ,x j ,y ij ,y j ,V i ), the trusted third party publishes the public parameters (N, H0, H1) online and transmits the corresponding key information (x ij ,y ij ,s0,V i-1 ,V i+1 ) is sent to sensor U ij , and (x ij ,x j ,y j ) is sent to aggregation node A j ,(λ0,x j ) is sent to the control center.
[0106] That is, the trusted third party determines and sends the target sensor U ij Send encryption information (x ij ,y ij ,s0,V i-1 ,V i+1 ). Among them, V i-1 For sensor U ij Part of the registration information sent by the previous sensor to the trusted third party, V i+1 For sensor U ij The latter sensor sends part of the registration information to the trusted third party.
[0107] S102: The target sensor establishes group key information with the preceding and following adjacent sensors based on the encrypted information sent by the trusted third party.
[0108] For example, sensor U ij Received encrypted information from a trusted third party (x ij ,y ij ,s0,V i-1 ,V i+1 ) and then store it in the memory.
[0109] The front and rear adjacent sensors of the target sensor include a front sensor adjacent to the target sensor and a rear sensor adjacent to the target sensor.
[0110] Sensor U ij Compared to its previous sensor U i-1,j Establish the corresponding key information Sk i.i-1 =d ij V i-1 , and its subsequent sensor Ui+1,j Establish the corresponding key information Sk i,i+1 =d ij V i+1 The two parts of key information can be called group key information, which is used to encrypt the data to be encrypted later.
[0111] That is, in this embodiment, a group key management method is adopted to establish a group key for each sensor for encrypting data.
[0112] S103: The target sensor performs multiple operations on the data to be encrypted, and encrypts the data obtained through the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext.
[0113] In some embodiments, the data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes:
[0114] Step 1: Map the original floating-point data into integers based on a linear function.
[0115] For example, sensor U ij Detected raw data And each original data m i,j Belongs to the real domain, that is, m i,j ∈[F j ,S j ]. Among them, F j and S j are the upper and lower bounds of the j-th dimension data respectively. Sensor U ij The original floating-point data is mapped into integers based on a linear function, that is, e ij is the integer after mapping, AC j is the accuracy of the j-th dimension data. Its inverse function is m i,j =e ij AC j +F j , to restore the original data through the inverse function.
[0116] Step 2: Process the mapped integers according to the remainder theorem to obtain the data to be encrypted.
[0117] That is, in this embodiment, linear functions are used to preprocess data, and the remainder theorem is used to convert multidimensional data into integers, which expands the limit of input data, reduces data redundancy, and reduces the overhead of data calculation and transmission.
[0118] For example, for the transformed data Assume (a1, a2, ..., a α) are l positive integers that are mutually prime. According to the remainder theorem, calculate Get the data to be encrypted as an integer
[0119] Sensor U ij In obtaining M ij After that, the timestamp can be obtained. In order to distinguish it from other timestamps in the following text, this timestamp can be called the first timestamp Tim ij . To pass the poke Tim ij Prevent replay attacks. Sensor U ij Calculate the encryption key μ based on the group key information ij =H1(Sk i,i-1 ||Tim ij )-H1(Sk i,i+1 ||Tim ij ). Sensor U ij You can randomly select an s ij , and the ciphertext is calculated based on formula 1, formula 1:
[0120]
[0121] In some embodiments, the encryption formula shown in Formula 1 above can be transformed to reduce the computational overhead. ij The results of multiple operations can be After packaging, encryption is performed to obtain ciphertext.
[0122] Sensor U ij The ciphertext can be sent to the aggregation node A j , so that it can be transmitted through the aggregation node A j The encrypted text is transmitted to the control center, so that the control center can perform multifunctional analysis of the data.
[0123] S104: The target sensor generates a signature of the ciphertext according to the ciphertext, the first timestamp, and the identifier of the target sensor, and generates a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor.
[0124] For example, sensor U ij You can calculate f ij =H0(C ij ||Tim ij ) to generate the signature of the ciphertext Sensor U ij Pack the data (δ ij ||C ij ||Tim ij ||ID ij) is sent to aggregation node A j The packaged data is the ciphertext report.
[0125] Combined with the above analysis, S103 and S104 can be understood as the data collection and encryption stage. Figure 2 As can be seen, at this stage, the sensor pre-processes the data, converting floating-point numbers into integers and multidimensional data into integers. The processed data is encrypted and a signature is generated, and the ciphertext is sent to the regional aggregation node.
[0126] In some embodiments, the method further comprises:
[0127] Step 1: When the target aggregation node receives the ciphertext reports sent by each sensor in the target interval, the first timestamp in the received ciphertext reports is checked to determine the validity of the received ciphertext reports.
[0128] Step 2: When it is determined that the received ciphertext report is valid, the target aggregation node performs batch verification on the signature in the received ciphertext report.
[0129] For example, aggregation node A j After receiving the report sent by the sensor in the interval, the first timestamp is checked to confirm the validity of the report. After confirming that the first timestamp is correct, the signature can be batch verified based on formula 2, formula 2:
[0130]
[0131] The correctness of Formula 2 for batch verification of signatures can be determined based on Formula 3:
[0132]
[0133] Step 3: When the signature in the received ciphertext report is verified to be valid, the target aggregation node aggregates the received ciphertext to obtain an aggregated ciphertext.
[0134] For example, if the above formula 2 holds true, it proves that the signature in the ciphertext report is a valid signature. j Aggregate each ciphertext
[0135] In other words, this embodiment utilizes batch signature verification technology to effectively address inefficient data processing. Specifically, verifying a large number of signatures individually can consume significant computing resources. Signature aggregation reduces computing costs by aggregating and verifying a large number of signatures, saving processing time and resources. This ensures lower communication latency and bandwidth consumption during data transmission, improving efficiency.
[0136] Step 4: The target aggregation node generates a signature of the aggregation ciphertext according to the aggregation ciphertext, the obtained second timestamp, and the identifier of the target aggregation node.
[0137] For example, aggregation node A j Get the second timestamp Tim j , and calculate f j =H0(C j ||Tim j ) to generate the signature of the aggregate ciphertext
[0138] Step 5: The target aggregation node packages the aggregated ciphertext, the signature of the aggregated ciphertext, the second timestamp, and the identifier of the target aggregation node, and sends the packaged data to the control center.
[0139] Combined with the above example, aggregation node A j Packed data (δ j ||C j ||Tim j ||ID j ) is sent to the control center. Among them, (δ j ||C j ||Tim j ||ID j ) packaged data.
[0140] Combined with the above analysis, we can see that steps 1 to 5 can be understood as the data aggregation stage. Figure 2 It can be seen that at this stage, the aggregation node A j Verify the first timestamp. If the first timestamp is correct, batch verify the signatures. If the verification passes, aggregate the ciphertexts.
[0141] In some embodiments, the method further comprises:
[0142] Step 6: The control center performs batch verification on the signatures of the packaged data obtained.
[0143] For example, the control center receives the aggregation node A j Packed data sent (δ j ||C j ||Tim j ||ID j ), the signature can be batch verified based on Formula 4:
[0144]
[0145] Step 7: If the verification is successful, the control center decrypts the aggregated ciphertext to obtain the aggregated plaintext.
[0146] If the verification result of step 6 is passed, the control can be based on the aggregate ciphertext C based on formula 5 j Decrypt and get the aggregate plaintext M j , Equation 5:
[0147]
[0148] In some embodiments, the method further comprises:
[0149] Step 8: The control center recovers the multi-dimensional components from the aggregate plaintext based on the remainder theorem and determines the multifunctional analysis information of the aggregate plaintext.
[0150] The multifunctional analysis information includes at least two of the following: linear sum, arithmetic mean, quadratic mean, harmonic mean, variance, and standard deviation.
[0151] For example, based on the remainder theorem, the control center can be Restore aggregate plaintext M j The β-dimensional component M (i) .
[0152] For example, M (4) It is the aggregation node A j The sum of the 4th dimension data of all multidimensional data in the area (i.e., the target area), that is, the aggregate value of the 4th dimension data.
[0153] The control center can be based on Calculate the linear sum; can be based on Calculate the arithmetic mean; can be based on Calculate the quadratic mean; can be based on Calculate the harmonic mean; can be based on Calculate the variance; can be based on Calculate the standard deviation.
[0154] Combined with the above analysis, we can see that steps 6 to 8 can be understood as the data decryption, recovery and analysis stages. Figure 2 It can be seen that at this stage, the control center receives the aggregation node A j After the data is sent, the signature is batch processed, the data is decrypted after passing, and the data is analyzed after decryption.
[0155] That is to say, in this embodiment, multiple functions are used to perform multifunctional analysis on the data. After the data is decrypted, the control center obtains the aggregated plaintext. Through multifunctional analysis of the data, more types of data are obtained, thereby obtaining more accurate data analysis results.
[0156] In some embodiments, the method further comprises:
[0157] Step 11: The target aggregation node generates a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and a first timestamp.
[0158] For example, aggregation node A j After obtaining the aggregate ciphertext C j Afterwards, the aggregate ciphertext C j and related information (such as the ID of the target aggregation node j 、TimestampTim ij ) to generate transaction T x =(C j ,ID j ,Tim ij ).
[0159] Step 12: The target aggregation node creates a new block and records the transaction in the new block.
[0160] For example, aggregation node A j Transaction T x =(C j ,ID j ,Tim ij ) is recorded in a new block. This block contains three other elements: the Merkle root and the previous and current hashes. The value of the Merkle root is obtained by hashing the ciphertext and identity in a Merkle tree.
[0161] The hash value of the new block can be calculated based on Formula 6:
[0162]
[0163] Among them, H prev-block is the previous hash value.
[0164] Step 13: The target aggregation node broadcasts the new block within the target interval.
[0165] Step 14: Each sensor in the target area verifies its corresponding data and broadcasts the verification results.
[0166] For example, aggregation node A j After a new block is created, it is broadcast within its sub-area (i.e., the target interval). Each sensor in the target interval verifies the new block. Each sensor in the target interval verifies only the data relevant to it. If the data matches the original data, verification is successful, and the verification result is broadcast.
[0167] For example, sensor U ij Verify the data related to it to verify whether it is consistent with the original data mi,j If yes, the verification is successful. ij The verification result is broadcast.
[0168] Step 15: When at least a predetermined number of verification results indicating that the verification is correct are obtained, the blockchain determines that the new block is a valid block and adds the new block to the blockchain.
[0169] For example, the blockchain counts the number of correct verification results it receives. If the blockchain receives 2n / 3+1 or more correctness confirmation messages from sensors, the new block is considered valid and added to the blockchain. Here, n is the number of sensors in the target interval.
[0170] Combined with the above analysis, we can see that steps 12 to 15 can be understood as the generation stage of a new block in the blockchain. Figure 2 It can be seen that at this stage, the aggregation node A j The transaction is recorded in a new block and the new block is broadcast in its sub-area for information authentication.
[0171] That is, in this embodiment, blockchain is used to store ciphertext. By utilizing the traceability and immutability of blockchain data, the timestamp, identity, and ciphertext are stored in the blockchain, which can ensure the reliability and traceability of the data.
[0172] In some embodiments, the method further comprises:
[0173] Step 21: When the target sensor is damaged and replaced with a new sensor, the new sensor obtains the updated encrypted information sent by the trusted third party.
[0174] For example, if the sensor U ij Damaged, sensor U ij Replace with sensor. Sensor U' ij Choose a random number d′ ij , V i ′=d′ ij P, sensor U′ ij Send its registration information {ID′ ij ,V i ′} to a trusted third party.
[0175] The trusted third party receives {ID′ ij ,V i '}, it is sensor U' ij Choose a random prime number x′ ij As the public key, and calculate the signing key
[0176] Trusted third party finds sensor U ij The previous sensor U i-1,j Key information V i-1 , and sensor U ij The last sensor U i+1,j Key information V i+1 Trusted third-party storage sensor U′ ij ID′ ij and key information V i ', send {x' ij ,y′ ij ,V i-1 ,V i+1}Give sensor U i+1,j , send {V i '} to sensor U i-1,j and sensor U i+1,j .
[0177] Among them, {x′ ij ,y′ ij ,V i-1 ,V i+1} is the updated encrypted information.
[0178] Step 22: The new sensor determines and sends encryption key parameters to the adjacent sensors in front and behind according to the updated encryption information.
[0179] For example, sensor U′ ij Receive {x′ ij ,y′ ij ,V i-1 ,V i+1}, calculate and forward the sensor U i-1,j Send the key parameter Sk′ used for encryption i.i-1 =d′ ij V i-1 , and calculate and send to the next sensor U i+1,j Send the key parameter Sk′ used for encryption i.i+1 =d′ ij V i+1 .
[0180] Step 23: The front and rear adjacent sensors update the encryption key according to the obtained encryption key parameters.
[0181] Correspondingly, sensor U i-1,j Update its Sk used for encryption i-1.i =d i-1,j V i 'Key. Sensor U i+1,j Update its Sk used for encryption i+1.i =di+1,j V i 'Key. After the key updates of adjacent sensors before and after are completed, the sensor replacement is successful.
[0182] In some embodiments, the method further includes:
[0183] Step 31: The trusted third party obtains the registration information corresponding to each sensor and groups the sensors according to the registration information.
[0184] Exemplarily, in combination with the above example, after obtaining all the registration information, the trusted third party can randomly group all the sensors.
[0185] For example, |Φ i | is the number of sensors in group Φ i i | = k.
[0186] The last group Φ t has [k, 2k) sensors. Φ l is the last (|Φ t | - k) sensors in group Φ t |, |Φ l | ∈ [0, k).
[0187] Step 32: In response to the newly added sensors, if the number of newly added sensors is less than the number of sensors in the last group, the trusted third party adds the newly added sensors to the last group.
[0188] For example, if m new sensors need to be added and the number of sensors in the last group is |Φ t |. m < k, the new sensors can be added to the last group. And if |Φ t | + m < 2k, the new sensors can be directly added to the end of the last group.
[0189] Step 33: If the number of newly added sensors reaches the number of sensors in the last group, the trusted third party determines the first preset number of sensors in the last group as a new sensor group, and determines the other sensors in the last group and the newly added sensors as a new last group.
[0190] Exemplarily, if |Φ t | + m ≥ 2k, the first k sensors in the last group can be separated into a new group, and the last |Φ[[ID=D]] t | - k sensors and the newly added m sensors form a new last group.
[0191] If m ≥ k, m = n·k + a (a < k), then the first n·k sensors can be divided into n groups and inserted into the last group Φ t In front of the last a sensors are added to Φ t In the judgment, |Φ t For the relationship between |+m and 2k, refer to the above operation.
[0192] It is worth noting that if the aggregation node A j Discovery Sensor 1j ,U 2j ,...,U nj} is damaged, then the aggregation node A j Find the group where the bad meter is located based on the sensor ID {Φ 1j ,Φ 2j ,...,Φ nj}, in the above aggregation phase, the data of these groups will not be aggregated, and the data from other groups will be aggregated.
[0193] In some embodiments, the method further comprises:
[0194] Step 34: The trusted third party obtains the total number of sensors and the number of sensor groupings;
[0195] Step 35: If the total number and the number of groups meet the preset conditions, the trusted third party will split and supplement the sensors in the latter group according to the number of missing sensors in the former group.
[0196] For example, if the total number of sensors (ie, total quantity) is A and the number of groups (ie, group number) is z, if z>3A / k, the trusted third party will split and supplement the sensors of the subsequent groups according to the number of missing sensors in the previous group.
[0197] Combined with the above analysis, it can be seen that steps 21 to 23, and steps 32 to 35 can be understood as the sensor replacement stage. Figure 2 It can be seen that at this stage, the trusted third party establishes a key for the replaced sensor and updates the keys of the two sensors before and after, thereby realizing sensor replacement (steps 21 to 23), dynamic connection (steps 32 and 33) and dynamic departure (steps 34 and 35).
[0198] That is, in this embodiment, the replacement, dynamic connection, and dynamic leaving of sensors are achieved by combining the group key with the group management technology.
[0199] According to an embodiment of the present disclosure, the present disclosure also provides a data aggregation system.
[0200] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of the data aggregation system provided by the present disclosure. Figure 3As shown, the data aggregation system 300 includes a trusted third party 301, multiple aggregation nodes, and multiple sensors. Each aggregation node includes multiple sensors; wherein,
[0201] The trusted third party 301 is configured to determine and send encryption information for encrypting the data to be encrypted to a target sensor 302, wherein the target sensor 302 is any sensor within a target interval of a target aggregation node 303, and the target aggregation node 303 is any node among the multiple aggregation nodes, and the encryption information includes encrypted information corresponding to the target sensor 302 and the sensors adjacent to and preceding the target sensor 302;
[0202] The target sensor 302 is used to establish group key information with the front and rear adjacent sensors based on the encrypted information sent by the trusted third party 301;
[0203] The target sensor 302 is further configured to perform multiple operations on the data to be encrypted, and encrypt the data obtained by the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext;
[0204] The target sensor 302 is further configured to generate a signature of the ciphertext based on the ciphertext, the first timestamp, and the identifier of the target sensor 302 , and to generate a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor 302 .
[0205] In some embodiments, the data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes:
[0206] Map the original floating-point data into integers based on a linear function;
[0207] The mapped integers are processed according to the remainder theorem to obtain the data to be encrypted.
[0208] In some embodiments, the data aggregation system further includes a control center 304;
[0209] The target aggregation node 303 is further configured to, upon receiving the ciphertext reports sent by the sensors within the target interval, check the first timestamp in the received ciphertext reports to determine the validity of the received ciphertext reports;
[0210] When it is determined that the received ciphertext report is valid, the target aggregation node 303 is further configured to perform batch verification on the signature in the received ciphertext report;
[0211] When the signature in the received ciphertext report is verified to be valid, the target aggregation node 303 is further configured to aggregate the received ciphertext to obtain an aggregated ciphertext;
[0212] The target aggregation node 303 is further configured to generate a signature of the aggregated ciphertext according to the aggregated ciphertext, the obtained second timestamp, and the identifier of the target aggregation node 303;
[0213] The target aggregation node 303 is further configured to package the aggregated ciphertext, the signature of the aggregated ciphertext, the second timestamp, and the identifier of the target aggregation node 303 , and send the packaged data to the control center 304 .
[0214] In some embodiments, the data aggregation system further includes a blockchain 305;
[0215] The target aggregation node 303 is further configured to generate a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and the first timestamp;
[0216] The target aggregation node 303 is further configured to create a new block and record the transaction in the new block;
[0217] The target aggregation node 303 is further configured to broadcast the new block within the target interval;
[0218] Each sensor in the target area is further used to verify the corresponding data and broadcast the verification results;
[0219] When at least a preset number of verification results indicating that the verification is correct are obtained, the blockchain 305 is used to determine that the new block is a valid block and add the new block to the blockchain 305.
[0220] In some embodiments, the control center 304 is used to perform batch verification on the obtained signatures of the packaged data;
[0221] When the verification is successful, the control center 304 is further configured to decrypt the aggregated ciphertext to obtain aggregated plaintext.
[0222] In some embodiments, the control center 304 is further configured to recover multi-dimensional components from the aggregate plaintext based on the remainder theorem and determine multi-functional analysis information of the aggregate plaintext;
[0223] The multifunctional analysis information includes at least two of the following: linear sum, arithmetic mean, quadratic mean, harmonic mean, variance, and standard deviation.
[0224] In some embodiments, when the target sensor 302 is damaged and replaced with a new sensor (not shown in the figure), the new sensor is used to obtain the updated encrypted information sent by the trusted third party;
[0225] The new sensor is further configured to determine and send encryption key parameters to the front and rear adjacent sensors based on the updated encryption information;
[0226] The front and rear adjacent sensors are used to update the encryption key according to the obtained encryption key parameters.
[0227] In some embodiments, the trusted third party 301 is further configured to obtain registration information corresponding to each sensor and group the sensors according to the registration information;
[0228] In response to the newly added sensor, if the number of the newly added sensors is less than the number of sensors in the last group, the trusted third party 301 is further configured to add the newly added sensor to the last group;
[0229] If the number of newly added sensors reaches the number of the last group of sensors, the trusted third party 301 is further configured to determine the previously preset number of sensors in the last group as a new sensor group, and determine the other sensors in the last group and the newly added sensors as a new last group.
[0230] In some embodiments, the trusted third party 301 is further configured to obtain the total number of sensors and the number of sensor groupings;
[0231] If the total number and the number of groups meet a preset condition, the trusted third party 301 is further configured to split and supplement the sensors in the latter group according to the number of missing sensors in the former group.
[0232] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information (such as the privacy data of the above-mentioned infectious disease patients, etc.) are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0233] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods or systems. Therefore, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.
[0234] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0235] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor-readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0236] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0237] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.
Claims
1. A data aggregation method, characterized in that: The data aggregation method is applied to a data aggregation system, which includes a trusted third party, multiple aggregation nodes, multiple sensors, and a control center, wherein each aggregation node includes multiple sensors. The method includes: The trusted third party determines and sends encryption information for encrypting the data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among the multiple aggregation nodes, and the encryption information includes encrypted information corresponding to the target sensor and adjacent sensors before and after the target sensor; The target sensor establishes group key information with the front and rear adjacent sensors based on the encrypted information sent by the trusted third party; The target sensor performs multiple operations on the data to be encrypted, and encrypts the data obtained by the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext; The target sensor generates a signature of the ciphertext according to the ciphertext, the first timestamp, and the identifier of the target sensor, and generates a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor; When the target aggregation node receives the ciphertext reports sent by each sensor within the target interval, checking the first timestamp in the received ciphertext reports to determine the validity of the received ciphertext reports; When it is determined that the received ciphertext report is valid, the target aggregation node performs batch verification on the signature in the received ciphertext report; When the signature in the received ciphertext report is verified to be valid, the target aggregation node aggregates the received ciphertext to obtain an aggregated ciphertext; The target aggregation node generates a signature of the aggregation ciphertext according to the aggregation ciphertext, the obtained second timestamp, and the identifier of the target aggregation node; The target aggregation node packages the aggregated ciphertext, the signature of the aggregated ciphertext, the second timestamp, and the identifier of the target aggregation node, and sends the packaged data to the control center; The control center performs batch verification on the obtained signatures of the packaged data; If the verification is successful, the control center decrypts the aggregated ciphertext to obtain the aggregated plaintext.
2. The method according to claim 1, characterized in that The data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes: Map the original floating-point data into integers based on a linear function; The mapped integers are processed according to the remainder theorem to obtain the data to be encrypted.
3. The method according to claim 1, characterized in that The data aggregation system further includes a blockchain; and the method further includes: The target aggregation node generates a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and the first timestamp; The target aggregation node creates a new block and records the transaction in the new block; The target aggregation node broadcasts the new block within the target interval; Each sensor in the target area verifies its corresponding data and broadcasts the verification result; When at least a preset number of verification results indicating that the verification is correct are obtained, the blockchain determines that the new block is a valid block and adds the new block to the blockchain.
4. The method according to claim 1, wherein The method further comprises: The control center recovers multi-dimensional components from the aggregate plaintext based on the remainder theorem and determines multifunctional analysis information of the aggregate plaintext; The multifunctional analysis information includes at least two of the following: linear sum, arithmetic mean, quadratic mean, harmonic mean, variance, and standard deviation.
5. The method according to claim 1, wherein The method further comprises: When the target sensor is damaged and replaced with a new sensor, the new sensor obtains the updated encrypted information sent by the trusted third party; The new sensor determines, based on the updated encryption information, and sends a key parameter for encryption to the front and rear adjacent sensors; The front and rear adjacent sensors update the encryption key according to the obtained encryption key parameter.
6. The method according to claim 1, characterized in that The method further comprises: The trusted third party obtains registration information corresponding to each sensor, and groups the sensors according to the registration information; In response to the newly added sensor, if the number of the newly added sensors is less than the number of sensors in the last group, the trusted third party adds the newly added sensor to the last group; If the number of newly added sensors reaches the number of the last group of sensors, the trusted third party determines the first preset number of sensors in the last group as a new sensor group, and determines the other sensors in the last group and the newly added sensors as a new last group.
7. The method according to claim 6, characterized in that The method further comprises: The trusted third party obtains the total number of sensors and the number of sensor groupings; If the total number and the number of groups meet the preset conditions, the trusted third party will split and supplement the sensors in the latter group according to the number of missing sensors in the former group.
8. A data aggregation system, characterized in that: The data aggregation system includes a trusted third party, multiple aggregation nodes, multiple sensors, and a control center, and each aggregation node includes multiple sensors; wherein, The trusted third party is used to determine and send encryption information for encrypting the data to be encrypted to a target sensor, wherein the target sensor is any sensor within a target interval of a target aggregation node, and the target aggregation node is any node among the multiple aggregation nodes, and the encryption information includes encrypted information corresponding to the target sensor and adjacent sensors before and after the target sensor; The target sensor is used to establish group key information with the front and rear adjacent sensors based on the encrypted information sent by the trusted third party; The target sensor is further configured to perform multiple operations on the data to be encrypted, and encrypt the data obtained by the multiple operations according to the group key information and the obtained first timestamp to obtain a ciphertext; The target sensor is further configured to generate a signature of the ciphertext based on the ciphertext, the first timestamp, and the identifier of the target sensor, and generate a ciphertext report including the ciphertext, the signature of the ciphertext, the first timestamp, and the identifier of the target sensor; When the target aggregation node receives the ciphertext report sent by each sensor in the target interval, the target aggregation node is used to check the first timestamp in the received ciphertext report to determine the validity of the received ciphertext report, and when it is determined that the received ciphertext report is valid, batch verify the signature in the received ciphertext report, and when it is verified that the signature in the received ciphertext report is valid, aggregate the received ciphertexts to obtain aggregated ciphertext, generate the signature of the aggregated ciphertext according to the aggregated ciphertext, the obtained second timestamp, and the identifier of the target aggregation node, package the aggregated ciphertext, the signature of the aggregated ciphertext, the second timestamp, and the identifier of the target aggregation node, and send the packaged data to the control center; The control center is used to perform batch verification on the obtained signatures of the packaged data, and if the verification is passed, decrypt the aggregated ciphertext to obtain the aggregated plaintext.
9. The data aggregation system according to claim 8, characterized in that: The data to be encrypted is data obtained by preprocessing the original data, wherein the preprocessing includes: Map the original floating-point data into integers based on a linear function; The mapped integers are processed according to the remainder theorem to obtain the data to be encrypted.
10. The data aggregation system according to claim 8, characterized in that: The data aggregation system also includes a blockchain; The target aggregation node is further configured to generate a transaction including an aggregation ciphertext, an identifier of the target aggregation node, and the first timestamp, create a new block, record the transaction in the new block, and broadcast the new block within the target interval; The target sensors are further used to verify the corresponding data and broadcast the verification results; When at least a preset number of verification results indicating that the verification is correct are obtained, the blockchain determines that the new block is a valid block and adds the new block to the blockchain.
Citation Information
Patent Citations
Key management system and data verification system of blockchain sensor
CN111769938A
Message forwarding method and device based on block chain network, and transaction processing method
CN114448730A