CN113286296A - Data processing method and device of wireless sensor network and computer equipment - Google Patents

Data processing method and device of wireless sensor network and computer equipment Download PDF

Info

Publication number
CN113286296A
CN113286296A CN202110565408.3A CN202110565408A CN113286296A CN 113286296 A CN113286296 A CN 113286296A CN 202110565408 A CN202110565408 A CN 202110565408A CN 113286296 A CN113286296 A CN 113286296A
Authority
CN
China
Prior art keywords
data
data set
processing
candidate
sensing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110565408.3A
Other languages
Chinese (zh)
Other versions
CN113286296B (en
Inventor
张琦
王莉
张少凡
刘璇
姜臻
陈煜敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN202110565408.3A priority Critical patent/CN113286296B/en
Publication of CN113286296A publication Critical patent/CN113286296A/en
Application granted granted Critical
Publication of CN113286296B publication Critical patent/CN113286296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a data processing method and device of a wireless sensor network, computer equipment and a storage medium. The method comprises the following steps: acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node; verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by the processing node; under the condition that the data signature is verified to be effective, dividing and clustering the sensing data to obtain a plurality of candidate data sets; sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets to fuse the plurality of candidate data sets to form a target data set; encrypting the target data set by using the encryption key generated and distributed by the processing node to obtain an encrypted data set; the encrypted data set is uploaded to a processing node. By adopting the method, the communication efficiency can be improved, and the data privacy safety can be guaranteed.

Description

Data processing method and device of wireless sensor network and computer equipment
Technical Field
The present application relates to the field of wireless sensor networks, and in particular, to a data processing method and apparatus for a wireless sensor network, and a computer device.
Background
With the rapid development of computers and mobile intelligent devices, Wireless Sensor Networks (WSN) technology has been rapidly developed. In a wireless sensor network, hundreds or thousands of wireless sensor devices collectively monitor an area, commonly referred to as an end node. The terminal nodes sense the real-time data and transmit the sensed data to the control center so that the control center can make comprehensive decisions.
However, the terminal node needs to consume a huge energy cost for transmitting a large amount of sensing data, and is accompanied by a huge communication delay, so how to reduce the network energy consumption in the data transmission process and avoid the communication delay is a problem that needs to be solved at present.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data processing method, an apparatus, a computer device, and a storage medium for a wireless sensor network, which can reduce transmission power consumption and avoid communication delay.
A data processing method of a wireless sensor network, the method comprising:
acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by a processing node;
under the condition that the data signature is verified to be effective, carrying out partition clustering processing on the sensing data to obtain a plurality of candidate data sets;
sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets so as to fuse the plurality of candidate data sets to form a target data set;
and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
In one embodiment, the method further comprises:
encrypting the target data set by using an encryption key generated and distributed by a processing node to obtain an encrypted data set;
uploading the target data set to the processing node, wherein the uploaded target data set is used for instructing the processing node to perform corresponding data processing, and the method comprises the following steps:
and uploading the encrypted data set to the processing node, wherein the uploaded encrypted data set is used for instructing the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and performing corresponding data processing based on a target data set obtained after decryption.
In one embodiment, the sensing data is obtained by the terminal node signing according to a signing key generated and distributed by a processing node; wherein the verification key matches the signing key.
In one embodiment, the performing the partition clustering process on the sensing data to obtain a plurality of candidate data sets includes:
randomly dividing a plurality of initial data sets in a data space formed by the perception data, wherein each initial data set has an initial centroid;
for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of initial data sets or discarding the perception data according to the distance values;
after all the perception data are classified or abandoned, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set;
according to the new centroid, returning to the step of calculating the distance between the sensing data and each initial centroid for each sensing data respectively to obtain a plurality of distance values, and repeating iteration until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process;
and taking a plurality of initial data sets corresponding to the centroids after the iteration is finished as candidate data sets.
In one embodiment, the sequentially performing hierarchical clustering on the plurality of candidate data sets to fuse the plurality of candidate data sets into one target data set includes:
sequentially calculating the distance between every two candidate data sets, and forming an intermediate data set combination by the two minimum candidate data sets according to the distance to obtain at least one intermediate data set;
for each candidate data set which does not form an intermediate data set, sequentially calculating the distance between each candidate data set and the intermediate data set, and combining the candidate data set with the minimum distance from the intermediate data set with the intermediate data set to form a new intermediate data set;
for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set;
and for the new intermediate data set, returning the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set and continuing to execute the step until all the candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
In one embodiment, the verifying the validity of the data signature carried by the sensing data with the verifying key generated and distributed by the processing node includes:
performing exponentiation operation on the data signature by using the first verification parameter, and performing modular operation on the exponentiation of the data signature by using the second verification parameter to obtain estimated sensing data;
and carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
A data processing apparatus of a wireless sensor network, the apparatus comprising:
the acquisition module is used for acquiring the perception data respectively acquired by the plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
the processing module is used for verifying the validity of the data signature carried by the sensing data by using a verification key generated and distributed by the processing node;
the processing module is further configured to perform partition clustering processing on the sensing data to obtain a plurality of candidate data sets under the condition that the data signature is verified to be valid;
the processing module is further configured to sequentially perform hierarchical clustering processing on the plurality of candidate data sets to fuse the plurality of candidate data sets to form a target data set;
and the uploading module is used for uploading the target data set to the processing node, and the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by a processing node;
under the condition that the data signature is verified to be effective, carrying out partition clustering processing on the sensing data to obtain a plurality of candidate data sets;
sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets so as to fuse the plurality of candidate data sets to form a target data set;
and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by a processing node;
under the condition that the data signature is verified to be effective, carrying out partition clustering processing on the sensing data to obtain a plurality of candidate data sets;
sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets so as to fuse the plurality of candidate data sets to form a target data set;
and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
According to the data processing method, the data processing device, the computer equipment and the storage medium of the wireless sensor network, the sensing data acquired by the plurality of terminal nodes are divided and clustered, the original sensing data are fused into a plurality of candidate data sets, and irrelevant data are screened out, so that unnecessary network resources are prevented from being consumed in the transmission process due to overlarge data; the multiple candidate data sets are hierarchically clustered, so that the perception data are further fused, the energy consumption in the network transmission process can be greatly reduced, huge network delay is avoided, and the transmission efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a data processing method of a wireless sensor network in one embodiment;
FIG. 2 is a flow chart illustrating a data processing method of a wireless sensor network according to an embodiment;
fig. 3 is a schematic flowchart illustrating a step of verifying validity of a data signature carried by the sensing data by using a verification key generated and distributed by a processing node in an embodiment;
FIG. 4 is a schematic flow chart illustrating a step of performing partition and clustering processing on the sensing data to obtain a plurality of candidate data sets according to an embodiment;
FIG. 5 is a schematic flow chart illustrating a process of sequentially performing hierarchical clustering on the candidate data sets to fuse the candidate data sets into a target data set according to an embodiment;
FIG. 6 is a flow chart illustrating a data processing method of a wireless sensor network according to another embodiment;
FIG. 7 is a flowchart illustrating steps of an embodiment of an encryption process performed on the target data set by using an encryption key generated and distributed by a processing node;
FIG. 8 is a block diagram showing a data processing apparatus of a wireless sensor network according to an embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data processing method of the wireless sensor network provided by the application can be applied to the application environment shown in fig. 1. The terminal node D collects data in the monitoring environment and sends the data to the aggregation node A. The aggregation node A receives the data from the terminal node D, carries out aggregation and encryption processing, and forwards the processed data to the processing node BS through the network. The terminal nodes can be but are not limited to various sensors, notebook computers, smart phones, tablet computers, portable wearable devices, GPS devices, environment measuring devices and the like. The aggregation node a is a device having a data processing function, a communication transmission function and a certain computing capability, and may be, but is not limited to, an embedded device, a gateway, an intelligent route, and the like. Aggregation node a may also be illustratively a terminal node with a large amount of remaining energy. Wherein, the larger residual energy means that the residual capacity is sufficient. Since the terminal nodes are usually deployed in an unattended environment and powered by energy sources such as batteries, when the remaining electric quantity of the terminal nodes is large, the terminal nodes can be dynamically selected as aggregation nodes. In some embodiments, the aggregation node a is connected with at least three child nodes, i.e. one aggregation node a collects data of at least 3 end nodes D or 3 aggregation nodes a. The processing node BS is, for example, a base station, a server, or the like, and may be, for example, an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a data processing method of a wireless sensor network is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step S202, obtaining perception data respectively collected by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node.
The sensing data refers to data in the environment obtained by the terminal node through collection and monitoring, such as sound, light, heat, pressure and the like obtained by various sensors, hydrology, weather and the like obtained by environment measurement equipment, voltage, current and the like of a power transmission and distribution line obtained by detection equipment arranged in a power grid.
The data signature is similar to a physical signature and is used for verifying the authenticity and integrity of the received sensing data by the aggregation node. In some embodiments, the sensing data is obtained by the terminal node signing according to the signing key generated and distributed by the processing node; wherein the verification key matches the signing key. Specifically, before sending the sensing data, the terminal node signs the sensing data by using the signing key, and sends the signed sensing data and the data signature to the aggregation node together.
In some embodiments, the signing key and the verification key are a matching pair of keys derived by the processing node using an encryption algorithm. Specifically, the processing node randomly obtains a key pair for data signing and verification by using an encryption algorithm, and distributes a key for data signing (i.e., a signing key) in the key pair to each terminal node and distributes a key for data verification (i.e., a verification key) in the key pair to each aggregation node by a data transmission method such as broadcasting. The encryption algorithm is an asymmetric encryption algorithm, and the sensing data is encrypted and decrypted through a pair of secret keys, so that the security of the sensing data in data transmission is greatly improved. The asymmetric encryption algorithm includes, but is not limited to, one or more of RSA algorithm, Elgamal algorithm, knapsack algorithm, Rabin algorithm, D-H algorithm, ECC (elliptic curve encryption algorithm), and the like.
Illustratively, the processing node randomly selects two unequal prime numbers p and q using the RSA algorithm. The key obtained by the RSA algorithm is 1024 bits or 2048 bits generally, and the security of the data can be greatly enhanced. The prime numbers p and q have the values as large as possible, the difference between the prime numbers p and q is as large as possible, and both of the prime numbers p and q are strong prime numbers. Obtaining Euler function by using prime numbers p and q
Figure BDA0003080523460000071
Figure BDA0003080523460000072
And the processing node randomly selects an integer e, wherein the integer needs to meet the following conditions:
Figure BDA0003080523460000073
and e and
Figure BDA0003080523460000074
coprime, namely:
Figure BDA0003080523460000075
wherein, gcd (×) refers to e and
Figure BDA0003080523460000076
the greatest common divisor of (c).
Then, the processing node calculates e for
Figure BDA0003080523460000077
Modulo element d. The modular reverse element means that can make the quilt
Figure BDA0003080523460000078
The remainder of the division is an integer d of 1, i.e.:
Figure BDA0003080523460000079
thereby, signature parameters n, d for signature and verification parameters n, e for verification can be obtained. For convenience of distinction and explanation, n in the signature parameters is referred to as a first signature parameter, and d is referred to as a second signature parameter; e of the authentication parameters is referred to as a first authentication parameter, and n is referred to as a second authentication parameter. It should be understood that N in the first signature parameter and the second verification parameter may be the same value, and N in the first signature parameter and the second verification parameter may be N, i.e., N ∈ { N }1,n2,…,niWhere i ═ 1,2, …, N.
It will be understood by those skilled in the art that the above terms "first" and "second" are used in this application to describe different parameters, but these parameters should not be limited by these terms. These terms are only used to distinguish one parameter from another. For example, a first signature parameter may be referred to as a second signature parameter, and similarly, a second signature parameter may be referred to as a first signature parameter, without departing from the scope of the various described embodiments, but they are not the same signature parameter unless the context clearly dictates otherwise. Similar situations also include a first authentication parameter and a second authentication parameter, a first encryption parameter and a second encryption parameter, a first decryption parameter and a second decryption parameter, etc.
The processing node encapsulates the first authentication parameter n and the second authentication parameter e into an authentication key (n, e) and distributes the authentication key (n, e) to each aggregation node; the first signature parameter n and the second signature parameter d are encapsulated into a signature key (n, d) and the signature key (n, d) is distributed to each terminal node.
It will be appreciated by those skilled in the art that cryptographic algorithms can also be used for data signing, and the process of data signing and verification is: the end node signs with one of the keys in the key pair (i.e., the signing key) and the aggregation node verifies with the other key in the key pair (i.e., the verification key).
Illustratively, the end node signs the perception data by using the signature key (n, d) generated and distributed by the processing node, and may utilize, for example, the following formula:
SIGM=Mdmod n (4)
where SIGM denotes the data signature on the perceptual data M and mod denotes the modulo operation.
The terminal node sends the digital signature and the signed sensing data to the aggregation node, and the aggregation node verifies the sensing data by receiving the digital signature and the signed sensing data, so that the integrity of the sensing data is determined, and the data integrity of the sensing data in the data transmission process can be guaranteed.
Specifically, the aggregation node receives a plurality of sensing data and data signatures corresponding to the sensing data, which are respectively sent by a plurality of terminal nodes connected to the aggregation node, so as to execute step S202.
And step S204, verifying the validity of the data signature carried by the sensing data by using the verification key generated and distributed by the processing node.
Specifically, after receiving a verification key generated and distributed by a processing node, an aggregation node stores the verification key; and when the aggregation node receives the sensing data which is sent by the terminal node and carries the data signature, verifying the validity of the data signature by using the stored verification key, thereby verifying the integrity of the sensing data. If the data signature corresponding to the sensing data is verified to be invalid, discarding the sensing data, and sending an instruction to enable the corresponding terminal node to resend the sensing data; and if the data signature corresponding to the sensing data is verified to be valid, continuing to execute the subsequent processing steps.
In some embodiments, as shown in fig. 3, the verifying validity of the data signature carried by the sensing data by the aggregation node using the verification key generated and distributed by the processing node includes:
and step S302, performing exponentiation operation on the data signature by using the first verification parameter, and performing modular operation on the exponentiation of the data signature by using the second verification parameter to obtain the estimated sensing data.
Specifically, after receiving the verification key (n, e) generated and distributed by the processing node, the aggregation node performs an exponentiation operation on the data signature by using the first verification parameter e in the verification key (n, e), that is, calculates the power SIGM of the data signature SIGMeAnd using the power of the second verification parameter n to the data signature SIGMeAnd performing modulus operation to obtain estimated sensing data M' obtained through calculation. Namely:
M′=SIGMemod n (5)
and step S304, carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
Specifically, the aggregation node performs consistency matching on the estimated sensing data M 'obtained through calculation and the received real sensing data M, if M' is equal to M, matching is successful, and the data signature SIGM is proved to be an effective signature of the sensing data M, that is, the data signature SIGM corresponding to the sensing data is determined to be effective.
And step S206, under the condition that the data signature is verified to be effective, the sensing data is subjected to partition clustering processing to obtain a plurality of candidate data sets.
In an actual scene, the data volume of the sensing data collected by the terminal node is large and various, and for different processing tasks, it is likely that part of the data is irrelevant, for example, when a prediction task for a power load is executed in the field of a power distribution network, the required sensing data is power consumption, and the power selling amount is irrelevant and meaningless, which may cause unnecessary power consumption and affect the accuracy of the result of the prediction task. Also, processing all the data collected by each end node consumes a lot of energy and time. Therefore, in order to eliminate unnecessary sensing data, influence of irrelevant sensing data on accuracy of subsequent data processing is reduced, network resources occupied by the data in a communication transmission process are reduced, transmission efficiency is improved, and under the condition that a data signature is verified to be effective, clustering processing is continuously carried out on the sensing data by the aggregation node, so that the irrelevant data is eliminated.
The partition clustering processing refers to the distance-based clustering processing of the sensing data, and includes but is not limited to k-means clustering, clarans clustering and the like.
Specifically, under the condition that the data signature sent by the terminal node is verified to be valid, the aggregation node performs partition clustering processing on corresponding sensing data to obtain a plurality of candidate data sets.
In some embodiments, as shown in fig. 4, the performing, by the aggregation node, partition and clustering on the sensing data to obtain a plurality of candidate data sets includes:
step S402, in a data space formed by perception data, a plurality of initial data sets are randomly divided, and each initial data set has an initial centroid.
Wherein, the data space refers to a vector space formed by a plurality of sensing data distributed therein. Specifically, the aggregation node divides the data space to obtain a plurality of regions as initial partitions. Wherein each initial partition includes at least one sensing data divided therein. Each initial partition has a region center as an initial centroid, each initial centroid corresponding to an initial data set. Illustratively, the aggregation node specifies a cluster number k and randomly chooses k objects from the data space composed of all perceptual data as initial centroids.
Step S404, for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of the initial data sets or discarding the perception data according to the plurality of distance values.
Specifically, the aggregation node calculates a distance between each sensing data and each initial centroid, a plurality of distance values between each sensing data and each initial centroid, and allocates each sensing data to a data set corresponding to the initial centroid with the smallest distance value, that is, allocates the sensing data closest to the initial centroid distance to the data set corresponding to the initial centroid.
Wherein the distance calculated by the aggregation node includes, but is not limited to, one or more of an euclidean distance, a minkowski distance, a manhattan distance, a chebyshev distance, and the like. For the sensing data collected by the mth terminal node, the aggregation node may calculate the distance using, for example, the following formula:
Figure BDA0003080523460000101
wherein S ismRepresenting the sensing data collected by the mth terminal node; c. CiRepresenting an initial centroid, wherein ci={c1,c2,…,ckAnd k represents the number of randomly selected initial centroids.
If the distance between the sensing data obtained by calculation of the aggregation node and each initial centroid is far and exceeds a preset threshold value, the sensing data is probably irrelevant data, and the aggregation node discards the sensing data.
Step S406, after all the perception data are classified or discarded, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set.
The center of gravity of a data set refers to an average distance center of the data set, that is, an average value of a plurality of distances from a centroid of each perception data.
Specifically, after the aggregation node completes classification (or rejection) of all the sensing data in the calculation process, the aggregation node calculates the gravity center of each classified initial data set, and takes the gravity center as a new mass center of the corresponding initial data set.
And step S408, returning to the step of calculating the distance between the sensing data and each initial centroid respectively for each sensing data according to the new centroid, and continuously executing the step of obtaining a plurality of distance values, and repeatedly iterating until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process.
Specifically, after the aggregation node uses the center of gravity as a new center of gravity of the corresponding initial data set, the aggregation node returns to step S404 to continue executing the above steps, and the above steps are iterated repeatedly until the obtained center of gravity does not change any more, that is, the center of gravity obtained in the current calculation process is consistent with the center of gravity obtained in the previous calculation process. At this time, the aggregation node completes the partition clustering process on each sensing data.
Step S410, using a plurality of initial data sets corresponding to the centroids after the iteration is completed as candidate data sets.
Specifically, the aggregation node takes a plurality of initial data sets obtained after iteration is completed as candidate data sets, and each candidate data set corresponds to a respective centroid.
The sensing data are clustered by the aggregation node by using a partition clustering algorithm such as K-means, irrelevant sensing data can be eliminated, only meaningful sensing data are kept in the data transmission process, the influence of the irrelevant sensing data on the accuracy of subsequent data processing is avoided, and the transmission efficiency is improved.
And step S208, sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets so as to fuse the plurality of candidate data sets to form a target data set.
In order to further reduce network resources occupied in the data transmission process, avoid communication delay, improve transmission efficiency, and prevent data from being lost in the transmission process, the aggregation node may further aggregate the obtained multiple data sets.
The hierarchical clustering process is to aggregate a plurality of data sets into one data set from bottom to top according to the similarity between samples, such as an aggregate clustering algorithm.
Specifically, the aggregation node sequentially performs hierarchical clustering processing on the plurality of candidate data sets, and performs clustering layer by layer, so that the plurality of candidate data sets are finally fused to form a target data set.
In some embodiments, as shown in fig. 5, the sequentially performing hierarchical clustering processing on multiple candidate data sets by an aggregation node to fuse the multiple candidate data sets into one target data set includes:
step S502, respectively calculating the distance between every two candidate data sets, forming an intermediate data set combination by the two candidate data sets according to the distance, and obtaining at least one intermediate data set.
The distance between each two candidate data sets calculated by the aggregation node includes, but is not limited to, one or more of Single link, Complete link, Average link, and the like. Specifically, after the aggregation node obtains a plurality of candidate data sets, there is no intermediate data set at first, the aggregation node calculates the distance between every two candidate data sets to obtain a plurality of distance values, combines the two candidate data sets with close distances to form an intermediate data set, and traverses all the candidate data sets in sequence, so that the aggregation node obtains a plurality of intermediate data sets. For example, for a plurality of candidate data sets { a }, { b }, { c }, { d }, { e }, { f }, { g }, { h }, the aggregation node calculates the distance between each two candidate data sets in turn, and combines { a } and { f }, { b } and { c }, { d } and { e } into three intermediate data sets { a, f }, { b, c }, { d, e }, respectively, and the remaining two candidate data sets { g } and { h }.
Step S504, for each candidate data set which does not form the intermediate data set, respectively calculating the distance between each candidate data set and each intermediate data set, and combining the candidate data set with the minimum distance between the candidate data set and the intermediate data set with the corresponding intermediate data set to form a new intermediate data set;
specifically, after forming an intermediate data set, the aggregation node calculates the distance between each candidate data set and the intermediate data set in each of the remaining candidate data sets that do not form the intermediate data set, respectively, obtains a plurality of distance values, and combines the candidate data set corresponding to the minimum distance value with the intermediate data set to form a new intermediate data set. For example, for three intermediate data sets { a, f }, { b, c }, { d, e } and two candidate data sets { g } and { h } that do not form an intermediate data set, the aggregation node calculates the distance between the candidate data sets { g } and { h } and each intermediate data set, respectively, and combines the candidate data set { g } with the corresponding intermediate data set { d, e } to form a new intermediate data set { { d, e } }.
Illustratively, for the intermediate data set F formed by the initial combination, and all the candidate data sets G except the two candidate data sets constituting the intermediate data set F (G ═ { G ═ G-1,G2,…,GkWhere k is the number of candidate data sets obtained by partition and clustering processing), the aggregation node may be calculated by using, for example, the following formula:
Figure BDA0003080523460000121
where Gi represents the ith candidate data set, FjRepresenting the jth intermediate data set.
Step S506, for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set.
Specifically, the aggregation node calculates the distance between every two intermediate data sets in the obtained at least one intermediate data set, and combines the two intermediate data sets with the minimum distance to obtain a new intermediate data set. For example, for three intermediate data sets { a, f }, { b, c }, { { d, e }, { g } }, the aggregation node calculates the distances of the intermediate data sets { a, f } from the intermediate data sets { b, c }, the distances of the intermediate data sets { a, f } from the intermediate data sets { { d, e }, { g }, and the distances of the intermediate data sets { b, c } from the intermediate data sets { { d, e }, { g }, respectively, and combines the intermediate data sets { a, f } with the intermediate data sets { b, c } according to the respective distance values to form a new intermediate data set { { a, f }, { b, c } }. Thus, the aggregation node gets two sets of intermediate data { { a, f }, { b, c } } and { { d, e }, { g } }.
It should be noted that step S504 and step S506 do not have a necessary execution order, and the execution orders of the two steps may be exchanged or may be executed simultaneously.
And step S508, for the new intermediate data set, returning to the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set, and continuing to execute the step until all candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
Specifically, the aggregation node repeats the above steps to perform calculation according to the obtained at least one intermediate data set and possibly remaining candidate data sets that do not form intermediate data sets, so as to combine one candidate data set and one intermediate data set to obtain a new intermediate data set, or combine every two intermediate data sets to obtain a new intermediate data set. And until the final aggregation node completes the combination of all the intermediate data sets, obtaining a final intermediate data set, and taking the intermediate data set as a target data set. For example, for two intermediate data sets { { a, f }, { b, c } } and { { d, e }, { g } }, the aggregation node combines the two, and the final target data set is { { a, f }, { b, c } }, { { d, e }, { g } }.
The candidate data sets are subjected to data fusion, and a plurality of candidate data sets are fused to form a target data set, so that the data volume in the transmission process is greatly reduced, the communication delay is avoided, and the transmission efficiency is improved. Meanwhile, compared with the transmission of a plurality of candidate data sets, the transmission of one target data set can avoid the loss of data in the transmission process as much as possible, and the integrity of the data is guaranteed.
Step S210, uploading the target data set to the processing node, where the uploaded target data set is used to instruct the processing node to perform corresponding data processing.
Specifically, the aggregation node uploads the target data set subjected to data fusion so as to send the target data set to the processing node, and the processing node performs subsequent data processing. In some embodiments, the aggregation node may send the target data set directly to the processing node; in some cases, a communication link between the current aggregation node and the processing node is occupied, or communication delay exists due to network fluctuation, and the like, in order to improve transmission efficiency and avoid communication delay, the aggregation node may further forward the target data set to another aggregation node, and the another aggregation node sends the target data set to the processing node, thereby implementing dynamic uploading of data.
After the aggregation node uploads the target data set to the processing node, the processing node receives the target data set and performs corresponding data processing. The data processing includes, but is not limited to, mining, analyzing, training, and the like. For example, for the field of a power distribution network, a terminal node acquires sensing data such as power consumption and the like and sends the sensing data to an aggregation node, the aggregation node performs data fusion to obtain a target data set and then sends the target data set to a processing node, and the processing node receives the target data set and predicts a power load by using power consumption data in the target data set.
In the data processing method of the wireless sensor network, the sensing data acquired by a plurality of terminal nodes are divided and clustered, the original sensing data are fused into a plurality of candidate data sets, irrelevant data are screened out, only meaningful data are reserved, and the influence on the accuracy of subsequent processing is avoided; the method and the device have the advantages that the multiple candidate data sets are hierarchically clustered, so that the perception data are further fused, energy consumption in the network transmission process can be greatly reduced, unnecessary network resources are prevented from being consumed in the transmission process due to overlarge data, huge network delay is avoided, and transmission efficiency is improved.
In some embodiments, in order to ensure privacy and security of data, before the aggregation node transmits the data to the processing node, encryption processing may be performed to ensure that the processing node cannot directly access the terminal node and obtain the sensing data collected by the terminal node. Thus, in addition to generating and distributing a key pair for data signing and verification, a processing node also generates a key pair for encryption and decryption, the key pair comprising an encryption key and a decryption key. And after the processing node generates a key pair for encryption and decryption, the encryption key is distributed to each aggregation node in a broadcasting mode and the like so that the aggregation nodes can carry out encryption processing according to the encryption key, and meanwhile, the processing node stores the decryption key so that the decryption key can be used for decryption processing after encrypted data transmitted by the aggregation nodes are received subsequently.
As shown in fig. 6, the data processing method of the wireless sensor network further includes:
step S212, the encryption key generated and distributed by the processing node is used to encrypt the target data set, so as to obtain an encrypted data set.
Similarly, the processing node may generate the encryption key and the decryption key by using, for example, an RSA algorithm, for example, using equations (1) to (3), which will not be described herein. To enhance data privacy, each aggregation node may use a different second encryption parameter n2, i.e., n2 ∈ { n }1,n2,…,niWhere i ═ 1,2, …, N.
Since an asymmetric encryption algorithm is also used, the encryption key is also denoted as (n, e) and the decryption key is denoted as (n, d) for ease of understanding. The encryption key comprises a first encryption parameter e and a second encryption parameter n, and the decryption key comprises a first decryption parameter d and a second decryption parameter n. However, it should be noted that the key pair used for data signing and verification and the key pair used for encryption and decryption are different key pairs, and therefore, the values of n, e, and d are also different between the two key pairs.
Specifically, after receiving an encryption key generated and distributed by a processing node, an aggregation node stores the encryption key; and after the target data set is obtained, encryption processing is executed, so that the data security in the transmission process is ensured.
In some embodiments, as shown in fig. 7, the aggregation node performs encryption processing on the target data set by using the encryption key generated and distributed by the processing node, including:
step S702, performing exponentiation operation on each sensing data in the target data set by using a first encryption parameter;
step S704, randomly selecting one of the second encryption parameters from the at least one second encryption parameter, and performing a modular operation on the power of the perception data by using the selected second encryption parameter to obtain encrypted perception data;
step S706, using the data set formed by the encrypted sensing data as an encrypted data set.
Specifically, after receiving an encryption key generated and distributed by a processing node, an aggregation node calculates the power of each sensing data in a target data set by using a first verification parameter in the encryption key, and performs a modular operation on the power of the sensing data by using a second verification parameter to obtain encrypted sensing data, which is called as encrypted sensing data. Each encrypted sensing data constitutes an encrypted data set.
Illustratively, the aggregation node performs an exponentiation operation on each perception data M in the target data set by using a first encryption parameter e in the encryption key (n, e), i.e. calculates M to which the perception data M is exponentiatede. Meanwhile, the aggregation node randomly selects a second encryption parameter n from a plurality of second encryption parameters, and utilizes the second encryption parameter n to the power M of the perception data MeAnd performing modulus operation to obtain encrypted sensing data. Namely:
C=Memodn (7)
where C represents the encrypted perceptual data. Thus, the aggregation node encrypts each sensing data in the target data set to obtain a data set composed of a plurality of encrypted sensing data, namely an encrypted data set.
Correspondingly, the aggregating node uploads the target data set to the processing node, and the uploaded target data set is used to instruct the processing node to perform corresponding data processing, which may be:
and step S214, uploading the encrypted data set to the processing node, wherein the uploaded encrypted data set is used for instructing the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and performing corresponding data processing based on a target data set obtained after decryption.
Specifically, the aggregation node uploads the encrypted data set which is encrypted, so that the encrypted data set is sent to the processing node, and the processing node performs subsequent data processing. In some embodiments, the aggregation node may send the encrypted data set directly to the processing node; in some cases, when a communication link between the current aggregation node and the processing node is occupied or communication delay exists due to network fluctuation, in order to improve transmission efficiency and avoid communication delay, the aggregation node may further forward the encrypted data set to another aggregation node, and the another aggregation node then sends the encrypted data set to the processing node, thereby implementing dynamic uploading of data.
After the aggregation node uploads the encrypted data set to the processing node, the processing node receives the encrypted data set, decrypts the encrypted data set according to a decryption key matched with the encryption key, and performs corresponding data processing based on a target data set obtained after decryption. The data processing includes, but is not limited to, mining, analyzing, training, and the like. For example, for the field of power distribution networks, a terminal node acquires sensing data such as power consumption and the like and sends the sensing data to an aggregation node, the aggregation node performs data fusion and encryption processing to a processing node, and the processing node performs prediction on power load by using the power consumption data after decryption.
In some embodiments, the processing node decrypts the encrypted data set according to a decryption key matching the encryption key, further comprising: and performing exponentiation operation on each encrypted sensing data in the encrypted data set by using the first decryption parameter, and performing modular operation on the exponentiation of the encrypted sensing data by using the second decryption parameter to obtain decrypted sensing data.
Specifically, the processing node performs an exponentiation operation on each encrypted sensing data in the encrypted data set by using a first decryption parameter d in the decryption key (n, d), namely, an exponentiation C of each encrypted sensing data C in the encrypted data setdAnd using a second decryption parameter n to power C of the encrypted perceptual data CdAnd performing modulus operation to obtain decrypted sensing data M. Namely:
M=Cdmod n (8)
for more efficient data decryption, in some embodiments, the processing node may further decrypt the data using the Chinese remainder theorem, so as to transform the decryption operation into a manner of solving the equation set, i.e., the remainder n is transformed into the remainder p, q, and then the formula (8) may be transformed into the remainder p, q
Figure BDA0003080523460000171
Wherein M is1And M2Representing the decrypted perceptual data.
Therefore, after the terminal node collects the sensing data, the terminal node signs the sensing data and sends the data signature of the sensing data and the sensing data to the corresponding aggregation node; after receiving the sensing data, the aggregation node sequentially performs division clustering processing and hierarchical clustering processing on the sensing data, encrypts a target data set finally obtained by clustering to obtain an encrypted data set, and dynamically uploads the encrypted data set to the processing node; and the processing node performs decryption processing after receiving the encrypted data set so as to obtain original sensing data, and performs subsequent data processing work by using the original sensing data.
By receiving and storing the encryption key generated and distributed by the processing node and encrypting the target data set by using the encryption key, the privacy safety of the data in the transmission process is effectively guaranteed, and meanwhile, the processing node cannot directly access a single terminal node, and the data privacy is further guaranteed.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 8, there is provided a data processing apparatus of a wireless sensor network, including: an obtaining module 810, a processing module 830, and an uploading module 850, wherein:
an obtaining module 810, configured to obtain sensing data respectively collected by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node.
The processing module 830 is configured to verify the validity of the data signature carried by the sensing data by using the verification key generated and distributed by the processing node.
The processing module 830 is further configured to perform partition and clustering processing on the sensing data to obtain a plurality of candidate data sets under the condition that the data signature is verified to be valid.
The processing module 830 is further configured to perform hierarchical clustering on the multiple candidate data sets in sequence, so as to fuse the multiple candidate data sets to form a target data set.
And an uploading module 850, configured to upload the target data set to a processing node, where the uploaded target data set is used to instruct the processing node to perform corresponding data processing.
In some embodiments, the processing module 830 is further configured to perform an encryption process on the target data set by using the encryption key generated and distributed by the processing node, so as to obtain an encrypted data set.
In some embodiments, the upload module 850 is configured to upload the encrypted data set to the processing node, where the uploaded encrypted data set is used to instruct the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and perform corresponding data processing based on a target data set obtained after decryption.
In some embodiments, the terminal node is configured to perform signing according to the signing key generated and distributed by the processing node to obtain the sensing data carrying the data signature.
In some embodiments, the processing module 830 is further configured to randomly partition a plurality of initial data sets in a data space formed by the perceptual data, each initial data set having an initial centroid therein; for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of the initial data sets or discarding the perception data according to the plurality of distance values; after all the perception data are classified or abandoned, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set; according to the new centroid, returning to the step of calculating the distance between the sensing data and each initial centroid for each sensing data respectively to obtain a plurality of distance values, and repeating iteration until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process; and taking a plurality of initial data sets corresponding to the centroids after the iteration is finished as candidate data sets.
In some embodiments, the processing module 830 is further configured to calculate a distance between each two candidate data sets, and combine the two candidate data sets according to the distance to obtain at least one intermediate data set; for each candidate data set which does not form an intermediate data set, respectively calculating the distance between each candidate data set and each intermediate data set, and combining the candidate data set with the minimum distance from the intermediate data set with the corresponding intermediate data set to form a new intermediate data set; for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set; and for the new intermediate data set, returning the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set, and continuing to execute the steps until all the candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
In some embodiments, the processing module 830 is further configured to perform an exponentiation operation on the data signature with the first verification parameter, and perform a modulo operation on the exponentiation of the data signature with the second verification parameter, so as to obtain the estimated perceptual data; and carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
In some embodiments, the processing module 830 is further configured to perform an exponentiation operation on each sensing data in the target data set using the first encryption parameter; randomly selecting one of the second encryption parameters from the at least one second encryption parameter, and performing modular operation on the power of the perception data by using the selected second encryption parameter to obtain encrypted perception data; and taking a data set formed by the encrypted sensing data as an encrypted data set.
In some embodiments, the processing node is configured to perform an exponentiation operation on each encrypted sensing data in the encrypted data set by using the first decryption parameter, and perform a modulo operation on the exponentiation of the encrypted sensing data by using the second decryption parameter, so as to obtain decrypted sensing data.
For specific limitations of the data processing apparatus of the wireless sensor network, reference may be made to the above limitations of the data processing method of the wireless sensor network, and details are not repeated here. All or part of each module in the data processing device of the wireless sensor network can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In the data processing device of the wireless sensor network, the sensing data acquired by a plurality of terminal nodes are divided and clustered, the original sensing data are fused into a plurality of candidate data sets, irrelevant data are screened out, only meaningful data are reserved, and the influence on the accuracy of subsequent processing is avoided; the method and the device have the advantages that the multiple candidate data sets are hierarchically clustered, so that the perception data are further fused, energy consumption in the network transmission process can be greatly reduced, unnecessary network resources are prevented from being consumed in the transmission process due to overlarge data, and huge network delay is avoided. Meanwhile, the target data set uploaded to the processing node is encrypted, so that privacy and safety of the data in the transmission process are guaranteed, the processing node cannot directly access a single terminal node, and data privacy is further guaranteed.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing perception data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data processing method of a wireless sensor network.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node; verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by the processing node; under the condition that the data signature is verified to be effective, dividing and clustering the sensing data to obtain a plurality of candidate data sets; sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets to fuse the plurality of candidate data sets to form a target data set; and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
In one embodiment, the processor, when executing the computer program, further performs the steps of: encrypting the target data set by using the encryption key generated and distributed by the processing node to obtain an encrypted data set; and uploading the encrypted data set to a processing node, wherein the uploaded encrypted data set is used for indicating the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and performing corresponding data processing based on a target data set obtained after decryption.
In one embodiment, the processor, when executing the computer program, further performs the steps of: randomly dividing a plurality of initial data sets in a data space formed by perception data, wherein each initial data set has an initial centroid; for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of the initial data sets or discarding the perception data according to the plurality of distance values; after all the perception data are classified or abandoned, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set; according to the new centroid, returning to the step of calculating the distance between the sensing data and each initial centroid for each sensing data respectively to obtain a plurality of distance values, and repeating iteration until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process; and taking a plurality of initial data sets corresponding to the centroids after the iteration is finished as candidate data sets.
In one embodiment, the processor, when executing the computer program, further performs the steps of: respectively calculating the distance between every two candidate data sets, and combining the two candidate data sets according to the distance to obtain at least one intermediate data set; for each candidate data set which does not form an intermediate data set, respectively calculating the distance between each candidate data set and each intermediate data set, and combining the candidate data set with the minimum distance from the intermediate data set with the corresponding intermediate data set to form a new intermediate data set; for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set; and for the new intermediate data set, returning the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set, and continuing to execute the steps until all the candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
In one embodiment, the processor, when executing the computer program, further performs the steps of: performing exponentiation operation on the data signature by using the first verification parameter, and performing modular operation on the exponentiation of the data signature by using the second verification parameter to obtain estimated sensing data; and carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
In one embodiment, the processor, when executing the computer program, further performs the steps of: performing exponentiation operation on each perception data in the target data set by using the first encryption parameter; randomly selecting one of the second encryption parameters from the at least one second encryption parameter, and performing modular operation on the power of the perception data by using the selected second encryption parameter to obtain encrypted perception data; and taking a data set formed by the encrypted sensing data as an encrypted data set.
In the computer equipment, the sensing data acquired by a plurality of terminal nodes are divided and clustered, the original sensing data are fused into a plurality of candidate data sets, irrelevant data are screened out, only meaningful data are reserved, and the influence on the accuracy of subsequent processing is avoided; the method and the device have the advantages that the multiple candidate data sets are hierarchically clustered, so that the perception data are further fused, energy consumption in the network transmission process can be greatly reduced, unnecessary network resources are prevented from being consumed in the transmission process due to overlarge data, and huge network delay is avoided. Meanwhile, the target data set uploaded to the processing node is encrypted, so that privacy and safety of the data in the transmission process are guaranteed, the processing node cannot directly access a single terminal node, and data privacy is further guaranteed.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node; verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by the processing node; under the condition that the data signature is verified to be effective, dividing and clustering the sensing data to obtain a plurality of candidate data sets; sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets to fuse the plurality of candidate data sets to form a target data set; and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
In one embodiment, the computer program when executed by the processor further performs the steps of: encrypting the target data set by using the encryption key generated and distributed by the processing node to obtain an encrypted data set; and uploading the encrypted data set to a processing node, wherein the uploaded encrypted data set is used for indicating the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and performing corresponding data processing based on a target data set obtained after decryption.
In one embodiment, the computer program when executed by the processor further performs the steps of: randomly dividing a plurality of initial data sets in a data space formed by perception data, wherein each initial data set has an initial centroid; for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of the initial data sets or discarding the perception data according to the plurality of distance values; after all the perception data are classified or abandoned, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set; according to the new centroid, returning to the step of calculating the distance between the sensing data and each initial centroid for each sensing data respectively to obtain a plurality of distance values, and repeating iteration until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process; and taking a plurality of initial data sets corresponding to the centroids after the iteration is finished as candidate data sets.
In one embodiment, the computer program when executed by the processor further performs the steps of: respectively calculating the distance between every two candidate data sets, and combining the two candidate data sets according to the distance to obtain at least one intermediate data set; for each candidate data set which does not form an intermediate data set, respectively calculating the distance between each candidate data set and each intermediate data set, and combining the candidate data set with the minimum distance from the intermediate data set with the corresponding intermediate data set to form a new intermediate data set; for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set; and for the new intermediate data set, returning the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set, and continuing to execute the steps until all the candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
In one embodiment, the computer program when executed by the processor further performs the steps of: performing exponentiation operation on the data signature by using the first verification parameter, and performing modular operation on the exponentiation of the data signature by using the second verification parameter to obtain estimated sensing data; and carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
In one embodiment, the computer program when executed by the processor further performs the steps of: performing exponentiation operation on each perception data in the target data set by using the first encryption parameter; randomly selecting one of the second encryption parameters from the at least one second encryption parameter, and performing modular operation on the power of the perception data by using the selected second encryption parameter to obtain encrypted perception data; and taking a data set formed by the encrypted sensing data as an encrypted data set.
In the computer-readable storage medium, the sensing data acquired by a plurality of terminal nodes are divided and clustered, the original sensing data are fused into a plurality of candidate data sets, irrelevant data are screened out, only meaningful data are reserved, and the influence on the accuracy of subsequent processing is avoided; the method and the device have the advantages that the multiple candidate data sets are hierarchically clustered, so that the perception data are further fused, energy consumption in the network transmission process can be greatly reduced, unnecessary network resources are prevented from being consumed in the transmission process due to overlarge data, and huge network delay is avoided. Meanwhile, the target data set uploaded to the processing node is encrypted, so that privacy and safety of the data in the transmission process are guaranteed, the processing node cannot directly access a single terminal node, and data privacy is further guaranteed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A data processing method of a wireless sensor network is characterized by comprising the following steps:
acquiring sensing data respectively acquired by a plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
verifying the validity of a data signature carried by the sensing data by using a verification key generated and distributed by a processing node;
under the condition that the data signature is verified to be effective, carrying out partition clustering processing on the sensing data to obtain a plurality of candidate data sets;
sequentially carrying out hierarchical clustering processing on the plurality of candidate data sets so as to fuse the plurality of candidate data sets to form a target data set;
and uploading the target data set to the processing node, wherein the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
2. The method of claim 1, further comprising:
encrypting the target data set by using an encryption key generated and distributed by a processing node to obtain an encrypted data set;
uploading the target data set to the processing node, wherein the uploaded target data set is used for instructing the processing node to perform corresponding data processing, and the method comprises the following steps:
and uploading the encrypted data set to the processing node, wherein the uploaded encrypted data set is used for instructing the processing node to decrypt the encrypted data set according to a decryption key matched with the encryption key, and performing corresponding data processing based on a target data set obtained after decryption.
3. The method according to claim 1, characterized in that the perception data is signed by the terminal node according to a signing key generated and distributed by a processing node; wherein the verification key matches the signing key.
4. The method of claim 1, wherein the performing the partitional clustering on the perception data to obtain a plurality of candidate data sets comprises:
randomly dividing a plurality of initial data sets in a data space formed by the perception data, wherein each initial data set has an initial centroid;
for each perception data, respectively calculating the distance between the perception data and each initial centroid to obtain a plurality of distance values, and classifying the perception data into one of initial data sets or discarding the perception data according to the distance values;
after all the perception data are classified or abandoned, calculating the gravity center of each initial data set, and taking the gravity center as a new mass center of the corresponding initial data set;
according to the new centroid, returning to the step of calculating the distance between the sensing data and each initial centroid for each sensing data respectively to obtain a plurality of distance values, and repeating iteration until the centroid obtained in the current calculation process is consistent with the centroid obtained in the last calculation process;
and taking a plurality of initial data sets corresponding to the centroids after the iteration is finished as candidate data sets.
5. The method of claim 1, wherein said sequentially performing hierarchical clustering on said plurality of candidate data sets to fuse said plurality of candidate data sets into a target data set comprises:
respectively calculating the distance between every two candidate data sets, and combining the two candidate data sets according to the distance to obtain at least one intermediate data set;
for each candidate data set which does not form an intermediate data set, respectively calculating the distance between each candidate data set and each intermediate data set, and combining the candidate data set with the minimum distance from the intermediate data set with the corresponding intermediate data set to form a new intermediate data set;
for at least one intermediate data set, respectively calculating the distance between every two intermediate data sets, and combining the two intermediate data sets with the minimum distance to obtain a new intermediate data set;
and for the new intermediate data set, returning the step of calculating the distance between each candidate data set which does not form the intermediate data set and the new intermediate data set and continuing to execute the step until all the candidate data sets are combined into one intermediate data set, and taking the finally obtained intermediate data set as a target data set.
6. The method according to claim 1, wherein the verification key comprises a first verification parameter and a second verification parameter, and the verifying the validity of the data signature carried by the sensing data by using the verification key generated and distributed by the processing node comprises:
performing exponentiation operation on the data signature by using the first verification parameter, and performing modular operation on the exponentiation of the data signature by using the second verification parameter to obtain estimated sensing data;
and carrying out consistency matching on the estimated sensing data and the received sensing data, and if the matching is successful, determining that the data signature is valid.
7. The method of claim 2, wherein the encryption key comprises a first encryption parameter and at least one second encryption parameter, and wherein the encrypting the target data set with the encryption key generated and distributed by the processing node comprises:
performing exponentiation operation on each perception data in the target data set by using the first encryption parameter;
randomly selecting one of the second encryption parameters from the at least one second encryption parameter, and performing modular operation on the power of the perception data by using the selected second encryption parameter to obtain encrypted perception data;
and taking a data set formed by the encrypted sensing data as an encrypted data set.
8. A data processing apparatus of a wireless sensor network, the apparatus comprising:
the acquisition module is used for acquiring the perception data respectively acquired by the plurality of terminal nodes; the sensing data carries a data signature corresponding to a corresponding terminal node;
the processing module is used for verifying the validity of the data signature carried by the sensing data by using a verification key generated and distributed by the processing node;
the processing module is further configured to perform partition clustering processing on the sensing data to obtain a plurality of candidate data sets under the condition that the data signature is verified to be valid;
the processing module is further configured to sequentially perform hierarchical clustering processing on the plurality of candidate data sets to fuse the plurality of candidate data sets to form a target data set;
and the uploading module is used for uploading the target data set to the processing node, and the uploaded target data set is used for indicating the processing node to perform corresponding data processing.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110565408.3A 2021-05-24 2021-05-24 Data processing method and device of wireless sensor network and computer equipment Active CN113286296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110565408.3A CN113286296B (en) 2021-05-24 2021-05-24 Data processing method and device of wireless sensor network and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110565408.3A CN113286296B (en) 2021-05-24 2021-05-24 Data processing method and device of wireless sensor network and computer equipment

Publications (2)

Publication Number Publication Date
CN113286296A true CN113286296A (en) 2021-08-20
CN113286296B CN113286296B (en) 2022-09-30

Family

ID=77281088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110565408.3A Active CN113286296B (en) 2021-05-24 2021-05-24 Data processing method and device of wireless sensor network and computer equipment

Country Status (1)

Country Link
CN (1) CN113286296B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205174A (en) * 2022-02-17 2022-03-18 深圳市三江电气有限公司 Sensor for realizing multi-sensing data intersection transmission based on networking
CN117411913A (en) * 2023-12-15 2024-01-16 徐州医科大学 Secure interaction method of cloud platform and health application based on power transformation

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8107397B1 (en) * 2006-06-05 2012-01-31 Purdue Research Foundation Protocol for secure and energy-efficient reprogramming of wireless multi-hop sensor networks
CN104618852A (en) * 2015-01-28 2015-05-13 广东电网有限责任公司电力调度控制中心 Hierarchical clustering-based data aggregating method and system
CN104780532A (en) * 2015-05-08 2015-07-15 淮海工学院 Cluster key management method capable of being used for wireless sensor network
CN107276751A (en) * 2017-06-21 2017-10-20 深圳市盛路物联通讯技术有限公司 A kind of Internet of Things data filter method and system based on filtering gateway
CN108540287A (en) * 2018-07-16 2018-09-14 铂讯(北京)科技有限公司 Internet of Things safety management encryption method
CN109544892A (en) * 2018-12-04 2019-03-29 四川奥地建筑设计有限公司 A kind of wisdom agricultural things-internet gateway system
CN111083131A (en) * 2019-12-10 2020-04-28 南瑞集团有限公司 Lightweight identity authentication method for power Internet of things sensing terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8107397B1 (en) * 2006-06-05 2012-01-31 Purdue Research Foundation Protocol for secure and energy-efficient reprogramming of wireless multi-hop sensor networks
CN104618852A (en) * 2015-01-28 2015-05-13 广东电网有限责任公司电力调度控制中心 Hierarchical clustering-based data aggregating method and system
CN104780532A (en) * 2015-05-08 2015-07-15 淮海工学院 Cluster key management method capable of being used for wireless sensor network
CN107276751A (en) * 2017-06-21 2017-10-20 深圳市盛路物联通讯技术有限公司 A kind of Internet of Things data filter method and system based on filtering gateway
CN108540287A (en) * 2018-07-16 2018-09-14 铂讯(北京)科技有限公司 Internet of Things safety management encryption method
CN109544892A (en) * 2018-12-04 2019-03-29 四川奥地建筑设计有限公司 A kind of wisdom agricultural things-internet gateway system
CN111083131A (en) * 2019-12-10 2020-04-28 南瑞集团有限公司 Lightweight identity authentication method for power Internet of things sensing terminal

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
张斌: "结合降维技术的电力负荷曲线集成聚类算法", 《中国电机工程学报》 *
张白艳: "基于LoRaWAN协议的无线传感器网络开发与数据采集算法研究", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *
李光斗: "《区块链财富革命》", 31 December 2018, 湖南教育出版社 *
赵辉: "无线传感网中数据聚类算法的研究", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *
郝洪星: "基于划分和层次的混合动态聚类算法", 《计算机应用研究》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205174A (en) * 2022-02-17 2022-03-18 深圳市三江电气有限公司 Sensor for realizing multi-sensing data intersection transmission based on networking
CN117411913A (en) * 2023-12-15 2024-01-16 徐州医科大学 Secure interaction method of cloud platform and health application based on power transformation
CN117411913B (en) * 2023-12-15 2024-02-13 徐州医科大学 Secure interaction method of cloud platform and health application based on power transformation

Also Published As

Publication number Publication date
CN113286296B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN104780532B (en) One cluster key management method that can be used for wireless sensor network
CN101300570B (en) Method and system for distributing network coding content using digital sign
CN113286296B (en) Data processing method and device of wireless sensor network and computer equipment
US10374797B2 (en) Public-key encryption system
TWI495319B (en) Method of generating a cryptographic key, network and computer program therefor
Rao et al. Privacy techniques for edge computing systems
CN109644126B (en) Techniques for multiple device authentication in a heterogeneous network
US20170272244A1 (en) Public-key encryption system
US20160156470A1 (en) System for sharing a cryptographic key
CN108055128B (en) RSA key generation method, RSA key generation device, storage medium and computer equipment
Li et al. A lightweight fine-grained searchable encryption scheme in fog-based healthcare IoT networks
JP2009517703A (en) Key management
Ambrosin et al. Odin: O bfuscation-based privacy-preserving consensus algorithm for d ecentralized i nformation fusion in smart device n etworks
CN110730064A (en) Data fusion method based on privacy protection in crowd sensing network
US9509511B2 (en) Identity based encryption
Dong et al. Fog computing: Comprehensive approach for security data theft attack using elliptic curve cryptography and decoy technology
Vakilinia et al. Privacy-preserving data aggregation over incomplete data for crowdsensing
CN113364595B (en) Power grid private data signature aggregation method and device and computer equipment
US11101975B2 (en) Ciphertext matching system and ciphertext matching method
WO2018213875A1 (en) Asymmetric cryptography and authentication
US10484186B2 (en) Cascading multivariate quadratic identification schemes for chain of trust
CN113094735B (en) Privacy model training method
Hegde et al. Secure search scheme for encrypted data in the VANET cloud with random query trapdoor
CN113630448A (en) Distributed encryption storage method and system, computer device and readable storage medium
CN107808687B (en) Medical data acquisition method, processing method, cluster processing system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant