# Efficient Data Collection Method in Sensor Networks

Authors: Keyan Cao; Haoli Liu; Yefan Liu; Gongjie Meng; Si Ji; Gui Li
Journal: Complexity
 (2020)

---

## Abstract

Wireless sensor networks are widely used in many fields, such as medical and health care, military monitoring, target tracking, and people’s life, because of their advantages of convenient deployment, low cost, and good concealment. However, due to the low battery capacity of sensor nodes and environmental changes, the energy consumption of nodes is serious and the accuracy of data collection is low. In the data collection method of multiple random paths, due to the uneven geographical distribution between nodes and the influence of the environment, it is easy to cause the communication between nodes to be blocked and the construction of random paths to fail. This paper proposes an efficient data collection algorithm for this problem. The algorithm is improved on the basis of the random node selection algorithm. This method can effectively avoid the failure of random path node selection and improve the node selection of random path in wireless sensor networks. Then, the sensor network in the dynamic environment is analyzed based on the static environment. An efficient data collection algorithm based on the position prediction of extreme learning machines is proposed. This method uses extreme learning machine methods to perform trajectory prediction for nodes in a dynamic environment.


---

## Body

## 1. Introduction

In recent years, with the development of wireless communication technology, sensor technology, and embedded technology, wireless sensor networks (WSNs) have been widely concerned [1]. Wireless sensor networks can rely on sensor nodes to sense a wide range of physical or environmental conditions, which are widely used in medical, military, scientific observation, emergency monitoring, and commercial applications. An important function of wireless sensor networks is to complete data collection. Sensor nodes collect sensor data and transmit it to Sink nodes through multihop wireless communication. Effective data collection is the key to various applications in wireless sensor networks, such as battlefield monitoring, habit monitoring, infrastructure monitoring, and environmental monitoring.In the current research and development process, Shannon sampling theorem is generally used as the main data collection method for wireless sensor network signals. However, because it needs to collect a large amount of raw data and perform data transmission, it causes node energy consumption and data redundancy. As a new technology, compressed sensing uses low-speed sampling to compress and project the collected raw data and then uses nonlinear reconstruction algorithm to reconstruct the compressed signal. Compressed sensing avoids collecting a large amount of raw data, which has become the development direction of extensive research.In wireless sensor network data collection, the traditional compressed sensing method uses the dense random matrix [2] as the observation matrix to compress and collect the data. However, the dense measurement matrix brings dense observation problems; that is, each projection value needs all nodes in the network to participate in the operation [3]. Therefore, the collection of the projection value requires great communication overhead, and the amount of calculation is huge when the signal is reconstructed. The proposed sparse random matrix collects and measures the data in the wireless sensor network [4] and collects the measurement data of some nodes in the network to construct the projection value, which reduces the communication cost between nodes and the amount of calculation when constructing the projection value. It plays a certain role in promoting the development of compressed sensing.In the process of constructing random path based on sparse random matrix, the random nodes are initialized as the initial nodes of random paths, and then the random walk strategy is used to collect the node data. After each random path reaches the specified length, the projection of the collected data can be completed. Then, the collected data is projected to the Sink node, as shown in Figure1. Finally, the project data is decompressed and reconstructed at the Sink node. At the same time, the observation matrix is generated when the random path is constructed; that is, the sparse random matrix is constructed. The observation matrix fills the parameter values in the matrix according to the different walk nodes of the random path, which are generally 0 or 1. The number of nonzero elements in each row of the observation matrix is consistent with the length of the corresponding random path. After reaching the specified length of random path, data reconstruction can be completed at Sink node. However, due to the uncertainty of the external environment, during the construction of the random path, the current nodes do not reach the neighbor nodes, resulting in the failure of random path construction and observation matrix construction. Therefore, it is particularly important to propose a more effective algorithm.Figure 1
Data gathering process based on Compressed Sensing.Based on the abovementioned problems, this paper proposes an efficient data collection method in the static and mobile environments of wireless sensor networks, which can effectively avoid the problems in the process of random path construction. The main contributions of this paper are as follows:(1)
We propose an efficient data collection algorithm in static environment. By statistical analysis of the current node’s neighbor nodes, select the appropriate threshold to filter the neighbor nodes that meet the threshold, select the appropriate set of neighbor nodes, and select the next hop node and improve the traditional random selection algorithm in static environment.(2)
We propose an efficient data collection algorithm based on ELM position prediction. By using the method of limit learning machine to predict the geographical location of nodes at the next time, select the appropriate node as the next hop node at the current time according to the predicted location, and improve the construction length of the random path.(3)
The construction of random path in static network environment and mobile network environment is simulated by designing the prototype system of efficient data collection method in wireless sensor network. The comparison between the traditional data collection algorithm and the efficient data collection algorithm is achieved, and the correctness and effectiveness of the algorithm are verified under multiple tests, and the robustness and accuracy of the system are verified.


## 2. Related Work

This section introduces the existing research results from two aspects: wireless sensor networks and compressed sensing.


### 2.1. Wireless Sensor Network

Wireless sensor network is a new development direction in the field of communication, and it also converges the integration and development of traditional disciplines and emerging disciplines. Wireless sensor network originated in the United States in the 1990s. In the following years (more than 10 years), wireless sensor network technology has been widely concerned by industry, academia, and government. It has also become the focus of competing development in military, environmental, and many other fields. The US Business Week has selected ten emerging technologies that have a great impact on the future, of which wireless sensor network is the first. As soon as the wireless sensor network technology is released, it has attracted the extensive attention of military departments, academia, and industry in many countries in the world and has become a research hotspot. The American Computer Society (ACM) specializes in the creation of Transaction on Sensor Network, which is used to research the most advanced wireless sensor network results. The application demand of wireless sensor networks is to achieve the best monitoring of the target under the limited energy supply. Therefore, the wireless sensor network has undergone multiple designs and optimizations in this respect.In recent years, wireless sensor network technology has made rapid development. Rebai et al. proposed a sensor deployment optimization method for wireless sensor network coverage and connectivity [5], Amine et al. proposed an efficient and secure weighted clustering algorithm for mobile wireless sensor network [6], and Diallo et al. proposed a distributed database management technology in wireless sensor network [7]. Bhuiyan et al. studied the mobile target tracking based on local area prediction in wireless sensor networks [8]. Iyer et al. proposed STCP sensor transmission control protocol [9]. In order to ensure the data security of wireless sensor networks, Ren et al. proposed an end-to-end security framework for position sensing, which ensures the security of sensor data [10]. Lin et al. proposed an adaptive transmission power control algorithm for wireless sensor networks [11]. All these scientific researches have promoted the development of wireless sensor networks.In China, in view of the development of wireless sensor network in the world, China Computer Federation Technical Committee on Sensor Network was established in October 2006, which has contributed to the research and development of wireless sensor network in China. In recent years, domestic research institutions have made important contributions to the development of wireless sensor networks. In [12], an improved DV-Hop algorithm was proposed to realize the accurate localization of sensor nodes. Reference [13] summarized the privacy protection technology of wireless sensor networks. In [14], the OSNC method was proposed to reduce the overload around the aggregation node. Now wireless sensor networks have been widely used in military, environment, agriculture, health care, intelligent transportation, and other fields. These will vigorously promote the good and rapid development of wireless network industry [15].


### 2.2. Compressed Sensing

Compressed sensing originated from Professor Mistretta [16] of the University of Wisconsin and others’ questions: we can reconstruct the original image with a small amount of MRI sampling data. In order to solve this problem, Professor Mistretta used the classical image reconstruction theory to perform simulation experiments. The results show that the resolution is low and the edge is fuzzy. At the same time, Professor Candes’s research team realized the accurate reconstruction of the original image from the limited adopted data by using the penalty function and proved that, from the Fourier transform coefficients of the image, random selection of no less than 2k coefficients can accurately and uniquely reconstruct the original signal, where k is the number of nonzero Fourier coefficients [17].Donoho et al. [18–21] proposed a theoretical framework of compressed sensing based on the ideas of sparse decomposition and signal recovery. On this basis, Donoho formally proposed the concept of “compressed sensing” [18]. The core idea is to first acquire the nonadaptive linear projection of the signal and then reconstruct the original signal from the measured values according to the corresponding reconstruction algorithm. References [17, 18, 21, 22] have made in-depth research and analysis on accurate signal reconstruction, signal stability maintenance, and optimal sparse decomposition in incomplete measurement and have achieved good development. Compressed sensing has attracted the attention of many scholars and experts, such as Waheed and others, who have conducted extensive research on compressed sensing of network data. In 2008, Jarvis Haupt proposed a specific network compression method in network distribution, which is considered as the prototype of distributed compressed sensing. Scholar D. Baron et al. proposed a new theory of distributed compressed sensing, which has been widely used.In recent years, a new compressed sensing theory has been born. For sparse signals or compressible signals, this method can achieve data compressed acquisition while acquiring signal, and its frequency is far lower than Nyquist sampling frequency [23]; its advantage is that it can reduce sampling data, save storage space, and contain enough signal information. In the process of data reconstruction, enough data points can be recovered according to the compressed data. Compressed sensing combines traditional data collection with data compression, but it does not need complex data encoding algorithm. Compressed sensing has become a new research direction in the field of signal processing [24].At home and abroad, the theoretical and practical application of compressed sensing has become a hot research direction in recent years. In [25], an algorithm of MRI image reconstruction based on joint regularization and compressed sensing was proposed for traditional compressed sensing MRI image reconstruction. In [26], an adaptive compressed sensing algorithm based on energy balance was proposed to solve the problem of limited processing capacity and energy shortage of traditional wireless sensor networks. In [27], an energy-constrained Bayesian compressed sensing algorithm was proposed. Reference [28] analyzed the performance and delay analysis of wireless sensor networks. In [29], a random walk path algorithm based on nonuniform sampling was proposed to compress and collect data. In [30], a data model of random projection estimation algorithm was proposed to achieve less compression measurement. In [31], EDAL data collection protocol was proposed. In [32], a sequential sliding window processing framework was proposed. With the continuous deepening of the theory of compressed sensing, the research on compressed sensing has made great progress in various fields. In [33], a novel distributed compression estimation scheme for sparse signals and systems based on the theory of compressed sensing was proposed. In [34], a compressed sensing method based on Gaussian mixture model was proposed. In [35], a CSPR method for dynamic wireless sensor network path reconstruction based on compressed sensing was proposed. In [36], compressed sensing was applied to image restoration.


## 2.1. Wireless Sensor Network

