A method and system for collecting sparse data of the Internet of Things based on drones

By dividing clusters in the wireless sensor network and using the encoded multi-head attention mechanism and decoded multi-head attention mechanism to process sparse data, the problems of limited modeling capabilities of complex data distribution and low reconstruction quality in the prior art are solved. It realizes efficient sparse collection and reconstruction of wireless sensor network data.

CN118764838BActive Publication Date: 2024-11-26BINGGE DREAM GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411237186.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-11-26
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The existing data acquisition methods have limitations in complex data distribution modeling and abnormal detection. The automatic encoder structure is simple, the training speed is fast, but the modeling ability of complex data distribution is limited. The variable automatic encoder is in terms of data compression and noise reduction. It has advantages but has low reconstruction quality and poor sensitivity to abnormal detection.

Method used

Using the drone-based sparse data acquisition method of the Internet of Things, the sensor nodes in the wireless sensor network are divided into clusters, the cluster head communicates with the cluster member nodes, and sparse data acquisition and encoding transmission are carried out, and the encoded multi-head attention mechanism is used. The multi-header attention mechanism processes sparse data, maps it to low-dimensional space and reconstructs it, reducing data redundancy, reducing data transmission volume, and improving reconstruction quality.

Benefits of technology

The sparse collection and reconstruction of wireless sensor network data is realized, the data transmission volume is reduced, the reconstruction quality is improved, the burden on the backbone link is reduced, and a new data acquisition solution is provided, which solves the problem of data redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764838B_ABST
    Figure CN118764838B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data collection technology, specifically to a method and system for sparse data collection of the Internet of Things based on drones, including sparse data collection; dividing all sensor nodes in a wireless sensor network into a number of clusters; establishing communication between a cluster head and cluster member nodes, the cluster head receiving the sensed data collected by the cluster member nodes; performing sparse transformation on the sensed data received from the sensor nodes to obtain sparse data; encoding and transmitting the sparse data; establishing communication between the drone and the cluster head, collecting the sparse data of the cluster head; encoding the collected sparse data to obtain encoded data, and transmitting it to the cloud; reconstructing the encoded data; the cloud obtains the encoded data transmitted by the drone, performs decoding and reconstruction, and obtains the reconstructed original sensed data. A cluster-drone-cloud collaborative data collection framework is proposed, which sparsely collects the original sensed data, reconstructs the original sensed data through the cloud, and solves the data redundancy problem of the wireless sensor network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data collection, and in particular to a method for collecting sparse data of the Internet of Things based on unmanned aerial vehicles. Background Art

[0002] The Internet of Things connects various terminal devices and sensors through the Internet to form a huge network system, realizing information sharing and interconnection between terminal devices. As a core component of the Internet of Things, wireless sensor networks undertake the perception tasks in the Internet of Things. Compressed sensing is a signal processing technology that reconstructs signals from a small number of measurements and uses the sparsity of signals to accurately restore them. In wireless sensor networks based on compressed sensing, compressed sensing technology is used to perform intra-network compression and use the sparsity of data for effective reconstruction.

[0003] With the rapid development of deep learning technology, many data collection schemes have been proposed by mapping complex high-dimensional signals to low-dimensional signals. Deep compressed sensing improves the accuracy of data reconstruction. It achieves sparse data reconstruction by learning the measurement matrix and reconstructing the signal. Inspired by nonlinear dimensionality reduction, autoencoders are designed to reconstruct data. They encode the collected data into a low-dimensional space and then use a decoder to reconstruct the data into its original form. Some studies use denoising autoencoders to sample and reconstruct data for each cluster data. The denoising autoencoder adds noise to the original sensed data and learns how to remove noise from the input data by minimizing the reconstruction error. Other studies use variational autoencoders to effectively learn low-dimensional encodings and extract key signals. It encodes the input data into a probability distribution in a latent space and then samples from this distribution to generate latent variables.

[0004] Although there are improvements in these methods, they still face some challenges. Autoencoders have simple structures and fast training speed, but their ability to model complex data distributions is limited. Variational autoencoders have advantages in data compression and noise reduction, however, they have lower reconstruction quality and poor sensitivity to anomaly detection. Summary of the invention

