Method for repairing target fence of wireless sensor network

The Discrete S-Elite Centroid Backward Learning Kepler Algorithm (DSCOKOA) solves the target fence repair problem in wireless sensor networks, especially in the case of obstacles within the target's safe range. It achieves efficient shortest path repair and is applicable to fields such as industry and smart homes.

CN121985347APending Publication Date: 2026-05-05SHENYANG INSTITUTE OF CHEMICAL TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENYANG INSTITUTE OF CHEMICAL TECHNOLOGY
Filing Date
2026-01-15
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Wireless sensor network target fences cannot be effectively repaired after sensor node energy is depleted, leading to fence failure. Existing technologies struggle to quickly find the shortest repair path, especially when a target safety range is defined.

Method used

The Kepler algorithm (SCOKOA) based on S-elite centroid back learning is adopted to abstract the target fence repair problem into a combinatorial optimization problem. The shortest repair path is found by discretizing the DSCOKOA algorithm, and the safety range set by the target is regarded as an obstacle during the repair process to optimize the repair path.

Benefits of technology

It effectively solves the problem of target fence repair in wireless sensor networks, improves the efficiency and stability of repair paths, and can find the shortest path in the presence of obstacles, making it suitable for target fence repair in real-world scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985347A_ABST
    Figure CN121985347A_ABST
Patent Text Reader

Abstract

The invention relates to a method for repairing a target fence of a wireless sensor network, which relates to a method for optimizing a network sensor target, and adopts sensor nodes to deploy the target fence under the condition that a domain has a target fence monitoring requirement and a plurality of targets exist. And when the sensor nodes on the target fence lose efficacy due to energy exhaustion, searching the shortest path to repair the fence. Firstly, an improved Kepler algorithm (SCOKOA) based on S-elite gravity center reverse learning for solving an optimization problem is proposed, then, a target fence repair problem is abstracted into a combinatorial optimization problem, and a discrete Kepler algorithm (DSCOKOA) based on S-elite gravity center reverse learning is adopted to find a shortest repair path. And finally, on the basis of a classical combinatorial optimization problem traveling salesman test problem, the efficiency and stability of DSCOKOA in solving the shortest path problem are verified, and a solution is given for a target fence repair problem under the condition that a safety range set by a target is regarded as an obstacle in combination with an actual scene and a repair path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a target optimization method for network sensors, and more particularly to a target fence repair method for wireless sensor networks. Background Technology

[0002] With the development of wireless sensor network technology, it has been widely promoted in industry and scientific research due to its advantages such as strong coverage and good practicality. The industrial applications of wireless sensor networks are constantly expanding, such as in industrial machinery condition monitoring[1], remote monitoring[2], warehouse management[3] and other industrial operation levels. In addition, it is also widely used in areas such as biological habitat monitoring and environmental science. At the same time, it has begun to be applied in people's daily lives, such as smart homes[4], intelligent transportation[5], environmental monitoring[6], etc., and has covered various industries and fields. The task of wireless sensor network deployment is not only to monitor targets and areas, but also to deploy fences to prevent intrusion. In recent years, the deployment and repair of target fences has also become the main research direction.

[0003] Regarding the target fence monitoring problem, in 2018, Cheng et al. defined a new wireless sensor network monitoring coverage problem—the target fence monitoring problem [7]. The target fence is a continuous ring fence formed around the target. The target fence has a dbound constraint set according to the application and requirements. dbound defines the minimum distance from the constructed fence to the target. For a target ts, if si is the closest to the target ts among the multiple sensors of the constructed target fence, then dist(si,ts)≥dbound. Where dist(si,ts) represents the distance between si and the target ts in the sensor. From the definition of the target fence, it can be understood that the sensors form a continuous closed fence around each target at a position not less than the distance constraint, such as Figure 1 As shown, target fence coverage is irreplaceable by target coverage, region coverage, and fence coverage.