Wireless sensor network is a new development direction in the field of communication, and it also converges the integration and development of traditional disciplines and emerging disciplines. Wireless sensor network originated in the United States in the 1990s. In the following years (more than 10 years), wireless sensor network technology has been widely concerned by industry, academia, and government. It has also become the focus of competing development in military, environmental, and many other fields. The US Business Week has selected ten emerging technologies that have a great impact on the future, of which wireless sensor network is the first. As soon as the wireless sensor network technology is released, it has attracted the extensive attention of military departments, academia, and industry in many countries in the world and has become a research hotspot. The American Computer Society (ACM) specializes in the creation of Transaction on Sensor Network, which is used to research the most advanced wireless sensor network results. The application demand of wireless sensor networks is to achieve the best monitoring of the target under the limited energy supply. Therefore, the wireless sensor network has undergone multiple designs and optimizations in this respect.In recent years, wireless sensor network technology has made rapid development. Rebai et al. proposed a sensor deployment optimization method for wireless sensor network coverage and connectivity [5], Amine et al. proposed an efficient and secure weighted clustering algorithm for mobile wireless sensor network [6], and Diallo et al. proposed a distributed database management technology in wireless sensor network [7]. Bhuiyan et al. studied the mobile target tracking based on local area prediction in wireless sensor networks [8]. Iyer et al. proposed STCP sensor transmission control protocol [9]. In order to ensure the data security of wireless sensor networks, Ren et al. proposed an end-to-end security framework for position sensing, which ensures the security of sensor data [10]. Lin et al. proposed an adaptive transmission power control algorithm for wireless sensor networks [11]. All these scientific researches have promoted the development of wireless sensor networks.In China, in view of the development of wireless sensor network in the world, China Computer Federation Technical Committee on Sensor Network was established in October 2006, which has contributed to the research and development of wireless sensor network in China. In recent years, domestic research institutions have made important contributions to the development of wireless sensor networks. In [12], an improved DV-Hop algorithm was proposed to realize the accurate localization of sensor nodes. Reference [13] summarized the privacy protection technology of wireless sensor networks. In [14], the OSNC method was proposed to reduce the overload around the aggregation node. Now wireless sensor networks have been widely used in military, environment, agriculture, health care, intelligent transportation, and other fields. These will vigorously promote the good and rapid development of wireless network industry [15].


## 2.2. Compressed Sensing

Compressed sensing originated from Professor Mistretta [16] of the University of Wisconsin and others’ questions: we can reconstruct the original image with a small amount of MRI sampling data. In order to solve this problem, Professor Mistretta used the classical image reconstruction theory to perform simulation experiments. The results show that the resolution is low and the edge is fuzzy. At the same time, Professor Candes’s research team realized the accurate reconstruction of the original image from the limited adopted data by using the penalty function and proved that, from the Fourier transform coefficients of the image, random selection of no less than 2k coefficients can accurately and uniquely reconstruct the original signal, where k is the number of nonzero Fourier coefficients [17].Donoho et al. [18–21] proposed a theoretical framework of compressed sensing based on the ideas of sparse decomposition and signal recovery. On this basis, Donoho formally proposed the concept of “compressed sensing” [18]. The core idea is to first acquire the nonadaptive linear projection of the signal and then reconstruct the original signal from the measured values according to the corresponding reconstruction algorithm. References [17, 18, 21, 22] have made in-depth research and analysis on accurate signal reconstruction, signal stability maintenance, and optimal sparse decomposition in incomplete measurement and have achieved good development. Compressed sensing has attracted the attention of many scholars and experts, such as Waheed and others, who have conducted extensive research on compressed sensing of network data. In 2008, Jarvis Haupt proposed a specific network compression method in network distribution, which is considered as the prototype of distributed compressed sensing. Scholar D. Baron et al. proposed a new theory of distributed compressed sensing, which has been widely used.In recent years, a new compressed sensing theory has been born. For sparse signals or compressible signals, this method can achieve data compressed acquisition while acquiring signal, and its frequency is far lower than Nyquist sampling frequency [23]; its advantage is that it can reduce sampling data, save storage space, and contain enough signal information. In the process of data reconstruction, enough data points can be recovered according to the compressed data. Compressed sensing combines traditional data collection with data compression, but it does not need complex data encoding algorithm. Compressed sensing has become a new research direction in the field of signal processing [24].At home and abroad, the theoretical and practical application of compressed sensing has become a hot research direction in recent years. In [25], an algorithm of MRI image reconstruction based on joint regularization and compressed sensing was proposed for traditional compressed sensing MRI image reconstruction. In [26], an adaptive compressed sensing algorithm based on energy balance was proposed to solve the problem of limited processing capacity and energy shortage of traditional wireless sensor networks. In [27], an energy-constrained Bayesian compressed sensing algorithm was proposed. Reference [28] analyzed the performance and delay analysis of wireless sensor networks. In [29], a random walk path algorithm based on nonuniform sampling was proposed to compress and collect data. In [30], a data model of random projection estimation algorithm was proposed to achieve less compression measurement. In [31], EDAL data collection protocol was proposed. In [32], a sequential sliding window processing framework was proposed. With the continuous deepening of the theory of compressed sensing, the research on compressed sensing has made great progress in various fields. In [33], a novel distributed compression estimation scheme for sparse signals and systems based on the theory of compressed sensing was proposed. In [34], a compressed sensing method based on Gaussian mixture model was proposed. In [35], a CSPR method for dynamic wireless sensor network path reconstruction based on compressed sensing was proposed. In [36], compressed sensing was applied to image restoration.


## 3. Efficient Data Collection Method in Static Sensor Network

### 3.1. Problem Description

This section first gives the definition of undirected graphs and the process of constructing random paths based on undirected graphs, then gives the observation matrix constructed from random paths, and finally gives the method of node selection in the process of constructing observation matrices. The symbols used in this chapter and subsequent chapters and their interpretations are shown in Table1.Table 1
Symbols and meanings.
Symbol
Interpretation
Φ
Random observation matrix
x
Raw data
y
Compressed data
Ψ
Sparse basis matrix
θ
,
θ
^
Sparse coefficient
k
Sparse value
A, Θ
Perception matrix
m
Number of paths
n
Number of nodes
μ
Correlation coefficient
t
Length of random path
W
u
PathW starting from u
deg(v)
Degree of nodev
pre(v)
Previous node of nodev
V
Vertex set
E
Edge set
G(V, E)
Undirected graph withV and E as parameters
R, r
Node communication radiusDefinition 1.
(undirected graph). A graphG = (V, E) with no direction in an edge is called an undirected graph if and only if the following conditions are satisfied:(1)
Vertex setV is a nonempty set(2)
Edge setE is a set of unordered two-tuples composed of elements in VDefinition 2.
(neighbor node). For nodeu, if node v exists, node u can communicate with node v within the communication radius, that is, satisfy r(u, v) ≤ R (R is the communication radius). Then, call node v a neighbor of node u.Definition 3.
(random path). In a wireless sensor network, if there is a path consisting of any consecutive neighbor nodes and the path lengtht ≥ o(n/k) is satisfied, the path is called a random path.
For the undirected graphG = (V, E), let the vertex set V be the set of nodes in the wireless sensor network; that is, V = n; construct a Boolean observation matrix Φ by completing m random paths in the undirected graph G = (V, E), where the wireless sensor network data collection is shown in Figure 2 below.
For example, during the data collection process in Figure2, first, randomly select node v as the initial node of the path; second, node v selects neighbor node l as the next hop node of the random path within the communication range and then randomly selects neighbor nodes p and q to be added to the path; then, perceptual data is aggregated and projected on node q. Finally, the node q sends the projection data to the Sink node through the shortest routing method to analyze and recover the data.
In Figure2, if the random path randomly selects the next hop node when it reaches the node, because the node’s neighbor node set is only the node and has already arrived, the path does not satisfy the length requirements of the random path, so the observation matrix construction fails and the collection of perception data is incomplete. In order to avoid this situation, during the construction of each random path, the traditional node random selection algorithm is analyzed and an efficient data collection algorithm is proposed. During the construction of the random path, a neighbor node set is constructed for the current node, each node in the neighbor node set is counted separately for the number of neighbor nodes, and then the total number of neighbor nodes for all nodes in the neighbor node set is calculated; then set a reasonable threshold to filter the nodes in the neighbor node set, and, finally, select appropriate neighbor nodes for random selection.Figure 2
Process of data gathering with random walk.


### 3.2. Property Analysis

Because the selection of the current node in each random path may affect the selection of the next node, the nature of the wireless sensor network is analyzed first, and then the problems existing in the current network are analyzed according to the properties of the sensor network. The shortcomings of the method are improved, and new solutions are proposed.Definition 4.
(reachable nodes). In wireless sensor networks, if nodeu can reach node v through n (n ≥ 1) consecutive neighbor nodes, then v is called reachable node of u.Definition 5.
(reachable path). In a wireless sensor network, if there is a path formed byn (n ≥ 2) consecutive neighbor nodes starting with node u and ending with node v, then it is called a reachable path and is denoted as R (u, v).Inference 1.
The path formed between two reachable nodes is called the reachable path.Definition 6.
(reachable path length). If there is a reachable pathR (u, v) starting with node u and ending with node v, then the number of connections between nodes u and v is called the reachable path length, which is denoted by L<u, v>.
In Figure3, node v is a neighbor node of node u, node x is a neighbor node of node v, node u can reach node x through node v, and node x is the reachable node of node u. The path u⟶v⟶x is a reachable path R (u, x), and the reachable path length is 2, which is L<u, v> = 2.Figure 3
Select of next node.Theorem 1.
If nodeb is a neighbor of node a, then b must be a reachable node of a.Proof.
Nodeb is a neighbor of node a. A reachable path R (a, b) can be formed between node b and node a by Definition 5. That is, node a can reach neighbor node b, which meets Definition 4; node b is called reachable node of node a. From Figure 3 and Definition 4, we know that x is a reachable node of u, but x is not a neighbor node of u.Theorem 2.
If there is a random path, this path must be a reachable path.Proof.
There is a random path. The random path lengtht ≥ o(n/k) is obtained by Definition 3. If k and n are known, then n/k > 2 exists. By Definition 5, the reachable path length requirement is met. Therefore, the random path length meets the reachable path length requirement; that is, the random path must be reachable path.Definition 7.
(P function set). For node a’s neighbor node set aT, node 0’s neighbor node set is Tb and satisfies node b∈Ta; then the function p(a, b) = TaU Tb − {a} is called the P function set of node a to neighbor node b.
Definition7 clearly indicates the set of nodes within the communication range of the current node and any of its neighboring nodes and provides the necessary set of nodes for the next efficient data collection algorithm. As shown in Figure 4, assuming that the initial node of the path in this network is b, and within its communication range, its neighbor node set is, Tb = {a c y}, and then each node in the Tb set is calculated separately and their P function sets select the construction selection domain for the next hop node. After obtaining the P function set of each node, a reasonable threshold can be set to filter the appropriate neighbor nodes for the next hop node selection.Fora, Ta = {b}, P(b, a) = Tb U Ta − {b} = {a, c, y};Forc, Tc = {b, p, y, s, d}, P(b, c) = Tb U Tc − {b} = {c, p, y, s, d, a};Fory, Ty = {b, c, d, s, t, x}, P(b, y) = Tb U Ty − {b} = {a, c, d, y, s, t, x}.
After obtaining the function set of each node, a reasonable threshold can be set to screen suitable neighbor nodes for the next hop node selection.Figure 4
P function set.


