Method for Patching Three-Dimensional Surface Coverage Loopholes of Hybrid Nodes in Wireless Sensor Networks

Target sensing and information monitoring using wireless sensor networks have become an important research ﬁ eld. Based on two-dimensional plane research, information monitoring, and transmission for three-dimensional curved target events, due to the uneven deployment of nodes and failures in sensor networks, there are a lot of coverage loopholes in the network. In this paper, a method of detecting and repairing loopholes in monitoring the coverage of three-dimensional surface targets with hybrid nodes is proposed. In the target monitoring area where the hybrid nodes are randomly deployed, the three-dimensional surface cube is meshed, and the coverage loopholes are gradually detected according to the method of computational geometry, and then, the redundant mobile nodes around the coverage loopholes are selected. According to the calculated distance to cover the moving direction and distance of the loophole, the virtual force is used to adjust the mobile nodes to repair the coverage loopholes. Simulation results show that compared with other algorithms, this algorithm has a higher utilization rate of mobile nodes, uses fewer nodes to complete coverage, reduces network coverage costs, meets the overall network coverage requirements, and has lower mobile energy consumption and longer network life. The actual scene further veri ﬁ es the good connectivity and high coverage of the whole network.


Introduction
Wireless sensor networks (WSNs) that are coordinated and communicated with each other and consist of multiple microsensor nodes are wireless coverage networks. The research on coverage monitoring of wireless sensor networks is mainly applied to forest fire monitoring, underwater dynamic monitoring, and national defense boundary security monitoring [1,2], in which coverage and energy consumption are the key issues of wireless sensor networks. The coverage and connectivity of wireless sensor networks not only directly affect the normal operation of the network but also greatly affect the consumption of network energy, the length of the network life cycle, and the level of network service quality [3]. On the one hand, due to the limitation of price cost and its own volume, the sensor node's event processing capacity, communication bandwidth, and power energy are extremely limited, especially in dangerous and harsh environments. It is not feasible to replace the sensor node or charge the sensor node [4]. On the other hand, under the condition that certain coverage is met, during the process of monitoring the target coverage area by high-density deployed nodes, when all nodes are in the working state, a large amount of data and information will interfere with each other, forming a phenomenon of information redundancy, which will not only cause the necessary energy loss that consumes a lot of network energy but also cause data packet conflicts, which greatly reduces the network quality performance. Therefore, in order to meet the requirements of network coverage and connectivity, when designing a wireless sensor network, patching coverage loopholes has become a very important issue. The problem of node deployment is a basic problem in WSN research, and it is the basis for the practical application of the network. It directly affects the accuracy, completeness, and timeliness of network monitoring information [5].
The research on two-dimensional (2D) planar coverage has become mature, but coverage monitoring is often applied in some complicated environmental conditions. In order to meet the requirements of target area coverage monitoring information, in-depth research on three-dimensional (3D) coverage is needed [6]. Based on this research, static nodes and dynamic nodes are mixed to deploy to form an efficient deployment method. Therefore, a hybrid node 3D surface covering loophole repaired method is proposed in this paper. First, a 3D coverage model is established to detect the coverage holes existing after the nodes are randomly deployed in the 3D surface. When the coverage holes are detected, the redundant mobile nodes around the coverage loopholes are dynamically and randomly searched. Under the action of the virtual force, the covering holes are repaired according to the moving path and direction. The experimental verification shows that the algorithm in this paper can fulfill the coverage requirements well and save the energy consumption and improve the overall network coverage. The main contributions of this article are listed below: (1) The coverage of the 2D plane is extended to the 3D surface, a probabilistic coverage model of the 3D surface is proposed, and the coverage and connectivity of the 3D surface are detected (2) Using the method of computational geometric graph theory to detect the coverage loopholes of the 3D surface, the algorithm is executed to calculate the repair path and direction, and then, the redundant nodes are moved to repair the coverage loopholes according to the effect of the virtual force (3) Verified by simulation experiments, the effectiveness and coverage of the algorithm in this paper are verified, and compared with the 3D-DVFA algorithm and the 3DSD algorithm, the algorithm in this paper has higher coverage loophole detection rate and repair rate and actual scenarios are set up to verify network connectivity and coverage issues The rest of the paper is arranged as follows. Section 2 describes the research progress and related work of wireless sensor networks in recent years. Section 3 describes the network model and related definitions used in this paper. Section 4 discusses the coverage loophole detection and repair algorithms proposed in this article. In addition, the design steps of the three-dimensional surface coverage loophole detection and repair (3D-SCHDR) algorithm in this paper are summarized. Section 5 verifies the theoretical network coverage and energy consumption analysis of the proposed algorithm and compares the algorithm in this paper with two other similar algorithms. A real experimental scenario was established to verify the good coverage and connectivity of the network. Section 6 presents the conclusions and briefly discusses the direction of future work.

