 Research
 Open access
 Published:
Research on sensor network optimization based on improved Apriori algorithm
EURASIP Journal on Wireless Communications and Networking volume 2018, Article number: 258 (2018)
Abstract
Traditional node deployment strategies have problems such as slow deployment, small coverage, and poor service quality. Based on this, this study improves the traditional Apriori. This study uses the grid overlay model as the basic model and applies the improved Apriori algorithm to the WSN (wireless sensor networks) coverage optimization process of mobile nodes. This study simulates from different population sized SizePops, different search interval lengths L, and different maximum iterations Maxgen. At the same time, this paper selects the traditional Apriori algorithm and the improved Apriori optimization algorithm to compare and analyze. The research shows that the improved Apriori optimization algorithm can better combine the wireless sensor network model of the mobile node and can obtain higher network coverage under the same parameters, and the problem can be solved more effectively.
1 Introduction
As one of the key technologies to promote the development of the Internet of Things technology, the first task of the wireless sensor network is to perceive the physical world information. The coverage control problem is directly related to the sensor network’s acquisition of detailed and accurate information of the target in the monitoring area, and the perceived quality of service provided by the sensor network, which reflects the performance of the wireless sensor network. The main problem solved by wireless sensor network coverage control is how to deploy sensor nodes in the monitoring area, which enables it to maximize network coverage while ensuring quality of service. In practical applications, sensor nodes are usually different in sensing functions, computing power, energy, links, protocols, and so on, resulting in heterogeneous wireless sensor networks. How to use the existing coverage algorithm and the hardware and software resources in the network to solve the coverage control problem in heterogeneous wireless sensor networks has become an important development direction of wireless sensor network coverage control research, which has great scientific significance and wide application value. Since 2001, the US Defense Advanced Research Projects Agency has invested heavily in research on wireless sensor network technologies and proposed the concept of C4KISR systems (command, control, communications, computer, kill, intelligence, reconnaissance, surveillance), which aims to highlight the need for intelligence on the battlefield, the comprehensive ability of information, and the need to utilize it. Therefore, wireless sensor networks are an important research area. For C4KISR technology, DARPA (Defense Advanced Research Projects Agency) has established a number of military sensor network research projects such as mart Sensor Web, sensor information technology, unattended ground sensor group, sensor networking system, advanced battlefield target positioning technology, battlefield intelligence surveillance, and reconnaissance management [1]. Driven by the Natural Science Foundation of the USA, many wellknown universities (e.g., MIT, UC Berkeley, UCLA, University of Southern California, Cornell University, University of Illinois, etc.) in the USA have made extensive research on the basic theories and key technologies of wireless sensor networks [2]. Some large IT companies in the USA such as Intel, HP, Rockwell, and Texas Instruments are also actively collaborating with universities to participate in the research and development of wireless sensor network technology and have achieved many fruitful research results in the miniaturization of node size, lowpower design of nodes, selforganizing control of networks, data transmission and processing, and specific practical applications of wireless sensor networks [3, 4]. Representative research results include Dust Networks’ Dust Networks network recently acquired by Linear Technology, Crossbow Technologies’ Mote2, MoteWorks software platform, and Crossbow Mote hardware platform [5]. Representative research results include Dust Networks’ network of Dust Networks, recently acquired by Linear Technology, and Mob2, MoteWorks software platform, and Crossbow Mote hardware platform from Crossbow Technologies. In addition to the USA, many other countries in the world, such as Japan, the UK, Italy, and Brazil, have also paid close attention to and conducted research on sensor network technologies, such as the EU EYES project.
In China, the wireless sensor network and its application technology were first proposed in the research report on information and automation in the “Investigation in the Field of Knowledge Innovation Engineering Pilots” published by the Chinese Academy of Sciences in 1999, which marks the official launch of the theory and application of wireless sensor networks in China’s modern sense [6]. In order to advance the research work of sensor networks, in 2001, the >Chinese Academy of Sciences established the Microsystems Research Technology and Development Center. From 2002 to now, the National Natural Science Foundation of China, the National “863” Key Project Development Plan, and the National Key Basic Research and Development Program “973” have invested heavily in sensor network technology research to support related projects [7].
One of the research hotspots of wireless sensor networks is the optimization of network coverage [5, 8]. This paper is doing some innovation work for this research direction and based on Apriori algorithm to improve the coverage rate of wireless sensor networks.
2 Research methods
2.1 Improved analysis of Apriori optimization algorithm
Apriori optimization algorithm is a new intelligent optimization algorithm proposed in 2011, which has good global optimization performance and can solve many problems. The Apriori optimization algorithm flow can be summarized as follows [9]:

1)
Apriori algorithm population size SizePop, algorithm maximum iteration number Maxgen is initialized, and Apriori algorithm seed group position X_axis, Y_axis is randomly initialized.

2)
The individual randomly searches for positions in all directions. It can be expressed as Formula (1) and Formula (2). Among them, H_{r} is a random number between fixed intervals [−H, H], which can be expressed as Eq. (3). H is the maximum step length for each search.

3)
The distance d between the individual and the origin is calculated, and the reciprocal of the distance is taken as the individual taste density determination value S_{i}.

4)
The taste concentration determination value S_{i} is substituted into the fitness function to determine the taste concentration of the individual (Formula (6)).

5)
The best individual of Smell_{i} in the population is found (minimum value is min, maximal value is max), seeing Eq. (7).

6)
The best taste concentration value bestSmell and X and Y coordinates are recorded and retained.

7)
The iteration is started, and it is repeated (steps 2–5), and it is judged whether the optimal taste concentration is better than the taste concentration obtained in the previous iteration. When it is better than the previous generation and the current number of iterations is less than the maximum number of iterations Maxgen, then step 6 is performed; otherwise, the algorithm ends [5] (Fig. 1).
The Apriori algorithm has several obvious advantages compared to several other group intelligent algorithms [10, 11]. For example, the Apriori algorithm has a small amount of computation, a short running time, a low algorithm complexity, and a high precision. However, the Apriori algorithm has a short time and the algorithm theory and method are not mature. Therefore, the algorithm also has great defects. For example, the Apriori algorithm is not stable, and it is easy to fall into local optimum, and the convergence accuracy is reduced in the later stage, and the convergence speed is slowed down. These are the things that need to be studied and the aspects of improvement when using algorithms (Kong, 2015).
In view of the limitations of the above algorithm, the variable step size Apriori algorithm proposed in this paper divides the search into several loops [12, 13]. For example, 50 iterations are treated as a period T, and the step size in each period is changed in the form of sin(x).
Among them, L is the length of the algorithm search interval, T is the number of iterations per unit period, and mod(i, T) is the remainder of the iteration of the ith order relative to T. It can be seen from Eq. (8) to Formula (11) that the variable step size Apriori algorithm first divides the entire search process into several cycles, which can increase the diversity of the search process, so that the algorithm can effectively jump out of local convergence and greatly reduce the possibility of local convergence. Secondly, the variable step size Apriori algorithm uses the sin(x) function in each cycle, so that the step size can be changed within the unit period T. When sin(x) monotonically increases, the step size increases. At this time, the algorithm has a strong global search ability, which can achieve fast convergence, and the convergence result is not easy to accompany the local optimum. At the same time, the bigger of step size can solve the local convergence problem that sin(x) may have in the last monotonic decreasing interval. In the monotonically decreasing interval of sin(x), the step size index is reduced, which enables the algorithm to perform highprecision search in a small range, and the result has better convergence effect.
The variable step size Apriori algorithm is an improvement of the Apriori algorithm [14], so the flow of the algorithm inherits the ideas and steps of the optimization algorithm and makes some changes in the parameter initialization and step change of the algorithm. The detailed flow of the algorithm is as follows:

1)
Population size SizePop, algorithm maximum iteration number Maxgen, unit cycle iteration number T, and search interval length L is initialized, group position X_axis and Y_axis are randomly initialized, and the optimal concentration value Smellbest is obtained.

2)
The iteration is started, the remainder α of the current iteration in the period is calculated, and it can be expressed as Eq. (12).

3)
According to step (2), combined with Formula (8)–Formula (10), the search step H_{i} of the current iteration is obtained. Individuals search in random directions within the search step range, and the formula is shown in Eq. (13).

4)
X_{i} is substituted into the fitness function to determine the taste concentration of the individual, and the formula is shown in Eq. (14).

5)
The best individual of Smell in the population is found (minimum value is min, and maximal value is max), and the formula is shown in Eq. (15) [10].

6)
Record and retain the optimal taste concentration value.