### 3.3. Algorithm Description

As can be seen in Figure2, for the current node on any reachable path, if the next node is randomly selected, it may be happen that the neighbor node set of the next node may be empty or the number of neighbor nodes is few, resulting in the failure of random path construction and incomplete data collection. According to Definition 7, on the premise of the current node, a reasonable threshold is set by calculating the number of P function sets of the current node and each neighbor node, and, on this basis, a reasonable selection of the next node is carried out, so that the random path reaches a reasonable length, and the projection of perceived data is completed.Based on the current nodes, this section compares the traditional Nodes Random Selection Algorithm in Static WSNs (NRAS) and the proposed Efficient Data Collection Algorithm in Static WSNs (EDCAS) and makes reasonable descriptions of the two algorithms, respectively.In data collection of wireless sensor networks, firstly,m nodes are randomly selected as initial nodes of m random paths. In the process of data collection of each random path, appropriate nodes are selected through different node selection methods to acquire data. Finally, the acquired data are gathered at the end of the path to form projection values of perceptual data, which are sent to Sink nodes for data reconstruction.Definition 8.
(Neighbor node dataset to be selected). To connect any node of the reachable path in the wireless sensor network, the neighbor node set within the letter range is called the neighbor node dataset to be selected and is expressed as SNS. Firstly, select the initial nodes. Sink node selectsM initial nodes from N nodes through its own calculation starting node, each starting node serves as the starting point of each random path, and the specific process is shown in Algorithm 1 below.
As shown in Algorithm1, firstly, Sink nodes in the wireless sensor network are randomly generated n element vectors by rand(1 ∗ n) function, and the sequence of nodes is 1, 2, ... (step 1); secondly, 1 ∗ n elements are sorted by sort(n) function (step 2); then, a node k is randomly selected from the nodes through the randSelect(p, n) function (step 4). If the currently selected node already exists in the index set S, the initial node is recalculated until there are no duplicate nodes (step 5 to 7); finally, it is added to the initial node index set S (step 8) and returned to the set (step 10).
In the node selection algorithm of wireless sensor networks, first, we analyze the traditional random node selection algorithm, and, on this basis, an efficient data collection algorithm is proposed.
As shown in Algorithm2, the current node is v. Firstly, the neighbor node set SNS (step 1) of the v node to be selected is obtained through the function getSNS(v); secondly, the neighbor node u (step 2) is randomly selected from the SNS through the function randSelect(SNS). If the node has already existed on the path, it means that the node has already been visited. Then the next hop node (steps 3–5) is randomly selected from SNS again, and then the data collected by the random path in the previous step and the data collected by the node u are superimposed at the node u (step 6), the current random path length is added by one (step 7), and the current node is marked as have been accessed (step 8); finally, return to the next hop node u (step 9).
Algorithm2 takes Figure 5 as an example. Assuming that the current initial node is c and the collected data is x c (t), the neighbor nodes in the communication range of c have five nodes as b, p, y, s, and d; then the neighbor node dataset SNS = {b, p, y, s, d}; then node d is selected randomly from SNS; the next node of c is d; that is to say, the data collected by node d is xd(t + 1) = xc(t) + xd(t). The reachable nodes in the communication range of node d are c, y, and k, namely, the neighbor node dataset SNS = {c, y, k}. If node d randomly selects the next hop node as k, then the data collected by node k is xk(t + 1) = xd(t) + xk(t) (t is the length of the current random path construction step).
In Figure5, due to the distribution edge of node k, the SNS set of node k is only d, and node d has already been accessed. If the current path length does not meet t ≥ o(n/k), then random path data collection fails and projection of perceived data cannot be completed.
Based on the traditional random node selection algorithm, this section proposes an efficient data collection algorithm in a static environment, with specific implementation as Algorithm3. Firstly, the neighbor node dataset SNS (step 1) is selected for the current node, the number of unlabeled nodes in the current SNS set is recorded, and the total number of nodes in the P function set (steps 2-3) is initialized; then, the P function set of nodes is calculated for each unlabeled node in the SNS, respectively, and the node data of the P function set is added to the total number of nodes totle (steps 4–9). Finally, calculate the average threshold and use in the next hop node selection (step 10). For each unlabeled node in SNS, the length of the P function set is calculated separately. If the length is longer than or equal to the average threshold, the current node is added to the cache neighbor node set tempSNS (steps 11–15). Then, the function randSelect(tempSNS) is used to randomly select node u from the tempSNS set as the next hop node (step 16). Finally, add the data collected by the current node to the path, add one to the current path length (steps 17-18), mark the current node (step 19), and return to the next hop node u (step 20).
Take Figure6 as an example to describe the efficient data collection algorithm in detail. Assuming that the current initial node is b, firstly obtain the neighbor node dataset SNS = {a, c, y} of node b to be selected, the number of unlabeled nodes in the dataset is length = 3, and totle is initialized to 0: then the p function set is calculated by getPSet(p) function for each value in the SNS set, respectively.For nodea, p (b, a) = {c, y, a}, p (b, a) length = 3, totle = 3;For nodec, p (b, c) = {p, y, s, d, a, c}, p (b, c) length = 6, totle = 3 + 6 = 9;For nodey, p (b, y) = (a, c, d, s, t, x, y), p (b, y) length = 7, totle = 9 + 7 = 16.
Then, calculate the average threshold value average = totle/length = 16/3, and then each unlabeled node inSNS is traversed again. For each node, the P function set is calculated separately. If the length of the P function set is longer than or equal to the average threshold, the node is added to the cache neighbor node set tempSNS.For nodea, P (b, a) length = 3 < average, do not add to tempSNS;For nodec, P (b, c) length = 6 > average, add to tempSNS;For nodey, P (b, y) length = 7 > average, add to tempSNS.
In the settempSNS = {c, y}, node c is randomly selected from tempSNS as the next hop node, and the node data is superimposed; then the current random path length is increased by 1, and node c is marked as accessed at the same time.
Efficient data collection algorithm can avoid the failure of node selection in the process of data collection for random paths to some extent. As shown in Figure6, Algorithm 3 filters the neighbor node a in the set SNS. From the figure, it can be observed that if node a is selected as the next hop node of the current node, then since the dataset of the neighbor nodes to be selected of node a is SNS = {b}, and node b has already accessed the tag, it may cause node a to fail to continue selecting nodes for this path. If the random path length does not reach the required length at node a, the sensor sensing data collection will fail.Algorithm 1: The initial node selection in wireless sensor networks.
Function: Select the initial nodes of m random paths
Input: Amount of node n
Amount of random pathm
Output: Index set S
Algorithm Description:
(1)
rand(1 ∗n);  //Randomly generate 1 ∗ n element vectors
(2)
sort(n);  //Sort the 1 ∗ n elements
(3)
foreach
p ≤ m
(4)
k = randSelect(p, n);  //Randomly choose node k form n nodes
(5)
whilek exists in Sdo
(6)
k = randSelect(p, n);
(7)
end while
(8)
S.add(k);  //Add node k to the initial index set S
(9)
end foreach
(10)
return
S;  //Return to set SAlgorithm 2: Random select node.
Function: Randomly select the next node in the random path
Input: Current node v
Output: Next node u
Algorithm Description:
(1)
SNS = getSNS(v);  //Obtain the neighbor node set SNS
(2)
u = randSelect(SNS);  //Randomly select node u from SNS
(3)
while
u exists in Route
do
(4)
u = randSelect(SNS);
(5)
end while
(6)
x
u (t) = xv (t − 1) + xu (t − 1);  //Superimposing node’s data
(7)
Route.length = Route.length + 1;  //Increase 1 to the length of random path
(8)
u.flag = 1;  //Mark u as accessed
(9)
return
u;  //Return to uFigure 5
Example of random select node.Algorithm 3: Efficient data gathering algorithm.
Function: Randomly select the next node in the random path
Input: Current node v
Output: Next node u
Algorithm Description:
(1)
SNS = getSNS(v);  //Obtain the neighbor node set SNS
(2)
length = SNS.length;  //Obtain the length of unmarked node in SNS
(3)
totle = 0;
(4)
foreach
node p in SNS
(5)
if
P not exists in Route
then
(6)
P(v, p) = getPSet(p);
(7)
totle = totle + P(v, p).length;
(8)
end if
(9)
end foreach
(10)
average = totle/length;
(11)
foreach
node k in SNS
(12)
if
k not exists in Route and getPSet(k).length ≥ averagethen
(13)
tempSNS.add(k);
(14)
end if
(15)
end foreach
(16)
u = randSelect(tempSNS);  //Randomly select node u from tempSNS
(17)
x
u (t) = xv (t − 1) + xu (t − 1);  //Superimposing node’s data
(18)
Route.length = Route.length + 1;  //Increase 1 to the length of random path
(19)
u.flag = 1;  //Mark u as accessed
(20)
return
u;  //Return to uFigure 6
Example of random select node.


## 3.1. Problem Description