Related Work
At present, wireless sensor network coverage control is a hot topic of research, which can effectively monitor environmental information and transmission tasks [7]. In order to achieve full coverage and connectivity [8,9], scholars have done a lot of research. Sensor networks are usually used in complex environments, and the node deployment methods are divided into deterministic deployment and random deployment, which is more practical. The authors of [10] proposed an effective strategy for the failure of normal monitoring when a network sensor fails, by establishing a dualconnected interpartition topology, while minimizing the maximum path length between partitions and deploying the minimum number of relay nodes (RN) to achieve failure recovery and effective network connectivity. In [11], the authors presented TSCR-M which is a single-hop-based routing algorithm supported for multiple mobile sinks in WSNs. There are mainly two parts in TSCR-M, park position selection and multipath scheduling for mobile sinks. The algorithm reduces the energy consumption and improves the network life. In [12], based on the deep study of game theory, a mobile sensor noncooperative game model is established for the sensor network deployment and a local information-based topology control (LITC) algorithm for coverage enhancement is proposed. The proposed algorithm can enlarge the coverage of the entire monitoring area while achieving effective coverage of the events. In [13], when the child node loses connection with the sink node, data transmission is interrupted. In order to restore the connection, a strategy of filling the relay nodes to restore the connection partition and distributed self-deployment is proposed. The authors of [14] proposed a new algorithm for the coverage loopholes that occurred when the network achieved full coverage, using the nature of empty circles to evaluate whether there are loopholes in the network and accurately identifying the boundary nodes of the coverage loopholes. Compared with other algorithms, it has the advantage of low computational complexity. In [15], due to the problem of coverage loophole caused by node failure, proposed is a multiobjective nonlinear mathematical programming model based on flow, in which nodes in a mobile network repair coverage loopholes. Optimize the total moving distance and individual moving distance of the node, and use the flow balance condition to improve the coverage. However, the problems of mobile energy consumption and prolonging the life of the network are not considered. In [16], in order to solve the concern about full coverage and connectivity of the network and to meet the requirements of reliability and real-time performance in industrial applications, the selected four connected coverage algorithms (CWGC, OCCH, OTTC, and AR-SC) analyze the performance of coverage time and network energy consumption. Various parameters are simulated in the environment of serious interference to get the best network coverage. In [17,18], the authors study the scheduling method of wireless sensor networks, which improves the life cycle of the network and the load balancing of the network. The algorithm in [19] is aimed at ensuring the maximum connectivity in the network life cycle and providing reliable data transmission. An Enhanced Connected Load Balanced Coverage Algorithm (MCLCT) of the enhanced leaching algorithm is proposed. Through dynamic organization of the load balancing routing coverage tree, full coverage and connectivity of the base stations of each sensing node are 2 Journal of Sensors obtained. Simulation experiments verify the superiority of the proposed algorithm in energy consumption, network life cycle, and connectivity. In [20], the authors considered the self-deployment of the network and proposed a mechanism that allows the network connection to be maintained during the deployment of mobile sensor nodes. In order to maintain connectivity, the distance covered by a mobile node is constrained by the connectivity of the nodes in the connected subgraph to its neighbors, and the simulation results of different deployment schemes are verified. The coverage loophole repair schemes in sensor networks are mainly divided into two categories: one is to add nodes at the loopholes and the other is to move the existing redundant nodes in the network. In [21], in order to effectively deploy sensors to cover the whole area, the authors present a novel node deployment algorithm based on mobile sensors. The problems of covering redundancy and covering holes are solved. In [22], a distributed self-deployment protocol for mobile sensors was designed for sensor deployment. Use Voronoi diagrams to detect coverage holes and move sensor nodes from densely deployed areas to sparse areas according to three motion-assisted deployment protocols to improve coverage. However, the energy consumption of mobile nodes is not considered. In [23], the authors introduced a new technique for covering holes through homology detection. The driving force of this technology is to complete the network communication diagram of two types of simple complexes: neural complexes and rips complexes. The authors of [24] proposed a serpentine mobile node control strategy SCRP and used a directed Hamiltonian loop to fill the coverage hole area. In this way, the network connection and coverage can be guaranteed. The disadvantage is that the mobile nodes in the network have a large moving distance, which greatly increases their energy consumption. In [25,26], in order to prolong the life cycle of the network, clustering technology is applied to improve the network performance in the WSN routing phase, and the adaptive clustering hierarchy with low energy consumption is effectively used. In [27], the authors used Voronoi diagrams to detect coverage holes in the network and proposed distributed protocols VEC, VOR, and Minimax for controlling node movement. After multiple iterations of the mobile node finally reaching the appropriate position, as long as there is still a coverage hole, the position of the hole is calculated and the mobile node is moved to that location for repair. However, using all mobile nodes in the network leads to higher energy consumption and costs. In [28], the authors consider both energy efficiency and coverage rate for WSNs. In this paper, we present a novel coverage control algorithm based on Particle Swarm Optimization (PSO). Simulation results show that the algorithm can effectively improve coverage and reduce energy consumption. In [29], the authors studied the use of the mobility of mobile sensor nodes to improve the quality of coverage and network connection and how to move the sensor nodes with the smallest mobile deployment distance to form a WSN that provides target coverage and network connectivity. Reducing the moving distance of nodes can not only reduce network energy consumption but also extend network life. In [30], for the problem of achieving global coverage in wireless sen-sor networks with mobility, the authors proposed a centroidbased attractive force algorithm (CAVFA), which can improve the network coverage in the entire area. Through adjustable parameters, better cooperation between mobile nodes and fixed nodes is achieved. Simulation experiments show that the algorithm has higher coverage and convergence speed. In [31], the authors proposed a 3D adaptive 3DSD algorithm in mobile sensor networks for WSN deployment in a 3D space. A 3D virtual force model was first established, a negotiation strategy was introduced to ensure network connectivity, and a density strategy was used to balance node distribution. The verification results show that the coverage of the proposed algorithm is close to the optimal value and meets the coverage requirements. In [32], it is assumed that the 3D mountain terrain is completely covered, and mobile sensor networks are introduced to improve the coverage problem because of the uneven coverage. Proposed is a 3D coverage method, which can consider the physical characteristics of the mountain terrain 3D spiral model and can be completely covered by the deployment of an appropriate number of sensors and designated sensing points. However, this method is not suitable for large-scale network environment. In [33], the authors proposed a node-optimized coverage method for a passive monitoring system of a three-dimensional wireless sensor network based on a link model for a 3D practical application environment quality. Intruders are detected by data packets transmitted between wireless links, and then, the coverage area is monitored by monitoring the received signal strength of the wireless signal. In [34], the authors study this directional antenna coverage problem and propose a new solution by using three-dimensional coordinate transformation, provide wireless signal coverage schemes for point-to-point and point-to-region, and determine the required horizontal rotation angle and pitch rotation angle of the directional antenna intelligent coverage, which lays the foundation for the performance of the wireless broadband communication in the maneuver command communication system. In [35], in order to completely cover the 3D area of interest, it is assumed that the sensor nodes are mobile and can gradually move towards a specified position. The authors design a 3D distributed redeployment algorithm (3D-DVFA) based on virtual force which is designed to ensure the coverage and connectivity. The effectiveness of the algorithm is verified. In [36], for the problem of sensor network deployment, the optimal number of sensor nodes was used to optimize the coverage and connectivity of sensor networks. The authors proposed a distributed deployment algorithm based on improved virtual force strategy, which can provide complete coverage and network connectivity.
Based on the above related work, the research on coverage deployment and coverage loophole detection and repair algorithms in wireless sensor networks has achieved a stage. However, most of these studies are suitable for the 2D plane, and there are few application studies in the 3D complex environment, so researchers need to invest a lot of research on 3D wireless sensor networks, considering not only network connectivity and coverage but also multiple network performance indicators such as the dynamics and energy constraints of the network and the quality of service of large-scale networks.

