Distributed energy-saving wireless sensor network coverage vulnerability detection and recovery method
By detecting and recovering coverage vulnerabilities through unitization and particle swarm optimization algorithms for wireless sensor networks, the performance degradation caused by coverage holes in the sensor network is solved, and efficient network coverage and energy consumption reduction are achieved.
Patent Information
- Application Number
- CN202410299539.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-07-25
AI Technical Summary
The existence of coverage holes in existing wireless sensor networks leads to degradation of network performance, and the energy of sensor nodes is limited and cannot be restored in time, affecting network life and coverage.
The distributed energy-saving method is adopted to unitize the network, select unit proxy nodes, and use particle swarm optimization algorithm to detect and recover coverage vulnerabilities, and optimize coverage by calculating key perceptual intersections and mobile nodes.
It improves network coverage to more than 97%, reduces network energy consumption by 5%, and extends network life.
Smart Images

Figure CN120378911A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless communication networks, and particularly relates to a method for detecting and recovering coverage holes in a distributed energy-saving wireless sensor network. Background Art
[0002] A wireless sensor network (WSN) is a wireless network composed of a large number of sensor nodes distributed in a physical space to sense physical signals. Each sensor node has one or more transceiver and processing resource modules, and multiple sensor nodes cooperate with each other to complete the sensing work. There are many problems to be solved in wireless sensors, such as limited sensing range and limited node energy. Therefore, the node deployment problem and coverage area in WSN are particularly important and are also hot issues that many researchers have been continuously concerned about. In the research of this problem, the network coverage rate, as an important index for judging performance, can better reflect the detection and tracking of the spatial deployment of sensors.
[0003] When sensor nodes run out of energy, it will inevitably lead to coverage holes in the network. The existence of coverage holes will change the network topology, affect the normal communication between nodes and the reliability of data, and reduce the performance of the network. If the coverage holes are not processed in time, the number and size of the coverage holes will gradually increase, and the existence of the coverage holes will reduce and damage the performance of the entire network, and the original intention of network construction cannot be guaranteed.
[0004] Wireless sensor networks have limited resources and strong topological dynamics. When studying the coverage problem, these characteristics need to be considered. For different application scenarios, industry researchers have carried out a considerable amount of research work on the coverage problem of wireless sensor networks. Currently, how to improve the network coverage rate of wireless sensor networks is still the focus and difficulty of current research. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for detecting and recovering coverage holes in a distributed energy-saving wireless sensor network to improve the network coverage rate in view of the deficiencies of the prior art.
[0006] To solve the above technical problem, the technical solution adopted by the present invention is:
[0007] A method for detecting and recovering coverage holes in a distributed energy-saving wireless sensor network includes the following steps:
[0008] Step S1: Unitize the wireless sensor network and select a node as a unit agent for each unit;
[0009] Step S2: Calculate the proportion of each unit covered by nodes and detect holes;
[0010] Step S3: Use the particle swarm optimization algorithm to recover the holes.
[0011] Optionally, step S1 is carried out as follows:
[0012] Step S101: Calculate the network density according to the number of network nodes and the network area;
[0013] Step S102: Divide the network into different numbers of units according to the network density, and calculate the size of each unit;
[0014] Step S103: Name each unit to obtain the cell number where each node is located;
[0015] Step S104: In each unit, select the node with the most remaining energy and the closest to the unit center as the unit agent.
[0016] Optionally, step S104 specifically includes:
[0017] Assume that each unit has a unit center point. All nodes send unit agent notification packets to other neighbor nodes in the same unit. The unit agent notification packet is a hello message containing the node ID, unit number, remaining energy, and the distance to the unit center point;
[0018] Each node compares with its neighbor nodes and declares itself as a unit agent. If the data packet type becomes 1, it means that the node is a unit agent.
[0019] Optionally, step S2 is carried out as follows:
[0020] Step S201: Convert the area covered by each unit into covered pixel points, and obtain the coordinates of the pixel points within its sensing range;
[0021] Step S202: Each unit configures an information table. The number of rows of the table is equal to the number of pixels covered by the unit, and the number of columns of the table is equal to the number of nodes within the unit. All table entries in a row of the information table are subjected to an OR operation using the logical OR function. If a pixel is covered by at least one node, the logical OR result of this row will be 1, and record the value of Coverage NO as 1; otherwise, record the value of Coverage NO as 0;
[0022] Step S203: Calculate the number of pixels of each cell according to the size of each cell;
[0023] Step S204: Calculate the proportion of each unit covered by nodes according to the number of pixels and the value of Coverage NO;
[0024] If the coverage rate of the unit is greater than or equal to 90%, it means that the unit has no coverage holes; otherwise, the unit has coverage holes.
[0025] Optionally, step S3 is performed as follows:
[0026] Step S301: Calculate the key perception intersection of all nodes in the unit, then calculate the coordinates of each intersection point in the key perception intersection, and calculate the geometric center coordinates of the polygon formed by the uncovered pixel points in the unit;
[0027] Step S302: By using moving nodes, use the PSO optimization algorithm to determine the most necessary holes to be covered. Those with a unit coverage rate lower than 90% are considered as the candidate set for improving the coverage rate; when there are m moving nodes for hole recovery and the number of detected coverage holes is n, when n ≤ m, no calculation is performed, and the moving nodes are directly sent to the holes for hole recovery; when n > m, select the hole with the highest priority according to the PSO optimization algorithm.
[0028] Optionally, the steps of the PSO optimization algorithm are as follows:
[0029] Initialization: Use g particles as the initial population. Each particle is considered as the response to the coverage hole, and it is considered as an array of moving nodes mapped to the hole.
[0030] The fitness function is shown as follows:
[0031] Fitness = a × (1 - D bs,h / L) + b × (1 - Coveragerate sij )
[0032] where D bs,h represents the distance from the base station to the candidate unit, calculated according to the Euclidean distance; Coveragerate sij is the coverage rate of cell S ij ; L is the network length; a and b are influence coefficients, with a value range of 0 to 1 and a + b = 1;
[0033] In this step, each response particle is evaluated according to the fitness function, and the answer with the highest fitness function is considered as T;
[0034] End condition: The end condition is to reach 100 repetitions. If the end condition is met, then T is considered as the answer; otherwise, update the position and velocity of the particle, and continue the steps until the end condition is met.
[0035] Optionally, the position of the updated particle is performed through the following formula:
[0036]
[0037] In the formula, —The position vector of particle i in the d-th dimension in the (k + 1)-th iteration;
[0038] — The position vector of particle i in the d-th dimension at the k-th iteration;
[0039] — The velocity vector of particle i in the d-th dimension at the k-th iteration.
[0040] Optionally, the velocity of the updated particle is calculated by the following formula:
[0041]
[0042] Where, N is the size of the particle swarm; i is the particle number, i = 1, 2,..., N;
[0043] D is the particle dimension; d is the particle dimension number, d = 1, 2,..., D;
[0044] k is the number of iterations; w is the inertia weight; c1 is the individual learning factor; c2 is the swarm learning factor;
[0045] r1, r2 are random numbers in the interval [0, 1], which increases the randomness of the search;
[0046] — The velocity vector of particle i in the d-th dimension at the k-th iteration;
[0047] — The position vector of particle i in the d-th dimension at the k-th iteration,
[0048] — The historical best position of particle i in the d-th dimension at the k-th iteration, that is, after the k-th iteration, the best solution obtained by the i-th particle (individual) search;
[0049] — The historical best position of the swarm in the d-th dimension at the k-th iteration, that is, after the k-th iteration, the best solution in the entire particle swarm;
[0050] Return to the evaluation step: After the update, evaluate the new particles and repeat these steps until the stopping condition is reached.
[0051] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0052] The present invention proposes a method for detecting and recovering coverage holes in a wireless sensor network based on the above technical solution. Maintaining coverage, power consumption, and network lifetime are the most fundamental challenges faced by wireless sensor networks. Since the batteries of sensor nodes cannot be replaced or charged, battery discharge will lead to the end of the lifetime of sensor nodes. As some sensor nodes die and disconnect, the coverage of the network is also disrupted. In this method, first, the network is unitized, and a node is selected as an agent for each unit. Then, the proportion of each unit covered by nodes can be accurately calculated and holes can be detected. Finally, the geometric center of the polygon (the figure composed of uncovered pixel points within the unit) is calculated using the critical sensing intersection, and then the holes are recovered using mobile nodes and the PSO optimization algorithm. The results show that this method can reduce the network energy consumption by about 5%, extend the network lifetime, and increase the network coverage rate to over 97%. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0054] Figure 1 : Schematic diagram of the network model used in the method of the present invention;
[0055] Figure 2 : Schematic diagram of the cell naming in the method of the present invention;
[0056] Figure 3 : Schematic diagram of the center point of the cell in the method of the present invention;
[0057] Figure 4 : Schematic diagram of the unit agent notification packet in the method of the present invention;
[0058] Figure 5 : Schematic diagram of node coverage in the method of the present invention;
[0059] Figure 6 : Flowchart of the PSO algorithm in the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0060] In order to better understand the present invention, the following further clearly elaborates the content of the present invention in combination with embodiments. However, the protected content of the present invention is not limited to the following embodiments. In the following description, a large number of specific details are given to provide a more thorough understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details.
[0061] Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0062] The wireless sensor network has mobile sensor nodes and static sensor nodes. The size of the environment to be detected is L×L. The static sensor nodes are uniform and randomly distributed. The base station is located outside the network, and the mobile nodes are located next to the base station. All sensor nodes can know the positions of their neighbor nodes (which can be through GPS, Beidou or other positioning methods) and know their own positions. The network model of the method of the present invention is as Figure 1 shown.
[0063] In this method, first, the network is unitized, and a node is selected as the unit agent for each unit. Then, the coverage ratio of each unit by the nodes is calculated and the vulnerabilities are detected. Finally, the particle swarm optimization algorithm is used to recover the vulnerabilities.
[0064] 1. Network unitization
[0065] In this stage, the network environment is unitized according to the network density. To ensure a reasonable distribution of the load, the number of network units will vary according to the different network densities. The higher the network density, the more units there are. The sizes of the network units are the same.
[0066] In this step, first, based on formula (1), the network density is calculated according to the number of nodes and the network area.
[0067] Density=n / L 2 (1)
[0068] In the formula, n is the number of network static nodes, and L is the width and length of the environment to be detected. The size of the detection environment targeted by the embodiments of the present invention is L×L.
[0069] Based on formula (2), the network is divided into different numbers of units according to the network density.
[0070]
[0071] In the formula, C is the number of units into which the detection environment is divided.
[0072] The number of C depends on the network density (Density). The greater the network density, the more units are divided.
[0073] The size of each unit is calculated according to formula (3):
[0074]
[0075] Where Cellsize is the size of each cell, L is the length and width of the environment to be detected, and C is the number of units into which the detection environment is divided.
[0076] Next, each unit after unitization is named Sij, where i is the row number of the cell and j is the column number of the cell, as Figure 2 shown.
[0077] According to Equation (4), each node obtains its cell number Sij:
[0078]
[0079] Where (x n , y n ) is the position coordinate of the sensor node n.
[0080] In each unit, the node with the most remaining energy and the closest distance to the center of the unit is selected as the unit proxy.
[0081] Assume that each unit has a center point, as Figure 3 shown.
[0082] The center point coordinates of each unit are ((j - 1 / 2) × Cellsize, (i - 1 / 2) × Cellsize).
[0083] First, all nodes send hello messages containing the node ID, cell number (Cellnumber), remaining energy (Remaining energy), and distance to the center of the cell (Distance) to other neighbor nodes in the same unit, as Figure 4 shown.
[0084] Then, each node compares with its neighbors to select the optimal unit proxy, which will send a data packet containing its ID and cell number to its co - unit nodes and declare itself as a unit proxy. The unit proxy notification packet is as Figure 4 shown. If the data packet type becomes 1, it means that the node is a unit proxy.
[0085] 2. Calculate the proportion of each unit covered by nodes and detect vulnerabilities
[0086] In this stage, the area covered by each unit is converted into covered pixel points, and the coordinates of the pixel points within its sensing range are calculated according to Equation (5):
[0087]
[0088] Where (x s , y s ) is the center coordinate of the unit S, (xp , y p ), where (x, y) are the coordinates of pixel p, d is the maximum distance from the center point of the cell to the side length, and C s represents the set of pixel points covered by cell S.
[0089] Each cell has an information table (Information) to estimate the proportion of each cell covered by nodes. Table 1 shows the information table. The number of rows in this table is equal to the number of pixels covered by the cell, denoted by k. The number of pixels covered by the sensor node is equal to the number of members in the C s set. The number of columns in this table is equal to the number of nodes within the cell.
[0090] All entries in a row of the information table are subject to an OR operation using the logical OR function. If a pixel is covered by at least one node, the logical OR result of this row will be 1, which is recorded in the Coverage NO column.
[0091] Table 1 Information Table
[0092] coordinate <![CDATA[S1]]> <![CDATA[S2]]> <![CDATA[S3]]> ... ... ... ... <![CDATA[S k > CoverageNO <![CDATA[(x1,y1)]]> <![CDATA[(x2,y2)]]> <![CDATA[(x3,y3)]]> ... <![CDATA[(x k ,y k )]]>
[0093] The number of rows in the information table is the same, but the number of columns is different and depends on the number of nodes contained in each cell. The initial value of all entries in the information table is 0. If the pixel is covered by a node, the corresponding entry in the table for this pixel is set to 1.
[0094] Table 2 shows a complete example of the information table for cell S 11 .
[0095] Table 2 Information Table of S 11
[0096] coordinate <![CDATA[S1]]> <![CDATA[S2]]> <![CDATA[S3]]> <![CDATA[S4]]> <![CDATA[S5]]> <![CDATA[S6]]> <![CDATA[S7]]> ... CoverageNO <![CDATA[(x1,y1)]]> 0 1 1 0 0 0 0 1 <![CDATA[(x2,y2)]]> 0 0 1 1 0 0 0 1 <![CDATA[(x3,y3)]]> 0 0 0 0 0 0 1 1 ... ... <![CDATA[(x k ,y k )]]> 0 0 0 0 0 0 0 0
[0097] As Figure 5 shown, (x1, y1) is covered by two nodes 2 and 3, and (x2, y2) is covered by two nodes 3 and 4. Therefore, the entry for (x1, y1) in the columns of these nodes in Table 2 is 1. (x k , y k ) is not covered by any node. Therefore, all relevant entries in Table 2 remain 0. Entries related to other pixels are calculated in the same way.
[0098] The number of pixels in each cell (Cell pixel ) is calculated based on the length and width of the cell, according to formula (6).
[0099] Cell pixel = (Cellsize × 37.7952755906) 2 (6)
[0100] In the formula, Cellsize is obtained according to formula (3).
[0101] Calculate the coverage ratio Coveragerate of each cell being covered by nodes according to formula (7) sij , as follows:
[0102] Coverageate sij = Coverage NO / Cell pixel (7)
[0103] In the formula, Coverage NO is calculated in the last column of the information table, and Cell pixel is obtained according to formula (6).
[0104] If the coverage rate of the cell is greater than or equal to 90%, it means that the cell has no coverage vulnerability; otherwise, the cell has a coverage vulnerability.
[0105] 3. Use the Particle Swarm Optimization (PSO) algorithm to recover the vulnerabilities
[0106] Before the start of this stage, first introduce a concept, KeyPerceptual IntersectionPoint, abbreviated as Kip, and its Chinese name is: Key Perceptual Intersection Point. The perceptual intersection P is the intersection of the sensing circles of the nodes in the detection area with their adjacent nodes, or the intersection of the node with the boundary of the sensing area. If the perceptual intersection P is no longer covered by other adjacent nodes, then this intersection is called the key perceptual intersection. For example, Figure 5 in, node S1 intersects with its neighbor node S2 at P2 and P3, node S1 has an intersection with the boundary of the monitoring area, and the set {P1, P2, P3, P 16} is no longer covered by other nodes. Therefore, the set {P1, P2, P3, P 16} is the key perceptual intersection of node S1.
[0107] Next, find the key perceptual intersections of other nodes within the cell, then find the coordinates of each intersection point inside the key perceptual intersection, and finally use formula (13) to calculate the geometric center coordinates of the polygon (the figure composed of the uncovered pixel points within the cell).
[0108] For example, the key perceptual intersections P1 and P2 of node S i with its neighbor node S j are calculated as follows:
[0109]
[0110]
[0111] In the formula, (x i , y i ) and (x j , y j ) are the position coordinates of nodes S i , S j respectively. d i,j represents the Euclidean distance between node S i and node S j . (x p1 , y p1 ) are the coordinates of the intersection point P1, and (x p2 , y p2 ) are the coordinates of the intersection point P2. γ, θ, and μ are calculated from the following three formulas:
[0112]
[0113]
[0114]
[0115] In the formula, R si , R sj represent the sensing radii of nodes Si and Sj.
[0116]
[0117] In the formula, is the calculated X coordinate of the geometric center, is the calculated Y coordinate of the geometric center, n is the number of key sensing intersections of this unit, and (x i , y i ) are the coordinates of each key sensing point.
[0118] In this stage, by using mobile nodes, the PSO optimization algorithm is adopted to determine the most necessary holes to be covered. Those with a unit coverage rate lower than 90% are considered as the candidate set for improving the coverage rate. When there are m mobile nodes for hole recovery and the number of detected covered holes is n, when n ≤ m, no calculation is performed and the mobile nodes are directly sent to the holes for hole recovery. When n > m, the hole with the highest priority is selected according to the PSO optimization algorithm.
[0119] As Figure 6 shown, the steps of this stage are described as follows:
[0120] Initialization: Use g particles as the initial population. Each particle is considered as the response to the covered hole, which is considered as an array of mobile nodes mapped to the hole.
[0121] The fitness function is as shown in formula (14).
[0122] Fitness = a × (1 - D bs,h / L) + b × (1 - Coveragerate sij ) (14)
[0123] Wherein, D bs,h represents the distance from the base station to the candidate cell, calculated according to the Euclidean distance; Coveragerate sij is the coverage rate of the S ij cell; L is the network length; a and b are influence coefficients, and the value ranges are from 0 to 1 and a + b = 1.
[0124] In this step, each response (particle) is evaluated according to the fitness function of formula (14), and the answer with the highest fitness function is considered as T.
[0125] End condition: In the proposed method, the end condition is to reach 100 repetitions. If the end condition is met, then T is considered as the answer; otherwise, the positions and velocities of the particles are updated and the steps continue.
[0126] Position update: Update the position of the particle according to formula (15).
[0127]
[0128] In the formula, —The position vector of particle i in the d-th dimension at the (k + 1)-th iteration;
[0129] —The position vector of particle i in the d-th dimension at the k-th iteration;
[0130] —The velocity vector of particle i in the d-th dimension at the k-th iteration.
[0131] Update the velocity of the particle according to formula (16).
[0132]
[0133] In the formula, N is the size of the particle swarm; i is the particle serial number, i = 1, 2,..., N;
[0134] D is the particle dimension; d is the particle dimension serial number, d = 1, 2,..., D;
[0135] k is the number of iterations; w is the inertia weight; c1 is the individual learning factor; c2 is the group learning factor;
[0136] r1, r2 are random numbers within the interval [0, 1], increasing the randomness of the search;
[0137] — The velocity vector of particle i in the d-th dimension at the k-th iteration;
[0138] — The position vector of particle i in the d-th dimension at the k-th iteration,
[0139] — The historical best position of particle i in the d-th dimension at the k-th iteration, that is, after the k-th iteration, the optimal solution obtained by the search of the i-th particle (individual);
[0140] — The historical best position of the population in the d-th dimension at the k-th iteration, that is, after the k-th iteration, the optimal solution in the entire particle population.
[0141] Return to the evaluation step: After the update, evaluate the new particles and repeat these steps until the stop condition is reached.
[0142] Maintaining coverage, power consumption, and network lifetime are the most fundamental challenges faced by wireless sensor networks. Since the batteries of sensor nodes cannot be replaced or charged, battery discharge will lead to the end of the life of sensor nodes. As some sensor nodes die and disconnect, the coverage of the network is also disrupted. For this reason, the present invention proposes a method for detecting and recovering coverage holes in wireless sensor networks.
[0143] In this method, first, the network is unitized, and a node is selected as an agent for each unit. Then, the proportion of each unit covered by nodes can be accurately calculated and holes can be detected. Finally, the geometric center of the polygon (the figure composed of uncovered pixel points within the unit) is calculated using the critical sensing intersection, and then the holes are recovered using mobile nodes and the PSO optimization algorithm. The results show that this method reduces the network energy consumption, extends the network lifetime, and improves the network coverage rate.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Other modifications or equivalent replacements made by those of ordinary skill in the art to the technical solutions of the present invention should be covered within the scope of the claims of the present invention as long as they do not depart from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network, characterized in that: It includes the following steps: Step S1: Unitize the wireless sensor network and select a node as the unit agent for each unit; Step S2: Calculate the proportion of each unit covered by nodes and detect vulnerabilities; Step S3: Use the particle swarm optimization algorithm to recover the vulnerabilities.
2. The distributed energy-saving wireless sensor network coverage vulnerability detection and recovery method according to claim 1, characterized in that: The step S1 is carried out as follows: Step S101: Calculate the network density according to the number of network nodes and the network area; Step S102: Divide the network into different numbers of units according to the network density and calculate the size of each unit; Step S103: Name each unit to obtain the cell number where each node is located; Step S104: In each unit, select the node with the most remaining energy and the closest to the unit center as the unit agent.
3. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 2, characterized in that: The step S104 specifically includes: Assume that each unit has a unit center point. All nodes send unit agent notification packets to other neighbor nodes in the same unit. The unit agent notification packet is a hello message containing the node ID, unit number, remaining energy, and the distance to the unit center point; Each node compares with its neighbor nodes and declares itself as a unit agent. If the data packet type becomes 1, it means that the node is the unit agent.
4. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 3, characterized in that: The step S2 is carried out as follows: Step S201: Convert the area covered by each unit into covered pixel points and obtain the coordinates of the pixel points within its sensing range; Step S202: Each unit configures an information table. The number of rows of the table is equal to the number of pixels covered by the unit, and the number of columns is equal to the number of nodes in the unit. All table entries in a row of the information table are subjected to an OR operation using the logical OR function. If a pixel is covered by at least one node, the logical OR result of this row will be 1, and record the value of Coverage NO as 1. Otherwise, record the value of Coverage NO as 0; Step S203: Calculate the number of pixels of each cell according to the size of each cell; Step S204: Calculate the proportion of each unit covered by nodes according to the number of pixels and the value of Coverage NO; If the coverage rate of the unit is greater than or equal to 90%, it means that the unit has no coverage vulnerability; otherwise, the unit has a coverage vulnerability.
5. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 4, characterized in that: The step S3 is carried out as follows: Step S301: Find the critical sensing intersection of all nodes in the unit, then find the coordinates of each intersection point in the critical sensing intersection, and calculate the geometric center coordinates of the polygon composed of the uncovered pixel points in the unit; Step S302: By using mobile nodes, adopt the PSO optimization algorithm to determine the most necessary vulnerabilities to be covered. The units with a coverage rate lower than 90% are considered as the candidate set for improving the coverage rate; when there are m mobile nodes for vulnerability recovery and the number of detected coverage vulnerabilities is n, when n ≤ m, no calculation is performed, and the mobile nodes are directly sent to the vulnerabilities for vulnerability recovery; when n > m, select the vulnerability with the highest priority according to the PSO optimization algorithm.
6. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 5, characterized in that: The steps of the PSO optimization algorithm are as follows: Initialization: Use g particles as the initial population. Each particle is considered as a response to covering the hole, which is considered as an array of mobile nodes mapped to the hole. The fitness function is shown as follows: Fitness=a×(1 - D bs,h / L)+b×(1 - Coveragerate sij ) Among them, D bs,h represents the distance from the base station to the candidate cell, calculated according to the Euclidean distance; Coveragerate sij is the coverage rate of the S ij cell; L is the network length; a and b are influence coefficients, with a value range of 0 to 1 and a + b = 1; In this step, each response particle is evaluated according to the fitness function, and the answer with the highest fitness function is considered as T. End condition: The end condition is to reach 100 repetitions. If the end condition is met, then T is considered as the answer; otherwise, update the positions and velocities of the particles, and the steps continue until the end condition is satisfied.
7. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 6, characterized in that: The position of the updated particle is carried out by the following formula: In the formula, — the position vector of particle i in the d-th dimension at the (k + 1)-th iteration; — The position vector of particle i in the d-th dimension at the k-th iteration; — The velocity vector of particle i in the d-th dimension at the k-th iteration.
8. A method for detecting and recovering coverage vulnerabilities in a distributed energy-saving wireless sensor network according to claim 7, characterized in that: The velocity of the updated particle is carried out by the following formula: Where, N—the size of the particle swarm; i—the particle serial number, i = 1, 2,..., N; D—the particle dimension; d—the particle dimension serial number, d = 1, 2,..., D; k—the number of iterations; w—the inertia weight; c1—the individual learning factor; c2—the swarm learning factor; r1, r2—random numbers within the interval [0, 1], increasing the randomness of the search; — The velocity vector of particle i in the d-th dimension at the k-th iteration; — The position vector of particle i in the d-th dimension at the k-th iteration, — The historical optimal position of particle i in the d-th dimension at the k-th iteration, that is, after the k-th iteration, the optimal solution obtained by the search of the i-th particle (individual); — The historical optimal position of the swarm in the d-th dimension at the k-th iteration, that is, the optimal solution among the entire particle swarm after the k-th iteration; Return to the evaluation step: After the update, evaluate the new particles, and repeat these steps until the stop condition is reached.