[0004] After the target fence is constructed, it begins operation to implement monitoring and protection tasks. After a period of time, some sensor nodes may malfunction due to insufficient energy or other factors, causing gaps in the target fence. In this case, the target fence needs to be repaired. In a smart warehouse scenario, to prevent people or robots entering the warehouse from accidentally coming into contact with or approaching potentially hazardous or radioactive products or materials (referred to as targets), a target fence needs to be established around these targets within a certain radius (centered on the target). When storing multiple different types of items, they cannot be placed together and must maintain a certain distance; in this case, a target fence is also necessary. When a sensor node on the target fence fails due to energy depletion, the target fence is repaired in the shortest possible time, i.e., the shortest path to repair the target fence is found. Along the repair path, the area within the target's designated safe range is considered an obstacle, and the shortest path repair solution is provided.

[0005] like Figure 1 The target fence. To complete the repair task, the shortest repair path must be found. Therefore, the problem of repairing the target fence is transformed into a classic traveling salesman problem.

[0006] The Traveling Salesman Problem (TSP) [8] is an NP-hard problem in combinatorial optimization. The problem is to find a traveler's route: the goal is to visit all cities with the shortest path, starting from a certain city, visiting all cities exactly once, and finally returning to the starting city. Although the rules are simple, the solution complexity increases as the number of locations increases.

[0007] References: [1] Shu, Shuai; Tang, Baoping; Huang, Yi, et al. Adaptive transmission control method for large amounts of data in mechanical vibration WSN [J]. Vibration and Shock, 2023, 42(04): 263-269. [2] Gu Yifeng, Zhang Zhenghua, Shen Yi, et al. Wireless sensor node data acquisition and distributed remote control [J]. Radio Engineering, 2020, 50(08): 661-665. [3] Zhang Longjie, Zhang Xiaoyu, Hu Hui, et al. WSN's large-scale unmanned intelligent monitoring system for warehouses[J]. Microcontroller & Embedded Systems Applications, 2019, 19(09): 82-85+89. [4] Zeng Debin, Xu Jiangchun, Zhang Kuangwei, et al. Research on the improvement of LEACH algorithm based on smart home networking design [J]. Journal of Electronic Measurement and Instrumentation, 2019, 33(12): 197-202. [5] Zhang Yuanyuan, Zhang Rui. Application of low-power wireless sensor network in health monitoring of urban rail transit [J]. Automation and Instrumentation, 2023, (03): 72-75. [6] Gao Jin, Qiao Jiping, Wu Yuan, et al. Design of a cold chain environment monitoring system based on compressed sensing [J]. Sensors & Microsystems, 2023, 42(07): 106-109 [7] CHENG CF, WANG CW. The Target-Barrier Coverage Problem in Wireless Sensor Networks [J]. Ieee Transactions on Mobile Computing, 2018, 17(5): 1216-1232. [8] Chen Xin, Wang Haibao, Luo Qiang, et al. Optimal Path for Citrus Harvesting Based on Improved Ant Colony Algorithm [J]. Journal of Anhui University (Natural Science Edition), 2022, 46(01): 68-74 [9] ABDEL-BASSET M, MOHAMED R, AZEEM SAA, et al. Kepleroptimization algorithm: A new metaheuristic algorithm inspired by Keplerslaws of planetary motion [J]. Knowledge-Based Systems, 2023, 268.

[10] TIZHOOSH H R. Opposition-based learning: A new scheme formachine intelligence; proceedings of the International Conference onComputational Intelligence for Modelling, Control and Automation / International Conference on Intelligent Agents Web Technologies andInternational Commerce, Vienna, AUSTRIA, F Nov 28-30, 2005 [C]

[11] RAHNAMAYAN S, JESUTHASAN J, BOURENNANI F, et al. Computing Opposition By Involving Entire Population; proceedings of the IEEE Congress on Evolutionary Computation (CEC), Beijing, PEOPLES R CHINA, F Jul 06-11, 2014 [C]. IEEE: NEW YORK

[12] ABDEL-BASSET M, MOHAMED R, HEZAM I M, et al. A novel binary Kepler optimization algorithm for 0-1 knapsack problems: Methods and applications [J]. Alex Eng J, 2023, 82: 358-376

[13] CLERC M. Discrete particle swarm optimization, illustrated by the Traveling Salesman Problem [J]. New Optimization Techniques in Engineering, 2004, 141: 219-239.