3D Surface Coverage Optimization Deployment
Description. This paper mainly studies the coverage holes that appear when the target area of the 3D surface is randomly deployed and redundant mobile nodes are moved to repair the coverage holes, effectively improving the coverage of the 3D surface. First of all, the cube mesh is divided into the target area of the 3D curved surface, static nodes and mobile nodes are mixed and randomly deployed in the target area, and the two kinds of nodes form a hybrid sensor network in the target area. Due to the problem of uneven deployment of random spray nodes, in order to meet the coverage requirements of the 3D curved target area, it is necessary to detect and repair the coverage holes existing in the sensor network to improve the network coverage and achieve effective monitoring of the 3D curved target area [37]. Meshing the target area is a common method in the study of 2D area coverage deployment. The principle is to divide the target coverage area into a certain shape to obtain a number of small-scale grid areas. The purpose is to facilitate scholars' research. The method can better study how to improve coverage and reduce energy consumption. Inspired by the 2D planar overlay mesh division, the mesh division is extended to a 3D surface. The coverage target area D is set to be a 3D surface. The cube mesh is first divided as shown in Figure 1(a). Then, the surface of the 3D curved target area is randomly sprayed with N hybrid sensor nodes for overlay deployment, as shown in Figure 1(b), where the gray circles are filled with static nodes and the black circles are filled with mobile nodes.