This section first gives the definition of undirected graphs and the process of constructing random paths based on undirected graphs, then gives the observation matrix constructed from random paths, and finally gives the method of node selection in the process of constructing observation matrices. The symbols used in this chapter and subsequent chapters and their interpretations are shown in Table1.Table 1
Symbols and meanings.
Symbol
Interpretation
Φ
Random observation matrix
x
Raw data
y
Compressed data
Ψ
Sparse basis matrix
θ
,
θ
^
Sparse coefficient
k
Sparse value
A, Θ
Perception matrix
m
Number of paths
n
Number of nodes
μ
Correlation coefficient
t
Length of random path
W
u
PathW starting from u
deg(v)
Degree of nodev
pre(v)
Previous node of nodev
V
Vertex set
E
Edge set
G(V, E)
Undirected graph withV and E as parameters
R, r
Node communication radiusDefinition 1.
(undirected graph). A graphG = (V, E) with no direction in an edge is called an undirected graph if and only if the following conditions are satisfied:(1)
Vertex setV is a nonempty set(2)
Edge setE is a set of unordered two-tuples composed of elements in VDefinition 2.
(neighbor node). For nodeu, if node v exists, node u can communicate with node v within the communication radius, that is, satisfy r(u, v) ≤ R (R is the communication radius). Then, call node v a neighbor of node u.Definition 3.
(random path). In a wireless sensor network, if there is a path consisting of any consecutive neighbor nodes and the path lengtht ≥ o(n/k) is satisfied, the path is called a random path.
For the undirected graphG = (V, E), let the vertex set V be the set of nodes in the wireless sensor network; that is, V = n; construct a Boolean observation matrix Φ by completing m random paths in the undirected graph G = (V, E), where the wireless sensor network data collection is shown in Figure 2 below.
For example, during the data collection process in Figure2, first, randomly select node v as the initial node of the path; second, node v selects neighbor node l as the next hop node of the random path within the communication range and then randomly selects neighbor nodes p and q to be added to the path; then, perceptual data is aggregated and projected on node q. Finally, the node q sends the projection data to the Sink node through the shortest routing method to analyze and recover the data.
In Figure2, if the random path randomly selects the next hop node when it reaches the node, because the node’s neighbor node set is only the node and has already arrived, the path does not satisfy the length requirements of the random path, so the observation matrix construction fails and the collection of perception data is incomplete. In order to avoid this situation, during the construction of each random path, the traditional node random selection algorithm is analyzed and an efficient data collection algorithm is proposed. During the construction of the random path, a neighbor node set is constructed for the current node, each node in the neighbor node set is counted separately for the number of neighbor nodes, and then the total number of neighbor nodes for all nodes in the neighbor node set is calculated; then set a reasonable threshold to filter the nodes in the neighbor node set, and, finally, select appropriate neighbor nodes for random selection.Figure 2
Process of data gathering with random walk.


## 3.2. Property Analysis

Because the selection of the current node in each random path may affect the selection of the next node, the nature of the wireless sensor network is analyzed first, and then the problems existing in the current network are analyzed according to the properties of the sensor network. The shortcomings of the method are improved, and new solutions are proposed.Definition 4.
(reachable nodes). In wireless sensor networks, if nodeu can reach node v through n (n ≥ 1) consecutive neighbor nodes, then v is called reachable node of u.Definition 5.
(reachable path). In a wireless sensor network, if there is a path formed byn (n ≥ 2) consecutive neighbor nodes starting with node u and ending with node v, then it is called a reachable path and is denoted as R (u, v).Inference 1.
The path formed between two reachable nodes is called the reachable path.Definition 6.
(reachable path length). If there is a reachable pathR (u, v) starting with node u and ending with node v, then the number of connections between nodes u and v is called the reachable path length, which is denoted by L<u, v>.
In Figure3, node v is a neighbor node of node u, node x is a neighbor node of node v, node u can reach node x through node v, and node x is the reachable node of node u. The path u⟶v⟶x is a reachable path R (u, x), and the reachable path length is 2, which is L<u, v> = 2.Figure 3
Select of next node.Theorem 1.
If nodeb is a neighbor of node a, then b must be a reachable node of a.Proof.
Nodeb is a neighbor of node a. A reachable path R (a, b) can be formed between node b and node a by Definition 5. That is, node a can reach neighbor node b, which meets Definition 4; node b is called reachable node of node a. From Figure 3 and Definition 4, we know that x is a reachable node of u, but x is not a neighbor node of u.Theorem 2.
If there is a random path, this path must be a reachable path.Proof.
There is a random path. The random path lengtht ≥ o(n/k) is obtained by Definition 3. If k and n are known, then n/k > 2 exists. By Definition 5, the reachable path length requirement is met. Therefore, the random path length meets the reachable path length requirement; that is, the random path must be reachable path.Definition 7.
(P function set). For node a’s neighbor node set aT, node 0’s neighbor node set is Tb and satisfies node b∈Ta; then the function p(a, b) = TaU Tb − {a} is called the P function set of node a to neighbor node b.
Definition7 clearly indicates the set of nodes within the communication range of the current node and any of its neighboring nodes and provides the necessary set of nodes for the next efficient data collection algorithm. As shown in Figure 4, assuming that the initial node of the path in this network is b, and within its communication range, its neighbor node set is, Tb = {a c y}, and then each node in the Tb set is calculated separately and their P function sets select the construction selection domain for the next hop node. After obtaining the P function set of each node, a reasonable threshold can be set to filter the appropriate neighbor nodes for the next hop node selection.Fora, Ta = {b}, P(b, a) = Tb U Ta − {b} = {a, c, y};Forc, Tc = {b, p, y, s, d}, P(b, c) = Tb U Tc − {b} = {c, p, y, s, d, a};Fory, Ty = {b, c, d, s, t, x}, P(b, y) = Tb U Ty − {b} = {a, c, d, y, s, t, x}.
After obtaining the function set of each node, a reasonable threshold can be set to screen suitable neighbor nodes for the next hop node selection.Figure 4
P function set.


## 3.3. Algorithm Description

As can be seen in Figure2, for the current node on any reachable path, if the next node is randomly selected, it may be happen that the neighbor node set of the next node may be empty or the number of neighbor nodes is few, resulting in the failure of random path construction and incomplete data collection. According to Definition 7, on the premise of the current node, a reasonable threshold is set by calculating the number of P function sets of the current node and each neighbor node, and, on this basis, a reasonable selection of the next node is carried out, so that the random path reaches a reasonable length, and the projection of perceived data is completed.Based on the current nodes, this section compares the traditional Nodes Random Selection Algorithm in Static WSNs (NRAS) and the proposed Efficient Data Collection Algorithm in Static WSNs (EDCAS) and makes reasonable descriptions of the two algorithms, respectively.In data collection of wireless sensor networks, firstly,m nodes are randomly selected as initial nodes of m random paths. In the process of data collection of each random path, appropriate nodes are selected through different node selection methods to acquire data. Finally, the acquired data are gathered at the end of the path to form projection values of perceptual data, which are sent to Sink nodes for data reconstruction.Definition 8.
(Neighbor node dataset to be selected). To connect any node of the reachable path in the wireless sensor network, the neighbor node set within the letter range is called the neighbor node dataset to be selected and is expressed as SNS. Firstly, select the initial nodes. Sink node selectsM initial nodes from N nodes through its own calculation starting node, each starting node serves as the starting point of each random path, and the specific process is shown in Algorithm 1 below.
As shown in Algorithm1, firstly, Sink nodes in the wireless sensor network are randomly generated n element vectors by rand(1 ∗ n) function, and the sequence of nodes is 1, 2, ... (step 1); secondly, 1 ∗ n elements are sorted by sort(n) function (step 2); then, a node k is randomly selected from the nodes through the randSelect(p, n) function (step 4). If the currently selected node already exists in the index set S, the initial node is recalculated until there are no duplicate nodes (step 5 to 7); finally, it is added to the initial node index set S (step 8) and returned to the set (step 10).
In the node selection algorithm of wireless sensor networks, first, we analyze the traditional random node selection algorithm, and, on this basis, an efficient data collection algorithm is proposed.
As shown in Algorithm2, the current node is v. Firstly, the neighbor node set SNS (step 1) of the v node to be selected is obtained through the function getSNS(v); secondly, the neighbor node u (step 2) is randomly selected from the SNS through the function randSelect(SNS). If the node has already existed on the path, it means that the node has already been visited. Then the next hop node (steps 3–5) is randomly selected from SNS again, and then the data collected by the random path in the previous step and the data collected by the node u are superimposed at the node u (step 6), the current random path length is added by one (step 7), and the current node is marked as have been accessed (step 8); finally, return to the next hop node u (step 9).
Algorithm2 takes Figure 5 as an example. Assuming that the current initial node is c and the collected data is x c (t), the neighbor nodes in the communication range of c have five nodes as b, p, y, s, and d; then the neighbor node dataset SNS = {b, p, y, s, d}; then node d is selected randomly from SNS; the next node of c is d; that is to say, the data collected by node d is xd(t + 1) = xc(t) + xd(t). The reachable nodes in the communication range of node d are c, y, and k, namely, the neighbor node dataset SNS = {c, y, k}. If node d randomly selects the next hop node as k, then the data collected by node k is xk(t + 1) = xd(t) + xk(t) (t is the length of the current random path construction step).
In Figure5, due to the distribution edge of node k, the SNS set of node k is only d, and node d has already been accessed. If the current path length does not meet t ≥ o(n/k), then random path data collection fails and projection of perceived data cannot be completed.
Based on the traditional random node selection algorithm, this section proposes an efficient data collection algorithm in a static environment, with specific implementation as Algorithm3. Firstly, the neighbor node dataset SNS (step 1) is selected for the current node, the number of unlabeled nodes in the current SNS set is recorded, and the total number of nodes in the P function set (steps 2-3) is initialized; then, the P function set of nodes is calculated for each unlabeled node in the SNS, respectively, and the node data of the P function set is added to the total number of nodes totle (steps 4–9). Finally, calculate the average threshold and use in the next hop node selection (step 10). For each unlabeled node in SNS, the length of the P function set is calculated separately. If the length is longer than or equal to the average threshold, the current node is added to the cache neighbor node set tempSNS (steps 11–15). Then, the function randSelect(tempSNS) is used to randomly select node u from the tempSNS set as the next hop node (step 16). Finally, add the data collected by the current node to the path, add one to the current path length (steps 17-18), mark the current node (step 19), and return to the next hop node u (step 20).
Take Figure6 as an example to describe the efficient data collection algorithm in detail. Assuming that the current initial node is b, firstly obtain the neighbor node dataset SNS = {a, c, y} of node b to be selected, the number of unlabeled nodes in the dataset is length = 3, and totle is initialized to 0: then the p function set is calculated by getPSet(p) function for each value in the SNS set, respectively.For nodea, p (b, a) = {c, y, a}, p (b, a) length = 3, totle = 3;For nodec, p (b, c) = {p, y, s, d, a, c}, p (b, c) length = 6, totle = 3 + 6 = 9;For nodey, p (b, y) = (a, c, d, s, t, x, y), p (b, y) length = 7, totle = 9 + 7 = 16.
Then, calculate the average threshold value average = totle/length = 16/3, and then each unlabeled node inSNS is traversed again. For each node, the P function set is calculated separately. If the length of the P function set is longer than or equal to the average threshold, the node is added to the cache neighbor node set tempSNS.For nodea, P (b, a) length = 3 < average, do not add to tempSNS;For nodec, P (b, c) length = 6 > average, add to tempSNS;For nodey, P (b, y) length = 7 > average, add to tempSNS.
In the settempSNS = {c, y}, node c is randomly selected from tempSNS as the next hop node, and the node data is superimposed; then the current random path length is increased by 1, and node c is marked as accessed at the same time.
Efficient data collection algorithm can avoid the failure of node selection in the process of data collection for random paths to some extent. As shown in Figure6, Algorithm 3 filters the neighbor node a in the set SNS. From the figure, it can be observed that if node a is selected as the next hop node of the current node, then since the dataset of the neighbor nodes to be selected of node a is SNS = {b}, and node b has already accessed the tag, it may cause node a to fail to continue selecting nodes for this path. If the random path length does not reach the required length at node a, the sensor sensing data collection will fail.Algorithm 1: The initial node selection in wireless sensor networks.
Function: Select the initial nodes of m random paths
Input: Amount of node n
Amount of random pathm
Output: Index set S
Algorithm Description:
(1)
rand(1 ∗n);  //Randomly generate 1 ∗ n element vectors
(2)
sort(n);  //Sort the 1 ∗ n elements
(3)
foreach
p ≤ m
(4)
k = randSelect(p, n);  //Randomly choose node k form n nodes
(5)
whilek exists in Sdo
(6)
k = randSelect(p, n);
(7)
end while
(8)
S.add(k);  //Add node k to the initial index set S
(9)
end foreach
(10)
return
S;  //Return to set SAlgorithm 2: Random select node.
Function: Randomly select the next node in the random path
Input: Current node v
Output: Next node u
Algorithm Description:
(1)
SNS = getSNS(v);  //Obtain the neighbor node set SNS
(2)
u = randSelect(SNS);  //Randomly select node u from SNS
(3)
while
u exists in Route
do
(4)
u = randSelect(SNS);
(5)
end while
(6)
x
u (t) = xv (t − 1) + xu (t − 1);  //Superimposing node’s data
(7)
Route.length = Route.length + 1;  //Increase 1 to the length of random path
(8)
u.flag = 1;  //Mark u as accessed
(9)
return
u;  //Return to uFigure 5
Example of random select node.Algorithm 3: Efficient data gathering algorithm.
Function: Randomly select the next node in the random path
Input: Current node v
Output: Next node u
Algorithm Description:
(1)
SNS = getSNS(v);  //Obtain the neighbor node set SNS
(2)
length = SNS.length;  //Obtain the length of unmarked node in SNS
(3)
totle = 0;
(4)
foreach
node p in SNS
(5)
if
P not exists in Route
then
(6)
P(v, p) = getPSet(p);
(7)
totle = totle + P(v, p).length;
(8)
end if
(9)
end foreach
(10)
average = totle/length;
(11)
foreach
node k in SNS
(12)
if
k not exists in Route and getPSet(k).length ≥ averagethen
(13)
tempSNS.add(k);
(14)
end if
(15)
end foreach
(16)
u = randSelect(tempSNS);  //Randomly select node u from tempSNS
(17)
x
u (t) = xv (t − 1) + xu (t − 1);  //Superimposing node’s data
(18)
Route.length = Route.length + 1;  //Increase 1 to the length of random path
(19)
u.flag = 1;  //Mark u as accessed
(20)
return
u;  //Return to uFigure 6
Example of random select node.


