Layered wireless sensor network performance optimization method based on MWO
By applying a method based on Marshallow distribution optimization algorithm in wireless sensor networks, the deployment location and transmission power of the aggregation layer nodes are optimized, and the energy consumption balance and coverage problems of sensor networks are solved, thus achieving the extension of network life and energy utilization. improve.
Patent Information
- Application Number
- CN202411410869.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-14
AI Technical Summary
When the prior art optimizes the performance of wireless sensor networks, it is difficult to achieve effective energy savings and network life while ensuring the energy balance, network coverage and connectivity of sensor nodes.
Using the Marshall distribution optimization algorithm (MWO)-based method, the objective function is constructed to minimize energy consumption, and optimize the deployment of aggregation layer nodes (CN) under the constraints of ensuring full coverage of sensor nodes, interconnection between nodes and energy consumption balance. Position and transmit power.
It is realized that under the conditions of ensuring full coverage of sensor nodes, interconnection between nodes and balanced energy consumption, the energy consumption of the layered wireless sensor network is optimized, the network life is extended, and the energy utilization rate is improved.
Smart Images

Figure CN119450517A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of communication technology, and in particular to a method for optimizing the performance of a hierarchical wireless sensor network based on MWO. Background Art
[0002] In recent years, the advancement of microelectronic systems and sensor node technology has made wireless sensor networks (WSNs) one of the most promising technologies in the future. WSNs are self-organizing wireless networks that consist of one or more sensor nodes and are used to monitor target areas. Due to the cost-effectiveness of sensor nodes and the ease of deployment and networking, WSNs have been widely used in various fields, such as health monitoring, precision agriculture, environmental monitoring, etc.
[0003] In general, the topology of WSNs is often hierarchical. Hierarchical WSNs have the advantages of easy expansion, efficient data transmission, and strong stability due to the characteristics of multi-level structure and hierarchical routing. At this time, the sensor nodes in the hierarchical WSNs include sensing nodes (SN) and convergence nodes (CN); SN monitors the area within the sensing range to generate sensing data and transmits the data to the convergence node; CN receives and summarizes the data collected by multiple SNs, and transmits the data to the terminal in a single hop or multi-hop manner.
[0004] Since sensor nodes are usually powered by batteries and have limited energy, how to effectively save the energy consumption of WSNs to extend the life of the network has always been one of the hot issues. In addition, energy consumption balance can effectively prevent some nodes in the network from exhausting their total energy in advance and dying due to high energy consumption, resulting in network disconnection and data transmission interruption. Therefore, energy consumption balance of sensor nodes also plays an important role in improving energy utilization and extending network life. In addition, node coverage is also an important indicator for measuring the performance of WSNs.
[0005] However, some scholars have only conducted in-depth research on energy conservation, but have ignored the issues of energy balance and network coverage. For example, GULEC O proposed a new energy-efficient distributed routing algorithm to extend the lifetime of WSNs. For another example, JIAO W, TIAN M, XU Y, etc. proposed a new data collection strategy to minimize energy consumption, improve data transmission performance and ensure network life. For another example, LIN D, MIN W, XU J, etc. proposed an inter-cluster routing method that considers both intra-cluster and inter-cluster energy efficiency and an inter-cluster routing energy-saving comprehensive economic theory to achieve the purpose of reducing network energy consumption and extending network life. For another example, MA N, ZHANG H, HU H, etc. proposed an energy-saving clustering protocol based on adaptive Voronoi partitioning to reduce sensor network energy consumption and improve network life.
[0006] Alternatively, some scholars have conducted in-depth research on energy conservation and energy balance, but have ignored the issues of network coverage and connectivity between CNs. For example, ZHU B, BEDEER E, NGUYEN HH, etc. studied a clustering algorithm to balance the energy consumption of nodes in WSNs and delay node death. For another example, YU CM, KU ML, WANG LC, etc. proposed a balanced multi-path routing hybrid transmission method to achieve high energy efficiency and balance of WSNs and maximize the life cycle of the entire network. For another example, PANDEY OJ, HEGDE RM developed a data routing method that optimizes link energy costs to make energy consumption uniform during data transmission and improve network life. For another example, TAM NT, HUNG TH, BINH HTT, etc. proposed a multi-objective optimization method for network energy balance to manage network energy consumption and extend network life cycle. For another example, Chen Kunding, Lin Muhui, etc. proposed a dynamic aggregation algorithm for multi-source heterogeneous sensor data under energy balance constraints to effectively reduce communication overhead.
[0007] Alternatively, some scholars have studied network coverage but ignored the energy consumption problem. For example, MIAO Z, YUAN X, ZHOU F, etc. proposed a gray wolf optimizer with enhanced hierarchical structure and applied it to the coverage optimization problem of WSNs. In another example, ELHOSENY M, THARWAT A, YUAN X, etc. proposed a new model for optimizing WSNs coverage requirements using genetic algorithms to achieve multiple coverage of the target. In another example, ZHAO XQ, CUI YP, GAO CY, etc. proposed an energy-saving coverage enhancement strategy based on vampire bat optimizer to improve the coverage effect. In another example, Chen Long, Jin Kezhong, Cai Xuebing, etc. proposed an improved marine predator algorithm combined with Tent chaotic sequence to reduce node energy consumption while ensuring full coverage. In another example, HANH NT, BINH HTT, HOAI NX, etc. proposed a novel and efficient meta-heuristic algorithm based on the form of genetic algorithm to solve the problem of coverage maximization in WSNs.
[0008] Therefore, in order to solve the above problems, a new method for optimizing the performance of wireless sensor networks is urgently needed. Under the constraints of full coverage of CN to SN, full connectivity between CNs and energy consumption balance, the deployment location and transmission power of CN in hierarchical WSNs are optimized to achieve the purpose of saving energy consumption, improving energy utilization and extending network life. Summary of the invention
[0009] The technical problem to be solved by the embodiments of the present invention is to provide a performance optimization method for a hierarchical wireless sensor network based on MWO, which optimizes the deployment position and transmission power of CNs in the hierarchical WSNs under the constraints of full coverage of CNs to SNs, full connectivity between CNs and energy consumption balance, so as to achieve the purpose of saving energy consumption, improving energy utilization and extending network life.
[0010] In order to solve the above technical problems, an embodiment of the present invention provides a method for optimizing the performance of a hierarchical wireless sensor network based on MWO, the method comprising the following steps:
[0011] S1. Under the constraints of ensuring full coverage of CN to SN, maintaining connectivity between CNs, balancing transmission power between CNs, and the maximum number of SNs covered by CNs not exceeding a preset upper limit, construct an objective function with minimum energy consumption;
[0012] S2. Using MWO, find the optimal solution for the objective function to obtain the optimal CN position coordinates and the transmission power of each CN;
[0013] The steps of using MWO to find the optimal solution for the objective function and obtain the optimal CN position coordinates and the transmission power of each CN specifically include:
[0014] S21, initializing network-related parameters and MWO-related parameters; wherein the network-related parameters include WSNs deployment area, locations of all SNs, locations and types of obstacles, and model parameters of all constraints; the MWO-related parameters include population size, individual dimension, and maximum number of iterations;
[0015] S22, according to the formula Initialize the population D 0 ; Among them, the superscript 0 represents the primary population; represents the i-th individual of the population; d represents the dimension of an individual; i = 1, 2, ..., N, N represents the population size; D i 0 In the search space [D min ,D max ] is evenly distributed, and D i 0 =D min +rand1·(D max -D min );D max and D min Represent the upper and lower limits of the search space respectively; rand1∈[0,1] 1×d represents a random matrix of dimension 1×d;
[0016] S23, determine the current number of iterations h, and calculate the fitness function values of all individuals corresponding to the current number of iterations h;
[0017] S24. Sort the fitness values in ascending order, and record the individual with the highest fitness value as the leader individual D best , and record the second-best individual as D second ;
[0018] S25, according to the formula DS = 2·α π·(1+α) ·(2·rand2-1), calculate the danger signal DS, and take any scalar ds in the vector DS; where rand2∈[0,1] 1×d Represents the matrix composed of random variables; α=1-h / h max ,h max Represents the maximum number of iterations;
[0019] If ds≥1, then execute the next step S26; otherwise, if ds<1, then jump to step S27;
[0020] S26, through the formula Update the population position; and Respectively represent any two individuals in the population at the hth iteration; r1∈[0,1] is a random variable;
[0021] S27. First, through the formula Update the population position; where, Represents a fitness value lower than D i h All individuals of; rand3,rand4∈[0,1] 1×d ; r7, r8∈[0,1]; round(·) represents rounding;
[0022] Secondly, randomly generate a scalar rand∈[0,1];
[0023] Next, if rand>0.5, the population is divided into male walruses, female walruses and juvenile walruses according to r∈[0,1], and the male walruses are ranked first. Individuals, female walruses are ranked arrive Individuals between and juvenile walruses are ranked Individuals between 1 and N; represents round down;
[0024] in front In individuals, by formula D i h+1 =D max +hal·(D max -D min ), update the population position; where hal represents the scalar in the Halton sequence;
[0025] exist arrive Among the individuals between Update the population position; where, represents the individual with the smallest fitness value in the hth iteration;
[0026] exist Among individuals between N, the formula Update the population position; where r2∈[0,1]; L is a vector of scalars l based on the Lévy distribution, and b follows a standard normal distribution; c = 1.5; a follows a normal distribution with a mean of 0 and a standard deviation of σ a By formula To determine, and Γ(x)=(x+1)! ;
[0027] Furthermore, if rand≤0.5 and ds≥0.5, by the formula Update the population position; where r3,r4∈[0,1], ||·||2 represents the Euclidean distance;
[0028] Furthermore, if rand≤0.5 and ds<0.5, then by formula D i h+1 =(A+B) / 2, update the population position; where, represents the individual with the second highest fitness value when the fitness values are sorted in ascending order; r5, r6∈[0,1]; θ1, θ2∈[0,π] represent randomly generated angles;
[0029] S28. Update the current number of iterations h according to the formula h=h+1; if h≤h max , then return to step S23; otherwise, if h>h max , then execute the next step S29;
[0030] S29, end the iteration, and output the optimal CN position coordinates and the transmission power of each CN.
[0031] The objective function in step S1 is specifically:
[0032]
[0033] in, Represents the preset threshold; V j represents the number of SNs currently covered by the jth CN; V max Represents the upper limit of the number of SNs covered by CN; C1 constraint ensures full coverage of SNs by CN; C2 ensures connectivity between CNs; C3 ensures balanced transmission power between CNs; C4 ensures the adjustment range of CN transmission power; C5 ensures that the maximum number of SNs covered by CN does not exceed the preset upper limit;
[0034] Among them, Cov Ω is the SN coverage model, and Cov Ω =1, it means that all SNs are covered by CN; m∈{1,…,T c}, n∈{1,…,T s}; T c Represents the total number of CNs, denoted as T s Represents the total number of SNs, denoted as cn m =(x m ,y m ) represents the position of the mth CN, and sn n =(x n ,y n ) represents the position of the nth SN; Used to judge cn m Whether to effectively cover sn n ; λ represents the wireless signal receiving sensitivity of SN, P m represents the transmit power of the mth CN; and represents the path loss at the reference distance d0; d mn =||cn m ,sn n ||2 represents cn m to sn n Euclidean distance; γ represents the path loss exponent, which indicates the growth rate of path loss with distance; d0 represents the reference distance; β represents the signal loss value of penetrating obstacles, and different obstacles correspond to different fixed values of β; δ~(0,σ δ 2 ) represents a mean of zero and a standard deviation of σ δ A random variable of
[0035] Among them, Tra(G wsn ) is the CN connectivity model; G wsn is an undirected graph, which represents the communication link topology between CNs and adopts To describe whether CNs communicate with each other; R c Represents the preset CN communication distance, which is a fixed value;
[0036] If Tra(G wsn )=1, that is, the communication links of all CNs in the network form a connected graph; otherwise, Tra(G wsn )=0; Tra(·) represents the depth-first traversal strategy, which is used to verify G wsn Is it a connected graph?
[0037] Among them, σ P is the CN energy consumption balance model, and Represents the mean value of all CN transmit powers;
[0038] Among them, represents the transmission power of all CNs, that is, the communication energy consumption between CNs and SNs; and, represents the communication energy consumption among all CNs, w n It represents the energy consumption of the nth CN communicating with some CNs.
[0039] Among them, in step S23, by formula Calculate the fitness function values of all individuals corresponding to the current iteration number h; where,
[0040] N1 is the penalty factor of the C1 constraint, which is a fixed value; N2 is the penalty factor of C2, which is a fixed value; N3 is the penalty factor of C3, which is a fixed value.
[0041] An embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the aforementioned MWO-based hierarchical wireless sensor network performance optimization method is implemented.
[0042] The embodiment of the present invention further provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the aforementioned MWO-based hierarchical wireless sensor network performance optimization method when executed by a computer processor.
[0043] Implementing the embodiments of the present invention has the following beneficial effects:
[0044] Under the constraints of ensuring full coverage of SN by CN, maintaining connectivity between CNs, balanced transmission power between CNs, and the maximum coverage number of SN by CNs not exceeding a preset upper limit, the present invention constructs an objective function with minimum energy consumption, and adopts MWO to find the optimal solution to obtain the optimal CN position coordinates and the transmission power of each CN. Therefore, under the constraints of full coverage of SN by CNs, full connectivity between CNs and balanced energy consumption, the deployment position and transmission power of CNs in hierarchical WSNs can be optimized, so as to achieve the purpose of saving energy consumption, improving energy utilization and extending network life. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying creative labor, other drawings obtained based on these drawings still belong to the scope of the present invention.
[0046] Figure 1 A flowchart of a method for optimizing the performance of a hierarchical wireless sensor network based on MWO provided in an embodiment of the present invention;
[0047] Figure 2 A comparison diagram of CN transmission power between MWO and other algorithms in an application scenario of a hierarchical wireless sensor network performance optimization method based on MWO provided by an embodiment of the present invention;
[0048] Figure 3 A comparison diagram of constraint violations between MWO and other algorithms in an application scenario of a method for optimizing performance of a hierarchical wireless sensor network based on MWO provided by an embodiment of the present invention;
[0049] Figure 4 A comparison chart of the change curves of CN survival rate and network connectivity over time in power balance and non-balanced conditions in an application scenario of a hierarchical wireless sensor network performance optimization method based on MWO provided in an embodiment of the present invention;
[0050] Figure 5 A comparison chart of CN average energy utilization curves under power balance and non-balance conditions in an application scenario of a hierarchical wireless sensor network performance optimization method based on MWO provided in an embodiment of the present invention;
[0051] Figure 6 A rendering diagram of CN coverage SN in an application scenario of a hierarchical wireless sensor network performance optimization method based on MWO provided in an embodiment of the present invention;
[0052] Figure 7 for Figure 6 The CN connectivity graph;
[0053] Figure 8 A comparison chart of the running time of MWO and other algorithms in an application scenario of a method for optimizing the performance of a hierarchical wireless sensor network based on MWO provided in an embodiment of the present invention;
[0054] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0056] like Figure 1 As shown in the figure, a method for optimizing the performance of a hierarchical wireless sensor network based on MWO is proposed in an embodiment of the present invention, and the method comprises the following steps:
[0057] Step S1: Under the constraints of ensuring full coverage of CN to SN, maintaining connectivity between CNs, balancing transmission power between CNs, and ensuring that the maximum number of SNs covered by CNs does not exceed a preset upper limit, construct an objective function for minimizing energy consumption;
[0058] The specific process is as follows: First, in order to achieve full coverage of SN, it is necessary to confirm that the coverage model of SN is Cov Ω
[0059]
[0060] Among them, Cov Ω =1, it means that all SNs are covered by CN; m∈{1,…,T c}, n∈{1,…,T s}; T c Represents the total number of CNs, denoted as T s Represents the total number of SNs, denoted as cn m =(x m ,y m ) represents the position of the mth CN, and sn n =(x n ,y n ) represents the position of the nth SN;
[0061] Used to judge cn m Whether to effectively cover sn n ;λ represents the wireless signal receiving sensitivity of SN; P m represents the transmit power of the mth CN;
[0062] At this time, in order to ensure that SN is covered by CN, the log-normal attenuation path loss model is adopted. This model comprehensively considers the distance attenuation and environmental impact of wireless signal strength during propagation. Specifically,
[0063] in, represents the path loss at the reference distance d0; d mn =||cn m ,sn n ||2 represents cn m to sn n Euclidean distance; γ represents the path loss exponent, which indicates the growth rate of path loss with distance; d0 represents the reference distance; β represents the signal loss value of penetrating obstacles, and different obstacles have different corresponding fixed values; δ~(0,σ δ 2 ) represents a mean of zero and a standard deviation of σ δ A random variable.
[0064] Secondly, in order to improve energy utilization, it is necessary to confirm the transmission power balance model σ between CNs. P ;
[0065]
[0066] in, Represents the average transmit power of all CNs.
[0067] Next, in order to measure the effectiveness and reliability of data transmission between CNs, it is necessary to confirm that the model for maintaining connectivity between CNs (i.e., connectivity model) is Tra(G wsn );
[0068] If Tra(G wsn )=1, that is, the communication links of all CNs in the network form a connected graph; otherwise, Tra(G wsn )=0; where Tra(·) represents the depth-first traversal strategy, which is used to verify G wsn Is it a connected graph?
[0069] At this time, G wsn is an undirected graph, which represents the communication link topology between CNs and adopts To describe whether CNs communicate with each other; where R c Represents the preset CN communication distance, which is a fixed value.
[0070] Next, we need to determine the energy consumption of the communication between CN and SN and between CN and CN. represents the transmission power of all CNs, that is, the communication energy consumption between CNs and SNs; and, represents the communication energy consumption among all CNs, w n It represents the energy consumption of the nth CN communicating with some CNs.
[0071] In summary, in hierarchical WSNs, under the premise of ensuring full coverage of CN to SN and balanced transmission power among CNs and interconnection, the positions and transmission powers of all CNs are jointly optimized to minimize the system energy consumption.
[0072] At the same time, considering the limitations of factors such as CN memory and processing chips in actual situations, there is an upper limit on the number of SNs connected to CN (that is, the maximum number of SNs covered by CN does not exceed the preset upper limit), and the following optimization objective function is constructed, specifically:
[0073]
[0074] in, Represents the preset threshold; V j represents the number of SNs currently covered by the jth CN; V max Represents the upper limit of the number of SNs covered by CN; C1 constraint ensures full coverage of SNs by CN; C2 ensures connectivity between CNs; C3 ensures balanced transmission power between CNs; C4 ensures the adjustment range of CN transmission power; C5 ensures that the maximum number of SNs covered by CN does not exceed the preset upper limit.
[0075] Step S2: using MWO to find the optimal solution for the objective function, and obtain the optimal CN position coordinates and the transmission power of each CN;
[0076] The specific process is as follows: step S21, initializing network-related parameters and MWO-related parameters; wherein the network-related parameters include but are not limited to WSNs deployment area, locations of all SNs, locations and types of obstacles, and model parameters of all constraints; MWO-related parameters include but are not limited to population size, individual dimension, and maximum number of iterations;
[0077] Step S22: According to the formula Initialize the population D 0 ; Among them, the superscript 0 represents the primary population; represents the i-th individual of the population; d represents the dimension of an individual; i = 1, 2, ..., N, N represents the population size; D i 0 In the search space [D min ,D max ] is evenly distributed, and D i 0 =D min +rand1·(D max -D min );D max and D min Represent the upper and lower limits of the search space respectively; rand1∈[0,1] 1×d represents a random matrix of dimension 1×d;
[0078] Step S23, determine the current iteration number h, and calculate the fitness function values of all individuals corresponding to the current iteration number h; wherein, through the formula Calculate the fitness function values of all individuals corresponding to the current iteration number h; where N1 is the penalty factor of the C1 constraint, which is a fixed value; N2 is the penalty factor of C2, which is a fixed value; N3 is the penalty factor of C3, which is a fixed value;
[0079] Step S24: Sort the fitness values in ascending order, and record the individual with the highest fitness value as the leader individual D best , and record the second-best individual as D second ;
[0080] Step S25: According to the formula DS = 2·α π·(1+α) ·(2·rand2-1), calculate the danger signal DS, and take any scalar ds in the vector DS; where rand2∈[0,1] 1×d Represents the matrix composed of random variables; α=1-h / h max ,h max Represents the maximum number of iterations;
[0081] If ds≥1, then execute the next step S26; otherwise, if ds<1, then jump to step S27;
[0082] Step S26: By formula Update the population position; and Respectively represent any two individuals in the population at the hth iteration; r1∈[0,1] is a random variable;
[0083] Step S27: First, by formula Update the population position; where, Represents a fitness value lower than D i h All individuals of; rand3,rand4∈[0,1] 1×d ; r7, r8∈[0,1]; round(·) represents rounding;
[0084] Secondly, randomly generate a scalar rand∈[0,1];
[0085] Next, if rand>0.5, the population is divided into male walruses, female walruses and juvenile walruses according to r∈[0,1], and the male walruses are ranked first. Individuals, female walruses are ranked arrive Individuals between and juvenile walruses are ranked Individuals between 1 and N; represents round down;
[0086] in front In individuals, by formula D i h+1 =D max +hal·(D max -D min ), update the population position; where hal represents the scalar in the Halton sequence;
[0087] exist arrive Among the individuals between Update the population position; where, represents the individual with the smallest fitness value in the hth iteration;
[0088] exist Among individuals between N, the formula Update the population position; where r2∈[0,1]; L is a vector of scalars l based on the Lévy distribution, and b follows a standard normal distribution; c = 1.5; a follows a normal distribution with a mean of 0 and a standard deviation of σ a By formula To determine, and Γ(x)=(x+1)! ;
[0089] Furthermore, if rand≤0.5 and ds≥0.5, by the formula Update the population position; where r3,r4∈[0,1], ||·||2 represents the Euclidean distance;
[0090] Furthermore, if rand≤0.5 and ds<0.5, then by formula D i h+1 =(A+B) / 2, update the population position; where, represents the individual with the second highest fitness value when the fitness values are sorted in ascending order; r5, r6∈[0,1]; θ1, θ2∈[0,π] represent randomly generated angles;
[0091] Step S28: Update the current number of iterations h according to the formula h=h+1; if h≤h max , then return to step S23; otherwise, if h>h max , then execute the next step S29;
[0092] Step S29, end the iteration, and output the optimal CN position coordinates and the transmission power of each CN.
[0093] like Figures 2 to 8 , which is an application scenario diagram of a hierarchical wireless sensor network performance optimization method based on MWO proposed in an embodiment of the present invention. Figure 2 A comparison diagram of CN transmission power between MWO and other algorithms used in the present invention; Figure 3 A comparison diagram of constraint violation between MWO and other algorithms used in the present invention; Figure 4 A comparison chart of the CN survival rate and network connectivity over time in the power balance and non-balanced conditions of the present invention; Figure 5 It is a comparison diagram of CN average energy utilization curves under power balance and non-balance conditions of the present invention; Figure 6 Rendering of CN covering SN of the present invention; Figure 7 for Figure 6 The CN connectivity graph; Figure 8 This is a comparison chart of the running time of MWO used in the present invention and other algorithms.
[0094] Based on the above embodiments and their preferred solutions, those skilled in the art can understand that, in actual operation, the technical concept involved in the present invention can be applied to a variety of implementations. The present invention uses the following carrier as an exemplary illustration:
[0095] (1) An electronic device. The device may specifically include: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the device, the device performs the steps / functions of the aforementioned embodiment or equivalent implementation. The electronic device may specifically be an electronic device related to a computer, such as but not limited to various types of interactive terminals and electronic products, such as a specific vehicle-mounted intelligent terminal, a mobile terminal, etc.
[0096] like Fig. 9 As shown, an electronic device is provided in an embodiment of the present invention. Specifically, the electronic device includes a processor 41 and a memory 42. The processor 41 and the memory 42 can communicate with each other through an internal connection path to transmit control and / or data signals. The memory 42 is used to store computer programs, and the processor 41 is used to call and run the computer program from the memory 42. The processor 41 and the memory 42 can be combined into a processing device, or more commonly, they are independent components. The processor 41 is used to execute the program code stored in the memory 42 to implement the above functions. In specific implementation, the memory 42 can also be integrated in the processor 41, or independent of the processor 41.
[0097] The processor 41 in the electronic device may be a system on chip SOC, which may include a central processing unit (hereinafter referred to as CPU), and may further include other types of processors, such as a graphics processing unit (hereinafter referred to as GPU), etc. In short, the various processors or processing units inside the processor 41 may work together to implement the method steps / functions of the aforementioned embodiments or equivalent implementations.
[0098] (2) A computer data storage medium on which a computer program or the above-mentioned device is stored, when the computer program or the above-mentioned device is executed, the computer executes the method steps / functions of the above-mentioned embodiment or equivalent implementation.
[0099] In several embodiments provided by the present invention, any function, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer data storage medium. Based on such an understanding, some technical solutions of the present invention are essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of the software product described below.
[0100] It should be particularly pointed out that the storage medium may refer to a server or a similar computer device, specifically, a storage device in a server or a similar computer device storing the aforementioned computer program or the aforementioned apparatus.
[0101] Implementing the embodiments of the present invention has the following beneficial effects:
[0102] Under the constraints of ensuring full coverage of SN by CN, maintaining connectivity between CNs, balanced transmission power between CNs, and the maximum coverage number of SN by CNs not exceeding a preset upper limit, the present invention constructs an objective function with minimum energy consumption, and adopts MWO to find the optimal solution to obtain the optimal CN position coordinates and the transmission power of each CN. Therefore, under the constraints of full coverage of SN by CNs, full connectivity between CNs and balanced energy consumption, the deployment position and transmission power of CNs in hierarchical WSNs can be optimized, so as to achieve the purpose of saving energy consumption, improving energy utilization and extending network life.
[0103] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.
[0104] The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for optimizing the performance of a hierarchical wireless sensor network based on MWO, characterized in that: The method comprises the following steps: S1. Under the constraints of ensuring full coverage of CN to SN, maintaining connectivity between CNs, balancing transmission power between CNs, and the maximum number of SNs covered by CNs not exceeding a preset upper limit, construct an objective function with minimum energy consumption; S2. Using MWO, find the optimal solution for the objective function to obtain the optimal CN position coordinates and the transmission power of each CN; The steps of using MWO to find the optimal solution for the objective function and obtain the optimal CN position coordinates and the transmission power of each CN specifically include: S21, initializing network-related parameters and MWO-related parameters; wherein the network-related parameters include WSNs deployment area, locations of all SNs, locations and types of obstacles, and model parameters of all constraints; the MWO-related parameters include population size, individual dimension, and maximum number of iterations; S22, according to the formula Initialize the population D 0 ; Among them, the superscript 0 represents the primary population; represents the i-th individual of the population; d represents the dimension of an individual; i = 1, 2, ..., N, where N represents the population size; In the search space [D min ,D max ] are evenly distributed, and D max and D min Represent the upper and lower limits of the search space respectively; rand1∈[0,1] 1×d represents a random matrix of dimension 1×d; S23, determine the current number of iterations h, and calculate the fitness function values of all individuals corresponding to the current number of iterations h; S24. Sort the fitness values in ascending order, and record the individual with the highest fitness value as the leader individual D best , and record the second-best individual as D second ; S25, according to the formula DS = 2·α π·(1+α) ·(2·rand2-1), calculate the danger signal DS, and take any scalar ds in the vector DS; where rand2∈[0,1] 1×d Represents the matrix composed of random variables; α=1-h / h max ,h max Represents the maximum number of iterations; If ds≥1, then execute the next step S26; otherwise, if ds<1, then jump to step S27; S26, through the formula Update the population position; and Respectively represent any two individuals in the population at the hth iteration; r1∈[0,1] is a random variable; S27. First, through the formula Update the population position; where, Represents a fitness value lower than All individuals of; rand3,rand4∈[0,1] 1×d ; r7, r8∈[0,1]; round(·) represents rounding; Secondly, randomly generate a scalar rand∈[0,1]; Next, if rand>0.5, the population is divided into male walruses, female walruses and juvenile walruses according to r∈[0,1], and the male walruses are ranked first. Individuals, female walruses are ranked arrive Individuals between and juvenile walruses are ranked Individuals between 1 and N; represents round down; in front In individuals, through the formula Update the population position; where hal represents a scalar in the Halton sequence; exist arrive Among the individuals between Update the population position; where, represents the individual with the smallest fitness value in the hth iteration; exist Among individuals between N, the formula Update the population position; where r2∈[0,1]; L is a vector of scalars l based on the Lévy distribution, and b follows a standard normal distribution; c = 1.5; a follows a normal distribution with a mean of 0 and a standard deviation of σ a By formula To determine, and Γ(x)=(x+1)! ; Furthermore, if rand≤0.5 and ds≥0.5, by the formula Update the population position; where r3,r4∈[0,1], ||·||2 represents the Euclidean distance; Furthermore, if rand≤0.5 and ds<0.5, then by the formula Update the population position; where, represents the individual with the second highest fitness value when the fitness values are sorted in ascending order; r5, r6∈[0,1]; θ1, θ2∈[0,π] represent randomly generated angles; S28. Update the current number of iterations h according to the formula h=h+1; if h≤h max , then return to step S23; otherwise, if h>h max , then execute the next step S29; S29, end the iteration, and output the optimal CN position coordinates and the transmission power of each CN.
2. The MWO-based hierarchical wireless sensor network performance optimization method according to claim 1, characterized in that: The objective function in step S1 is specifically: in, Represents the preset threshold; V j represents the number of SNs currently covered by the jth CN; V max Represents the upper limit of the number of SNs covered by CN; C1 constraint ensures full coverage of SNs by CN; C2 ensures connectivity between CNs; C3 ensures balanced transmission power between CNs; C4 ensures the adjustment range of CN transmission power; C5 ensures that the maximum number of SNs covered by CN does not exceed the preset upper limit; Among them, Cov Ω is the SN coverage model, and Cov Ω =1, it means that all SNs are covered by CN; m∈{1,…,T c }, n∈{1,…,T s }; T c Represents the total number of CNs, denoted as T s Represents the total number of SNs, denoted as cn m =(x m ,y m ) represents the position of the mth CN, and sn n =(x n ,y n ) represents the position of the nth SN; Used to judge cn m Whether to effectively cover sn n ; λ represents the wireless signal receiving sensitivity of SN, P m represents the transmit power of the mth CN; and represents the path loss at the reference distance d0; d mn =||cn m ,sn n ||2 represents cn m to sn n Euclidean distance; γ represents the path loss exponent, which indicates the growth rate of path loss with distance; d0 represents the reference distance; β represents the signal loss value of penetrating obstacles, and different obstacles have different corresponding fixed values; δ~(0,σ δ 2 ) represents a mean of zero and a standard deviation of σ δ A random variable of Among them, Tra(G wsn ) is the CN connectivity model; G wsn is an undirected graph, which represents the communication link topology between CNs and adopts To describe whether CNs communicate with each other; R c Represents the preset CN communication distance, which is a fixed value; If Tra(G wsn )=1, that is, the communication links of all CNs in the network form a connected graph; otherwise, Tra(G wsn )=0; Tra(·) represents the depth-first traversal strategy, which is used to verify G wsn Is it a connected graph? Among them, σ P is the CN energy consumption balance model, and Represents the mean value of all CN transmit powers; Among them, represents the transmission power of all CNs, that is, the communication energy consumption between CNs and SNs; and, represents the communication energy consumption among all CNs, w n It represents the energy consumption of the nth CN communicating with some CNs.
3. The MWO-based hierarchical wireless sensor network performance optimization method according to claim 2, characterized in that: In step S23, the formula Calculate the fitness function values of all individuals corresponding to the current iteration number h; where, N1 is the penalty factor of the C1 constraint, which is a fixed value; N2 is the penalty factor of C2, which is a fixed value; N3 is the penalty factor of C3, which is a fixed value.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the MWO-based hierarchical wireless sensor network performance optimization method according to any one of claims 1 to 3 is implemented.
5. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the MWO-based hierarchical wireless sensor network performance optimization method according to any one of claims 1 to 3.