Establish 3D Surface Coverage Model and Related
Definitions. The common disc perception model is mainly used in 2D plane coverage; in order to apply the actual scene, it is necessary to build a 3D surface coverage model, so the 3D probability perception model is adopted. The probabilistic perception model is a continuous model, which is more in line with the actual situation and also more in line with the actual network service quality standards. At the same time, it reflects the close correlation between perceived probability and distance. Suppose the sensor network environment is as follows: the target area is the 3D surface coverage area D, in which N sensor nodes are randomly deployed. The position of node N i ðx i , y i , z i Þ, i = 1, 2, 3, ⋯, N, then the coordinate of the observation target point Mðx M , y M , z M Þ and the detection probability observed by sensor node N i is Among them, the coverage probability of P is at any point Mðx X , y X , z X Þ in the sensing area of node N i ; the geometric distance between node N i and point M is represented by d, . α and β in the formula are type parameters, which are related to the physical characteristics of the sensor. Generally, the parameter value of α is adjustable, β is a constant, and the value range is [1,4]. The coverage probability is P ∈ ½0, 1 of any point, and when point P coincides with the N i node ðd = 0Þ , the coverage probability of the node is equal to 1.
A large number of nodes randomly deployed in a wireless sensor network will cause a high density of nodes in the target area. Multiple nodes may detect the same thing at the same time, which indicates that there is a node coverage redundancy area between nodes. The nodes covering the redundant area have neighbor nodes. The existence of these neighbor nodes will cause point t to fall in the overlapping area, which will cause the neighboring nodes to affect the probability that point t is actually covered by a node. For example, there is a node N i , which has K − 1 neighbor nodes N 1 , N 2 , ⋯, N k , and the sensing regions of the node N i and the neighbor nodes are, respectively, denoted as RðN i Þ, i = 1, 2, 3, ⋯, k, and then the overlapping regions H = RðN i Þ, RðN 1 Þ ∩ RðN 2 Þ ∩ ⋯ ∩ RðN k Þ of these sensing regions. At this time, the network's detection probability of the observation target Mðx X , y X , z X Þ can be expressed as Substituting into equation (2), we get According to equation (3), when the occurrence of an event is monitored by multiple sensor nodes at the same time, the detection probability P of any single node that monitors the event will not be higher than the actual detection probability P M of the system.
In this paper, according to the wireless sensor network deployed by hybrid nodes, the sensor nodes are assumed as follows: static nodes and mobile nodes have mixed deployment, and all nodes have isomorphism and detection all round 3D surfaces. The node communication radius is R c and the sensing radius is r s , and R c ≥ 2r s . The mobile nodes have enough energy to support movement.
Definition 1 (neighbor nodes). If the selected node can communicate directly or indirectly with any nodes and the Euclidean distance is less than or equal to the sum of the two nodes' sensing radius, then these two nodes are called neighbor nodes. The set of neighbor nodes of the selected node is In equation (4), N represents the set of mixed nodes in the entire network, N y represents the selected node, N x represents any node, r sy represents the sensing radius of node N y , and r sx represents the sensing radius of source node N x .

Journal of Sensors
Definition 2 (3D joint detection probability). In the 3D curved target monitoring area, the probability that any cube grid is effectively covered is the effect of the joint action of multiple sensor nodes, so the entire network's joint detection probability of any cube grid U k ðPÞ can be defined as where P i is the detection probability of sensor node i, ∅ represents the set of nodes that meet the conditions, d k,i is the distance between monitoring point k and node i, and R c is the communication radius of the node. This paper mainly uses equation (5) to calculate the 3D joint detection probability of each cube grid in the monitoring area to determine the coverage of the target space and whether it meets the 3D coverage requirements.
Definition 3 (virtual force). When nodes are randomly deployed to the monitoring area, they are redeployed with the help of the Van der Waals forces in the physical world. When the distance between two nodes is greater than a certain value, gravity will bring them closer to each other. When it is close to less than a given value, a repulsive force will be generated, and the distance between the two will be adjusted accordingly so that the nodes are evenly distributed in the target area.
Among them, k 1 , k 2 , a 1 , and a 2 all represent gain coefficients, m i and m j represent node quality factors (usually taking unit 1), d ij represents the Euclidean distance between node i and node j, k min represents the minimum safe distance between nodes, k b represents the equilibrium distance between nodes, and R c represents the communication radius of the nodes. When the distance between the nodes is less than the minimum safe distance, there is an infinite repulsive force between the nodes; when the distance between the nodes is between the minimum safe distance and the equilibrium distance, the nodes have a repulsive force; when the distance between nodes is equal to the equilibrium distance, there is no force to achieve equilibrium; when the distance between the nodes is between the equilibrium distance and the communication radius, the nodes attract each other; when the distance between the nodes is greater than the communication radius, the force between the nodes disappear.
Definition 4 (redundant nodes). In the entire network, if a node's sensing area monitoring information can be replaced by several other nodes, then this node is called a redundant node. Nodes communicate with each other and broadcast messages to determine whether the node is a redundant node. When the node is determined to be a redundant node, the node does not participate in the coverage loophole detection, and it is considered that the node will not cause a new coverage loophole in the network. The redundant mobile nodes are mainly used to repair coverage loopholes.
Definition 5 (shortest path of node movement). After detecting the coverage holes of the 3D surface target area, the redundant mobile nodes around the coverage loopholes need to be used to repair the loopholes. And the moving distance of the mobile node is related to the total energy consumption of the entire network. In order to reduce the overall network energy consumption, the shortest moving path of the mobile node needs to be calculated.
Definition 6 (3D surface coverage). The ratio of the volume of the 3D surface target area completely covered by the sensor node to the total volume of the target area to be covered is called the 3D surface coverage. Regarding the calculation of the coverage of the 3D surface in this paper, the method of mesh division is used to divide the monitored 3D surface area into cube grids of equal size. Calculate the perceptual coverage of each cube mesh, and add up the coverage of each cube to obtain the total 3D surface coverage.
Among them, η represents the 3D surface coverage, ξðiÞ represents the volume of the effective coverage area of the node, and VðΩÞ represents the total volume of the monitoring area.  Proof. Take the acute triangle as an example; the proof of the right triangle is similar, discussed in three situations:

3D Surface Coverage Loopholes for Detection and Repair Algorithm
(1) As shown in Figure 2(a), node A and two neighbor nodes B, C form an acute-angled triangle, the circumscribed sphere center O is located within the acuteangled triangle, the circumscribed sphere radius R ≤ r s , and the circumscribed sphere center O is these nodes cover, so there is a common coverage monitoring area, and there are no coverage loopholes between the three sensor nodes.
(2) As shown in Figure 2(b), node A and two neighbor nodes B, C form an acute-angled triangle. When the radius of the circumscribed sphere R > r s , there is no common coverage of the monitoring area between the three nodes. Outside O the coverage of these three sensor nodes, there are coverage loopholes.
(3) As shown in Figure 2(c), node A and two neighbor nodes B, C form an acute-angled triangle, and the proof method is similar to the above two cases.