## 4. Efficient Data Collection Method in Mobile Sensor Network

### 4.1. Problem Description

This section will introduce the change of wireless sensor node position in the mobile network environment and the method of node selection in random path data collection. In a static environment, a node can communicate with nodes within a communication radius. However, in a mobile network environment, the location of the node may change due to changes in the external environment. The nodes that can communicate can lose contact due to changes in distance, and then the construction of random paths has an impact.As shown in Figure7, it is assumed that three random paths are required, with each including five sensor nodes. Figure 7(a) shows the node position at time t = t1. First, three initial nodes a, f, and m are selected randomly. Then, within the communication radius of each node, the node randomly selects the neighbor nodes to form a ⟶ b ⟶ c ⟶ d ⟶ e, f ⟶ g ⟶ i ⟶ j ⟶ k, m ⟶ n ⟶ j ⟶ o ⟶ p, three routes for data collection. Among them, the solid line indicates the route selected by the nodes of each random path, and the dashed line indicates the position change of the sensor node at the next moment; for example, i represents the position of node i at t = t2(t2 = t1 + 1). The node position at time t = t2 is shown in Figure 7(b), where the solid line indicates the random path selection after the node position changes, and the dashed line indicates that the connection of the random path is disconnected due to the node position change. The distance of d exceeds the communication radius, and communication cannot be performed, so the path a ⟶ b ⟶ c ⟶ d ⟶ e becomes a ⟶ b ⟶ c ⟶ d: the positions of nodes g, i, and l have changed, but nodes f and g are still within the communication radius, and communication can still be performed. Node g and node l can also communicate. Node g and node i have a larger communication distance and cannot communicate. The neighbor node dataset of node g is {f, l, q}. The neighbor node dataset of node l is {g}, so the path f ⟶ g ⟶ i ⟶ j ⟶ k cannot communicate with node i when it reaches node g. If node g randomly selects node l as the next node on the path, similarly, after reaching l, because the neighbor dataset is only g cannot select the next hop node, the path becomes f ⟶ g ⟶ l. Because the path length does not meet the requirements, the random path data collection fails.Figure 7
Sensor node dynamic network. (a)t = t1. (b) t = t2.
(a)
(b)In the abovementioned example, if the pathf ⟶ g ⟶ i ⟶ j ⟶ k can predict the position of node g when it reaches node f and predict the next node based on the size of the neighbor node dataset node of g, it will work well. The selection of node paths avoids the failure of the construction of random paths.Therefore, it is an important part to be able to perform position prediction on nodes on a random path. This chapter uses extreme learning machine methods to predict node locations. Extreme learning machine is a simple and effective single hidden layer feedforward neural network learning algorithm. The extreme learning machine only needs to set the number of nodes in the hidden layer of the network, and the algorithm does not need to adjust the input weight of the network and the offset of the hidden elements to generate the optimal solution. The extreme learning machine has the advantages of less manual intervention, fast learning speed, etc., and it is not easy to generate a local optimal solution during the learning process, so it is widely used in text classification, image recognition, biomedicine, and other fields.


### 4.2. Property Analysis

In the mobile network environment, the construction of random paths may fail due to changes in node locations. Therefore, this section first analyzes the properties based on this and then proposes new solutions.Definition 10.
(prenode and postnode). In a wireless sensor network, if there is a path that connects nodea directly to node b, then node a is called the prenode of node b and node b is called the postnode of node a.Theorem 3.
If nodea is a predecessor (or postnode) of node b, then node a must be a neighbor of node b.Proof.
If nodea is the predecessor (or postnode) of node b, there must be r (a, b) ≤ R (R is the communication radius); then the definition can be found from the neighbor nodes.Definition 11.
(historical location). In the mobile network environment, the existence node ν is recorded asLtv at time t; then if there are times t1 and t2 (t1≤t2), then Lt1v is called the historical position of Lt2v.Definition 12.
(historical trajectory and future trajectory). In a mobile network environment, if there is a set of positions of nodeu in continuous unit time as N＝{Lt1u,⋯, Liu,...,Ltnu} (i∈[t1, tn]), then it is called a set N1＝{Lt1u,⋯,Liu} which is set N2＝{Liu,...,Ltnu}’s historical trajectory; N2 is N1's future trajectory.Definition 13.
(historical path and future path). In a mobile network environment, if there is a reachable pathRu,v and a node kk∈u,v exists, the reachable path is divided into two parts Ru,k and Rk,v; then the path Ru,k is called the historical path of Rk,v, and the path Rk,v is the future path of Ru,k.
As shown in Figure7(a), for the random path a ⟶ b ⟶ c ⟶ d ⟶ e, node c is called the predecessor of d, and d is the postnode of c. Node c and node d are neighbor nodes to each other. Nodes d and h are neighbors to each other in the communication range, but because there is no path connectivity between the two nodes, they cannot be called prenodes or postnodes: in the random path f ⟶ g ⟶ i ⟶ j ⟶ k, node g is called the historical position of node g’, reachable path f ⟶ g ⟶ i is called the historical path of reachable path i ⟶ j ⟶ k, and reachable path i ⟶ j ⟶ k is called reachable future path of f ⟶ g ⟶ i future path.


### 4.3. Algorithm Description

