Background
Since the sensor nodes are very limited in energy, calculation and storage capacity, especially are powered by batteries, and are difficult to replace, saving energy consumption and prolonging the service life of the network are important challenges for wireless sensor network research. Because the energy consumption for transmitting 1bit data is far higher than that of 1 instruction, the key point is to reduce the communication traffic to save the energy consumption, and the data aggregation technology is one of the main technologies for reducing the communication traffic of the wireless sensor network. Meanwhile, the wireless sensor network is generally deployed in the field and transmits data in a multi-hop and wireless manner, so that the network faces serious security problems, and the privacy of sensing data cannot be sacrificed while the communication traffic is reduced by a data aggregation technology.
At present, a data aggregation method based on privacy protection in an existing wireless sensor network mainly focuses on snapshot data aggregation, and in a real application scenario, a user may need to obtain a series of continuous data aggregation results for analysis and application. The existing snapshot data aggregation method is continuously executed to obtain continuous data aggregation results, which is inefficient in terms of data privacy and energy consumption, and a targeted research on an application scenario of continuous data aggregation based on privacy protection in a wireless sensor network is needed.
In addition, the existing privacy-preserving data aggregation method generally guarantees the privacy of data through an encryption technology, so that a large number of encryption and decryption operations are required in the data aggregation process, thereby causing serious delay and operation energy consumption. One solution proposed at present is to share a random number between a Sink node and all sensor nodes, and avoid encryption and decryption operations in an aggregation process by adding the random number to sensing data, because in a data aggregation process, there may be some nodes that do not complete data transmission, and the Sink node is difficult to track to these nodes, a final aggregation result may generate a large deviation due to subtraction of an additional random number, and the method is a snapshot data aggregation.
Disclosure of Invention
In order to overcome the defects of the existing method, the invention provides a privacy protection-oriented continuous data aggregation method in a sensor network, and the method can continuously obtain an accurate data aggregation result on the basis of ensuring the privacy of node sensing data. Meanwhile, the method can effectively reduce the data transmission amount by using the time correlation of the sensing data, and avoids the encryption and decryption operation required in the data gathering process by constructing the shared secret random number between the neighbor nodes and carrying out the fragment recombination operation on the leaf node data, so that the communication energy consumption and the operation energy consumption are lower, the life cycle of the network is prolonged, and the method has better network expansibility.
In order to solve the technical problems, the invention adopts the technical scheme that: a continuous data gathering method facing privacy protection in a wireless sensor network reduces data transmission quantity by using time correlation of sensing data, and reduces encryption and decryption operations in a data gathering process by constructing shared secret random numbers between neighbor nodes and carrying out fragment recombination operation on leaf node data. The method comprises the following steps: an initialization stage: carrying out key pre-distribution on each sensor node, constructing a shared secret random number between adjacent nodes, and establishing a safe link node list; a network topology structure construction stage: the wireless sensor network is constructed into a tree-shaped topological structure, the tree-shaped topological structure is that a focusing tree comprises a Sink node, a middle node and leaf nodes, wherein the Sink node is a root node, and a father node and a son node have shared secret random numbers. Perception data slicing and recombining stage: determining whether the current sensing data is subjected to slicing operation and transmission by setting a threshold delta, when the variation of the sensing data value exceeds the threshold delta, the leaf nodes need to slice and transmit the sensing data, otherwise, the sensing data is not processed; and the node recombines the received fragment data and transmits the recombined result to the father node. Successive data aggregation stages: after receiving the child node recombination value/aggregation value, the intermediate node performs aggregation operation on the perception data including the intermediate node, transmits the operation result to the father node until the Sink node obtains a final aggregation result, completes data aggregation once at each time step, and continuously executes the data aggregation, so that the Sink node continuously obtains the final aggregation result.
Further, in the initialization phase, the method for constructing the shared secret random number between the neighbor nodes comprises the following steps:
step 1.1, two neighbor nodes ni and nj determine whether at least one shared secret key exists through mutual information, if so, the following steps are executed; step 1.2 node niGenerating a random number rijBy means of a shared key pair rijEncrypted and transmitted to node nj(ii) a Step 1.3 node njDecrypting the ciphertext by using the shared secret key to obtain the random number rij,rijI.e. a secret random number shared by two neighboring nodes.
Further, the network topology construction phase comprises the following steps:
step 2.1, the Sink node sends a broadcast message 'Child' and a hop count hop value 0 to a neighbor node; step 2.2 node niReceiving node njSent message 'Child' and hop value hjThen, if node niWithout a parent node and with a shared secret random number between the two nodes, node niNode njSet as the parent node, set hi=hj+1, and to node njSending a 'Parent' message; step 2.3 determining node n of the parent nodeiAnd continuing to send 'Child' messages outwards until the nodes in the whole network have father nodes, and finishing the construction of the aggregation tree.
Further, the perceptual data slicing and recombining stage comprises the following steps: step 3.1 leaf node niAt time step tkObtaining perception data, performing difference operation on the perception data and a base number value, and executing a step 3.2 when an absolute value of a difference value is within a threshold value delta range, or executing a step 3.4; step 3.2, the leaf node does not process the sensing data and broadcasts a mark signal to the neighbor node; step 3.3 neighbor node receives leaf node niBroadcast the flag signal, then consider node niAt time step tkSensing the data within the threshold range, and receiving the node n most recentlyiThe slice value is taken as the current slice value and then is recombined, and the step 3.6 is executed; 3.4, the leaf node slices the sensing data and transmits the sliced data to a neighbor node with a secret random number; step 3.5, the node receives the slice data and carries out recombination operation on the received slice data and the reserved slice data; and 3.6, uploading the recombination result to the father node by the node.
Further, the step 3.4 and the step 3.5 are realized by the following steps: step a, randomly cutting data into J pieces of data, adding secret random number and transmitting to neighbor nodes of a secure link, wherein leaf nodes n
iTransmitting slice data to neighbor node n
jI.e. by
Wherein r is
ijSharing a secret random number for two nodes, R ═ R
dN is the aggregation result range, R
dFor the perceptual data range, N is the number of nodes,
slicing data for nodes at a first time step
j(ii) a Step b, waiting for delta t time to ensure that the slice data is received by the neighbor node; step c, each node n
iIf a leaf node n is received
jThe slice data is recombined and node n is set
jSlice base number of
Further, at a first time step t
1Leaf node n
iPerceiving data
Setting a base value
At time step t
kEach leaf node n
iPerceiving data
If it is not
Then set the base value
Further, the continuous data aggregation phase comprises the steps of: step 4.1, the leaf node transmits the recombination value to the father node;
step 4.2, after receiving all the data/aggregation results of the child nodes, the intermediate node performs aggregation operation on the data and transmits the aggregation results to the father node; 4.3, the intermediate nodes transmit the aggregation results upwards layer by layer along the aggregation tree, and finally reach the Sink node, and the Sink node obtains the final aggregation result of the current time step; and 4.4, after completing one round of data aggregation, if an aggregation result needs to be continuously obtained, performing the next round of data aggregation, otherwise, ending the method.
The method has the advantages that 1) the method utilizes the characteristic that the sensing data has time correlation to filter the sensing data, effectively reduces data communication traffic and saves communication energy consumption under the condition of ensuring the accuracy of an aggregation result, N is set as the total number of nodes, the proportion occupied by leaf nodes is α, only when the difference value of the sensing data and the base number exceeds a threshold value delta, the nodes slice and transmit the sensing data, otherwise, a non-transmission data flag signal (1bit) is broadcasted to a neighbor node, the probability that the sensing number changes within the range of the threshold value delta is set as β, the digits of the transmission data are all bits of the transmission data
The traffic for continuously performing the gamma data aggregation is
The energy consumption of the node for transmitting and receiving the 1bit is e respectivelyTAnd eRThe method in generalEnergy consumption of communication is
2) By setting the shared secret random number, the neighbor node does not need to encrypt and decrypt data in the data transmission process under the condition of ensuring the privacy of the perception data, so that the calculation energy consumption is saved;
3) the leaf nodes slice the sensing data, so that the sensing data can be prevented from eavesdropping attack and internal attack, and the method has higher data privacy;
4) the invention has better network expansibility because the common information is deployed in advance among the sensor nodes.
Detailed Description
The following description of the embodiments with reference to the drawings is provided to describe the embodiments of the present invention, and the embodiments of the present invention, such as the shapes and configurations of the components, the mutual positions and connection relationships of the components, the functions and working principles of the components, the manufacturing processes and the operation and use methods, etc., will be further described in detail to help those skilled in the art to more completely, accurately and deeply understand the inventive concept and technical solutions of the present invention.
The method and the device realize the filtration of the perception data based on the time correlation of the perception data, and effectively reduce the data transmission amount under the condition of ensuring the accuracy of the gathering result; by using the shared secret random number and the slicing technology, the eavesdropping attack prevention is realized by adding the secret random number into the data, and the internal attack can be prevented by the slicing technology. As shown in fig. 2, the continuous data aggregation method includes an initialization phase, a network topology construction phase, a slicing and restructuring phase, and continuous data aggregation.
An initialization stage: the method comprises the following steps of pre-distributing keys to sensor nodes, constructing shared secret random numbers between neighbor nodes with the same key, generating a safe link node list by each node, and maintaining information such as physical positions of the nodes in the list, wherein the method mainly comprises the following steps:
step 1.1, the management system generates a large key pool with K keys;
step 1.2 Each sensor node niRandomly extracting k keys from a large key pool;
step 1.3 Each node niWith its neighbor node njMutual information determination whether to have at least one identical key kijIf yes, executing step 1.4, otherwise, not executing;
step 1.4 node niGenerating a random number rijBy means of a secret key kijFor random number rijEncrypted and transmitted to a neighbor node nj;
Step 1.5 node njBy means of a secret key kijDecrypting the ciphertext to obtain the random number rijAnd r isij=rji;
Step 1.6 node niNode njAdd to secure Link node List SiIn the same way, node njNode niAdd to secure Link node List SjPerforming the following steps;
a network topology structure construction stage: the wireless sensor network constructs an aggregation tree, wherein a Sink node is a root node, and the construction process comprises the following steps:
step 2.1, the Sink node sends a broadcast message 'Child' and a hop count hop value 0 to a neighbor node;
step 2.2 sectionPoint niReceiving node njSent message 'Child' and hop value hjThen, if node niWithout a parent node and with a shared secret random number between the two nodes, node niNode njSet as the parent node, set hi=hj+1, and to node njSending a 'Parent' message;
step 2.3 determining node h of the parent nodeiAnd continuing to send 'Child' messages outwards until the nodes in the whole network have father nodes, and finishing the construction of the aggregation tree.
Slicing and recombining: the method comprises the steps of filtering transmitted data by utilizing the time correlation of sensing data to reduce the data transmission quantity, ensuring the security of the sensing data by sharing a secret random number and a slicing technology, setting a threshold delta according to the time correlation of the data, namely the characteristic that the variation of the sensing data is small in the similar time, and slicing and transmitting the sensing data only when the difference value between the sensing data and a base value exceeds the threshold delta, so that the transmission quantity can be effectively reduced.
As shown in fig. 3, the main implementation processes of this stage are:
step 3.1, setting a threshold value delta to determine whether the sensing data needs to be transmitted in a slicing mode, and setting a waiting time delta t to ensure that all slicing data are received;
step 3.2 at the 1 st time step t1Each node niThe following work is completed:
(a) leaf node n
iPerceiving data
Setting a base value
(b) For data d
iAnd randomly cutting the data into J pieces of data, adding a secret random number and transmitting the secret random number to the neighbor node of the secure link. Example (b)E.g. leaf node n
iTransmitting slice data to neighbor node n
jI.e. by
r
ijSharing a secret random number for two nodes, R ═ R
dN is the aggregation result range, where R
dFor the perceptual data range, N is the number of nodes;
(c) waiting for delta t time to ensure that the slice data is received by the neighbor node;
(d) each node n
iIf a leaf node n is received
jThe slice data is recombined and node n is set
jSlice base number of
Step 3.3 complete a cycle at each time step, at time step tkNode niThe following work is completed:
(a) each leaf node n
iPerceiving data
If it is not
Then set the base value
And performing slicing operation and transmission, otherwise, node n
iBroadcasting flag information (sensing data within a threshold value delta) to neighbor nodes;
(b) wait for delta t time
(c) Each node niIf a leaf node n is receivedjPerforming the step (d) if the number of slices is less than the number of slices, and performing the step (e) if the flag information is received;
(d) node n
iFor slice data
Performing a reconfiguration operation and reconfiguring the node n
jSlice base number of
(e) The marking information indicates the leaf node n
jThe difference value of the sensing data and the base number is within a threshold value range, and the node n
iFor slice data
Carrying out a recombination operation in which
Is a node n
jThe slice number base value of (a);
step 3.4 node niObtaining a recombination result, if data aggregation is continuously executed, the time step is tk+1And returns to perform step 3.3, otherwise the operation ends.
Continuous data aggregation: the nodes continuously transmit data upwards along the aggregation number, the Sink node continuously obtains a final aggregation result, data aggregation is completed once in each time step, and each data aggregation mainly comprises the following execution processes:
step 4.1 leaf node niThe recombination value viTo the parent node njI.e. ni→nj:vi+rijMOD r;
Step 4.2 intermediate node niAfter all the child node recombined data are received, the data are aggregated, and the aggregation result is transmitted to the father node njFIG. 5 shows a schematic diagram of the node n in FIG. 12Instances of data aggregation are performed;
and 4.3, transmitting the aggregation result upwards by the intermediate nodes layer by layer along the aggregation tree, and finally reaching the Sink node, wherein the Sink node obtains the final aggregation result of the current time step.
The invention has been described above with reference to the accompanying drawings, it is obvious that the invention is not limited to the specific implementation in the above-described manner, and it is within the scope of the invention to apply the inventive concept and solution to other applications without substantial modification. The protection scope of the present invention shall be subject to the protection scope defined by the claims.