Theorem 2.
When any node A of the 3D covering surface forms an obtuse triangle with its two neighbor nodes B, C and the circumscribed sphere radius R ≤ r s of the obtuse triangle, there are no coverage loopholes near the node; otherwise, when the circumscribed sphere radius R > r s and the outer sphere center O is not covered by other sensor nodes, there are coverage loopholes near the node.
Proof. It is discussed in the following three situations: (1) As shown in Figure 3(a), node A and two neighboring nodes B, C form an obtuse triangle. When the radius of the circumscribed sphere R ≤ r s , the radius of the circumscribed sphere R is within the coverage of one of the sensor nodes. The spherical center O is covered by these nodes, so there are no coverage loopholes between these three nodes. When R > r s , the outer spherical center O is outside the coverage of these three sensor nodes. If the point O is not covered by any other sensor node, there are coverage loopholes near the node.
(2) As shown in Figure 3(b), node A and two neighboring nodes B, C form an obtuse triangle, and the angle where the node is located is an acute angle. When the corner where the node is located is an acute angle and R ≤ r s , the outer spherical center O is within the coverage monitoring range of one of the sensor nodes, that is, there is no coverage loophole between the three nodes; when the angle where the node is located is an obtuse angle and R > r s , the outer spherical center O is outside the coverage monitoring range of the sensor node, that is, coverage loopholes exist between the three nodes.
(3) As shown in Figure 3(c), node A and two neighboring nodes B, C form an obtuse triangle, and the proof method is similar to the above two cases.
Based on the description of the above theorem, this section introduces a method of detecting WSN coverage loopholes based on geometry, and the method is distributed and     As shown in Figure 4(a), node B is a hole edge node, L 1 and L 2 are hole edge intersections, and arc d L 1 L 2 is an uncovered arc of node B, and the vectors BL 1 ! and BL 2 ! are made. The purpose of the mobile node is to reduce the volume of the covered hole. From the perspective of the movement itself, the movement increases the arc length of the nodes that are not covered by the edge of the hole. Eventually, as many nodes as possible will perceive the intersection of circles at the same point. The essence of the algorithm in this paper is to move the redundant nodes at the edge of the hole to make their neighbors intersect at the same point through the action of virtual force. Because the nodes in the wireless sensor network are randomly distributed and there is no precise geographic information, it is not realistic to use vectors. This If cos∠BAC < 0, move the trajectory Then, calculate the distance between the selected mobile node and the edge node of the coverage loophole, as shown in Figure 6. When nodes X and Y satisfy the coverage arc B b,x ∩ B b,y ≠ NULL, the intersection of X and Y is a point within B. Let its intersection point be o. d b,x , d b,y , d x,y are known, and d x,o = d y,o = r s . Obtained by the rule of triangle ∠o, x, y = cos −1 d 2 ∠b, cos∠b, The following can be obtained from equations (11)- (14):   The algorithm in this paper shows that the movement of the nodes is limited to the distance of the neighbors, and the movement of the nodes has no effect on the existing coverage and does not affect the coverage of the original nodes, so the algorithm does not affect the original coverage. Assume that any coverage loopholes in the network are surrounded by m nodes, and each arc node has n arc nodes. The time complexity of the algorithm in this paper is Oðn 2 Þ. Mobile nodes are used to repair the edge nodes that cover the loopholes in turn and can quickly converge [38,39]. Simulation experiments prove that for the overall wireless sensor network, the coverage loopholes existing in it can be basically repaired, and the monitoring information requirements of the coverage target area can be met [40,41].

Algorithm Description.
Based on the description of the above algorithm theory, this paper proposes a wireless sensor hybrid node coverage loophole detection and repair Algorithm 1. The coverage loopholes of the network randomly deployed by the hybrid node are detected, and when the coverage loophole is detected, the virtual force is used to schedule the mobile node to repair the holes. The specific steps of the algorithm are listed as follows.
Step 1. Initially deploy N hybrid sensor nodes randomly and divide the 3D curved target area into a cubic mesh. Set the parameters of the perception model and use the joint detection probability model to detect the coverage of each cube grid.    Journal of Sensors Step 2. In the network, select any reference node A with coordinates ða, b, cÞ, find the two neighbor nodes of node A, as a set W, and determine this based on geometric graphicsrelated knowledge, whether there are coverage holes between the three sensor nodes.
Step 3. The calculation node A and the two neighbor nodes B, C constitute the external sphere radius R and the ball center O of △ABC and determine the shape of △ABC (acute triangle, right triangle, and obtuse triangle).
Step 4. If △ABC is an acute-or right-angled triangle and R ≤ r s , there are no coverage loopholes around node A; otherwise, there are coverage loopholes around node A.
Step 5. If △ABC is an obtuse triangle and R ≤ r s , then there are no coverage loopholes around node A; otherwise, check whether O point is covered by other sensor nodes.
Step 6. If point O is covered by other sensor nodes, there are no coverage loopholes around node A; otherwise, there is a coverage vulnerability around node A.
Step 7. After detecting the coverage loopholes, select the redundant mobile nodes around the coverage loopholes, calculate the node's moving direction and distance according to formulas (8)- (15), and repair the coverage loopholes one by one under the action of the virtual force.
Step 9. Determine whether the network coverage and connectivity meet the requirements.
Step 10. End the algorithm.
The algorithm flowchart is shown in Figure 8.