[14] SOPTO D S, AYON S I, AKHAND M A H, et al. Modified Grey Wolf Optimization to Solve Traveling Salesman Problem; proceedings of the International Conference on Innovation in Engineering and Technology (ICIET), Dhaka, BANGLADESH, F Dec 27-28, 2018 [C]. IEEE: NEW YORK Summary of the Invention

[0008] The purpose of this invention is to provide a target fence repair method for wireless sensor networks. This method addresses the need for target fence monitoring in a given area by deploying target fences using sensor nodes. An improved Kepler algorithm (SCOKOA) based on S-elite centroid back-learning is proposed to solve the optimization problem. This abstracts the target fence repair problem into a combinatorial optimization problem. The efficiency and stability of DSCOKOA in solving the shortest path problem are verified. Furthermore, for the target fence repair problem, a solution is provided in a practical scenario where the safety range of the target is considered an obstacle in the repair path.

[0009] The objective of this invention is achieved through the following technical solution: A method for repairing a target fence in a wireless sensor network is provided. The method is designed for situations where there is a need to monitor a target fence in an area and there are multiple targets. The method involves deploying a target fence using sensor nodes. When a sensor node on the target fence fails due to energy depletion, the method finds the shortest path to repair the fence. First, the Kepler algorithm (SCOKOA) based on S-elite centroid back learning is used to solve the optimization problem. Then, the target fence repair problem is abstracted into a combinatorial optimization problem, and the discretized Kepler algorithm (DSCOKOA) based on S-elite centroid back learning is used to find the shortest repair path. Finally, in the classic combinatorial optimization problem, the Traveling Salesman Test, DSCOKOA's efficiency and stability in solving the shortest path problem are verified. For the target fence repair problem, a solution is provided in a real-world scenario where the target's safety range is treated as an obstacle in the repair path. The specific repair process includes the following: (1) Experiments on the TSPLIB dataset for the Traveling Salesman Problem On the TSPLIB dataset for the Traveling Salesman Problem, based on the preprocessed distances between cities, a greedy algorithm was used to initialize the population. The shortest path values ​​found by each algorithm were compared with the number of iterations. On the TSPLIB datasets (att48, rand50, eil51, berlin52, eil76, pr76, rat99, kroA100, and tsp225), the optimal and average shortest path values ​​found by several algorithms were compared. It was found that the DSCOKOA algorithm performed best on the nine datasets, finding the optimal path on the smaller datasets rand50, eil51, and berlin52. On the att48 and rat99 datasets, although the optimal path value was slightly higher than the DPSO algorithm, the average value was better, indicating a better optimization trend. Comparative analysis shows that the discretization method is effective. (2) Example of target fence repair To address the target fence repair problem, the design is as follows: Figure 6 The target fence shown is to be repaired. When repairing the target fence, the sensor nodes are repositioned according to the shortest path. Since the monitored or protected target needs to have a certain safety range, the repair path must bypass the target's set safety range, depending on the actual scenario. In this case, the target is regarded as an obstacle of the set safety range size. (3) Repair the route when encountering obstacles When encountering obstacles during the repair process, such as Figure 8 As shown, all path points are set at the vertices of obstacles (green vertices in the figure). When bypassing obstacles, the shortest path among all possible paths (shown by the purple dashed line in the figure) is selected. Before optimization, the distance between any two nodes to be repaired is preprocessed according to this rule. Before finding the optimal path, the DSCOKOA algorithm preprocesses the distance between any two points based on whether there are obstacles between them, and finally finds the shortest path to repair the target fence.

[0010] The wireless sensor network target fence repair method described herein includes (1) the TSPLIB dataset experiment of the traveling salesman problem, in which each experiment is run 30 times, the population size is 100, and the number of iterations is 300 generations.

