Method and device for improving coverage rate of wireless sensor network, electronic equipment and storage medium
By applying the improved performance sparrow search algorithm in wireless sensor networks, using methods such as Logistic chaotic mapping, Cauchy factor and firefly perturbation, the problems of insufficient search capabilities and local optimization in coverage optimization of the group intelligence algorithm are solved, and higher coverage accuracy and stability are achieved.
Patent Information
- Application Number
- CN202510106484.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-03-18
AI Technical Summary
The existing group intelligent algorithms have problems such as insufficient search capabilities in the later iteration of wireless sensor network coverage optimization and are prone to fall into local optimality, resulting in limited coverage improvement.
The sparrow search algorithm with improved performance is adopted, and the search ability of the algorithm and the ability to jump out of the local optimality by introducing methods such as Logistic chaotic mapping, Cauchy factor and firefly perturbation.
It improves the accuracy and stability of wireless sensor network coverage, reduces the setting of algorithm parameters, and enhances the expansion of position updates.
Smart Images

Figure CN119653381A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wireless sensor networks, and in particular to a method, device, electronic device, and storage medium for improving the coverage of a wireless sensor network. Background Art
[0002] The Internet of Things system is divided into three parts: the perception layer, the network layer, and the application layer. Among them, the perception layer generally senses and collects external environmental data through wired or wireless sensor nodes. Multiple wireless sensor nodes can be built into a wireless sensor network. Each wireless sensor has its own perception range. How to reasonably arrange each wireless sensor in a certain area to achieve the best perception coverage has always been a hot issue in the field of the Internet of Things. Wireless Sensor Network (WSN) is a network composed of a large number of low-power sensor nodes with communication functions, and has extremely wide applications in the field of the Internet of Things.
[0003] In order to solve the coverage optimization problem of WSN, we consider introducing swarm intelligence algorithm for optimization. Swarm intelligence (SI) algorithm is a method to solve complex optimization problems by simulating group behavior in nature. Common intelligent optimization algorithms include particle swarm optimization (PSO), ant colony optimization (ACO), grey wolf optimization (GWO), whale optimization (WHO), sparrow search algorithm (SSA), etc.
[0004] The deployment method that introduces swarm intelligence algorithms can improve WSN coverage to a certain extent, but the swarm intelligence algorithm generally has problems such as insufficient search ability in the later iteration and easy to fall into local optimality during the iteration process, resulting in limited coverage improvement. Local optimality refers to the solution to a problem that is optimal within a certain range or region. General heuristic algorithms, greedy algorithms or local algorithms are prone to local optimality, which makes it impossible for the algorithm iteration to find the global optimal solution. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device, and storage medium for improving the coverage of a wireless sensor network to provide higher accuracy and stability, while requiring fewer parameters to be set and providing better scalability for location updates.
[0006] The present application embodiment adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for improving coverage of a wireless sensor network, wherein the method comprises:
[0008] Determine the sparrow search algorithm with improved performance;
[0009] Establishing a WSN model, wherein the WSN model has an initial coverage;
[0010] In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance.
[0011] In some embodiments, determining the improved performance of the sparrow search algorithm includes:
[0012] Initialize the parameters of the sparrow search algorithm, population size N, number of discoverers M, number of alerters SD, current alert value st, and maximum number of iterations t, and initialize the sparrow population;
[0013] According to the initialized sparrow population, the fitness value corresponding to the initialized sparrow population is calculated, and after sorting the fitness values of the initialized sparrow population, the sparrows with the best and worst individual fitness values and their corresponding position information are selected respectively;
[0014] Divide the discoverers and followers according to the fitness value and update the location information;
[0015] Update the number of Sentinel SDs and update the location information;
[0016] Update the location information again according to the current sparrow population and calculate the current fitness value;
[0017] Determine whether the current algorithm execution times have reached the maximum number of iterations. If not, return the calculated fitness value.
[0018] In some embodiments, the initialization of the sparrow population includes:
[0019] Adopt X i =4*X i-1 *(1-X i-1 ), initialize the sparrow population;
[0020] One-dimensional Logistic chaotic map X(K+1)=r*X(1-X(K)), K=1,2,…N;
[0021] The value range of r is [0,4], which serves as the Logistic parameter.
[0022] In some embodiments, the updating of the number of alerters SD and the updating of the location information includes:
[0023] Dynamically update the number of sentinels' SD. The formula for updating SD is as follows:
[0024]
[0025] Among them, t represents the current iteration number, and T represents the maximum iteration number.
[0026] In some embodiments, updating the location information again according to the current sparrow population and calculating the current fitness value includes:
[0027] According to the current sparrow population, the Cauchy factor and firefly perturbation method are used to jump out of the local optimal solution, update the position information again, and calculate the current fitness value.
[0028] In some embodiments, in the WSN model, using the performance-improved sparrow search algorithm to calculate the final coverage rate includes:
[0029] Initialize the sensing radius, sensing area size, number of wireless sensor nodes, and related parameters of the sparrow search algorithm in the WSN model;
[0030] Randomly distribute a corresponding number of wireless sensor nodes in the sensing area and initialize their positions;
[0031] The sparrow population is initialized with Logistic chaos, and the coverage value of the WSN model is used as the objective function of the algorithm to calculate the fitness of the population and sort it, and find out the current optimal fitness value and the worst fitness value and their positions;
[0032] Divide the discoverers and followers according to the fitness value and update the location information;
[0033] Update the number of sentinel SDs and update the sentinel's location information;
[0034] According to the current sparrow population, the location information is updated again, and the current fitness value is calculated, and finally the WSN coverage is calculated;
[0035] Determine whether the maximum number of iterations has been reached, and if so, output the optimal position of the sensor node.
[0036] In some embodiments, the coverage value of the WSN model includes:
[0037] The coverage value CoverRatio in the monitoring area is defined as the ratio of the coverage area of the node set to the total area of the monitoring area:
[0038]
[0039] In a second aspect, an embodiment of the present application further provides a device for improving the coverage of a wireless sensor network, wherein the device comprises:
[0040] A determination module, used for determining the sparrow search algorithm after performance improvement;
[0041] An establishing module, used for establishing a WSN model, wherein the WSN model has an initial coverage rate;
[0042] The calculation module is used to calculate the final coverage rate in the WSN model using the sparrow search algorithm with improved performance.
[0043] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the above method.
[0044] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above method.
[0045] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: first determine the sparrow search algorithm with improved performance, then establish a WSN model, and the WSN model has an initial coverage rate. Then, in the WSN model, the final coverage rate is calculated using the sparrow search algorithm with improved performance. Through the above method, compared with other swarm intelligence algorithms, it has higher accuracy and stability, fewer algorithm setting parameters, and better scalability of location update. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0047] Figure 1 A flowchart of a method for improving wireless sensor network coverage in an embodiment of the present application;
[0048] Figure 2 This is a schematic diagram of the structure of a device for improving the coverage of a wireless sensor network in an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0051] The technical terms involved in this application are as follows:
[0052] Wireless Sensor Networks (WSN): Wireless Sensor Networks (WSN) is a distributed sensor network whose terminals are sensors that can sense and inspect the outside world. Sensors in WSN communicate wirelessly, so the network settings are flexible, the location of devices can be changed at any time, and they can also be connected to the Internet by wire or wireless. A multi-hop self-organizing network formed by wireless communication.
[0053] Swarm Intelligence Algorithm: Swarm Intelligence is a distributed intelligence algorithm that simulates the behavior of biological groups in nature. It simulates the collective behavior of social organisms such as ants and bees, and uses local interactions between simple individuals to generate complex global intelligent behaviors. It does not require central control and has the characteristics of self-organization, scalability and strong robustness. It is widely used in optimization problem solving, robot collaborative operations and other fields.
[0054] Local optimum: refers to the optimal solution to a problem within a certain range or region, or the optimal means of solving a problem or achieving a goal within a certain range or limit. General heuristic algorithms, greedy algorithms or local algorithms are prone to produce local optimums, or it is impossible to verify whether the optimal solution is global or only local. This is because for large systems or complex problems, general algorithms focus on solving them from a local perspective to reduce the amount of calculation and algorithm complexity.
[0055] The traditional wireless sensor node layout method is deployed without intelligent algorithm optimization and is randomly distributed, which easily causes the perception area of each wireless sensor node to overlap or have a large perception blind area, thus failing to meet the perception requirements. The deployment method that introduces the swarm intelligence algorithm can improve the WSN coverage to a certain extent, but the swarm intelligence algorithm generally has problems such as insufficient search ability in the later iteration and easy to fall into the local optimum during the iteration process, resulting in limited coverage improvement. Local optimum refers to the solution to a problem being optimal within a certain range or region. General heuristic algorithms, greedy algorithms or local algorithms are easy to produce local optimums, resulting in the algorithm iteration being unable to find the global optimal solution. In addition, in the method of applying swarm intelligence algorithms to WSN coverage optimization, swarm intelligence algorithms such as particle swarm algorithm, flower pollination algorithm and whale algorithm are generally used. This method uses a relatively novel sparrow search algorithm, which has higher accuracy and stability than other swarm intelligence algorithms, fewer algorithm setting parameters, and better scalability for position update.
[0056] In view of the above shortcomings, the method for improving the coverage of the wireless sensor network in the embodiment of the present application is to simulate the foraging process of the sparrow group. The foraging behavior of this animal group is similar to the distribution of wireless sensor network nodes. Therefore, it is very feasible to use this algorithm to solve the problem of wireless sensor network coverage. However, in view of the problem that the algorithm itself may have insufficient search ability and easy to fall into local optimality in the later iteration, the use of Logistic chaos mapping, Cauchy mutation factor, adaptive guard update strategy and firefly random perturbation strategy is considered to optimize the problem of insufficient search ability and easy to fall into local optimality. Then the improved sparrow search algorithm is applied to the constructed WSN model to calculate the coverage of WSN.
[0057] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0058] The present application embodiment provides a method for improving the coverage of a wireless sensor network, such as Figure 1 As shown, a flow chart of a method for improving the coverage of a wireless sensor network in an embodiment of the present application is provided, and the method at least includes the following steps S110 to S130:
[0059] Step S110, determining the sparrow search algorithm after performance improvement.
[0060] In the sparrow search algorithm, each individual sparrow has two attributes: position and fitness. It represents the current position of the individual and the satiety of the individual sparrow. Individuals with high fitness act as discoverers and are responsible for searching for food. Individuals with low fitness act as joiners and follow the discoverer to search for food around it. Some individuals are responsible for vigilance and reconnaissance. If the population realizes that there is danger, they will give up the current food and change the search position.
[0061] In order to improve the performance of the sparrow search algorithm and solve the problems of insufficient search ability and local optimality, Logistic chaotic mapping can be introduced. Chaotic mapping is often used in algorithm optimization to improve the search ability of the algorithm.
[0062] Step S120: establishing a WSN model, wherein the WSN model has an initial coverage rate.
[0063] A wireless sensor network (WSN) is a network composed of a large number of low-power sensor nodes with communication functions. In the study of wireless sensor network coverage, the node perception model used determines the spatial location of node deployment. Preferably, the wireless sensor network perception model established in the embodiment of the present application is a Boolean perception model.
[0064] Step S130: In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance.
[0065] The improved algorithm is applied to the optimization of wireless sensor network coverage, which significantly improves the coverage.
[0066] Through the above method, in the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance. In order to improve the coverage of the wireless sensor network in a certain area, the sparrow search algorithm in the swarm intelligence algorithm is introduced, and the good characteristics of the sparrow search algorithm are used to achieve the improvement of the coverage of the wireless sensor network.
[0067] Through the above method, a sparrow search algorithm with improved performance was determined to solve the problems of the sparrow search algorithm itself, such as the decline of search ability in the later iteration and falling into the local optimum.
[0068] Different from the related technologies, swarm intelligence algorithms generally have problems such as insufficient search capabilities in the later stages of iteration and easy falling into local optimality during the iteration process, which leads to limited coverage improvement. The above method uses a relatively novel sparrow search algorithm, which has higher accuracy and stability than other swarm intelligence algorithms, fewer algorithm setting parameters, and better scalability in position updates.
[0069] In one embodiment of the present application, the determination of the improved performance of the sparrow search algorithm includes: initializing the parameters of the sparrow search algorithm, namely, the population size N, the number of discoverers M, the number of sentinels SD, the current alert value st, and the maximum number of iterations t, and initializing the sparrow population; calculating the fitness value corresponding to the initialized sparrow population according to the initialized sparrow population, and selecting the sparrows with the best and worst individual fitness values and their corresponding position information after sorting according to the fitness value of the initialized sparrow population; dividing discoverers and followers according to the fitness value, and updating the position information; updating the number of sentinels SD, and updating the position information; updating the position information again according to the current sparrow population, and calculating the current fitness value; judging whether the current algorithm execution times reaches the maximum number of iterations, and if not, returning to calculate the fitness value.
[0070] Suppose there are N sparrow individuals in a D-dimensional solution space. In each iteration, the M individuals with the best fitness are selected as discoverers, and the number of vigilants is defined as SD. The position of the sparrow population in space can be defined as represents the position of the i-th sparrow. The discoverer position is updated as shown in formula (1).
[0071]
[0072] In formula (1), t represents the number of iterations; M represents the final number of iterations; a is a random number between (0,1]; Q is a random number that follows a normal distribution; R2 and st are the warning value and safety value of [0,1] and [0.5,1] respectively. That is, when R2>st is within the safety value, the population conducts a wide search to obtain a higher fitness. When R2<st is in an unsafe situation, it will immediately fly to a safe place to forage. The position update of the joiner is performed according to the following formula.
[0073]
[0074] In formula (2), represents the worst position of the current population, represents the most favorable position in the population. A is a 1×d matrix, and A + =A T (AA T ) -1 When i>n / 2, it means that the fitness of the joiner is low, and no food is obtained, so it needs to fly elsewhere to find food. Finally, when the population begins to realize the danger, some sparrows need to conduct reconnaissance and early warning and move according to formula (3).
[0075]
[0076] In formula (3), fi is the current fitness value, f g is the optimal fitness value, f w is the worst fitness, β is a Gaussian distribution random number with mean 0 and variance 1. k is a random number between -1 and 1. ε is a constant that can avoid the denominator being 0. From formula (3), we can know that when the warning sparrow is in the optimal position, it will escape to a position near itself. If it is not in the optimal position, it will escape to the vicinity of the optimal position.
[0077] Based on the overall implementation process of the sparrow search algorithm, in order to solve the problems of insufficient search ability and local optimality, an attempt is made to introduce Logistic chaotic mapping. Chaotic mapping is often used in algorithm optimization to improve the search ability of the algorithm. The chaotic mapping used in the present invention is a one-dimensional Logistic chaotic mapping, and its expression is as follows. X(K+1)=r*X(1-X(K)), K=1,2,…N, the value range of r is [0,4], which is called the Logistic parameter. It is proposed to use Logistic chaotic mapping to initialize the population and thus increase the richness of the population. The individual initialization method of the population is as follows:
[0078] X i =4*X i-1 *(1-X i-1 ) (4)
[0079] In the above formula, the chaos parameter is 4 to ensure a completely chaotic state. Initializing the population in this way can ensure the diversity of the population. Compared with the original sparrow search algorithm, the global search capability has been enhanced to a certain extent.
[0080] There are two ways to update the position of the original sparrow search algorithm: moving to the current optimal position for updating, and moving close to the origin for updating. Using these two methods to update the position of individual sparrows can easily cause the algorithm to fall into a local optimum. Consider using the Cauchy factor and firefly perturbation method to jump out of the local optimal solution. The Cauchy mutation comes from the Cauchy distribution, which is a common statistical distribution. The current optimal solution moves according to the following formula:
[0081]
[0082] Where Cauchy(0,1) is the standard Cauchy distribution, using the function Generates a standard Cauchy distribution. The firefly perturbation algorithm is a swarm intelligence algorithm proposed in 2009 to simulate the activity of firefly populations. It is widely used in optimization problems. The main way fireflies move is to attract each other through the intensity of light. Individuals with low brightness will be attracted by individuals with high brightness. The position update method between fireflies is more random, has a stronger local search capability, and has fewer parameters, which makes the algorithm more robust. The specific implementation process is: after completing a search, the algorithm performs firefly perturbation on all sparrow individuals, compares the individuals after the perturbation with the individuals before the perturbation, and if the individuals after the perturbation are better, replace the original individuals for position update. The specific implementation is shown in the following formula.
[0083]
[0084] in is the current global optimal individual; α∈[0,1] is the step size factor; rand is a random number that follows a uniform distribution on [0,1]; Among them, β0 is the maximum attraction, that is, the attraction when the distance between two individuals is 0.
[0085] In order to better describe the sparrow search algorithm with improved performance in the embodiment of the present application, the improved sparrow search algorithm process is as follows:
[0086] Step 1: Initialize the parameters of the sparrow search algorithm, population size N, number of discoverers M, number of guards SD, current warning value st, and maximum number of iterations t.
[0087] Step 2: Initialize the sparrow population according to Formula 4.
[0088] Step 3, according to the initialized sparrow population, calculate the corresponding fitness value size, and sort them according to their fitness value size, and select the sparrow individual fitness value with the best and the worst and their corresponding position information respectively;
[0089] Step 4: Divide the discoverers and followers according to the fitness value, and use formula (1) and formula (2) to update the location information.
[0090] Step 5: Update the number of sentinels SD using formula (7) and update the location information using formula (3).
[0091] Step 6: Update the position information again according to the current sparrow population through formula (5) and formula (6), i.e., use the Cauchy mutation factor and firefly disturbance, and calculate the current fitness value.
[0092] Step 7, determine whether the current algorithm execution times reaches the maximum number of iterations, if not, return to step 3.
[0093] The modified sparrow search algorithm was tested on 14 commonly used benchmark functions. The test results show that the improved algorithm is 3.5 orders of magnitude higher than the original algorithm in the fitness value of the same test function, and the convergence performance of the algorithm has been significantly improved. In addition, the improved sparrow search algorithm was compared with other swarm intelligence algorithms, such as particle swarm algorithm, whale algorithm, gray wolf algorithm, etc. The test results show that the convergence speed and ability to jump out of local optimality of the improved algorithm are higher than those of several other swarm intelligence algorithms.
[0094] In the process of applying the algorithm to the optimization of wireless sensor network coverage, the target area is set to 50m*50m, 45 sensor nodes are arranged, and the coverage is optimized and improved with the particle swarm algorithm, whale algorithm, and gray wolf algorithm under the same conditions. The results show that the wireless sensor nodes using the improved sparrow search algorithm are more evenly distributed, the area of the uncovered area is the smallest, and the average coverage can reach 96.667%, which is significantly improved compared with the coverage of several other algorithms.
[0095] In one embodiment of the present application, the initialization of the sparrow population includes: using X i =4*X i-1 *(1-X i-1 ), to initialize the sparrow population; one-dimensional Logistic chaotic mapping X(K+1)=r*X(1-X(K)), K=1,2,…N; the value range of r is [0,4], which is used as the Logistic parameter.
[0096] Based on the overall implementation process of the sparrow search algorithm, in order to solve the problems of insufficient search ability and local optimality, an attempt is made to introduce Logistic chaotic mapping. Chaotic mapping is often used in algorithm optimization to improve the search ability of the algorithm. The chaotic mapping used in the present invention is a one-dimensional Logistic chaotic mapping, and its expression is as follows. X(K+1)=r*X(1-X(K)), K=1,2,…N, the value range of r is [0,4], which is called the Logistic parameter. It is proposed to use Logistic chaotic mapping to initialize the population and thus increase the richness of the population. The individual initialization method of the population is as follows:
[0097] X i =4*X i-1 *(1-X i-1 ) (4)
[0098] In the above formula, the chaos parameter is 4 to ensure a completely chaotic state. Initializing the population in this way can ensure the diversity of the population. Compared with the original sparrow search algorithm, the global search capability has been enhanced to a certain extent.
[0099] In order to improve the coverage of wireless sensor networks in a certain area, the sparrow search algorithm in the swarm intelligence algorithm is considered to be introduced, and the good characteristics of the sparrow search algorithm are used to improve the coverage of wireless sensor networks. For the problems of the sparrow search algorithm itself, such as the decline of search ability in the later iteration and falling into the local optimum, the Logistic chaos map is innovatively introduced to increase the diversity of the population.
[0100] In one embodiment of the present application, the updating of the number of alerters SD and the updating of the location information includes: dynamically updating the number of alerters SD, and the updating formula of SD is as follows:
[0101]
[0102] Among them, t represents the current iteration number, and T represents the maximum iteration number.
[0103] The sentinel SD is randomly selected to monitor the activities of the entire sparrow population and protect the foraging safety of the population. It is a key part of the sparrow algorithm structure. In the initial stage of the algorithm iteration, the sparrow algorithm tends to search globally, and the number of sentinels should be as large as possible. However, in the later stage of the algorithm iteration, the algorithm tends to search locally. While ensuring the foraging safety of the sparrow population, the number of sentinels should be reduced as much as possible. Therefore, dynamically updating the number of sentinels SD also helps to enhance the overall search capability of the search algorithm. The update formula of SD is as follows:
[0104]
[0105] Among them, t represents the current iteration number; T represents the maximum iteration number.
[0106] Through the above method, the update method of the sentinel population in the original algorithm is optimized and the convergence speed of the algorithm is improved.
[0107] In one embodiment of the present application, updating the position information again according to the current sparrow population and calculating the current fitness value includes: using the Cauchy factor and firefly perturbation method to jump out of the local optimal solution according to the current sparrow population, updating the position information again, and calculating the current fitness value.
[0108] Use the Cauchy factor and firefly perturbation method to jump out of the local optimal solution. The Cauchy mutation comes from the Cauchy distribution, which is a common statistical distribution. The current optimal solution moves according to the following formula:
[0109]
[0110] Where Cauchy(0,1) is the standard Cauchy distribution, using the function Generates a standard Cauchy distribution.
[0111] The firefly perturbation algorithm is a swarm intelligence algorithm proposed in 2009 to simulate the activity of firefly populations. It is widely used in optimization problems. The main way fireflies move is to attract each other through light intensity. Individuals with low brightness will be attracted by individuals with high brightness. The position update method between fireflies is more random, has a strong local search capability, and has fewer parameters, which makes the algorithm more robust. The specific implementation process is: after completing a search, the algorithm performs firefly perturbation on all sparrow individuals, compares the individuals after perturbation with the individuals before perturbation, and if the individuals after perturbation are better, replace the original individuals for position update. The specific implementation is shown in the following formula.
[0112]
[0113] in is the current global optimal individual; α∈[0,1] is the step size factor; rand is a random number that follows a uniform distribution on [0,1]; Among them, β0 is the maximum attraction, that is, the attraction when the distance between two individuals is 0.
[0114] Through the above method, the Cauchy mutation factor is introduced to reduce the probability of the algorithm falling into the local optimum; the firefly perturbation algorithm is introduced to further enhance the algorithm's global search capability and ability to jump out of the local optimum.
[0115] In one embodiment of the present application, in the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance, including: initializing the perception radius, perception area size, number of wireless sensor nodes, and related parameters of the sparrow search algorithm in the WSN model; randomly distributing a corresponding number of wireless sensor nodes in the perception area and initializing their positions; performing Logistic chaos initialization on the sparrow population, using the coverage value of the WSN model as the objective function of the algorithm to calculate and sort the population fitness, and find out the current optimal fitness value and the worst fitness value and their positions; dividing the discoverer and the follower according to the fitness value, and updating the position information; updating the number of sentinels SD, and updating the position information of the sentinels; updating the position information again according to the current sparrow population, and calculating the current fitness value, and finally calculating the WSN coverage size; judging whether the maximum number of iterations has been reached, and if so, outputting the optimal position of the sensor node.
[0116] By applying the improved sparrow search algorithm to the coverage optimization of wireless sensor networks, the coverage rate has been significantly improved. Compared with the original sparrow search algorithm, the optimization methods such as chaotic mapping, Cauchy mutation factor, and firefly perturbation are introduced to improve the performance of the algorithm.
[0117] After optimizing the sparrow search algorithm, it is necessary to establish a WSN model and apply the improved algorithm to the WSN coverage optimization. In the research on wireless sensor network coverage, the node perception model used determines the spatial location of node deployment. The wireless sensor network perception model established by this method is a Boolean perception model. On a two-dimensional plane, the sensor node perception range is a circle with a radius of R and a node as the center. n The prototype area of the specified circular area is called the "perception disk", R n It is called the perception radius. The size of the perception radius depends on the physical factors of the sensor. Assume that the coordinates of the node in the area are (x n ,y n ), for any point p in the region, its coordinates are (x p ,y p ). Then the probability that node n detects p is: in is the Euclidean distance between the node and any point. The probability of being covered within the range is recorded as 1, and the rest is recorded as 0. Therefore, the established Boolean perception model is shown in the following formula (8):
[0118]
[0119] The coverage ratio CoverRatio in the monitoring area is defined as the ratio of the coverage area of the node set to the total area of the monitoring area as shown in the following formula (9).
[0120]
[0121] In order to better describe the WSN model in the embodiment of the present application, the final coverage is calculated using the sparrow search algorithm with improved performance, and the specific steps of applying the improved sparrow search algorithm to the WSN coverage optimization established above are as follows:
[0122] Step 1: Initialize the sensing radius, sensing area size, number of wireless sensor nodes, and related parameters of the sparrow search algorithm.
[0123] Step 2: Randomly distribute a corresponding number of wireless sensor nodes in the sensing area and initialize their positions.
[0124] Step 3: Use formula (4) to initialize the sparrow population with Logistic chaos. Use the WSN coverage value of formula (9) as the objective function of the algorithm to calculate the fitness of the population and sort it. Find the current optimal fitness value and the worst fitness value and their positions.
[0125] Step 4: Divide the discoverers and followers according to the fitness value, and use formula (1) and formula (2) to update the location information.
[0126] Step 5: Use formula (7) to update the number of sentinels’ SDs, and use formula (3) to update the sentinels’ location information.
[0127] Step 6: Update the position information again according to the current sparrow population through formula (5) and formula (6), i.e., use the Cauchy mutation factor and firefly disturbance, and calculate the current fitness value.
[0128] Step 7: Finally calculate the WSN coverage size.
[0129] Step 8: Determine whether the maximum number of iterations has been reached. If so, output the optimal position of the sensor node. Otherwise, return to step 3.
[0130] Through the above method, the improved algorithm is applied to the optimization of wireless sensor network coverage, so that the coverage is significantly improved.
[0131] In one embodiment of the present application, the coverage value of the WSN model includes: defining the coverage value CoverRatio in the monitoring area as the ratio of the coverage area of the node set to the total area of the monitoring area:
[0132]
[0133] On a two-dimensional plane, the sensing range of a sensor node is a circle with the node as the center and a radius of R. n The prototype area of the specified circular area is called the "perception disk", R n It is called the perception radius. The size of the perception radius depends on the physical factors of the sensor. Assume that the coordinates of the node in the area are (x n ,y n ), for any point p in the region, its coordinates are (x p ,y p ). Then the probability that node n detects p is: in is the Euclidean distance between the node and any point. The probability of being covered within the range is recorded as 1, and the rest is recorded as 0. Therefore, the established Boolean perception model is shown in the following formula (8):
[0134]
[0135] The coverage ratio CoverRatio in the monitoring area is defined as the ratio of the coverage area of the node set to the total area of the monitoring area as shown in the following formula (9).
[0136]
[0137] The present application embodiment also provides a device 200 for improving the coverage of a wireless sensor network, such as Figure 2 As shown, a schematic diagram of the structure of a device for improving the coverage of a wireless sensor network in an embodiment of the present application is provided. The device 200 for improving the coverage of a wireless sensor network at least includes: a determination module 210, an establishment module 220, and a calculation module 230, wherein:
[0138] In one embodiment of the present application, the determination module 210 is specifically used to determine a sparrow search algorithm with improved performance.
[0139] In the sparrow search algorithm, each individual sparrow has two attributes: position and fitness. It represents the current position of the individual and the satiety of the individual sparrow. Individuals with high fitness act as discoverers and are responsible for searching for food. Individuals with low fitness act as joiners and follow the discoverer to search for food around it. Some individuals are responsible for vigilance and reconnaissance. If the population realizes that there is danger, they will give up the current food and change the search position.
[0140] In order to improve the performance of the sparrow search algorithm and solve the problems of insufficient search ability and local optimality, Logistic chaotic mapping can be introduced. Chaotic mapping is often used in algorithm optimization to improve the search ability of the algorithm.
[0141] In one embodiment of the present application, the establishing module 220 is specifically used to: establish a WSN model, and the WSN model has an initial coverage rate.
[0142] A wireless sensor network (WSN) is a network composed of a large number of low-power sensor nodes with communication functions. In the study of wireless sensor network coverage, the node perception model used determines the spatial location of node deployment. Preferably, the wireless sensor network perception model established in the embodiment of the present application is a Boolean perception model.
[0143] In one embodiment of the present application, the calculation module 230 is specifically used to: in the WSN model, use the sparrow search algorithm with improved performance to calculate and obtain the final coverage rate.
[0144] The improved algorithm is applied to the optimization of wireless sensor network coverage, which significantly improves the coverage.
[0145] In one embodiment of the present application, the determining module 210 is further configured to:
[0146] Initialize the parameters of the sparrow search algorithm, population size N, number of discoverers M, number of alerters SD, current alert value st, and maximum number of iterations t, and initialize the sparrow population;
[0147] According to the initialized sparrow population, the fitness value corresponding to the initialized sparrow population is calculated, and after sorting the fitness values of the initialized sparrow population, the sparrows with the best and worst individual fitness values and their corresponding position information are selected respectively;
[0148] Divide the discoverers and followers according to the fitness value and update the location information;
[0149] Update the number of Sentinel SDs and update the location information;
[0150] Update the location information again according to the current sparrow population and calculate the current fitness value;
[0151] Determine whether the current algorithm execution times have reached the maximum number of iterations. If not, return the calculated fitness value.
[0152] In one embodiment of the present application, the determining module 210 is further configured to:
[0153] Adopt X i =4*X i-1 *(1-X i-1 ), initialize the sparrow population;
[0154] One-dimensional Logistic chaotic map X(K+1)=r*X(1-X(K)), K=1,2,…N;
[0155] The value range of r is [0,4], which serves as the Logistic parameter.
[0156] In one embodiment of the present application, the determining module 210 is further configured to:
[0157] Dynamically update the number of sentinels' SD. The formula for updating SD is as follows:
[0158]
[0159] Among them, t represents the current iteration number, and T represents the maximum iteration number.
[0160] In one embodiment of the present application, the determining module 210 is further configured to:
[0161] According to the current sparrow population, the Cauchy factor and firefly perturbation method are used to jump out of the local optimal solution, update the position information again, and calculate the current fitness value.
[0162] In one embodiment of the present application, the calculation module 230 is also used to
[0163] Initialize the sensing radius, sensing area size, number of wireless sensor nodes, and related parameters of the sparrow search algorithm in the WSN model;
[0164] Randomly distribute a corresponding number of wireless sensor nodes in the sensing area and initialize their positions;
[0165] The sparrow population is initialized with Logistic chaos, and the coverage value of the WSN model is used as the objective function of the algorithm to calculate the fitness of the population and sort it, and find out the current optimal fitness value and the worst fitness value and their positions;
[0166] Divide the discoverers and followers according to the fitness value and update the location information;
[0167] Update the number of sentinel SDs and update the sentinel's location information;
[0168] According to the current sparrow population, the location information is updated again, and the current fitness value is calculated, and finally the WSN coverage is calculated;
[0169] Determine whether the maximum number of iterations has been reached, and if so, output the optimal position of the sensor node.
[0170] It can be understood that the above-mentioned device for improving the coverage of a wireless sensor network can implement the various steps of the method for improving the coverage of a wireless sensor network provided in the aforementioned embodiment. The relevant explanations on the method for improving the coverage of a wireless sensor network are applicable to the device for improving the coverage of a wireless sensor network and will not be repeated here.
[0171] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 3 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0172] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0173] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0174] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a device for improving the coverage of the wireless sensor network at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0175] Determine the sparrow search algorithm with improved performance;
[0176] Establishing a WSN model, wherein the WSN model has an initial coverage;
[0177] In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance.
[0178] The above application Figure 1The method performed by the device for improving the coverage of a wireless sensor network disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0179] The electronic device may also perform Figure 1 A method for improving the coverage rate of a wireless sensor network is implemented in the device for improving the coverage rate of a wireless sensor network. Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0180] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method performed by the device for improving the coverage of a wireless sensor network in the illustrated embodiment is specifically used to perform:
[0181] Determine the sparrow search algorithm with improved performance;
[0182] Establishing a WSN model, wherein the WSN model has an initial coverage;
[0183] In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance.
[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0188] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0189] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0190] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0191] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0193] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for improving the coverage of a wireless sensor network, wherein: The method comprises: Determine the sparrow search algorithm with improved performance; Establishing a WSN model, wherein the WSN model has an initial coverage; In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance.
2. The method of claim 1, wherein: The determination of the sparrow search algorithm after the performance improvement includes: Initialize the parameters of the sparrow search algorithm, population size N, number of discoverers M, number of alerters SD, current alert value st, and maximum number of iterations t, and initialize the sparrow population; According to the initialized sparrow population, the fitness value corresponding to the initialized sparrow population is calculated, and after sorting the fitness values of the initialized sparrow population, the sparrows with the best and worst individual fitness values and their corresponding position information are selected respectively; Divide the discoverers and followers according to the fitness value and update the location information; Update the number of Sentinel SDs and update the location information; Update the location information again according to the current sparrow population and calculate the current fitness value; Determine whether the current algorithm execution times have reached the maximum number of iterations. If not, return the calculated fitness value.
3. The method of claim 2, wherein: The initialization of the sparrow population includes: Adopt X i =4*X i-1 *(1-X i-1 ), initialize the sparrow population; One-dimensional Logistic chaotic map X(K+1)=r*X(1-X(K)), K=1,2,…N; The value range of r is [0,4], which serves as the Logistic parameter.
4. The method of claim 2, wherein: The updating of the number of alerter SDs and the updating of location information includes: Dynamically update the number of sentinels' SD. The formula for updating SD is as follows: Among them, t represents the current iteration number, and T represents the maximum iteration number.
5. The method of claim 1, wherein: The updating of the location information again according to the current sparrow population and calculating the current fitness value include: According to the current sparrow population, the Cauchy factor and firefly perturbation method are used to jump out of the local optimal solution, update the position information again, and calculate the current fitness value.
6. The method of claim 1, wherein: In the WSN model, the final coverage is calculated using the sparrow search algorithm with improved performance, including: Initialize the sensing radius, sensing area size, number of wireless sensor nodes, and related parameters of the sparrow search algorithm in the WSN model; Randomly distribute a corresponding number of wireless sensor nodes in the sensing area and initialize their positions; The sparrow population is initialized with Logistic chaos, and the coverage value of the WSN model is used as the objective function of the algorithm to calculate the fitness of the population and sort it, and find out the current optimal fitness value and the worst fitness value and their positions; Divide the discoverers and followers according to the fitness value and update the location information; Update the number of sentinel SDs and update the sentinel's location information; According to the current sparrow population, the location information is updated again, and the current fitness value is calculated, and finally the WSN coverage is calculated; Determine whether the maximum number of iterations has been reached, and if so, output the optimal position of the sensor node.
7. The method of claim 6, wherein: The coverage values of the WSN model include: The coverage value CoverRatio in the monitoring area is defined as the ratio of the coverage area of the node set to the total area of the monitoring area:
8. A device for improving the coverage of a wireless sensor network, wherein: The device comprises: A determination module, used for determining the sparrow search algorithm after performance improvement; An establishing module, used for establishing a WSN model, wherein the WSN model has an initial coverage rate; The calculation module is used to calculate the final coverage rate in the WSN model using the sparrow search algorithm with improved performance.
9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute any one of the methods of claims 1 to 7.