Simulation Environment and Parameter Settings.
Based on the proposed 3D surface coverage loophole detection and repair (3D-SCHDR) algorithm deployed by hybrid nodes in this paper, simulation experiments were performed to verify the coverage and energy consumption. Using MATLAB2015b simulation software for experimental verification, it is assumed that the deployment environment of wireless sensor network is the 3D curved area of 100 m * 100 m * 30 m, and the sensor nodes are deployed randomly under the initial conditions, and the simulation parameters are shown in Table 1.

Algorithm Performance Analysis.
Simulation experiments verify the performance index of the coverage loophole repair method proposed in this paper. The coverage loophole detection rate and repair rate of the 3D-SCHDR algorithm as well as the energy consumption of mobile nodes are verified and analyzed. Under the same other conditions, after many optimization simulation experiments, the first is to analyze the relationship between the coverage loophole detection rate of the algorithm with different iterations and the number of sensor nodes. The second is to analyze the relationship between the coverage loophole repair rate and the number of sensor nodes with different proportions of mobile nodes. The third is to analyze the relationship between the coverage repair rate and the time change of different mobile nodes. Fourth, the relationship between the energy consumption of mobile nodes with different numbers of mobile nodes and the number of iterations of the algorithm is analyzed. Judge whether the algorithm meets the coverage requirements of network monitoring and the requirements of connected transmission, reduce the mobile energy consumption, and maximize the life cycle of the network. The variation curve of coverage loophole detection rate and the number of sensor nodes is shown in Figure 9. With the same number of sensor nodes, the detection rate of coverage holes varies with the number of iterations of the algorithm. At the beginning, the number of sensor nodes is small, the number of algorithm iterations is increasing, and the coverage loophole detection rate change is not obvious. When the nodes gradually double and increase, the number of different algorithm iterations makes the coverage loophole detection rate change greatly. The more nodes are there, the more coverage loopholes the algorithm detects. When the total number of nodes reaches 180 and the number of algorithm iterations reaches 150, the coverage loophole detection rate in the entire network reaches a maximum of 92%.
When using virtual force scheduling mobile nodes to repair coverage holes, the experimental results show that with the different proportions of mobile nodes, the change curve of coverage loophole repair rate and the number of sensor nodes is shown in Figure 10. When the proportion of mobile nodes in the total number of nodes is different, the coverage loophole repair rate is also different with the running of the algorithm. When the total number of nodes is increased from 0 to 90 ranges, the coverage rates of three different proportions of mobile node coverage loopholes are growing steadily. When the total number of nodes gradually increased from 90 to 180, the change curves of three different proportions of mobile nodes changed greatly. The curve with a mobile node ratio of 30% rose the fastest, and the upward trend of the curve of the other two ratios is slow. The experimental results show that when the proportion of mobile nodes reaches 30%, the overall network coverage loophole repair rate has the best effect.
Aiming at the number of different mobile nodes, the relationship between the repair rate and repair time of the 3D surface coverage vulnerability is shown in Figure 11. With the iterative operation of the algorithm, the coverage loopholes are gradually repaired. Under the initialization condition, because some mobile nodes act as static nodes, the loophole repair rate is relatively small. If the number of mobile nodes is different, the selection probability of redundant mobile nodes around the loopholes is different. The more mobile nodes there are the greater the probability of choosing to repair the loophole. When the number of mobile nodes is 18 and 36, as time increases, there are almost no redundant mobile nodes that can repair loopholes, so they 11 Journal of Sensors cannot meet the coverage loophole repair requirements. The experimental results show that when the number of mobile nodes is 54, over time the coverage loopholes are gradually repaired, and the overall network meets the coverage and connectivity requirements.
The change curve of mobile node energy consumption and algorithm iteration times is shown in Figure 12. The energy consumption of different mobile nodes in the network is analyzed. As the number of algorithm iterations increases, the more coverage loopholes are detected in the network, and the loopholes are continuously repaired. The node energy consumption is also increasing. The energy consumption of mobile nodes is also increasing. When the initial algorithm iterations are in the range of 0-60, the number of vulnerabilities detected in the network is small, and the energy consumption of mobile nodes is relatively small. When the number of iterations of the algorithm is in the range of 60-120,and the number of mobile nodes is 18 and 36, the energy consumption for repairing the loopholes is large. When the number of mobile nodes is 54, the energy consumption of mobile nodes in the overall network is small, so the remaining energy of the mobile nodes is large. When the number of algorithm iterations reaches 150 during the process, the energy of three different numbers of mobile nodes is gradually decreasing. The analysis shows that when the number of mobile nodes in the network is 45, the mobile energy consumption in the entire network is low.
Through the above experimental verification and analysis, it is concluded that the algorithm proposed in this paper is feasible and has good performance. It can use the least number of destination nodes to meet the connectivity and coverage requirements of the target monitoring area, save the network cost, reduce the energy consumption of mobile nodes, and prolong the network life cycle.