[0011] Figure 1 This is a schematic diagram of the target fence shape; Figure 2 A schematic diagram of discrete individuals; Figure 3 Velocity adjustment sequence calculation process Move to Position velocity adjustment sequence diagram; Figure 4 Velocity adjustment sequence calculation process Move to Position velocity adjustment sequence diagram; Figure 5 Flowchart of the Kepler algorithm for discretized S-elite centroid reverse learning; Figure 6 The target fence image to be repaired; Figure 7 Treat the target as an obstacle map; Figure 8 This is a schematic diagram of the repair route when encountering obstacles; Figure 9 This is an initialization diagram of the shortest path optimization process of the DSCOKOA algorithm in the target fence repair problem. Figure 10The diagram for the shortest path optimization process of the DSCOKOA algorithm in the target fence repair problem (iteration=5) is shown. Figure 11 This is a diagram showing the shortest path optimization process of the DSCOKOA algorithm in the target fence repair problem (iteration=10). Detailed Implementation

[0012] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings.

[0013] Regarding the S-elite center-of-gravity back-learning Kepler optimization algorithm Among them, the Kepler optimization algorithm The Kepler Optimization Algorithm (KOA) is a physics-based metaheuristic optimization algorithm inspired by Kepler's laws of planetary motion. [9] The search space is represented by the Sun and planets orbiting it in elliptical orbits. In KOA, the planets (candidate solutions) have different positions and gravitational relationships with the Sun (optimal solution) at different times, thus allowing for more efficient exploration and development of the search space.

[0014] (1) During the initialization phase, N planets (candidate solutions) X in the d-dimensional search space will be selected. i As an initial population, X ij This represents the value of the j-th dimension of the i-th planet (candidate solution) in the search space; (2) Calculate planet X i With the sun (optimal solution) X s The gravitational force F between them gi (t), obtained by using the orbital eccentricity of the planet, yields the normalized values ​​of the planet's and the Sun's masses; (3) Calculate the planetary velocity. The planetary velocity depends on its position relative to the Sun. That is, if the planet is close to the Sun, the Sun's gravity is strong, and the planetary velocity will increase; if it is far from the Sun, the Sun's gravity is weak, and the planetary velocity will decrease. By determining the planet's normalized distance, a scheme for updating the velocity is selected. This design avoids getting trapped in local optima and can handle situations where diversity is lacking. As shown in Equation (1).

[0015]

[0016] (4) Escaping local optima. In the solar system, most planets revolve around the sun counterclockwise; however, some planets revolve around the sun clockwise. KOA uses this behavior to escape local optima.

[0017] (5) Update planetary positions. KOA uses planets far from the sun to explore for new solutions, while using solutions closer to the sun to further develop more accurate solutions, as it searches for new locations near the optimal solution. As shown in Equation (2).

[0018]

[0019] (6) Update the distance between the planet and the Sun. When a planet is close to the Sun, KOA will focus on optimizing development operations; when it is far from the Sun, KOA will optimize exploration operations. These patterns depend on the value of the adjustment parameter h. When the value is large, exploration operations are used to increase the distance between the planet's orbit and the Sun; conversely, when the value is small, development operations are used to develop the region, as shown in Equation (3). This principle is randomly interchanged with Equation (2) to further improve KOA's exploration and development operations.

[0020]

[0021] (7) Ensure the optimal positions of the planets and the Sun, and retain the better solution. (The relevant parameters are expressed according to the original reference [9]). S-Center for Elite Gravity Backward Learning Kepler Algorithm (SCOKOA) Opposition-Based Learning (OBL) was proposed by Tizhoosh, Rahnamayan, and others based on the concept of opposite points

[10] . The basic idea is that the initial candidate solutions randomly generated in the search space may get stuck in local optima during the evolution process. In order to balance the convergence and diversity in the evolution process, the Opposition-Based Learning (OBL) mechanism generates corresponding opposite candidate solutions in the search space during initialization or during the evolution process. For finding unknown optimal solutions, searching in random directions and their opposite directions will have a higher chance of finding promising regions. The centroid-based offset learning mechanism treats points in the space as points with unit mass and calculates the offset points with the centroid of all points as the center to optimize the population.

[0022] Definition 1: Centroid Opposition-Based Learning (COBL)

[11] : Let... Let there be n points in space, each with a unit mass. Then the center of gravity can be defined as shown in formula (4): (4) Then that point The reverse point of the center of gravity is As shown in formula (5): (5) Definition 2: S Elite: The first In the next iteration, the top S candidate solutions sorted by fitness value are considered elites. Their number gradually decreases with each iteration, as shown in formula (6).