7)
The iteration is started, and steps (steps 2–5) are repeated and it is judged whether the optimal taste concentration is better than the taste concentration obtained in the previous iteration. When it is better than the previous generation and the current number of iterations is less than the maximum number of iterations Maxgen, then step 6 is performed; otherwise, the algorithm ends.
2.2 Sensor network optimization based on improved Apriori algorithm
One of the hottest research areas of wireless sensor networks is the optimization of network coverage [15, 16]. This paper is to carry out some innovation work for this research direction and based on Apriori algorithm to improve the coverage of wireless sensor networks.
This paper adopts the grid coverage model. In a twodimensional region of a × b, the region is discretized into a × b receiving points, and the position of each receiving point is represented as (a_{t}, b_{t}). N number of sensor nodes is randomly deployed in the target area, and the nominal effective radius of the node coverage is R. Each node sends its own location to the Sink node, and the Sink node performs an optimization operation. Each set of sensor nodes can be expressed as Eq. (16), the distance between the node w_{i} and the receiving point (a_{k}, b_{k}) is expressed as Eq. (17), and the probability that the receiving point (a_{k}, b_{k}) can receive the node signal is expressed as Eq. (18). At the same time, the probability that the receiving point (a_{k}, b_{k}) can receive the signal transmitted by the group of nodes is expressed as Eq. (19), and the signal coverage of the transmitter W for this area can be expressed as Eq. (20).
The algorithm flow for applying the improved Apriori algorithm to WSN coverage optimization of mobile nodes is as follows:

1)
The wireless sensor network related parameters are initialized, including the area length and width, the node’s rated effective coverage radius J, and the number of sensor nodes arranged in the area is N.

2)
The relevant parameters of the Apriori algorithm are initialized and improved, including the population size SizePop, the maximum number of iterations Maxgen, the number of iterations per unit period T, and the length L of the search interval.

3)
The position of SizePop get W_{t} is randomly initialized. According to Eq. (15), the sensor node of the itth individual is represented as

4)
According to Formula (17)–Formula (21), G_{W} is calculated, the largest individual in G_{W} is marked as the best individual, and the individual’s G_{W} and position W are recorded, which can be expressed as Eq. (21).

5)
Iterative optimization calculations are taken. The individual determines the search step according to the previous research method and randomly searches in various directions.

6)
Step 4 is performed to find the individual with the highest coverage. This location and coverage are recorded and compared to the best individual coverage of the previous generation. If the individual coverage is greater than the previous generation coverage, then the individual is marked as the best individual. The position of the best individual is set to the node position, which is also the initial position of the next search, and all individuals gather to the individual.