Comparison of This Algorithm with Other Similar
Algorithms. In order to further verify the performance of   the algorithm in this paper, the experimental analysis of the 3D-SCHDR algorithm is compared with the 3D-DVFA algorithm and the 3DSD algorithm. All three algorithms use mobile sensor nodes to repair coverage loopholes and perform a comparative analysis in terms of 3D coverage and mobile energy consumption.
The curve of the relationship between the coverage of 3D surface and the number of sensor nodes can be seen in Figure 13. When the number of the nodes is the same, different algorithms have different coverage. At the beginning, the number of sensor nodes is small, and the coverage of the three algorithms is relatively low. When the number of nodes reaches 100 ranges, the coverage of the 3DSD algorithm rises quickly, and the coverage curves of the other two algorithms are slow. When the number of nodes is more than 100, the coverage of the algorithm in this paper increases obviously, while the coverage of the other two algorithms tends to be gentle. The experimental results show that the rapid upward trend of coverage reflects the advantages of the algorithm in this paper.
The curve of the relationship between 3D surface coverage and time can be seen in Figure 14. At the beginning of the random deployment phase, the coverage of the 3DSD algorithm is slightly higher than that of the other two algorithms. Between 10 s and 60 s, as the three algorithms run iteratively, the coverage holes are gradually repaired, and their coverage rates are increasing significantly. However, the coverage of the algorithm in this paper has increased more than the other two algorithms. Between 60 s and 90 s, the increase of the three algorithms tends to be gentle, but the algorithm in this paper has the highest coverage. It shows that the algorithm in this paper is more efficient to meet the requirements of coverage monitoring.
When the mobile node repairs the coverage loopholes, the curve relationship between the mobile energy consumption rate and the number of mobile nodes can be seen in Figure 15. Network energy consumption determines the overall life of the network. In the entire net-work, the energy consumption of the network is dominated by the energy consumed by mobile node movement. Therefore, the moving path of the mobile node should be shortened as much as possible to reduce the mobile energy consumption and extend the network life. Simulation experiments verify that the energy consumption of the three algorithms increases with the number of mobile nodes. When the number of mobile nodes is less than 20, the mobile energy consumption trends of the three algorithms are relatively small with the increase of the number of mobile nodes. When the number of nodes is 20-45, the mobile energy consumption of the three algorithms has a significant upward trend, especially the 3DSD algorithm which has the highest rise. When the number of mobile nodes is 45-54, with the increase of the number of mobile nodes in the three algorithms, the mobile energy consumption tends to rise gently. For the overall energy consumption of the network, the algorithm in this paper has the lowest energy consumption in the entire overlay network process and effectively extends the network life.

Real-World Experimental Verification.
In order to verify the practical application of the method proposed in this paper, a sensor network experimental verification platform is built in the actual scene. The experimental equipment used is the STM32W108 development board, and the sensor node uses an STM32W108 RF transceiver module that complies with the IEEE802.15.4/ZigBee standard. The development board supports the random selection of channels 11-26. The RF transceiver module sends broadcast packets on one of the channels randomly selected by the development board. Figures 16(a) and 16(b) show the circuit boards and radio frequency transceiver modules of the STM32W108 development board, respectively, which are powered by a battery box with three no. 5 batteries. The online debugging circuit is a 20-pin Joint Test Action Group (JTAG) circuit that can be connected to JLink for program burning and online debugging.
This paper has verified the coverage and connectivity for both indoor and outdoor environments. First, under the condition of large multipath interference in the indoor office, the spherical space area with a radius of 3 m is shown in Figure 17(a). Second, in the open outdoor environment with less multipath interference, the spherical space area with a radius of 5 m is shown in Figure 17(b). Eight sending nodes are randomly deployed on the spherical surface, and the sending node broadcasts the wireless signal RSSI as shown in the red circle in Figure 17, and the receiving node receives all the broadcast signals as shown in the yellow circle in Figure 17, carries out network communication and artificial intrusion detection, and verifies the connectivity and coverage of the sensor network by analyzing the RSSI value of the wireless signal.
Set up a network for verification in view of the open outdoor scene, and deploy the location of the sending node and the receiving node. First, let the sensor network be self-organized. When all ordinary nodes join the network, start to verify the network coverage, randomly select the space area where several nodes are located for artificial