Based on the analysis of Nodes Random Selection Algorithm in Mobile WSNs (NRSAM) in traditional mobile wireless sensor networks, this section proposes a university data collection algorithm (ELM) based on extreme learning machine position prediction in a mobile wireless sensor network-based Efficient Data Collection Algorithm in Mobile WSNs (EEDCM) and dynamically selects the next hop node, so that the most avoidable path can reach the corresponding length, thereby achieving the purpose of data collection.As shown in Figure8, first, the Sink node randomly selects m different nodes from the n nodes of the sensor network as the initial nodes (shaded nodes in the figure) through its own operation and then sends them to the selected m nodes by broadcasting and starts the construction of the random path. The process is shown in Algorithm 4.Figure 8
The initial node selection in wireless sensor networks.Algorithm 4: Parameter training.
Function: According to learning machine training parameters
Input: The number of hidden nodes L, the node’s historical trajectory vector F, and the node’s future trajectory vector T.
Output: ELM three parameters w, b, β.
Algorithm Description:
(1)
fori=1 to L do
(2)
Randomly generate hidden layer nodeswi, bi, i=1, …, L
(3)
Compute hidden layer node output matrixH according to F;
(4)
Calculateβ=H′T;
(5)
Return <w, b, β>;This section first analyzes the node random selection algorithm in the traditional mobile network environment. The node random algorithm in the mobile environment is shown in Algorithm5. The process of the node random selection algorithm in the mobile network is illustrated in Figure 9, where the black arrow indicates the next hop data collection node of the node. As shown in Figure (a), the initial distribution of network nodes at time t=t1, node a is the initial node, and its neighbor node set is {b, d, g, l}, and then node b is randomly selected as the path. For one-hop node, at time t=t2, the node position changes, and the set of neighbor nodes of node b is {a, d, p, l, o}, and then node p is randomly selected as the next hop node. At time t=t3, the positions of nodes g and q and other nodes move, the set of neighbor nodes of node p is {b}, and node b has been visited and cannot be repeatedly selected. Therefore, node P cannot select the next hop node for random selection, resulting in random travel. The path cannot meet the minimum length requirement and the construction fails. At time t=t4, the node position changes, and node P selects neighbor node g as the next hop node.Algorithm 5: Detection function.
Function: Prediction of node position in sensor network.
Input: Number of sensor nodes N, number of hidden layer nodes L, node historical trajectory vector F, node parameters w, b, β
Output: Test result S
Algorithm Description:
(1)
Calculate the hidden layer output matrixH by F, w, b
(2)
Obtaining test resultsS=H∗β
(3)
ReturnS;Figure 9
Example for nodes random selection algorithm in mobile networks. (a)t = t1, (b) t = t2, (c) t = t3, and (d) t = t4.
(a)
(b)
(c)
(d)In the traditional random path data collection process, the node’s location changes due to changes in the mobile network environment and the random path construction fails. Therefore, this section proposes an efficient data collection algorithm based on ELM location prediction in mobile networks. In the case of the current node, the network node is predicted and the appropriate value is selected to select the next hop node to ensure the construction length of the random path.During the node selection process of the random path, ELM is used to predict the position of each node in the sensor network. First, the historical trajectory of each node is sent to the Sink node, and the node is parameterly trained according to the trajectory of the node. After the parameters, they are sent to the nodes in the network through Sink broadcast, and then, according to the training parameters, the nodes in the network can obtain the predicted trajectory.The algorithm for ELM training parameters is shown in Algorithm4. First, the historical trajectory vector F and the future trajectory vector T of the nodes and the number of hidden layer nodes L are obtained in a dynamic environment. Then the hidden layer node parameters are wi and bi (lines 1-2). Then calculate the hidden layer node output matrix H according to F (line 3). Then calculate the parameter β (line 4) according to the formula β=H′T. Finally, return the parameters.After training on parameters of the extreme learning machine, it can predict the future position of each node in the wireless sensor network, as shown in Algorithm5. First, use the node history trajectory F and the training node parameters to calculate the hidden layer output matrix H (line 1) by (1); then use S=H∗β to obtain the detection result (line 2) as shown in Equation (2), and return the prediction result (line 3):(1)HW1,…,WL,b1,…,bL,…,X1,…,XL=gW1⋅X1+b1…gWL⋅X1+bLM…MgW1⋅XN+b1…gWL⋅XN+bL,(2)β^=H′T.Next, analyze the efficient data collection algorithm in the mobile sensor network environment, as shown in Algorithm6. First, for the current node v, the prediction position of the current node (line 1) is obtained by the extreme learning machine prediction functiongetELMLocation(), and the prediction process is shown in Algorithm 5. Then perform ELM node position prediction for all other nodes in the wireless sensor network, add new predicted nodes to the node position set tempN(line 34), and obtain node v to be selected from the node predicted position set tempN.Algorithm 6: ELM-based efficient data gathering algorithm.
Function: Select the next hop node of the random path in the mobile network environment
Input: Current node v on random path, node set N
Output: Next hop u of random path
Algorithm Description:
(1)
v
′
=
v
.
g
e
t
E
L
M
L
o
c
a
t
i
o
n();  //Get the current node predicted position v′ by ELM
(2)
foreach node n in N
(3)
n
′
=
n
.
g
e
t
E
L
M
L
o
c
a
t
i
o
n();  //Get the predicted position of the nodes in the sensor network through ELM
(4)
t
e
m
p
N
.
a
d
d
n
′;  //Add new node to new node position combined with tempN
(5)
end foreach
(6)
S
N
S
=
g
e
t
S
N
S
v
′
,
t
e
m
p
N;
(7)
l
e
n
g
t
h
=
S
N
S
.
l
e
n
g
t
h;  //Get the length of unlabeled nodes in the SNS
(8)
t
o
t
l
e
=
0;
(9)
foreach node p in SNS
(10)
if
p
not exits Route then
(11)
P
v
′
,
p
=
g
e
t
P
S
e
t
p
,
t
e
m
p
N;
(12)
t
o
t
l
e
=
t
o
t
l
e
+
P
v
′
,
p
.
l
e
n
g
t
h;
(13)
end if
(14)
end foreach
(15)
a
v
e
r
a
g
e
=
t
o
t
l
e
/
l
e
n
g
t
h;
(16)
foreach node k in SNS
(17)
if getPSetk,tempN.length≥average then
(18)
t
e
m
p
S
N
S
.
a
d
d
k;
(19)
end if
(20)
end foreach
(21)
u
=
r
a
n
d
S
e
l
e
c
t
t
e
m
p
S
N
S;  //Randomly select node u from tempSNS
(22)
while u exists in Route or Rv,u>r do
(23)
u
=
r
a
n
d
S
e
l
e
c
t
t
e
m
p
S
N
S;
(24)
end while
(25)
x
u
t
=
x
v
t
−
1
+
x
u
t
−
1;  //Node data overlay
(26)
R
o
u
t
e
.
l
e
n
g
t
h
=
R
o
u
t
e
.
l
e
n
g
t
h
+
1;  //Current path length plus 1
(27)
u
.
f
l
a
g
=
1;  //Current node u is marked as passed
(28)
return u;  //Returns the next hop node uNode setSNS(line 6) and parameter information are initialized (lines 7-8), and then a P function set is calculated for each unlabeled node in the SNS set. The reference nodes in the calculation are nodes in the node prediction position set tempN, and the length of the P function set of the unlabeled nodes is accumulated (lines 9–14), and the average length is obtained as the selection threshold (line 15). Then, for each unlabeled node in the set SNS, determine whether the length of the node P function set is greater than or equal to the average threshold, and if it is greater, add it to the tempSNS set as the node to be selected (lines 16–20). Next, randomly select nodes from tempSNS. If the selected node μ and the current node v are not in the communication range or the selected node μ has collected data in the current path, then the nodes in the tempSNS set are randomly selected again until the appropriate node (lines 22–24); finally superimpose the node data (line 25), add one to the current path length (line 26), and mark the selected node to return its node information (lines 27-28).In terms of analysis of the time complexity of all the algorithms, the number of executions of basic operations in the algorithm is a measure of the time complexity of the algorithm. For Algorithm6, the size of it is N; then the number of loops is determined. The time complexity T(n) = O (f(n), fastest-growing term/term factor). The time complexity of the algorithm can be determined as O(N).


## 4.1. Problem Description

This section will introduce the change of wireless sensor node position in the mobile network environment and the method of node selection in random path data collection. In a static environment, a node can communicate with nodes within a communication radius. However, in a mobile network environment, the location of the node may change due to changes in the external environment. The nodes that can communicate can lose contact due to changes in distance, and then the construction of random paths has an impact.As shown in Figure7, it is assumed that three random paths are required, with each including five sensor nodes. Figure 7(a) shows the node position at time t = t1. First, three initial nodes a, f, and m are selected randomly. Then, within the communication radius of each node, the node randomly selects the neighbor nodes to form a ⟶ b ⟶ c ⟶ d ⟶ e, f ⟶ g ⟶ i ⟶ j ⟶ k, m ⟶ n ⟶ j ⟶ o ⟶ p, three routes for data collection. Among them, the solid line indicates the route selected by the nodes of each random path, and the dashed line indicates the position change of the sensor node at the next moment; for example, i represents the position of node i at t = t2(t2 = t1 + 1). The node position at time t = t2 is shown in Figure 7(b), where the solid line indicates the random path selection after the node position changes, and the dashed line indicates that the connection of the random path is disconnected due to the node position change. The distance of d exceeds the communication radius, and communication cannot be performed, so the path a ⟶ b ⟶ c ⟶ d ⟶ e becomes a ⟶ b ⟶ c ⟶ d: the positions of nodes g, i, and l have changed, but nodes f and g are still within the communication radius, and communication can still be performed. Node g and node l can also communicate. Node g and node i have a larger communication distance and cannot communicate. The neighbor node dataset of node g is {f, l, q}. The neighbor node dataset of node l is {g}, so the path f ⟶ g ⟶ i ⟶ j ⟶ k cannot communicate with node i when it reaches node g. If node g randomly selects node l as the next node on the path, similarly, after reaching l, because the neighbor dataset is only g cannot select the next hop node, the path becomes f ⟶ g ⟶ l. Because the path length does not meet the requirements, the random path data collection fails.Figure 7
Sensor node dynamic network. (a)t = t1. (b) t = t2.
(a)
(b)In the abovementioned example, if the pathf ⟶ g ⟶ i ⟶ j ⟶ k can predict the position of node g when it reaches node f and predict the next node based on the size of the neighbor node dataset node of g, it will work well. The selection of node paths avoids the failure of the construction of random paths.Therefore, it is an important part to be able to perform position prediction on nodes on a random path. This chapter uses extreme learning machine methods to predict node locations. Extreme learning machine is a simple and effective single hidden layer feedforward neural network learning algorithm. The extreme learning machine only needs to set the number of nodes in the hidden layer of the network, and the algorithm does not need to adjust the input weight of the network and the offset of the hidden elements to generate the optimal solution. The extreme learning machine has the advantages of less manual intervention, fast learning speed, etc., and it is not easy to generate a local optimal solution during the learning process, so it is widely used in text classification, image recognition, biomedicine, and other fields.


## 4.2. Property Analysis

In the mobile network environment, the construction of random paths may fail due to changes in node locations. Therefore, this section first analyzes the properties based on this and then proposes new solutions.Definition 10.
(prenode and postnode). In a wireless sensor network, if there is a path that connects nodea directly to node b, then node a is called the prenode of node b and node b is called the postnode of node a.Theorem 3.
If nodea is a predecessor (or postnode) of node b, then node a must be a neighbor of node b.Proof.
If nodea is the predecessor (or postnode) of node b, there must be r (a, b) ≤ R (R is the communication radius); then the definition can be found from the neighbor nodes.Definition 11.
(historical location). In the mobile network environment, the existence node ν is recorded asLtv at time t; then if there are times t1 and t2 (t1≤t2), then Lt1v is called the historical position of Lt2v.Definition 12.
(historical trajectory and future trajectory). In a mobile network environment, if there is a set of positions of nodeu in continuous unit time as N＝{Lt1u,⋯, Liu,...,Ltnu} (i∈[t1, tn]), then it is called a set N1＝{Lt1u,⋯,Liu} which is set N2＝{Liu,...,Ltnu}’s historical trajectory; N2 is N1's future trajectory.Definition 13.
(historical path and future path). In a mobile network environment, if there is a reachable pathRu,v and a node kk∈u,v exists, the reachable path is divided into two parts Ru,k and Rk,v; then the path Ru,k is called the historical path of Rk,v, and the path Rk,v is the future path of Ru,k.
As shown in Figure7(a), for the random path a ⟶ b ⟶ c ⟶ d ⟶ e, node c is called the predecessor of d, and d is the postnode of c. Node c and node d are neighbor nodes to each other. Nodes d and h are neighbors to each other in the communication range, but because there is no path connectivity between the two nodes, they cannot be called prenodes or postnodes: in the random path f ⟶ g ⟶ i ⟶ j ⟶ k, node g is called the historical position of node g’, reachable path f ⟶ g ⟶ i is called the historical path of reachable path i ⟶ j ⟶ k, and reachable path i ⟶ j ⟶ k is called reachable future path of f ⟶ g ⟶ i future path.