[0005] To solve the above problems, the present invention provides a method for collecting sparse data of the Internet of Things based on a drone, comprising:

[0006] S1, sparse data collection;

[0007] S1.1, dividing all sensor nodes in the wireless sensor network into a number of clusters, each cluster comprising a cluster head sensor node and a number of non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes;

[0008] S1.2, establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on the binary label, and receives the perception data collected by the cluster member node with the label 1;

[0009] S1.3, performing sparse transformation on the received perception data of the cluster member nodes to obtain sparse data;

[0010] S2, sparse data coding transmission;

[0011] S2.1, establish communication between the UAV and the cluster head and collect sparse data of the cluster head;

[0012] S2.2, encoding the collected sparse data to obtain encoded data, and transmitting the encoded data to the cloud;

[0013] a. Map the input sparse data to a low-dimensional space through linear projection, and use the sparse data in the low-dimensional space as input data;

[0014] b, process the input data by encoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one;

[0015] c. Perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the encoding multi-head attention mechanism;

[0016] d, output data 2 is processed by the encoding position feedforward network to obtain output data 3;

[0017] e. Perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4;

[0018] f, take the output data 4 as the primary output data, re-input it into b and repeat the bf operation until the preset number of repetitions, and obtain the encoded data;

[0019] S3, coded data reconstruction: The cloud obtains the coded data transmitted by the drone, decodes and reconstructs it, and obtains the reconstructed original perception data.

[0020] In S1.3, the received perception data of the cluster member nodes is subjected to sparse transformation to obtain sparse data. The specific method is as follows:

[0021] The received perception data of n cluster member nodes is used as the original perception data x , the original perception data x Sparse transformation is performed to obtain sparse data, and the formula is:

[0022] ,

[0023] In the formula, Represents sparse data; represents the Hadamard product, i.e. element-by-element multiplication; is a binary function, ;

[0024] in, , p (i) is the output value, x i Indicates i The perception data of cluster member nodes; For the sigmoid activation function: ; W g is the weight matrix of the sparse transformation, b g is the bias vector of the sparse transformation, is the preset threshold.

[0025] In a specific implementation, each attention head of the multi-head attention mechanism processes the input data, and the processing formula is:

[0026] ,

[0027] , , ,

[0028] Among them, Attention is a self-attention mechanism; Q is the query matrix, K is a key-value matrix, V is the value matrix, W l Q , W l K and W l V The weight matrices representing the query, key, and value projections, respectively; d k represents the dimension of the key vector, i.e. K The length of each key vector in ; x l Represents the input data encoding the multi-head attention mechanism.

[0029] In a specific implementation, the outputs of all attention heads are connected and linearly transformed into:

[0030] ,

[0031] in, x (1) Indicates output data one, W O Represents the weight matrix of linear transformation; MultiHead() represents the linear transformation function; Concat() represents the concatenation operation of the outputs of multiple attention heads; h n Represents the output data of the attention head encoding the multi-head attention mechanism.

[0032] In S3, the cloud obtains the coded data transmitted by the drone, performs decoding and reconstruction, and obtains the reconstructed original perception data. The specific operation is as follows:

[0033] A, takes the obtained encoded data as input data and inputs it into the cloud-based decoding multi-head attention mechanism;

[0034] B, process the input data by decoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one;

[0035] C, perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the decoding multi-head attention mechanism;

[0036] D, output data 2 is processed by the decoded position feed-forward network to obtain output data 3;

[0037] E, perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4;

[0038] F, take the output data 4 as the primary output data, re-input it into B and repeat the BF operation until the preset number of repetitions, and obtain the decoded data;

[0039] E, the decoded data is integrated through the fully connected layer to obtain the reconstructed data.

[0040] In a specific implementation, the input data of the decoding multi-head attention mechanism is determined based on the encoded data and the previous output data. , x t-1 Indicates the previous output data. Represents encoded data; DecoderLayer represents the decoder layer.