[0023] (6) in, It is the initial value. This represents the current iteration number. This represents the maximum number of iterations.

[0024] Definition 3: S-elite Centroid Opposition-based learning (SCO): Let... It is the first The number of S elites selected during iteration will yield all S elites. Using the center of gravity as the center, for all candidate solutions in the population Find the inverse solution. The calculation is shown in formula (7).

[0025] (7) Inverse solutions of all candidate solutions in the population As shown in formula (8).

[0026] (8) In the early stages of evolutionary search, selecting a larger number of S elites to calculate the centroid and obtain the inverse solution helps in the exploration of the search space. After fitness ranking, the selected elites proceed to the next iteration, preserving excellent evolutionary experience. As the iteration progresses, the number of S elites is gradually adjusted to a smaller value. At this point, it facilitates development operations near the optimal value, as the elites are close to each other, requiring fewer elites to be selected. This allows development operations to be performed near the elite positions, searching for the optimal solution. The S elite centroid inverse learning step is not performed in every iteration, but rather periodically (…). This is done to avoid frequent reverse operations affecting evolutionary efficiency.

[0027] The dynamic boundary of the inverse solution can preserve search experience for the inverse solution. ,in , When the solution after the reverse operation exceeds the boundary range, it is reset by generating a random number according to formula (9).

[0028] (9) Regarding the discretized S-elite center of gravity reverse learning Kepler algorithm The Kepler algorithm is currently mainly applied to continuous problems, and it has already solved the 0-1 knapsack problem for discretization.

[12] However, the 0-1 knapsack problem involves binary discretization, which differs significantly from solving the Traveling Salesman Problem. This section will discretize the S-elite centroid back-learning Kepler algorithm to solve the Traveling Salesman Problem abstracted from the target fence repair problem.

[0029] Here, it is necessary to redefine the meaning, expression, and update rules of the parameters in the algorithm, and propose the Discrete S-elite Centroid Opposition-based learning Kepler Optimization Algorithm (DSCOKOA).

[0030] Discretized Individual Definition In solving the traveling salesman problem, the first in the population individual planets ,in This corresponds to the city numbers visited by the traveling salesman. In other words, each candidate solution is discretized, represented by a sequence of candidate paths formed by the city numbers visited by the salesman in order of the path. For example... Figure 2 As shown. Schematic diagram of discrete individuals. Distance between candidate solutions (individual planets) and optimal solutions (the Sun) As shown in formula (10).

[0031] (10) Its normalized distance value As shown in formula (11), (11) After discretization, the distance between individuals The length of the common substring between the discretized planetary individuals and the solar individuals is used. To represent, the normalized distance is... As shown in formula (12).

[0032] (12) Discretization operation rule definition and update formula In discretization, the position of each individual planet The sequence of numbers corresponding to the n cities visited by the traveling salesman is a path sequence, which is a solution. In the SCOKOA algorithm, there are two ways to update the planetary position: one is to update the planetary position according to the velocity formula (1) formula (2), and the other is to update the planetary position by changing the distance between the planet and the sun formula (3). One of them is randomly executed during the algorithm execution to improve the exploration and development operation of the algorithm.

[0033] Heuristic factor In solving the Traveling Salesman Problem (TSP), the shortest path optimization result shows a high proportion of path subsequences closest to the city. This is a characteristic of the TSP and the basis for constructing heuristic factors. We use the shortest city path as a heuristic factor, injecting it into the optimization iterations. That is, we sequentially calculate the proportion of each edge length in the path sequence X to the total path sequence length. , With probability Add a distance after each edge in the sequence. The nearest city.

[0034] First discretization scheme For the first scheme, based on the discrete method of the velocity adjustment sequence in reference

[13] , the velocity of each individual planet is designed. This is a set of all positions that need to be adjusted for the corresponding planet, and at the same time, a series of adjustment schemes for position and velocity are redefined.

[0035] Example of constructing a velocity adjustment sequence set: If an individual's position is... If you want to move it to an individual location The calculation process of the velocity adjustment sequence is as follows: Figure 3 As shown; if you want to change it from Position moved to The calculation process for the velocity adjustment sequence is shown in Figure 4.