## 4.3. Algorithm Description

Based on the analysis of Nodes Random Selection Algorithm in Mobile WSNs (NRSAM) in traditional mobile wireless sensor networks, this section proposes a university data collection algorithm (ELM) based on extreme learning machine position prediction in a mobile wireless sensor network-based Efficient Data Collection Algorithm in Mobile WSNs (EEDCM) and dynamically selects the next hop node, so that the most avoidable path can reach the corresponding length, thereby achieving the purpose of data collection.As shown in Figure8, first, the Sink node randomly selects m different nodes from the n nodes of the sensor network as the initial nodes (shaded nodes in the figure) through its own operation and then sends them to the selected m nodes by broadcasting and starts the construction of the random path. The process is shown in Algorithm 4.Figure 8
The initial node selection in wireless sensor networks.Algorithm 4: Parameter training.
Function: According to learning machine training parameters
Input: The number of hidden nodes L, the node’s historical trajectory vector F, and the node’s future trajectory vector T.
Output: ELM three parameters w, b, β.
Algorithm Description:
(1)
fori=1 to L do
(2)
Randomly generate hidden layer nodeswi, bi, i=1, …, L
(3)
Compute hidden layer node output matrixH according to F;
(4)
Calculateβ=H′T;
(5)
Return <w, b, β>;This section first analyzes the node random selection algorithm in the traditional mobile network environment. The node random algorithm in the mobile environment is shown in Algorithm5. The process of the node random selection algorithm in the mobile network is illustrated in Figure 9, where the black arrow indicates the next hop data collection node of the node. As shown in Figure (a), the initial distribution of network nodes at time t=t1, node a is the initial node, and its neighbor node set is {b, d, g, l}, and then node b is randomly selected as the path. For one-hop node, at time t=t2, the node position changes, and the set of neighbor nodes of node b is {a, d, p, l, o}, and then node p is randomly selected as the next hop node. At time t=t3, the positions of nodes g and q and other nodes move, the set of neighbor nodes of node p is {b}, and node b has been visited and cannot be repeatedly selected. Therefore, node P cannot select the next hop node for random selection, resulting in random travel. The path cannot meet the minimum length requirement and the construction fails. At time t=t4, the node position changes, and node P selects neighbor node g as the next hop node.Algorithm 5: Detection function.
Function: Prediction of node position in sensor network.
Input: Number of sensor nodes N, number of hidden layer nodes L, node historical trajectory vector F, node parameters w, b, β
Output: Test result S
Algorithm Description:
(1)
Calculate the hidden layer output matrixH by F, w, b
(2)
Obtaining test resultsS=H∗β
(3)
ReturnS;Figure 9
Example for nodes random selection algorithm in mobile networks. (a)t = t1, (b) t = t2, (c) t = t3, and (d) t = t4.
(a)
(b)
(c)
(d)In the traditional random path data collection process, the node’s location changes due to changes in the mobile network environment and the random path construction fails. Therefore, this section proposes an efficient data collection algorithm based on ELM location prediction in mobile networks. In the case of the current node, the network node is predicted and the appropriate value is selected to select the next hop node to ensure the construction length of the random path.During the node selection process of the random path, ELM is used to predict the position of each node in the sensor network. First, the historical trajectory of each node is sent to the Sink node, and the node is parameterly trained according to the trajectory of the node. After the parameters, they are sent to the nodes in the network through Sink broadcast, and then, according to the training parameters, the nodes in the network can obtain the predicted trajectory.The algorithm for ELM training parameters is shown in Algorithm4. First, the historical trajectory vector F and the future trajectory vector T of the nodes and the number of hidden layer nodes L are obtained in a dynamic environment. Then the hidden layer node parameters are wi and bi (lines 1-2). Then calculate the hidden layer node output matrix H according to F (line 3). Then calculate the parameter β (line 4) according to the formula β=H′T. Finally, return the parameters.After training on parameters of the extreme learning machine, it can predict the future position of each node in the wireless sensor network, as shown in Algorithm5. First, use the node history trajectory F and the training node parameters to calculate the hidden layer output matrix H (line 1) by (1); then use S=H∗β to obtain the detection result (line 2) as shown in Equation (2), and return the prediction result (line 3):(1)HW1,…,WL,b1,…,bL,…,X1,…,XL=gW1⋅X1+b1…gWL⋅X1+bLM…MgW1⋅XN+b1…gWL⋅XN+bL,(2)β^=H′T.Next, analyze the efficient data collection algorithm in the mobile sensor network environment, as shown in Algorithm6. First, for the current node v, the prediction position of the current node (line 1) is obtained by the extreme learning machine prediction functiongetELMLocation(), and the prediction process is shown in Algorithm 5. Then perform ELM node position prediction for all other nodes in the wireless sensor network, add new predicted nodes to the node position set tempN(line 34), and obtain node v to be selected from the node predicted position set tempN.Algorithm 6: ELM-based efficient data gathering algorithm.
Function: Select the next hop node of the random path in the mobile network environment
Input: Current node v on random path, node set N
Output: Next hop u of random path
Algorithm Description:
(1)
v
′
=
v
.
g
e
t
E
L
M
L
o
c
a
t
i
o
n();  //Get the current node predicted position v′ by ELM
(2)
foreach node n in N
(3)
n
′
=
n
.
g
e
t
E
L
M
L
o
c
a
t
i
o
n();  //Get the predicted position of the nodes in the sensor network through ELM
(4)
t
e
m
p
N
.
a
d
d
n
′;  //Add new node to new node position combined with tempN
(5)
end foreach
(6)
S
N
S
=
g
e
t
S
N
S
v
′
,
t
e
m
p
N;
(7)
l
e
n
g
t
h
=
S
N
S
.
l
e
n
g
t
h;  //Get the length of unlabeled nodes in the SNS
(8)
t
o
t
l
e
=
0;
(9)
foreach node p in SNS
(10)
if
p
not exits Route then
(11)
P
v
′
,
p
=
g
e
t
P
S
e
t
p
,
t
e
m
p
N;
(12)
t
o
t
l
e
=
t
o
t
l
e
+
P
v
′
,
p
.
l
e
n
g
t
h;
(13)
end if
(14)
end foreach
(15)
a
v
e
r
a
g
e
=
t
o
t
l
e
/
l
e
n
g
t
h;
(16)
foreach node k in SNS
(17)
if getPSetk,tempN.length≥average then
(18)
t
e
m
p
S
N
S
.
a
d
d
k;
(19)
end if
(20)
end foreach
(21)
u
=
r
a
n
d
S
e
l
e
c
t
t
e
m
p
S
N
S;  //Randomly select node u from tempSNS
(22)
while u exists in Route or Rv,u>r do
(23)
u
=
r
a
n
d
S
e
l
e
c
t
t
e
m
p
S
N
S;
(24)
end while
(25)
x
u
t
=
x
v
t
−
1
+
x
u
t
−
1;  //Node data overlay
(26)
R
o
u
t
e
.
l
e
n
g
t
h
=
R
o
u
t
e
.
l
e
n
g
t
h
+
1;  //Current path length plus 1
(27)
u
.
f
l
a
g
=
1;  //Current node u is marked as passed
(28)
return u;  //Returns the next hop node uNode setSNS(line 6) and parameter information are initialized (lines 7-8), and then a P function set is calculated for each unlabeled node in the SNS set. The reference nodes in the calculation are nodes in the node prediction position set tempN, and the length of the P function set of the unlabeled nodes is accumulated (lines 9–14), and the average length is obtained as the selection threshold (line 15). Then, for each unlabeled node in the set SNS, determine whether the length of the node P function set is greater than or equal to the average threshold, and if it is greater, add it to the tempSNS set as the node to be selected (lines 16–20). Next, randomly select nodes from tempSNS. If the selected node μ and the current node v are not in the communication range or the selected node μ has collected data in the current path, then the nodes in the tempSNS set are randomly selected again until the appropriate node (lines 22–24); finally superimpose the node data (line 25), add one to the current path length (line 26), and mark the selected node to return its node information (lines 27-28).In terms of analysis of the time complexity of all the algorithms, the number of executions of basic operations in the algorithm is a measure of the time complexity of the algorithm. For Algorithm6, the size of it is N; then the number of loops is determined. The time complexity T(n) = O (f(n), fastest-growing term/term factor). The time complexity of the algorithm can be determined as O(N).


## 5. Experiments

In this section, the simulation experiments are performed under the variable parameter variables such as signal sparsity and communication radius. The random selection method of nodes in static environment and the efficient data collection algorithm are implemented. Finally, the performance of the two algorithms is compared and analyzed. During the experiments, random paths are selected by using the synthetic data and the sensor node data from IntelLab laboratory.


### 5.1. Experimental Environment

The experimental environment in this chapter is as follows.(1)
Operating system: win7 64 bit operating system(2)
Memory: 8 GB RAM(3)
Processor: Intel (R) Core (TM) i5(4)
Algorithm language: C++The data used in this simulation experiment are artificial data and IntelLab laboratory data:(1)
In order to verify the effectiveness of the efficient data collection algorithm, 256 nodes’ location data information is synthesized and a 100 × 100 sensor network environment is constructed in this experiment. Because of the randomness of sensor network layout in the actual wireless sensor network environment, 256 nodes’ location data are randomly generated, and then the program removes the duplicate nodes and generates new location nodes.(2)
The data used in the simulation experiment is the node location data of IntelLab laboratory from February to April 2004. There are 54 sensor nodes, which are distributed in 35 × 45 network environment to verify the effectiveness of the efficient data collection algorithm.Table2 lists the parameter value change range and default value in the experiment. In the simulation experiments, the main parameters are signal sparsity k, the number of sensor nodes n, and the node communication radius r. The main parameters are the length changes that can be reached by m random paths in the range of multiple parameters. During the experiment, when one of the parameter variables changes, the other two reference variables are set as default values.Table 2
Range and default values of parameters.
Parameter
Default
Optional parameter value
K
7
5, 9, 11, 14
Number of nodesn
256
169, 400
Communication radiusr
8
4, 6, 10, 12When considering the effect of the number of nodesn on the performance of the two algorithms, this section only compares the two algorithms by using synthetic data.