[0041] In order to reduce data redundancy, the cluster head in S1.2 sends a 0 or 1 label to each cluster member node based on the binary label. If the binary label received by the cluster member node is 1, the node remains active and can communicate data normally; if the binary label received by the cluster member node is 0, the node enters sleep mode.

[0042] On the other hand, a UAV-based IoT sparse data collection system is provided, comprising:

[0043] The data acquisition module is used to divide all sensor nodes in the wireless sensor network into several clusters, each cluster includes a cluster head sensor node and several non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes; establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on a binary label, and receives the perception data collected by the cluster member node with the label of 1; perform sparse transformation on the perception data received from the cluster member nodes to obtain sparse data;

[0044] The coding transmission module is used to establish communication with the cluster head through the UAV and collect the sparse data of the cluster head; encode the collected sparse data to obtain coded data, and transmit it to the cloud;

[0045] The decoding and reconstruction module is used to obtain the encoded data transmitted by the drone in the cloud, perform decoding and reconstruction, and obtain the reconstructed original perception data. Beneficial Effects

[0046] (1) The present invention is a sparse data collection method and system for the Internet of Things based on drones, and proposes a cluster-drone-cloud collaborative data collection framework. For a large amount of data in a wireless sensor network, cluster heads and drones act as relay devices to sparsely collect raw sensor data and reconstruct the raw sensor data through the advanced computing power of the cloud, providing a new data collection solution to solve the data redundancy problem in wireless sensor networks;

[0047] (2) By using the cluster head in the proposed data acquisition framework to sparse the perception data of each cluster member node, selectively extracting the relevant features of the perception data, and uploading the data to the drone, the amount of data transmission can be reduced, thereby reducing the burden on the backbone link. Finally, the encoded data is decoded through the cloud to accurately obtain the reconstructed data, thus realizing sparse data acquisition and reconstruction of the wireless sensor network. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of the sparse data collection method of the Internet of Things based on drones;

[0049] Figure 2 The flowchart of data collection is shown in Figure 2. DETAILED DESCRIPTION

[0050] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.

[0051] See also Figure 1-Figure 2 This embodiment provides a method for collecting sparse data of the Internet of Things based on drones, which collects data from the Internet of Things terminals through a wireless sensor network. The specific steps of the method are as follows:

[0052] S1, sparse data collection;

[0053] S1.1, dividing all sensor nodes in the wireless sensor network into a number of clusters, each cluster comprising a cluster head sensor node and a number of non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes;

[0054] The cluster member nodes are used to collect data from IoT terminals in the wireless sensor network to obtain perception data; the cluster head is used to receive the perception data of all cluster member nodes.

[0055] S1.2, establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on the binary label, and receives the perception data collected by the cluster member node with the label 1;

[0056] The cluster head sends a binary tag to the cluster member nodes in the cluster. If the binary tag received by the cluster member node is 1, the node remains active and can communicate data normally; if the binary tag received by the cluster member node is 0, the node enters sleep mode, shuts down all energy consumption cycles and stops data communication. The active cluster member nodes transmit the perception data to the cluster head.

[0057] S1.3, performing sparse transformation on the received perception data of the cluster member nodes to obtain sparse data, the specific method is as follows:

[0058] The received perception data of n cluster member nodes is used as the original perception data x , the original perception data x Sparse transformation is performed to obtain sparse data, and the formula is:

[0059] ,

[0060] In the formula, Represents sparse data; represents the Hadamard product, i.e. element-by-element multiplication; is a binary function, ;

[0061] in, , p (i) is the output value, x i Indicates i The perception data of cluster member nodes; For the sigmoid activation function: ; W g is the weight matrix of the sparse transformation, b g is the bias vector of the sparse transformation, is the preset threshold.

[0062] The preset threshold selectively processes the input features to obtain sparse features.

[0063] S2, sparse data coding transmission;

[0064] S2.1, establish communication between the UAV and the cluster head and collect sparse data of the cluster head;