7)
Steps 5–6 are executed cyclically until the number of iterations reaches Maxgen, and the final result is recorded. At this time, the maximum coverage rate bestG of the wireless sensor network and the corresponding node position G_{_axis} are obtained.
3 Results
Twentyfive wireless sensor nodes are placed in a 50 × 50 square monitoring area, which are characterized by a positional shift and a fixed effective radius. The node has a rated effective radius R of 5 m and a communication radius of 2R. In order to select reasonable parameters, this paper simulates from different population size SizePop, different search interval length L, and different maximum iterations Maxgen. At the same time, the average of 50 experimental results was selected as the result in each set of experiments, and finally, the appropriate parameters were selected for the wireless sensor network coverage optimization research. The search interval L is set to 5 m, the number of iterations Maxgen is set to 200, and the population size SizePop is set to 20, 50, and 100, respectively. A comparison of the different coverage rates of the population number is shown in Fig. 2.
The population size SizePop is set to 50, the number of iterations Maxgen is set to 200, and the search length L is set to 2 m, 5 m, and 10 m, respectively. The result is shown in Fig. 3.
The population size SizePop is set to 50, the search length L is set to 5 m, and the maximum iteration number Maxgen is set to 100, 200, and 500, respectively. The results are shown in Fig. 4.
Under the above wireless sensor network model, the traditional Apriori algorithm, Apriori optimization algorithm, and the improved Apriori optimization algorithm proposed in this paper are selected for comparative analysis. The number of iterations Maxgen is set to 200, the population size SizePop is set to 50, the search length L is set to 5 m, and the search interval is set to [0, 50].The simulation experiment was run 50 times, and the experimental results were averaged. The simulation results are shown in Fig. 5. The theoretical maximum coverage rate is 78.5%. On this basis, the coverage of the above three algorithms is compared, and the convergence is analyzed. The results are shown in Fig. 6.
4 Discussion and analysis
It can be seen from Fig. 2 that when the population is 20, the population is too small, resulting in insufficient network coverage accuracy. When the number of populations is 50 and 100, the final convergence accuracy tends to be consistent as the number of iterations increases. When the population is 100, the algorithm converges faster, but the search time consumed is too long and the performance is not high. Based on the comprehensive consideration of search speed and accuracy, the population number SizePop = 50 is selected.
It can be seen from Fig. 3 that when the search length L = 2 m, the search interval is too small, which leads to slow convergence in the early stage of the algorithm, low convergence accuracy in the later stage, and the obtained network maximum coverage effect is not excellent enough. When the search length L = 10 m, the search interval is too large, which leads to rapid convergence in the early stage of the algorithm, but the convergence effect decreases in the later stage. At the same time, the final convergence accuracy is low, and the resulting maximum network coverage is not good enough. When the length of the cable is L = 5 m, the early period can be quickly converge, and the convergence accuracy can be further improved in a small range in the later stage, and a higher network coverage is obtained. For the comprehensive consideration of search speed and accuracy, the search length L = 5 m is selected.
As can be seen from Fig. 4, when the number of iterations is 100, the number of searches is too small, resulting in insufficient convergence precision, and the obtained network maximum coverage accuracy is low. When the number of iterations is 200 and 500, the final convergence accuracy tends to be consistent, and the maximum coverage of the network with higher precision can be obtained. Based on the comprehensive consideration of search speed and accuracy, the maximum number of iterations Maxgen = 200 is selected.
As shown in Fig. 5, after 200 iterations, the coverage of the improved Apriori optimization algorithm is 77.12%, reaching 98.24% of the theoretical maximum coverage, and the coverage of the Apriori optimization algorithm is 75.03%, reaching 95.54% of the theoretical maximum coverage. The coverage rate of the traditional Apriori algorithm is 68.28%, reaching 86.98% of the theoretical maximum coverage. It can be seen from the comparison that the improved Apriori optimization algorithm can better combine the wireless sensor network model of the mobile node and can obtain higher network coverage under the same parameters, and the problem can be solved more effectively.
It can be seen from Fig. 6 that the traditional Apriori algorithm is trapped in local convergence after 100 iterations because the search step is fixed. At the same time, as the number of iterations increases, the algorithm itself cannot jump out of local convergence, and the convergence accuracy of the final result is not ideal. Due to the excessively previous search step size of the Apriori optimization algorithm, the convergence speed of the algorithm is too slow, and the convergence accuracy to the midterm is still not high, which affects the overall progress of convergence, leads to a poor starting point for optimization in the later stage, and causes the algorithm to require more iterations to achieve a certain effect. The improved Apriori optimization algorithm not only has fast convergence speed, but also has good convergence precision. Through the periodicity and fall of the step size, in the early stage of the optimization cycle, the improved Apriori optimization algorithm can achieve rapid convergence with the increase of the step size, and thus quickly approach the theoretical coverage. The improved Apriori optimization algorithm has good stability on the coverage optimization problem of WSN, and the algorithm does not easily fall into local optimum. At the same time, in the process of optimization, the algorithm itself has the ability to correct and can automatically jump out of local convergence, and the accuracy of the search will be further improved along with the optimization process.
Through the data display and analysis of the simulation experiment, it can be seen that the improved Apriori optimization algorithm has good performance (convergence precision and convergence speed) on the wireless sensor network coverage optimization problem of the mobile node. Compared with several other improved intelligent optimization algorithms for wireless sensor network coverage optimization problems applied to mobile nodes, the proposed algorithm in this paper can better combine the network model, has better effect and more stable process, and finally obtains higher network coverage, which is more suitable for wireless sensor network coverage optimization of mobile nodes.
5 Conclusion
In this paper, some innovations are carried out for wireless sensor network optimization, and this paper improves Apriori algorithm based on Apriori algorithm to optimize the coverage of wireless sensor networks. The Apriori algorithm is unstable, easy to fall into local optimum, the convergence precision is reduced, and the convergence speed is slowed down later. These are the aspects and areas of improvement that need to be studied when applying algorithms. In view of the limitations of the above algorithm, the variable step size Apriori algorithm proposed in this paper divides the search into several cycles. For example, 50 iterations are taken as a period T, and the step size in each period is changed in the form of sin(x).
This paper adopts the grid coverage model. In a twodimensional region of a × b, the region is discretized into a × b receiving points, and the position of each receiving point is represented as (a_{t}, b_{t}). In this paper, the traditional Apriori algorithm, Apriori optimization algorithm and the improved Apriori optimization algorithm proposed in this paper are selected for comparative analysis. The number of iterations Maxgen is set to 200, the population size SizePop is set to 50, the search length L is set to 5 m, and the search interval is set to [0, 50]. The simulation experiment was run 50 times, and the experimental results were averaged. Through the data display and analysis of the simulation experiment, it can be seen that the improved Apriori optimization algorithm has good performance (convergence precision and convergence speed) on the wireless sensor network coverage optimization problem of the mobile node. Compared with several other improved intelligent optimization algorithms for wireless sensor network coverage optimization problems applied to mobile nodes, the proposed algorithm in this paper can better combine the network model, has better effect and more stable process, and finally obtains higher network coverage, which is more suitable for wireless sensor network coverage optimization of mobile nodes.
Abbreviations
 C4KISR:

Command, control, communications, computer, kill, intelligence, reconnaissance, surveillance
 DARPA:

Defense Advanced Research Projects Agency
 WSN:

Wireless sensor networks
References
J. Yang, H. Zhang, Y. Ling, et al., Task allocation for wireless sensor network using modified binary particle swarm optimization [J]. IEEE Sensors J. 14(3), 882–892 (2014)
M. Iqbal, M. Naeem, A. Anpalagan, et al., Wireless sensor network optimization: multiobjective paradigm [J]. Sensors 15(7), 17572–17620 (2015)
J. Li, X. Chen, X. Huang, et al., Secure distributed deduplication systems with improved reliability. IEEE Trans. Comput. 64(12), 3569–3579 (2015)
G. Sun, H. Yu, V. Anand, et al., A cost efficient framework and algorithm for embedding dynamic virtual network requests. Futur. Gener. Comput. Syst. 29(5), 1265–1277 (2013)
R. Mijumbi, J.L. Gorricho, J. Serrat, et al., A neurofuzzy approach to selfmanagement of virtual network resources. Expert Syst. Appl. 42(3), 1376–1390 (2015)
Y. Ge, J.H. Wang, G.B.M. Heuvelink, et al., Sampling design optimization of a wireless sensor network for monitoring ecohydrological processes in the Babao River basin, China [J]. Int. J. Geogr. Inf. Sci. 29(1), 92–110 (2015)
W. Xu, Y. Zhang, Q. Shi, et al., Energy management and cross layer optimization for wireless sensor network powered by heterogeneous energy sources [J]. IEEE Trans. Wirel. Commun. 14(5), 2814–2826 (2015)
G. Sun, H. Yu, L. Li, et al., The framework and algorithms for the survivable mapping of virtual network onto a substrate network. IETE Tech. Rev. 28(5), 381–391 (2011)
D.T. Ho, P.B. Sujit, T.A. Johansen, Optimization of wireless sensor network and UAV data acquisition [J]. J. Intell. Robot. Syst. 78(1), 159–179 (2015)
D. Qiao, G.K.H. Pang, A modified differential evolution with heuristic algorithm for nonconvex optimization on sensor network localization [J]. IEEE Trans. Veh. Technol. 65(3), 1676–1689 (2016)
Y. Zhang, X. Chen, J. Li, et al., Ensuring attribute privacy protection and fast decryption for outsourced data security in mobile cloud computing. Inf. Sci. 379, 42–61 (2017)
G. Yang, W. Tan, H. Jin, T. Zhao, L. Tu, Review wearable sensing system for gait recognition [J]. Clust. Comput. (2018). https://doi.org/10.1007/s105860181830y
Y. Lin, C. Wang, J. Wang, Z. Dou, A novel dynamic spectrum access framework based on reinforcement learning for cognitive radio sensor networks [J]. Sensors 16(10), 1–22 (2016). https://doi.org/10.3390/s16101675
G. Yang, Y. Zhang, J. Yang, et al., Automated classification of brain images using waveletenergy and biogeographybased optimization [J]. Multimed. Tools Appl. 75(23), 15601–15617 (2016)
Z. Zheng, A.K. Sangaiah, T. Wang, Adaptive communication protocols in flying ad hoc network [J]. IEEE Commun. Mag. 56(1), 136–142 (2018)
S. Su, Z. Zhang, A. Liu, et al., Energyaware virtual network embedding. IEEE/ACM Trans. Networking 22(5), 1607–1620 (2014)
Acknowledgements
Not applicable.
Funding
No
Availability of data and materials
Not applicable.
Author information
Authors and Affiliations
Contributions
QJ is in charge of the major theoretical analysis, algorithm design, and numerical simulations. SZ is in charge of part of the theoretical analysis and algorithm design. Both authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Ji, Q., Zhang, S. Research on sensor network optimization based on improved Apriori algorithm. J Wireless Com Network 2018, 258 (2018). https://doi.org/10.1186/s136380181278z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s136380181278z