[0036] (a) Move to Position speed adjustment sequence (b) Move to Position speed adjustment sequence like Figures 3 to 4 Velocity adjustment sequence calculation process Fig.3 The process of velocity sequence Depend on Figures 3 to 4 It can be seen from the position Move to The set of speed adjustment sequences is ; by position Move to The set of speed adjustment sequences is It can be seen that... and They are reverse sequences, we use the symbol " " represents a set of reverse sequences. That is: .

[0037] There are three main discretization operators: the one corresponding to "-" in the update formula, and the other two. The operator "+" corresponds to the "+" operator. The operator "×" corresponds to the "×" operator. Operators. When the operands on both sides of an operator have different meanings, such as representing an individual's position, an individual's speed, or a random number, the rules of operation will also be different.

[0038] Below, we will explain the specific meanings of the different operators: (1) Operators ① Location Position = Velocity When the operator " When both operands are positions, that is... The meaning expressed is position, Convert and adjust to The set of speed adjustment sequences to be passed .

[0039] ② Location Speed ​​= New Position When the operator " "When the operands on both sides are position and velocity respectively, that is..." The meaning expressed is location. Using a velocity sequence set Adjust the position.

[0040] (2) Operators ① Location Speed ​​= New Position When the operator " "When the operands on both sides are position and velocity respectively, that is..." It expresses two meanings. One is location. Using a velocity sequence set Another approach involves adjusting the position, calculating the fitness value after each adjustment, and finally retaining the sequence with the best fitness value; the third approach is to use the length of the velocity sequence. To determine the length of the crossover operation, the position is... with optimal position Random crossover is performed, retaining the sequence with the best fitness value. During algorithm execution, both operations are performed randomly.

[0041] ②Speed Speed ​​= Merging speed When the operator " When both operands are speed, that is... The meaning expressed is to merge the velocity sequence sets and use the velocity sequence sets. .in, .

[0042] ③ Location Position = the better position after position intersection When the operator " When both operands are positions, that is... This means performing a crossover operation on two positional sequences, resulting in a pair of random numbers. This represents the index (position index) to be crossed. The crossing method uses partial matching, meaning it crosses the positions of the two parent nodes. The sequences are swapped. After the crossover, if duplicate city IDs appear in the original sequence, they are replaced with the uncovered city IDs. After the crossover operation is completed, the operation at the crossover point is performed with a certain probability. Among the P cities before and after it, find the city p that is closest to it, and move it to the next city. and Among cities (if they are the same, the location sequence with the better fitness value is retained).

[0043] (3) Operators One end of the operator is a number, which can be a random number or a value calculated from an expression.

[0044] ① Speed ​​= Cutoff Speed When the operator " When one side is speed, when When the value is a random number in the range [0,1], the meaning expressed is the percentage of the retained speed adjustment sequence; when... At that time, the meaning expressed is that the repetition speed adjustment sequence Second-rate.

[0045] ② Location = Location of random mutation When the operator " When one side of the "" is the position, when When the value is a random number in the range [0,1], it represents the probability of random mutation in the position sequence; when... When, it means that the position sequence undergoes random variation. Each city has a unique identifier. After mutation, if duplicate city identifiers appear, the duplicate city identifiers in the original sequence will be replaced with the city identifiers that have not been covered.

[0046] The operator precedence is: Operator precedence is higher than Operators.

[0047] By determining the normalized distance of individual planets The decision is made to select an update speed scheme. This design avoids getting trapped in local optima and can handle situations where diversity is lacking. The discretization speed calculation formula is shown in formula (13).

[0048] (13) The discretized position update formula is shown in formula (14).

[0049] (14) The second discretization scheme For the second scheme, when the planet is close to the sun, the algorithm will focus on optimizing development operations; when it is far from the sun, it will optimize exploration operations. Formula (15) and formula (14) are randomly swapped to further improve the algorithm's exploration and development operations.

[0050] (15) (1)

[0051] Based on contribution length , The number of 1s in the sequence, Selecting continuous The city sequence was preserved; based on the length of the supplementary contribution... , The number of 0s in the sequence, Selecting continuous The city sequences are preserved and concatenated into a path sequence. Duplicate city numbers are deleted, and the missing city numbers are added to the end of the sequence in sequence.