13
Journal of Sensors intrusion interference, and analyze the change of the received RSSI signal value. To determine whether the area is covered by a sensor node, this experiment first selects the area where the second node is located as shown in Figure 18(a) and the area where the eighth node is located as shown in Figure 18(b) for intrusion detection. Based on the received data, the data changes in these two areas are observed and analyzed, determining whether the area is covered. Among them, when some sending nodes fail or the energy is exhausted, the receiving nodes will not receive wireless signals in the area. At this time, a coverage loophole will occur, and an algorithm needs to be run to (a) STM32W108 development board (b) STM32W108 wireless RF transceiver module    14 Journal of Sensors repair the loopholes to restore the entire network connectivity. In this experiment, when the fourth node and the seventh node failed, the algorithm was run to repair the loopholes, and the coverage and connectivity were verified again after the patch was completed. When human intrusion occurs in the area where the fourth node and the seventh node are located, as shown in Figures 18(c) and 18(d), it will cause signal fluctuations. By analyzing the signal data, you can determine whether the coverage loopholes are repaired. Network coverage can also form good connectivity. The analysis of outdoor sensor network wireless signal RSSI data is shown in Figure 19. First, after the random nodes are deployed randomly, the wireless signal RSSI is transmitted by broadcasting to form a network. After connecting with the receiving node, the entire wireless sensor network is formed. The state of the overall network connectivity is shown in Figure 19(a). The eight RSSI signal value curves are relatively stable and fluctuate less, which shows that the entire network is connected. In order to test the connectivity and coverage of the network, artificial intrusion detection is performed on the area where the second node and the eighth node are located. The RSSI value of the wireless signal can fluctuate greatly, as shown in the red and yellow curves in Figure 19(b); it further validates the good coverage and connectivity of this area. Due to the bad application environment of the sensor node, when the node fails or the power is insufficient, the signal connection in the network is disconnected. As shown in Figure 19(c), when the fourth node and the seventh node fail, the receiving node cannot receive the wireless signal values of these two nodes, and a coverage loophole occurs, resulting in that the target object in the area where the two nodes are located cannot be detected by the coverage. After fixing the loopholes through the location provided by the algorithm running in this article, the intrusion detection was performed on these two areas again. After analyzing the RSSI value of the wireless signal, we can see that the brown curve and the light blue curve fluctuate greatly as shown in Figure 19(d). The other curves fluctuated slightly, which verified that the loophole was repaired and the entire network was restored.   In order to further verify the scientific nature and effectiveness of the algorithm proposed in this paper, the network connectivity and coverage under the condition of multipath interference in indoor scenes are verified as shown in Figure 20. Due to the complex indoor environment and a lot of interference, different nodes in the area where human intrusion detection is performed, the received wireless signal RSSI value can be analyzed to determine the connectivity and coverage of the area and the entire network. Similar to the outdoor experimental design, the areas where the first node and the fourth node are located are shown in Figures 20(a) and 20(b). When the whole network is connected, the personnel moves in the coverage area of the two nodes, causing some interference and making the wireless signal fluctuate greatly. In this way, the validity of the network can be verified. When the network runtime process fails, move the redundant nodes around to repair the coverage loopholes and restore the network. When the sixth node and the eighth node in the network fail and the mobile node repairs them, intrusion detection is performed on these two areas as shown in Figures 20(c) and 20(d) to verify the repair effect of the coverage loopholes.
The RSSI data analysis curve collected by the indoor scene is shown in Figure 21. Due to the small indoor environment range and the relatively large interference, the RSSI value of the wireless signal fluctuates greatly. When the entire network is connected, as shown in Figure 21(a), the RSSI curve is relatively stable, and the RSSI value is relatively high compared to the outdoor RSSI. When external objects invade in the area where the first node and the fourth node are located, as shown in Figure 21(b), the RSSI value curve fluctuates significantly, which indicates that the network status at this time is good. When a coverage loophole occurs, the receiver cannot receive the wireless signal. As shown in Figure 21(c), the sixth node and the eighth node are faulty, causing a coverage loophole. After the loopholes are repaired, the network status is checked again as shown in Figure 21(d). By observing the large fluctuations in the sixth yellow curve and the eighth pink color curve, you can verify that the network connectivity is restored.
Through the experimental verification of sensor networking in two groups of indoor and outdoor scenes and the analysis of the RSSI value of the collected wireless signal, the coverage and connectivity of the algorithm can be effectively verified. Personnel intrusion detection in the node coverage area can effectively verify the connectivity of the network, analyze the collected data, and judge the coverage of the whole network according to the fluctuation of RSSI curve value. At the same time, it can be applied to real life, deploy nodes to the environment that need information monitoring, set up a network and transmit information.

Conclusion
For the needs of 3D complex environmental information monitoring of actual scenes, this paper proposes a 3D surface coverage loophole patching algorithm for wireless sensor network hybrid nodes. First, randomly deploy hybrid sensor nodes in the target area, establish a 3D surface coverage model, and use the probability model to detect the 3D surface coverage probability and then detect the coverage loopholes in the network according to the repair characteristics, using mobile nodes to repair the coverage loopholes and simulate experiments. The performance of the algorithm proposed   16 Journal of Sensors in this paper in terms of loophole detection rate and repair rate and mobile energy consumption is verified, and the performance of two similar algorithms in coverage and mobile energy consumption are compared and analyzed. The connectivity and coverage of the network are verified by building a real scene, which reflects the effectiveness and scientific nature of the algorithm proposed in this paper. In the next work, we will continue to study the energy consumption and topology optimization problems in 3D coverage.
Abbreviations D: 3D surface coverage area N: Total number of sensor nodes R c : Communication radius r s : Sensing radius P: Coverage probability M: Observation target point d: Geometric distance F ij : Virtual force U k ðPÞ: Joint detection probability

A:
Reference node B, C: Two neighbor nodes O: The center of the circumscribed sphere R: The radius of the circumscribed sphere.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.