[0065] The drone regularly hovers over each cluster area and sends a beacon signal to the cluster head. When the cluster head detects the beacon signal, it scans the channel and sends an association request to the drone. The drone establishes communication with the cluster head based on the association request, and the cluster head transmits the collected and stored sparse data to the drone using ZigBee.

[0066] S2.2, encoding the collected sparse data to obtain encoded data, and transmitting the encoded data to the cloud;

[0067] The method of encoding the collected sparse data to obtain the encoded data is as follows:

[0068] a. Map the input sparse data to a low-dimensional space through linear projection, and use the sparse data in the low-dimensional space as input data;

[0069] The sparse data By mapping to a low-dimensional space:

[0070] ,

[0071] in, W e and b e Represent the weight matrix and bias vector in the low-dimensional space respectively.

[0072] b, process the input data by encoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one;

[0073] The encoding multi-head attention mechanism includes 8 attention heads, each of which pays attention to the input data x l ( x 0 To encode the first input data of the multi-head attention mechanism), the formula is:

[0074] ,

[0075] , , ,

[0076] Among them, Attention is a self-attention mechanism; Q is the query matrix, K is a key-value matrix, V is the value matrix, W l Q , W l K and W l V The weight matrices representing the query, key, and value projections, respectively; d k represents the dimension of the key vector, i.e. K The length of each key vector in ; x l Represents the input data encoding the multi-head attention mechanism.

[0077] The outputs of all attention heads are concatenated and linearly transformed into:

[0078] ,

[0079] in, x (1) Indicates output data one, W O Represents the weight matrix of linear transformation; MultiHead() represents the linear transformation function; Concat() represents the concatenation operation of the outputs of multiple attention heads; h n Represents the output data of the attention head encoding the multi-head attention mechanism.

[0080] c. Perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the encoding multi-head attention mechanism;

[0081] Output data x (1) With input data xl Perform residual connection and layer normalization:

[0082] ,

[0083] in, x (2) Represents the output data 2 after encoding the residual connection of the multi-head attention mechanism and layer normalization; LayerNorm() represents the layer normalization operation.

[0084] d, output data 2 is processed by the encoding position feedforward network to obtain output data 3;

[0085] ,

[0086] in, x (3) Indicates output data three, W 1 and W 2 Respectively represent the weight matrices of the encoding position feedforward network, b 1 and b 2 They are the bias vectors of the feedforward network encoding the position respectively; FFN() represents the feedforward network, which is used to perform feature transformation on the data processed by the multi-head attention mechanism through linear transformation and nonlinear activation function.

[0087] e. Perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4. Output data 4 is ;

[0088] f, take the output data 4 as the primary output data, re-enter it into b and repeat the bf operation until the preset number of repetitions, and obtain the encoded data .

[0089] S3, coded data reconstruction: The cloud obtains the coded data transmitted by the drone, decodes and reconstructs it, and obtains the reconstructed original perception data. The specific operations are as follows:

[0090] A, takes the obtained encoded data as input data and inputs it into the cloud-based decoding multi-head attention mechanism;

[0091] B, process the input data by decoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one;

[0092] The input data of the decoding multi-head attention mechanism is determined based on the encoded data and the previous output data. ,x t-1 Indicates the previous output data. DecoderLayer represents the encoded data; DecoderLayer represents the decoder layer. When the decoding multi-head attention mechanism inputs data for the first time, the input data is only the encoded data, without the previous output data.

[0093] The decoding multi-head attention mechanism includes 8 attention heads. The input data is processed by each attention head of the decoding multi-head attention mechanism. The formula is:

[0094] ,

[0095] , , ,

[0096] Among them, Attention is a self-attention mechanism; Q d is the query matrix, K d is a key-value matrix, V d is the value matrix, W d Q , W d K , W d V They are the weight matrices for query, key, and value projection respectively; d k represents the dimension of the key vector, i.e. K The length of each key vector in .

[0097] The outputs of all attention heads are concatenated and linearly transformed into:

[0098] ,