[0052] (2)

[0053] In position In the process, the most frequently occurring path sequences are extracted sequentially and then supplemented to form a complete path sequence. .

[0054] (3)

[0055] Based on the cross length , and Perform a crossover operation, retaining the sequences with the best fitness values. Among these, The total number of sides, The length of the common substring.

[0056] Rule (2) and rule (3) are randomly selected for execution.

[0057] Discretized S-Center Backward Learning Mechanism Discrete S-elite Centroid Opposition-based learning (DSCO) is the first... During iteration, the selected Given a sequence of elites (as shown in Formula 5-21), all S elites will be obtained. The fitness value (i.e., path length) average Focusing on all candidate solutions (candidate paths) in the population. Find the reverse solution (reverse path). As shown in formula (16).

[0058] (16) Find the elite with the closest fitness value. Candidate paths This is taken as the center of the reverse mechanism.

[0059] The reverse solution of all candidate solutions in the population, i.e., the reverse path The calculation formula is shown in formula (17).

[0060] (17) Discretized S-Center of Gravity Backward Learning Kepler Algorithm Flow Discretized S-Center of Elite Backward Learning Kepler Algorithm (DSCOKOA) is used to solve the Traveling Salesman Problem, which is abstracted from the Target Fence Repair Problem.

[0061] First, initialize the population based on the traveling salesman problem. Determine the optimal path Then, candidate paths are calculated. normalized common substring length The speed is calculated using formula (13) based on this value.

[0062] Then update the path according to formula (14) or (15); next, use the S-elite centroid reverse learning mechanism to generate the reverse path. The process involves calculating the fitness values ​​for all paths and reverse paths; finally, the next generation population is determined by ranking the fitness values. The workflow is as follows: Figure 5 As shown. Discretized S-elite centroid reverse learning Kepler algorithm flow. Example

[0063] 1. Experiment with the TSPLIB dataset for the Traveling Salesman Problem On the TSPLIB dataset for the Traveling Salesman Problem, the classic algorithms SA, DPSO, DGWO

[14] and DSCOKOA were compared after discretization. Based on the preprocessed distance between cities, a greedy algorithm was used to initialize the population, and the shortest path values ​​found by each algorithm were compared with the number of iterations. Each experiment was run 30 times, the population size was 100, and the number of iterations was 300 generations. On the TSPLIB dataset for the Traveling Salesman Problem (att48, rand50, eil51, berlin52, eil76, pr76, rat99, kroA100 and tsp225), the optimal and average values ​​of the shortest paths found by several algorithms were compared, as shown in Tables 1 and 2.

[0064] Table 1. Comparison of shortest path values ​​for different TSPLIB algorithms TSPLIB optimal value DGWO DPSO SA DSCOKOA att48 33522 37815 33992 34300 34326 rand50 5553 5700 5553 5553 5553 eil51 426 467 429 435 426 berlin52 7542 7804 7542 7542 7542 eil76 538 604 553 560 548 pr76 108159 127467 111784 110531 109967 rat99 1211 1424 1248 1256 1260 kroA100 21282 24225 21868 21566 21292 tsp225 3916 4488 4440 4255 4145 Table 2 Comparison of the average shortest path for different TSPLIB algorithms TSPLIB optimal value DGWO DPSO SA DSCOKOA att48 33522.0 38471.6 35148.9 35505.5 34668.8 rand50 5553.0 5717.0 5625.0 5623.4 5570.9 eil51 426.0 472.4 439.8 440.8 437.1 berlin52 7542.0 7972.0 7585.5 7723.3 7587.5 eil76 538.0 606.5 567.6 567.8 559.7 pr76 108159.0 129546.6 115662.3 113693.8 112064.8 rat99 1211.0 1434.8 1299.7 1288.5 1273.7 kroA100 21282.0 24652.7 22233.1 22155.4 21795.5 tsp225 3916.0 4502.1 4480.1 4342.8 4237.3 Tables 1 and 2 show the results of the DSCOKOA algorithm in optimizing across nine datasets. It found the optimal path on the smaller datasets rand50, eil51, and berlin52. On the att48 and rat99 datasets, although the optimal path values ​​were slightly higher than those of the DPSO algorithm, the average values ​​were better, indicating a good optimization trend. Comparative analysis shows that the discretization method is effective.