### 5.2. Performance of Efficient Data Collection Methods in Static Sensor Networks

Figure10 shows the effect of different signal sparsity on the total number of random walk path nodes. As the signal sparseness changes, both the random path length t and the number of random paths m change. Under different signal sparsity, each test case is statistically summed 15 times and the average node length is calculated. It can be observed from the figure that, as the signal sparsity increases, the total length of actual nodes of m random paths decreases. Then it is observed that, under the same signal sparsity, the efficient data collection algorithm has better performance than the node random selection algorithm, and its performance advantage is more obvious when the signal sparsity is smaller.Figure 10
The effect of the sparsity on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)Figure11 shows the performance comparison between the two algorithms in the case of different nodes in the network. It can be observed from the figure that, with the increase of the total number of nodes in the network, the total number of actual random path nodes obtained by random selection algorithm and efficient data collection algorithm shows an increasing trend, because, with the increase of the value, the number of random walk paths and the length of random walk paths are increasing. Compared with the same node in the network, the high-efficiency data collection algorithm can get more random path nodes than the random selection algorithm, and, with the increase of the total number of nodes, the performance of the high-efficiency data collection algorithm is more obvious.Figure 11
The effect of the node number on the random path.Figure12 shows a comparison of the performance of the two algorithms under different communication radius, with other parameters remaining at their default values. Since the total number of nodes and the sparsity of signal remain unchanged, the length of random walk path remains unchanged in theory. It can be seen from the figure that, with the increase of the communication radius of the sensor nodes, the total number of nodes on the random path shows an increasing trend. When the communication radius reaches a certain value, the total number of nodes basically tends to be the same. The reason is that, as the communication range of the nodes becomes larger, the dataset of the neighbor nodes becomes larger, and the number of the next hop nodes that can be selected increases, the construction of the random walk path can be completed. Then it is observed that, under the same communication radius, the efficient data collection algorithm can show better performance than the node random selection algorithm.Figure 12
The effect of the communication radius on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)


### 5.3. Performance of Efficient Data Collection Methods in Mobile Sensor Networks

As shown in Figure13, the effect of signal sparsity on the total number of random path nodes in the mobile network environment is demonstrated, in which the parameter variables such as communication radius and total number of nodes keep the default values. It can be seen from the figure that, with the increase of signal sparsity k degree, the total number of nodes in random selection algorithm and efficient data collection algorithm based on ELM position prediction is decreasing. Then compare the performance of the two algorithms under the same signal sparsity. Through analysis, we can see that, under the same signal sparsity, the efficient data collection algorithm based on ELM position prediction can get more nodes than the random path collection algorithm. More data is collected, so the former has better performance advantages. With the increase of signal sparsity, the gap between the two algorithms gradually narrows, because, with the increase of signal sparsity, the required length of random path gradually reduces. When the value is larger, the performance advantage of efficient data collection algorithm is more obvious.Figure 13
The effect of the sparsity on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)As shown in Figure14, the effect of the change of the total number of different nodes n in the network on the total number of m random path nodes is demonstrated, and other parameters keep the default values. It can be seen from the figure that, with the change of the total number of nodes n, the total number of m random path nodes in both algorithms shows an upward trend, because, with the increase of the total number of nodes, the required length t and the number of random paths m increase. Then it is observed that, under the same node number n, the efficient data collection algorithm based on ELM position prediction has better performance than the node random path collection algorithm. Also, as n increases, this performance advantage becomes more obvious.Figure 14
The effect of the node number on the random path.As shown in Figure15, the effect of the change of communication radius on the total number of random path nodes is demonstrated. The other parameters remain at their default values. It can be seen from the figure that, with the increase of the communication radius of the nodes, the total number of nodes that can be obtained by random paths in the two algorithms is increasing. The number of selected neighbor nodes to be selected in the data collection node increases, so the number of selectable next hop nodes increases, which provides more possibilities for the current node to select the next hop node. Then it is observed that, in the same communication radius range, the proposed efficient data collection algorithm based on ELM has better performance than the random selection algorithm in a certain communication radius range. It shows that the efficient data collection algorithm based on ELM position prediction has better performance than the random selection algorithm.Figure 15
The effect of the communication radius on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)


## 5.1. Experimental Environment

The experimental environment in this chapter is as follows.(1)
Operating system: win7 64 bit operating system(2)
Memory: 8 GB RAM(3)
Processor: Intel (R) Core (TM) i5(4)
Algorithm language: C++The data used in this simulation experiment are artificial data and IntelLab laboratory data:(1)
In order to verify the effectiveness of the efficient data collection algorithm, 256 nodes’ location data information is synthesized and a 100 × 100 sensor network environment is constructed in this experiment. Because of the randomness of sensor network layout in the actual wireless sensor network environment, 256 nodes’ location data are randomly generated, and then the program removes the duplicate nodes and generates new location nodes.(2)
The data used in the simulation experiment is the node location data of IntelLab laboratory from February to April 2004. There are 54 sensor nodes, which are distributed in 35 × 45 network environment to verify the effectiveness of the efficient data collection algorithm.Table2 lists the parameter value change range and default value in the experiment. In the simulation experiments, the main parameters are signal sparsity k, the number of sensor nodes n, and the node communication radius r. The main parameters are the length changes that can be reached by m random paths in the range of multiple parameters. During the experiment, when one of the parameter variables changes, the other two reference variables are set as default values.Table 2
Range and default values of parameters.
Parameter
Default
Optional parameter value
K
7
5, 9, 11, 14
Number of nodesn
256
169, 400
Communication radiusr
8
4, 6, 10, 12When considering the effect of the number of nodesn on the performance of the two algorithms, this section only compares the two algorithms by using synthetic data.


## 5.2. Performance of Efficient Data Collection Methods in Static Sensor Networks

Figure10 shows the effect of different signal sparsity on the total number of random walk path nodes. As the signal sparseness changes, both the random path length t and the number of random paths m change. Under different signal sparsity, each test case is statistically summed 15 times and the average node length is calculated. It can be observed from the figure that, as the signal sparsity increases, the total length of actual nodes of m random paths decreases. Then it is observed that, under the same signal sparsity, the efficient data collection algorithm has better performance than the node random selection algorithm, and its performance advantage is more obvious when the signal sparsity is smaller.Figure 10
The effect of the sparsity on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)Figure11 shows the performance comparison between the two algorithms in the case of different nodes in the network. It can be observed from the figure that, with the increase of the total number of nodes in the network, the total number of actual random path nodes obtained by random selection algorithm and efficient data collection algorithm shows an increasing trend, because, with the increase of the value, the number of random walk paths and the length of random walk paths are increasing. Compared with the same node in the network, the high-efficiency data collection algorithm can get more random path nodes than the random selection algorithm, and, with the increase of the total number of nodes, the performance of the high-efficiency data collection algorithm is more obvious.Figure 11
The effect of the node number on the random path.Figure12 shows a comparison of the performance of the two algorithms under different communication radius, with other parameters remaining at their default values. Since the total number of nodes and the sparsity of signal remain unchanged, the length of random walk path remains unchanged in theory. It can be seen from the figure that, with the increase of the communication radius of the sensor nodes, the total number of nodes on the random path shows an increasing trend. When the communication radius reaches a certain value, the total number of nodes basically tends to be the same. The reason is that, as the communication range of the nodes becomes larger, the dataset of the neighbor nodes becomes larger, and the number of the next hop nodes that can be selected increases, the construction of the random walk path can be completed. Then it is observed that, under the same communication radius, the efficient data collection algorithm can show better performance than the node random selection algorithm.Figure 12
The effect of the communication radius on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)


## 5.3. Performance of Efficient Data Collection Methods in Mobile Sensor Networks

As shown in Figure13, the effect of signal sparsity on the total number of random path nodes in the mobile network environment is demonstrated, in which the parameter variables such as communication radius and total number of nodes keep the default values. It can be seen from the figure that, with the increase of signal sparsity k degree, the total number of nodes in random selection algorithm and efficient data collection algorithm based on ELM position prediction is decreasing. Then compare the performance of the two algorithms under the same signal sparsity. Through analysis, we can see that, under the same signal sparsity, the efficient data collection algorithm based on ELM position prediction can get more nodes than the random path collection algorithm. More data is collected, so the former has better performance advantages. With the increase of signal sparsity, the gap between the two algorithms gradually narrows, because, with the increase of signal sparsity, the required length of random path gradually reduces. When the value is larger, the performance advantage of efficient data collection algorithm is more obvious.Figure 13
The effect of the sparsity on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)As shown in Figure14, the effect of the change of the total number of different nodes n in the network on the total number of m random path nodes is demonstrated, and other parameters keep the default values. It can be seen from the figure that, with the change of the total number of nodes n, the total number of m random path nodes in both algorithms shows an upward trend, because, with the increase of the total number of nodes, the required length t and the number of random paths m increase. Then it is observed that, under the same node number n, the efficient data collection algorithm based on ELM position prediction has better performance than the node random path collection algorithm. Also, as n increases, this performance advantage becomes more obvious.Figure 14
The effect of the node number on the random path.As shown in Figure15, the effect of the change of communication radius on the total number of random path nodes is demonstrated. The other parameters remain at their default values. It can be seen from the figure that, with the increase of the communication radius of the nodes, the total number of nodes that can be obtained by random paths in the two algorithms is increasing. The number of selected neighbor nodes to be selected in the data collection node increases, so the number of selectable next hop nodes increases, which provides more possibilities for the current node to select the next hop node. Then it is observed that, in the same communication radius range, the proposed efficient data collection algorithm based on ELM has better performance than the random selection algorithm in a certain communication radius range. It shows that the efficient data collection algorithm based on ELM position prediction has better performance than the random selection algorithm.Figure 15
The effect of the communication radius on the random path. (a) Synthetic dataset. (b) IntelLab dataset.
(a)
(b)


## 6. Conclusion

In this paper, the properties of compressed sensing in wireless sensor networks are analyzed, and the random walk path selection strategy is studied in depth. This paper proposes an efficient data collection algorithm in a static environment for the uncertain environment of the wireless sensor network and the problems that occur during the data collection process of a complex layout. Then, it is extended to propose an efficient data collection algorithm based on ELM location prediction in mobile network environment and makes a lot of simulation experiments to verify the correctness of the algorithm. Finally, the prototype system is designed to verify the correctness and effectiveness of the algorithm.



---

*Source: 6467891-2020-04-10.xml*