[0099] in, z (1) Represents the output data after linear transformation of the decoding multi-head attention mechanism; MultiHead() represents the linear transformation function; Concat() represents the concatenation operation of the outputs of multiple attention heads; h n d Represents the output data of the decoding multi-head attention mechanism attention head.

[0100] C, the output data 1 is residually connected with the input data, and then the layer is normalized to obtain the output data 2 after the residual connection and layer normalization of the decoding multi-head attention mechanism , LayerNorm() represents the layer normalization operation;

[0101] D, the output data 2 is processed by the decoded position feedforward network to obtain the output data 3 , W 5 d and W 6 d Respectively represent the weight matrix of the decoded position feedforward network, b 5 d and b 6 d are the bias vectors of the encoding position feedforward network, and FFN() represents the feedforward network, which is used to perform feature transformation on the data processed by the multi-head attention mechanism through linear transformation and nonlinear activation function;

[0102] E, perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4 ;

[0103] F, take the output data 4 as the first output data, re-input it into B and repeat the BF operation until the preset number of repetitions, and obtain the decoded data ;

[0104] E, the decoded data is integrated through the fully connected layer to obtain the reconstructed data, and its formula is:

[0105] ,

[0106] in, Represents the reconstructed data; FC() represents the fully connected layer, which is used to convert the feature representation into the dimension of the target output, realizing the conversion from input data to target representation;

[0107] The reconstructed data is the original perception data of the IoT terminal collected by the sensor node.

[0108] In addition, a UAV-based IoT sparse data collection system is provided, including:

[0109] The data acquisition module is used to divide all sensor nodes in the wireless sensor network into several clusters, each cluster includes a cluster head sensor node and several non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes; establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on a binary label, and receives the perception data collected by the cluster member node with the label of 1; perform sparse transformation on the perception data received from the cluster member nodes to obtain sparse data;

[0110] The coding transmission module is used to establish communication with the cluster head through the UAV and collect the sparse data of the cluster head; encode the collected sparse data to obtain coded data, and transmit it to the cloud;

[0111] The decoding and reconstruction module is used to obtain the encoded data transmitted by the drone in the cloud, perform decoding and reconstruction, and obtain the reconstructed original perception data.

Claims

1. A method for collecting sparse data of the Internet of Things based on drones, characterized in that: include: S1, sparse data collection; S1.1, dividing all sensor nodes in the wireless sensor network into a number of clusters, each cluster comprising a cluster head sensor node and a number of non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes; S1.2, establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on the binary label, and receives the perception data collected by the cluster member node with the label 1; S1.3, performing sparse transformation on the received perception data of the cluster member nodes to obtain sparse data; S2, sparse data coding transmission; S2.1, establish communication between the UAV and the cluster head and collect sparse data of the cluster head; S2.2, encoding the collected sparse data to obtain encoded data, and transmitting the encoded data to the cloud; a. Map the input sparse data to a low-dimensional space through linear projection, and use the sparse data in the low-dimensional space as input data; b, process the input data by encoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one; c. Perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the encoding multi-head attention mechanism; d, output data 2 is processed by the encoding position feedforward network to obtain output data 3; e. Perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4; f, take the output data 4 as the primary output data, re-input it into b and repeat the bf operation until the preset number of repetitions, and obtain the encoded data; S3, coded data reconstruction: The cloud obtains the coded data transmitted by the drone, decodes and reconstructs it, and obtains the reconstructed original perception data.

2. The method for collecting sparse data of the Internet of Things based on drones according to claim 1 is characterized in that: In S1.3, the received perception data of the cluster member nodes is subjected to sparse transformation to obtain sparse data. The specific method is as follows: The received perception data of n cluster member nodes is used as the original perception data x , the original perception data x Sparse transformation is performed to obtain sparse data, and the formula is: , In the formula, Represents sparse data; represents the Hadamard product, i.e. element-by-element multiplication; is a binary function, ; in, , p (i) is the output value, x i Indicates i The perception data of cluster member nodes; For the sigmoid activation function: ; W g is the weight matrix of the sparse transformation, b g is the bias vector of the sparse transformation, is the preset threshold.