[0065] 2 Target Fence Repair Examples To address the target fence repair problem, the design is as follows: Figure 6 The target fence shown is the one to be repaired. When repairing the target fence, the sensor nodes are repositioned based on the shortest path. Since the monitored or protected target requires a certain safety range, the repair path must bypass this safety range, taking into account the actual scenario. In this case, the target is considered an obstacle of the set safety range size. For example... Figure 7 The target is shown as an obstacle.

[0066] 3. Repair the route when encountering obstacles When encountering obstacles during the repair process, such as Figure 8 As shown, all path points are set at the vertices of obstacles (green vertices in the figure). When bypassing an obstacle, the shortest path among all possible paths (shown by the purple dashed lines in the figure) is selected. Before optimization, the distance between any two nodes to be repaired is preprocessed according to this rule, instead of simply processing it based on the straight-line distance between the two nodes.

[0067] Before finding the optimal path, the DSCOKOA algorithm considers the relationship between any two points. Figures 9 to 11 The DSCOKOA algorithm is used to find the shortest path in the target fence repair problem. Figure 9 initialization; Figure 10 iteration=5; Figure 11 iteration=10.

Claims

1. A method for repairing a target fence in a wireless sensor network, characterized in that, The method addresses the situation where there is a need for target fence monitoring in an area, and multiple targets exist. It employs sensor nodes to deploy target fences. When a sensor node on a target fence fails due to energy depletion, the method finds the shortest path to repair the fence. First, the Kepler algorithm SCOKOA, based on S-elite centroid back learning, is used to solve the optimization problem. Then, the target fence repair problem is abstracted into a combinatorial optimization problem, and the discretized Kepler algorithm DSCOKOA based on S-elite centroid back learning is used to find the shortest repair path. Finally, in the classic combinatorial optimization problem, the Traveling Salesman Test, DSCOKOA's efficiency and stability in solving the shortest path problem are verified. For the target fence repair problem, a solution is provided in a real-world scenario where the target's safety range is treated as an obstacle in the repair path. The specific repair process includes the following: (1) Experiments on the TSPLIB dataset for the Traveling Salesman Problem On the TSPLIB dataset for the Traveling Salesman Problem, based on the preprocessed distances between cities, a greedy algorithm was used to initialize the population. The shortest path values ​​found by each algorithm were compared as the number of iterations increased. On the TSPLIB datasets att48, rand50, eil51, berlin52, eil76, pr76, rat99, kroA100, and tsp225, the optimal and average shortest path values ​​found by several algorithms were compared. It can be seen that the DSCOKOA algorithm performs best on the nine datasets, finding the optimal path on the smaller datasets rand50, eil51, and berlin52. On the att48 and rat99 datasets, although the optimal path value is slightly higher than that of the DPSO algorithm, the average value is better, indicating a better optimization trend. Comparative analysis shows that the discretization method is effective; (2) Example of target fence repair Regarding the target fence repair issue, the target fence to be repaired; When repairing the target fence, the sensor nodes are repositioned based on the shortest path. Since the monitored or protected target needs to have a certain safety range set, the repair path needs to bypass the target's set safety range, depending on the actual scenario. In this case, the target is regarded as an obstacle of the set safety range size. (3) Repair the route when encountering obstacles When encountering obstacles during the repair process, all path points are set at the vertices of the obstacles, i.e., green vertices. When bypassing obstacles, the shortest path among all possible paths is selected, i.e., the purple dashed line. Before optimization, the distance between any two nodes to be repaired is preprocessed according to this rule. Before finding the optimal path, the DSCOKOA algorithm preprocesses the distance between any two points based on whether there are obstacles between them, and finally finds the shortest path to repair the target fence.

2. The method for repairing a target fence in a wireless sensor network according to claim 1, characterized in that, The experiments on the TSPLIB dataset for the Traveling Salesman Problem (1) were run 30 times each, with a population size of 100 and 300 iterations.