3. The method for collecting sparse data of the Internet of Things based on drones according to claim 1 is characterized in that: Each attention head of the multi-head attention mechanism processes the input data, and its processing formula is: , , , , Among them, Attention is a self-attention mechanism; Q is the query matrix, K is a key-value matrix, V is the value matrix, W l Q , W l K and W l V The weight matrices representing the query, key, and value projections, respectively; d k represents the dimension of the key vector, i.e. K The length of each key vector in ; x l Represents the input data encoding the multi-head attention mechanism.

4. The method for collecting sparse data of the Internet of Things based on drones according to claim 3 is characterized in that: The outputs of all attention heads are connected and linearly transformed as follows: , in, x (1) Indicates output data one, W O Represents the weight matrix of linear transformation; MultiHead() represents the linear transformation function; Concat() represents the concatenation operation of the outputs of multiple attention heads; h n Represents the output data of the attention head encoding the multi-head attention mechanism.

5. The method for collecting sparse data of the Internet of Things based on drones according to claim 1 is characterized in that: In S3, the cloud obtains the coded data transmitted by the drone, performs decoding and reconstruction, and obtains the reconstructed original perception data. The specific operation is as follows: A, takes the obtained encoded data as input data and inputs it into the cloud-based decoding multi-head attention mechanism; B, process the input data by decoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one; C, perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the decoding multi-head attention mechanism; D, output data 2 is processed by the decoded position feed-forward network to obtain output data 3; E, perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4; F, take the output data 4 as the primary output data, re-input it into B and repeat the BF operation until the preset number of repetitions, and obtain the decoded data; E, the decoded data is integrated through the fully connected layer to obtain the reconstructed data.

6. The method for collecting sparse data of the Internet of Things based on drones according to claim 5 is characterized in that: The input data of the decoding multi-head attention mechanism is determined based on the encoded data and the previous output data. , x t-1 Indicates the previous output data. Represents encoded data; DecoderLayer represents the decoder layer.

7. The method for collecting sparse data of the Internet of Things based on drones according to claim 1, characterized in that: In S1.2, the cluster head sends a 0 or 1 label to each cluster member node based on the binary label. If the binary label received by the cluster member node is 1, the node remains active and can communicate data normally; if the binary label received by the cluster member node is 0, the node enters sleep mode.

8. A sparse data collection system for the Internet of Things based on drones, characterized in that: include: The data acquisition module is used to divide all sensor nodes in the wireless sensor network into several clusters, each cluster includes a cluster head sensor node and several non-cluster head sensor nodes; the cluster head sensor node is the cluster head, and the non-cluster head sensor nodes are cluster member nodes; establish communication between the cluster head and the cluster member nodes in the cluster, the cluster head sends a 0 or 1 label to each cluster member node based on a binary label, and receives the perception data collected by the cluster member node with the label of 1; perform sparse transformation on the perception data received from the cluster member nodes to obtain sparse data; The coding transmission module is used to establish communication with the cluster head through the UAV and collect the sparse data of the cluster head; encode the collected sparse data to obtain coded data, and transmit it to the cloud; The encoding and transmission module encodes the collected sparse data to obtain encoded data, and the specific operations are as follows: a. mapping the input sparse data to a low-dimensional space by linear projection, and using the sparse data in the low-dimensional space as input data; b, process the input data by encoding each attention head of the multi-head attention mechanism, connect the outputs of all attention heads and perform linear transformation to obtain output data one; c. Perform residual connection on the output data 1 and the input data, and then perform layer normalization to obtain the output data 2 after residual connection and layer normalization of the encoding multi-head attention mechanism; d, output data 2 is processed by the encoding position feedforward network to obtain output data 3; e. Perform residual connection on output data 3 and output data 2, and then perform layer normalization to obtain output data 4; f, take the output data 4 as the primary output data, re-input it into b and repeat the bf operation until the preset number of repetitions, and obtain the encoded data; The decoding and reconstruction module is used to obtain the encoded data transmitted by the drone in the cloud, perform decoding and reconstruction, and obtain the reconstructed original perception data.