Wireless sensor network routing recovery method, device and medium

By applying quantum random number generator and artificial bee colony algorithm in wireless sensor networks, suboptimal spanning tree solution sets are quickly generated, which solves the problems of high computational complexity and low efficiency of existing routing recovery methods, and achieves efficient and fast Routing recovery.

CN118612775BActive Publication Date: 2025-02-14MINZU UNIVERSITY OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410783336.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-02-14
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The routing recovery method in existing wireless sensor networks relies on global information, has high computational complexity, and is inefficient in large-scale networks, which cannot meet real-time requirements.

Method used

Using an artificial bee colony algorithm based on a quantum random number generator, a set of suboptimal spanning tree solution sets are quickly generated through the combination of local search and global search as an alternative to maintain network connectivity.

Benefits of technology

It reduces the computational complexity, improves the efficiency of routing recovery, and can quickly search for suboptimal spanning tree solution sets in large-scale networks to meet real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612775B_ABST
    Figure CN118612775B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of wireless communication networks, and discloses a wireless sensor network routing recovery method, device and medium to solve the problem of how to quickly select alternative solutions to maintain the connectivity of the network when a fault occurs in the wireless sensor network. Based on the concept of suboptimal spanning trees, a set of suboptimal spanning tree solution sets can be generated by inputting the topological structure of the network. These suboptimal spanning trees can be used as alternative solutions, and alternative solutions can be quickly selected to maintain the connectivity of the network when a fault occurs. When a fault occurs, the suboptimal solution can be used as an alternative solution in time to maintain the connectivity of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communication networks, and more specifically, to a method, device and medium for wireless sensor network routing recovery. Background Art

[0002] In the field of wireless communication networks, especially wireless sensor networks, maintaining network connectivity is an important technical issue. When a node or link in the network fails or fails, timely measures need to be taken to restore the normal operation of the network to ensure the reliability of data transmission and communication.

[0003] Traditional routing recovery methods usually rely on global information and need to recalculate the shortest path or the global optimal solution. However, this method usually has high computational complexity and is inefficient in large-scale networks. In addition, for some real-time applications or delay-sensitive applications, the time to recalculate the global optimal solution may cause unacceptable delays.

[0004] Specifically, it is found that the existing technologies related to this application are traditional routing recovery methods, which are often used in wireless sensor networks to solve connectivity problems when the network fails. These traditional methods usually rely on global information, such as network topology and node status, to restore the network route by recalculating the shortest path or global optimal solution. Among the traditional routing recovery methods, common technical solutions include the following two:

[0005] 1. Route recovery based on centralized control: In this solution, a central control node in the network is responsible for collecting global information and calculating the shortest path or global optimal solution. When a node or link in the network fails, the control node recalculates and updates the routing information. The control node then distributes the updated routing information to all nodes to achieve route recovery. The disadvantage of this solution is that it requires the maintenance of a central control node, which increases the complexity of the system and the risk of single point failure.

[0006] 2. Route recovery based on distributed algorithms: In this scheme, each node in the network performs route calculations based on local information and the status of neighboring nodes. Nodes gradually update the routing table by exchanging information to achieve route recovery. Common distributed algorithms include distributed shortest path algorithms, distributed minimum spanning tree algorithms, etc. However, these distributed algorithms have high computational complexity in large-scale networks and require a long recovery time.

[0007] The disadvantages of the above existing technical solutions are mainly due to the following three reasons:

[0008] 1) Global information dependence: Traditional methods usually need to obtain global information, such as network topology and node status. This requires nodes in the network to communicate with each other and exchange information, which increases communication overhead and energy consumption. At the same time, the complexity of collecting and processing global information in large-scale networks is high, resulting in increased computational delays and system overhead.

[0009] 2) High computational complexity: The shortest path or global optimal solution calculation in traditional methods usually requires complex mathematical calculations, such as the Dijkstra algorithm, the Floyd-Warshall algorithm, etc. In large-scale networks, these high computational complexity results in extended routing recovery time and cannot meet real-time requirements.

[0010] 3) Central control risk: The centralized control-based solution relies on a central control node, which increases the complexity of the system and poses a risk of single point failure. Once the control node fails, the routing recovery function of the entire network will be affected.

[0011] Therefore, existing technical solutions have some disadvantages when dealing with the routing recovery problem in wireless sensor networks, including large communication overhead, high computational complexity, and central control risks. Summary of the invention

[0012] The present invention is provided to solve the above problems existing in the prior art. Therefore, a wireless sensor network routing recovery method, device and medium are needed to solve the problem of how to quickly select an alternative solution to maintain the connectivity of the network when a failure occurs in the wireless sensor network.

[0013] According to a first aspect of the present invention, a wireless sensor network routing recovery method is provided, the method comprising:

[0014] Obtain the connected undirected weighted graph model G(t) = (N, E, W), the number of solutions, the maximum number of iterations, the population, and the counter population of the wireless sensor network at any given time t, where E = {e1,…,e i ,…,e l |e i =(v j ,v k )}, i∈(1,2,…,l), j, k∈(1,2,…,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n}, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, vj 、v k and v n denote the jth, kth, and nth sensors respectively, W is the weight set of communication links, and denote the weight values ​​corresponding to the ith communication link and the lth communication link respectively, and the population includes sn solutions;

[0015] Use the quantum random number generator to initialize each solution, calculate the fitness values ​​of all solutions, and initialize all dimensions of the counter population to 0;

[0016] When the current number of iterations T is less than or equal to the maximum number of iterations, the counter population strategy, the employed bee search strategy, the replacement search strategy, the follower bee search strategy, the replacement search strategy and the scout bee search strategy are executed to update the population, and the current number of iterations T=T+1 is updated, and the updated current number of iterations is compared with the maximum number of iterations again;

[0017] When the current number of iterations is greater than the maximum number of iterations, the final updated population is output.

[0018] According to a second aspect of the present invention, a wireless sensor network routing recovery device is provided, the device comprising:

[0019] The parameter acquisition unit is configured to acquire the connected undirected weighted graph model G(t)=(N,E,W), the number of solutions, the maximum number of iterations, the population, and the counter population of the wireless sensor network at any given time t, where E={e1,…,e i ,…,e l |e i =(v j ,v k )}, i∈(1,2,…,l), j, k∈(1,2,…,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n}, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, v j 、v k and v n denote the jth, kth, and nth sensors respectively, W is the weight set of communication links, and denote the weight values ​​corresponding to the ith communication link and the lth communication link respectively, and the population includes sn solutions;

[0020] An initialization unit is configured to initialize each solution using a quantum random number generator, calculate the fitness values ​​of all solutions, and initialize all dimension values ​​of the counter population to 0;

[0021] The iterative calculation unit is configured to execute the counter population strategy, the employed bee search strategy, the replacement search strategy, the follower bee search strategy, the replacement search strategy and the scout bee search strategy to update the population when the current iteration number T is less than or equal to the maximum iteration number, and update the current iteration number T=T+1, and re-compare the updated current iteration number with the maximum iteration number; when the current iteration number is greater than the maximum iteration number, output the final updated population.

[0022] According to a third aspect of the present invention, there is provided a readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the method as described above.

[0023] The present invention has at least the following beneficial effects:

[0024] 1. Based on the concept of suboptimal spanning trees, a set of suboptimal spanning tree solutions can be generated by inputting the network topology. These suboptimal spanning trees can be used as alternative solutions. When a failure occurs, alternative solutions can be quickly selected to maintain network connectivity. In this way, optimal solutions and suboptimal solutions can be quickly generated in the network for backup. When a failure occurs, suboptimal solutions can be used as alternative solutions in a timely manner to maintain network connectivity.

[0025] 2. Improve routing recovery efficiency: Traditional routing recovery methods usually require global information and complex calculations to find the optimal solution, resulting in extended recovery time. The present invention aims to quickly generate a set of suboptimal spanning tree solutions through a combination of local search and global search. These solutions can be used as alternatives, greatly reducing the computational complexity and improving the efficiency of routing recovery.

[0026] 3. Applicable to large-scale networks: Traditional methods have high computational complexity in large-scale networks and are difficult to meet real-time requirements. The present invention can quickly search for suboptimal spanning tree solutions in large-scale networks by designing effective local search and global search strategies, with lower computational complexity and shorter recovery time.

[0027] 4. The present invention is an efficient, fast, reliable and large-scale network routing recovery solution. Through the improved artificial bee colony algorithm, the present invention is expected to significantly optimize the routing recovery performance of wireless sensor networks, improve the connectivity and stability of the network, and bring significant technological progress to the field of wireless communications. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A flow chart of a wireless sensor network routing recovery method according to an embodiment of the present invention is shown.

[0029] Figure 2 An example of a quantum random number generator according to an embodiment of the present invention is shown.

[0030] Figure 3 A conceptual diagram of a dynamic search strategy according to an embodiment of the present invention is shown.

[0031] Figure 4 A schematic diagram of the structure of a wireless sensor network Network1 according to an embodiment of the present invention is shown, which has 16 nodes and 32 edges.

[0032] Figure 5 Four sets of solution examples are shown after a communication link failure occurs in the wireless sensor network Network1 according to an embodiment of the present invention.

[0033] Figure 6 The structure diagram of the wireless sensor network routing recovery device according to the embodiment of the present invention is shown. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments, but are not intended to limit the present invention. For the various steps described herein, if there is no necessity for a causal relationship between each other, the order in which they are described as examples herein should not be regarded as a limitation, and those skilled in the art should know that they can be adjusted in order, as long as the logic between them is not destroyed, resulting in the inability to implement the entire process.

[0035] The embodiment of the present invention provides a wireless sensor network routing recovery method, such as Figure 1 As shown, it is a flow chart of the method, which starts with step S1, obtaining the connected undirected weighted graph model, the number of solutions, the maximum number of iterations, the population and the counter population of the wireless sensor network at any given time t.

[0036] The connected undirected weighted graph model is represented by G(t)=(N,E,W) (hereinafter referred to as graph G), where E={e1,…,ei ,…,e l |e i =(v j ,v k )}, i∈(1,2,…,l), j, k∈(1,2,…,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n}, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, v j 、v k and v n denote the jth, kth, and nth sensors respectively, W is the weight set of communication links, and They respectively represent the weight values ​​corresponding to the ith communication link and the lth communication link, and the population includes sn solutions.

[0037] Then, step S2 is executed to initialize each solution using the quantum random number generator, calculate the fitness values ​​of all solutions, and initialize all dimension values ​​of the counter population to 0.

[0038] After step S2, step S3 is executed to determine whether T≤MaxIterateNum, where MaxIterateNum is the maximum number of iterations and T represents the current number of iterations. If T≤MaxIterateNum, step S4 is executed; if T>MaxIterateNum, step S5 is executed.

[0039] Step S4 includes the following steps:

[0040] Step S41, executing the counter population strategy;

[0041] Step S42, executing the employed bee search strategy and the replacement search strategy;

[0042] Step S43, executing the follow-up bee search strategy and the replacement search strategy;

[0043] Step S44, executing the search strategy of the scout bees to update the population.

[0044] Step S45, T=T+1, and return to step S3.

[0045] Step S5, outputting the final updated population, namely, SN solutions based on the suboptimal spanning tree.

[0046] In some embodiments, the weight value corresponding to the i-th communication link is calculated by the following formula (1):

[0047]

[0048] Among them, α1, α2, α3, α4, and α5 represent weight values ​​corresponding to different indicators, which can be set according to actual needs, but the sum of them is 1.

[0049] The cost between each node (e i ) depends on the Euclidean distance between nodes dist(e i ); delay delay(e i ) is equal to the link distance divided by two-thirds of the speed of light plus a random number between 10ms and 100ms; the packet loss rate of each link packetLoss(e i ) is randomly generated between 0 and 1; delay jitter (e i ) is randomly selected between 5ms and 18ms; bandwidth (e i ) takes a random number between 20 and 280 kb / s. The expression is as follows:

[0050] cost(e i ) = β·dist(e i ) (2)

[0051]

[0052] packetLoss(e i )=rand(0,1) (4)

[0053] jitter i )=rand(0,1)·13+5 (5)

[0054] bandwidth(e i )=rand(0,1)·260+20 (6)

[0055] Among them, dist(e i )=dist(v j ,v k ) represents the v to which the communication link ei is connected j ,v k The Euclidean distance between two sensors, β represents a given coefficient, c represents the speed of light, and rand(0,1) represents a random number between [0,1].

[0056] In some embodiments, the fitness values ​​of all solutions are calculated by the following method:

[0057] Assume the search space is Φ={P|P=[p1,…,p i ,…,p sn ]}, i∈(1,2,…,sn), where Φ contains all possible populations, P is a population consisting of sn food sources, each food source is a solution, p i and p sn are the ith and snth solutions respectively.

[0058] Assume the solution space is S = {p i |p i =[x1,…,x j ,…,x l ]}, x j ∈{0,1},j∈(1,2,…,l). Among them, S contains all possible solutions, and each solution p i is a food source, corresponding to an individual, consisting of l dimensions, each dimension is represented by x j It is a 0-1 variable. Where S = S f ∪S nf , the solution space S can be divided into feasible solution space S f and infeasible solution space S nf . Where S f is the set of solutions that satisfy the feasible constraints in the solution space. A feasible constraint means that the solution must satisfy specific constraints, expressed as S f ={p i ∈S|F c (p i )=True}, where p i is a feasible solution, F c (p i )=True means that the solution satisfies the specific feasible constraints. nf is the set of solutions in S that do not satisfy the feasible constraints, denoted by S nf ={p i ∈S|F c (p i )=False},F c (p i )=False means the solution p i The feasibility constraints set are not met.

[0059] For the binary coding strategy and model G(t) = (N, E, W), let the population P = [p1, ..., p i ,…,p sn ],i∈(1,2,…,sn), solution p i =[x i1 ,…,x ij,…,x il ], x ij ∈{0,1}, j∈(1,2,…,l). P is the symbolic representation of all solutions Foodsources corresponding to the population, p i is the symbol corresponding to the food source Foodsource, sn is the population size, l is the number of edges in the graph G, corresponding to the number of communication links, and n is the number of nodes in the graph G, corresponding to the number of sensors. A solution p i Corresponding to a spanning tree, it is a binary string consisting of l classical bits, x ij and x il Represents the jth and lth values ​​corresponding to the ith solution, with each classical bit x ij Corresponds to an edge e in the graph G in order j . Where x ij =1 indicates the corresponding edge e j is included in the spanning tree, and vice versa. The feasible constraint function is the spanning tree constraint, as shown in formula (7):

[0060]

[0061] Among them, F c () represents the spanning tree constraint, u, v represent the set of spanning tree nodes N st The node, n v represents the number of edges associated with node v, deg(v) represents the degree of node v, e represents the edge connecting nodes v and u, E represents the set of edges, and (l=n-1) represents the edge number constraint, requiring that the number of edges in the spanning tree is equal to the number of vertices minus one; Represents the vertex degree constraint. For each vertex in the graph, the number of edges associated with the vertex in the spanning tree must be less than or equal to the degree of the vertex minus one. Represents a connectivity constraint, requiring that the subgraph constructed by the edge set of the spanning tree is connected, that is, there is a path between any two vertices.

[0062] Constructing a spanning tree is a combinatorial optimization problem based on discrete variables, and a fitness function is defined as shown in formula (8).

[0063]

[0064] In formula (8), fitness i is the fitness value of the ith solution, sn is the number of solutions, i.e., the number of populations, l is the number of communication links, and n is the number of sensors. ij ∈{0,1}, i∈(1,2,…,sn), j∈(1,2,…,l). x ij The jth value corresponding to the i-th solution indicates whether the j-th edge e is selectedj ; is the jth edge e of the ith solution j The weight value of .

[0065] In some embodiments, the implementation principle of population initialization based on the quantum random number generator is as follows:

[0066] The quantum circuit device of the quantum random number generator mainly uses the quantum H gate or Hadamard gate, which can convert the ground state and the excited state into a superposition state, which can be expressed as Its matrix is: The probability that the superposition state measurement result is 0 is equal to the probability that it is 1. Figure 2 As shown, the quantum random number generator is composed of 5 quantum bits (q0, q1, q2, q3, q4) and 25 quantum H gates.

[0067] Exemplarily, the specific process of population initialization based on the quantum random number generator is (m=5):

[0068] (1) First, initialize the m-bit quantum bits to

[0069] (2) Use of quantum bits Change the base to the equilibrium superposition state, as shown in equation (9);

[0070]

[0071] in, The symbolic representation of the vector representation of qubits using Dirac symbols, here represents 64 qubits in a state of equilibrium superposition, H represents the quantum H gate or Hadamard gate, which converts the qubit in the ground state |0> into a state of equilibrium superposition. The matrix is: j> represents the base right vector.

[0072] (3) Observe and obtain a binary string consisting of m classical bits.

[0073] The quantum random number generator can obtain a binary bit string composed of classical bits between "00000" and "11111" with equal probability in one observation, which corresponds to a decimal integer value between "0" and "31". Count the 10,000 observation results of the quantum random number generator. And count the top n-1 binary strings in the range of 0-1, that is, the top 15, convert them to decimal, and assign 1 to the classical bits corresponding to the edges of the individuals to obtain new individuals representing the spanning tree solution. For example, the new individual is: "10100001001110011000100100011111".

[0074] In some embodiments, the multiple search strategies involved in step S4 mentioned above are described in detail.

[0075] In this embodiment, the replacement search strategy is improved based on the replacement strategy proposed in the document "Li Y, Zhao Y, Zhang Y. A spanning tree construction algorithm for industrial wireless sensor networks based on quantum artificial bee colony [J]. EURASIP Journal on Wireless Communications and Networking, 2019, 2019 (1): 176–188." According to the document, the feasible new solution is reasonably replaced, but it does not consider how to operate the original solution when the new solution is not feasible. The present invention introduces a replacement strategy and proposes a counter strategy for improvement. The main function of the improved replacement search strategy is to reasonably replace the inferior solution in the population with the high-quality solution. When the new solution is not feasible, the existing solution is operated according to the counter in order to obtain a high-quality solution. This strategy is committed to better maintaining the diversity, uniqueness and feasibility of the population.

[0076] The replacement search strategy designed in this embodiment uses a counter population. Suppose the counter population is Counters = [counter1, ..., counter i ,…,counter sn ], i∈(1,2,…,sn). Counter i =[num i1 ,…,num ij ,…,num il ], j∈(1,2,…,l), sn is the population size, l is the number of edges in the graph G, corresponding to the number of communication links in the wireless sensor network, and n is the number of nodes in the graph G, corresponding to the number of network sensors. i Each has a counter i , the size of the counter is the same as the solution, and the counter counts the solution p i All corresponding edges e ij The weight value num ij A large weight value indicates that the corresponding edge is selected. ij= 1, the probability of being a feasible solution is high, and vice versa. The probability of a solution being a feasible solution is low after the edge with the smallest weight value is selected. In other words, the smaller the weight value, the fewer times the corresponding edge is selected. The algorithm tends to select edges with high weight values ​​during iteration, which makes the algorithm prone to local optimality, reduces population diversity, and weakens the algorithm's exploration ability. Therefore, when the new solution p new When it is an infeasible solution, the original solution p is exchanged according to the counter weight value i The corresponding subscript value gets the new solution p * new , in order to improve the exploration ability of the algorithm and improve the diversity of the population. Formula (10) is the calculation formula of the counter:

[0077]

[0078] Let F Re () is a replacement search strategy, which is described in detail as follows: the input is the original solution p i And new solution new , first determine p new Is it a feasible solution? new For a feasible solution, execute the feasible solution replacement strategy: determine whether there is an infeasible solution in the current population. If so, use p new Replace the randomly selected infeasible solution p nf If it does not exist, determine whether the new solution is better than the original solution and does not overlap with all the solutions in the population. If it does, use p new Replace p i If p new For an infeasible solution, execute the infeasible solution replacement strategy: according to p i The corresponding counter i , calculate the minimum counter value num ij and the next smallest num ik The two subscripts j, k, x in the original solution are not equal ij ≠x ik , swap the corresponding subscripts of the two to get another new solution p * new , determine whether the new solution is a feasible solution. If it is a feasible solution, use the new solution to replace the original solution. This strategy is shown in formula (11):

[0079]

[0080] In formula (11), p new <p i Represents the solution p i Better than the new solution new , p new >p i Represents the new solution p new Better than solution pi , p * new <p i Represents the solution p i Better than another new solution p * new >p i Another new solution Better than solution p i , p new ∈S f Represents the new solution p new is a feasible solution, p new ∈S nf Expressed as a new solution p new is an infeasible solution, ∧ is an AND operation, and ∨ is an OR operation.

[0081] The main function of the employed bee search strategy is to improve the global exploration ability, that is, the exploration ability, to find more unknown solutions based on the known solutions, and to retain the good genes of the original solutions to improve the population diversity. Em () is the employed bee search strategy, which is described in detail as follows: loop through the population P, randomly select a solution in P that is not equal to the current solution p i A random solution p k , (p i ≠p k ). i and p k Executing equation (12) yields a new solution: new =[y1,…,y q ,…,y l ], q∈(1,2,…,l). Finally, p i and p new Perform the improved replacement search strategy F Re (p i ,p new ), after executing the strategy, the population is updated to a certain extent, P * =F Em (P). The specific operation is shown in formula (12):

[0082]

[0083] In formula (12), y q represents the value of the qth dimension of the new solution individual, x kj represents the j-th dimension value of the k-th individual, represents the j*th dimension value of the i-th individual, represents the j*th dimension value of the kth individual, j* represents the j*th dimension, p new Initialized to p new=[0,…,0,…,0]. new satisfy When p new All dimensions executed Operation, for example, if x i3 =1,x k3 =0, then y3 = x i3 ∧x k3 = 0. In order to satisfy the feasible solution constraint Other operations need to be performed. Indicates p i In and p k In satisfy When , its dimension value is added to the set {j*|1≤j*≤l}, where rand{} represents randomly selecting a dimension value q from the set {}, for p new The y in q Perform assignment operation.

[0084] The main function of the follow-bee search strategy is to improve the local development capability, that is, the mining capability, to find more high-quality solutions based on the current global optimal solution, and to improve the optimality and feasibility of the solution population. Fo () is the bee-following search strategy, which is described in detail as follows: loop through the population P and find the optimal solution p of the current population in P. best . For the current solution p i and p best Executing equations (13) and (14) yields two new solutions: c =[y1,…,y m ,…,y l ],m∈(1,2,...,l),p b =[y1,...,y h ,…,y l ], h∈(1,2,…,l). Finally, p i and p c 、p b Execute the improved replacement search strategy F respectively Re (p i ,p c ), F Re (p i ,p b ), after executing the strategy, the population is updated to a certain extent, P * =F Fo (P). The different operations to obtain the two new solutions are shown in equations (13) and (14):

[0085]

[0086] Among them, y m and l Represents the value of the mth and lth dimensions of the solution individual, y h and l represents the value of the hth and lth dimensions of the solution individual, x bj represents the j-th dimension value of the b-th individual, h represents the h-th dimension, and m represents the m-th dimension;

[0087] The operations in equations (13) and (14) are the same as those in equation (12).

[0088] The main function of the scout bee search strategy is to maintain the feasibility, diversity and uniqueness of the population. Feasibility means that all individuals in the population are feasible solutions; diversity and uniqueness require that all solutions of the population are evenly distributed and non-repetitive. Let F Sc () is the scout bee search strategy, which is described in detail as follows: First, determine whether there is an infeasible solution p in the current population P. nf , if it exists, for p nf , use the quantum random number generator to generate a new solution p that is not in the population q Replace; if it does not exist, find the repeated solution in the current population, and replace the repeated solution p1, p2, ..., p corresponding to the repeated individuals d , keep the first repeated element p1, and the remaining repeated elements p2,…,p d Use a quantum random number generator to generate a new solution p that is not in the population qi Replacement. After executing the strategy, the population is updated to a certain extent, P * =F Fo (P). This strategy is shown in formula (15):

[0089]

[0090] In formula (15), p q New solutions generated for quantum random number generators.

[0091] In actual operation, failure of a node or edge in the network is inevitable. The method proposed above can obtain a solution set consisting of solutions based on suboptimal spanning trees to ensure network connectivity and restore routing. How to reasonably use these solutions to ensure network connectivity in a timely manner is a key issue. This embodiment also provides a design of a dynamic search strategy to ensure that the most accurate replacement solution is found in a timely manner when a node or edge fails.

[0092] like Figure 3As shown in the figure, the process of the dynamic search strategy is as follows: first determine whether the faulty link constitutes a separate node in the network. If not, continue to select. For example, when node x is only connected by edge 12 and edge 14, node x is isolated and the network structure needs to be adjusted to build a new spanning tree solution set. Then, in the wireless sensor network, sum the numbers of the faulty links, find the corresponding nodes in the linked list, and continue to traverse to find the corresponding nodes according to the number of faulty links. The node is a balanced search binary tree (Adelson-Velskii and Landis, AVLTree). Find the corresponding node in the tree. The node maps a linked list. The first value of the linked list is the weight value of the optimal solution that does not contain the faulty link. The weight value corresponds to the specific solution in the database. The weight value is used to find the specific solution in the database.

[0093] When adding data to the database, we also need to determine the feasibility of adding data in the Network. The reason for using the database to store specific solutions is that the solutions mapped in different AVL trees may have duplicate values. For example, the faulty links of the solution with a weight value of 1326.42 can be E3, E6, E8, E9, E26, etc. Therefore, using the database to store specific and unique solutions effectively avoids Hash conflicts, and finally uses the weight value and Hash to find the solution.

[0094] M corresponds to the number of linked lists of the sum of the number of faulty links. Assuming N = 16, E = 32, the number of faulty links in the worst case is 17, and the sum is 408. This is without considering whether the faulty links affect the generation of isolated nodes in the graph network and do not meet the constraints. In actual situations, M is much smaller than 408, so M is a small constant. N is the number of faulty links. The number of faulty links in the worst case is 17. In actual situations, N is much smaller than 17, so N is a small constant. For an AVL tree with L elements, the time complexity of the search is O(logL), and the size of L depends on the size of N and E. Then traverse the linked list containing K elements. Generally speaking, we need the first smallest element of the sorted linked list. The time complexity is O(K) at worst and O(1) at best. After obtaining the weight value of the linked list, perform a Hash search on the database, and the time complexity is O(1). In summary, the time complexity of the dynamic search strategy envisioned in this paper is O(KlogN) at worst, where K is a constant value and N is the number of nodes in the AVL tree. It can be seen that the search strategy designed in this paper can quickly provide a suboptimal solution when there is a faulty link.

[0095] The following embodiments will further illustrate the feasibility and advancement of the present invention in conjunction with specific implementation cases.

[0096] Enter the specified wireless sensor network, the network information is shown in Table 1 and Figure 4 As shown; the output is a specified number of solutions based on suboptimal spanning trees, as shown in Table 2, which gives 20 solutions out of 100 solutions.

[0097] Table 1 Detailed data of wireless sensor network Network1

[0098]

[0099]

[0100] Table 2 20 examples of suboptimal spanning tree-based solution sets found on Network1

[0101]

[0102]

[0103] like Figure 5 As shown, the dotted line is the communication link with failure, and the solid line is the communication link based on the suboptimal spanning tree to ensure that the network is connected to each sensor node, and the route propagation is restored in time after a failure to ensure the connectivity of the network.

[0104] The embodiment of the present invention also provides a wireless sensor network routing recovery device, such as Figure 6 As shown, the device comprises:

[0105] The parameter acquisition unit 601 is configured to acquire the connected undirected weighted graph model G(t)=(N,E,W), the number of solutions, the maximum number of iterations, the population, and the counter population of the wireless sensor network at any given time t, where E={e1,…,e i ,…,e l |e i =(v j ,v k )}, i∈(1,2,…,l), j, k∈(1,2,…,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n}, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, v j 、v k and v n denote the jth, kth, and nth sensors respectively, W is the weight set of communication links, and denote the weight values ​​corresponding to the ith communication link and the lth communication link respectively, and the population includes sn solutions;

[0106] An initialization unit 602 is configured to initialize each solution using a quantum random number generator, calculate fitness values ​​of all solutions, and initialize all dimension values ​​of the counter population to 0;

[0107] The iterative calculation unit 603 is configured to execute the counter population strategy, the employed bee search strategy, the replacement search strategy, the follower bee search strategy, the replacement search strategy and the scout bee search strategy to update the population when the current iteration number T is less than or equal to the maximum iteration number, and update the current iteration number T=T+1, and re-compare the updated current iteration number with the maximum iteration number; when the current iteration number is greater than the maximum iteration number, output the final updated population.

[0108] It should be noted that the device structure described in this embodiment and the method described previously belong to the same technical concept, and achieve the same technical effect through the same principle, which will not be repeated here.

[0109] An embodiment of the present invention further provides a readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the method described in any of the above embodiments.

[0110] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of the claims and specification of the present invention.

Claims

1. A wireless sensor network routing recovery method, characterized in that: The method comprises: Obtain the connected undirected weighted graph model G(t) = (N, E, W), the number of solutions, the maximum number of iterations, the population, and the counter population of the wireless sensor network at any given time t, where E = {e1,…,e i ,…,e l |e i =(v j ,v k )}, i∈(1,2,...,l), j, k∈(1,2,...,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n }, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, v j 、v k and v n denote the jth, kth, and nth sensors respectively, i∈(1,2,…,l), W is the weight set of communication links, and denote the weight values ​​corresponding to the ith communication link and the lth communication link respectively, and the population includes sn solutions; Use the quantum random number generator to initialize each solution, calculate the fitness values ​​of all solutions, and initialize the values ​​of all dimensions of the counter population to 0; When the current number of iterations T is less than or equal to the maximum number of iterations, the counter population strategy, the employed bee search strategy, the replacement search strategy, the follower bee search strategy, the replacement search strategy and the scout bee search strategy are executed to update the population, and the current number of iterations T=T+1 is updated, and the updated current number of iterations is compared with the maximum number of iterations again; When the current number of iterations is greater than the maximum number of iterations, the final updated population is output.

2. The method according to claim 1, characterized in that The weight value corresponding to the i-th communication link is calculated by the following formula: Among them, α1, α2, α3, α4, and α5 represent the weight values ​​corresponding to different indicators. cost(e i ) represents the cost between sensors, delay(e i ) indicates delay, packetLoss(e i ) represents the packet loss rate of each link, jitter(e i ) indicates delay jitter; bandwidth(e i ) represents the bandwidth, which is calculated by the following formula: cost(e i )=β·dist(e i ) (2) packetLoss(e i )=rand(0,1) (4) jitter i )=rand(0,1)·13+5 (5) bandwidth(e i )=rand(0,1)·260+20 (6) Among them, dist(e i )=dist(v j ,v k ) represents the communication link e i The connected v j ,v k The Euclidean distance between two sensors, β represents a given coefficient, c represents the speed of light, and rand(0,1) represents a random number between [0,1].

3. The method according to claim 1, characterized in that The fitness values ​​of all solutions are calculated as follows: Establish a search space Φ={P|P=[p1,…,p i ,…,p sn ]}, i∈(1,2,…,sn), where Φ contains all possible populations P, sn is the number of solutions contained in the population, p i and p sn are the ith and snth solutions respectively; Establish the solution space S = {p i |p i =[x1,…,x j ,…,x l ]}, x j ∈{0,1}, j∈(1,2,…,l), where S contains all possible solutions, each solution is a food source, corresponding to an individual, and consists of l dimensions, x j and x l denote the jth and lth dimensions respectively, which are 0-1 variables, and divide the solution space S into the feasible solution space S f and the infeasible solution space S nf , where S f It is the set of solutions that satisfy the feasible constraints in the solution space. The feasible constraints mean that the solutions must satisfy the set constraints, expressed as S f ={p i ∈S|F c (p i )=True},F c (p i )=True means solution p i Satisfy the feasible constraints set, S nf is the set of solutions in the solution space S that do not satisfy the feasible constraints, denoted as S nf ={p i ∈S|F c (p i )=False},F c (p i )=False means the solution p i The feasibility constraints set are not met; Let the solution p i =[x i1 ,…,x ij ,…,x il ], x ij ∈{0,1}, j∈(1,2,…,l), l is the number of edges in the connected undirected weighted graph model, corresponding to the dimension of the solution and the number of communication links, n is the number of sensors in the connected undirected weighted graph model, a solution p i Corresponding to a spanning tree, it is a binary string consisting of l classical bits, x ij and x il represents the jth and lth values ​​corresponding to the ith solution, x ij Corresponding in sequence to an edge e in a connected undirected weighted graph model j , where x ij =1 indicates the corresponding edge e j Included in the spanning tree, the feasible constraint function is the spanning tree constraint, as shown in formula (7): Among them, F c () represents the spanning tree constraint, u, v represent the set of spanning tree nodes N st The node, n v represents the number of edges associated with node v, deg(v) represents the degree of node v, e represents the edge connecting nodes v and u, E represents the set of edges, and (l=n-1) represents the edge number constraint, requiring that the number of edges in the spanning tree is equal to the number of vertices minus one; Represents the vertex degree constraint. For each vertex in the graph, the number of edges associated with the vertex in the spanning tree must be less than or equal to the degree of the vertex minus one. Represents a connectivity constraint, requiring that the subgraph constructed by the edge set of the spanning tree is connected, that is, there is a path between any two vertices; Based on the constructed spanning tree constraints, the fitness function is defined as shown in formula (8): Among them fitness i is the fitness value of the ith solution, x ij The jth value corresponding to the i-th solution is used to determine whether to select the j-th edge e j ; is the jth edge e of the ith solution j The weight value of .

4. The method according to claim 1, characterized in that: Each solution is initialized using a quantum random number generator, including: First, initialize the m-bit quantum bits as in represents rounding up, l represents the number of network edges; Using Hadamard gates on qubits Change the basis to the equilibrium superposition state, as shown in equation (9): in, To represent the symbolic representation of the vector representation of quantum bits using Dirac symbols, H represents the quantum H gate or Hadamard gate, which functions to convert the quantum bit in the ground state |0> into a balanced superposition state. The matrix is: j> represents the base right arrow; Perform one observation to obtain a binary string consisting of m classical bits, corresponding to a decimal integer value between 0 and l-1. Count the 10,000 observation results of the quantum random number generator, and count the top n-1 binary strings in the range of 0-l, convert them to decimal, and assign 1 to the classical bit corresponding to the edge of the individual to obtain a new individual representing the spanning tree solution.

5. The method according to claim 3, characterized in that: The counter population strategy includes: Let the counter population be Counters = [counter1,…,counter i ,…,counter sn ], i∈(1,2,…,sn), counter i =[num i1 ,…,num ij ,…,num il ], j∈(1,2,…,l), is an integer set, l is the number of edges in the connected undirected weighted graph model, corresponding to the number of communication links, n is the number of nodes in the connected undirected weighted graph model, corresponding to the number of sensors, and each solution p in the population P i Each has a counter i , the size of the counter is the same as the solution, and the counter counts the solution p i All corresponding edges e ij The weight value num ij , the calculation formula of the counter is: The replacement search strategy includes: Get the original solution p i And new solution new , determine the new solution p new Is it a feasible solution? If p new For a feasible solution, execute the feasible solution replacement strategy: determine whether there is an infeasible solution in the current population: If it exists, use p new Replace the randomly selected infeasible solution p nf ; If it does not exist, if the new solution is better than the original solution and does not overlap with all the solutions in the population, use p new Replace p i ; If p new For an infeasible solution, execute the infeasible solution replacement strategy: according to p i The corresponding counter i , calculate the minimum value num in the counter value ij and the next smallest value num ik The two subscripts j, k, x in the original solution are not equal ij ≠x ik , exchange the original solution p i The jth value x in ij and the kth value x ik Get another new solution If the new solution As a feasible solution, use this new solution Replace the original solution; The calculation formula of the replacement search strategy is shown in formula (11): Among them, p new <p i Represents the solution p i Better than the new solution new , p new >p i Represents the new solution p new Better than solution p i , p * new <p i Represents the solution p i Better than another new solution Another new solution Better than solution p i , p new ∈S f Represents the new solution p new is a feasible solution, p new ∈S nf Expressed as a new solution p new is an infeasible solution, ∧ is an AND operation, and ∨ is an OR operation.

6. The method according to claim 5, characterized in that The employed bee search strategy includes: Loop through the population P and randomly select a solution in the population P that is not equal to the current solution p i A random solution p k ; P i and p k Execute equation (12) to get a new solution p new =[y1,…,y q ,…,y l ], q∈(1,2,…,l): Among them, y q represents the value of the qth dimension of the new solution individual, x kj represents the j-th dimension value of the k-th individual, x ij* represents the j*th dimension value of the ith individual, x kj* represents the j*th dimension value of the kth individual, j* represents the j*th dimension, p new Initialized to p new =[0,…,0,…,0], p new satisfy When p new Perform x on all dimensions ij ∧x kj , operate, Indicates p i In and p k In satisfy When the dimension value and Add to the set {j*|1≤j*≤l}, where rand{} represents randomly selecting a dimension value q from the set {} for p new The y in q Perform assignment operation.

7. The method according to claim 6, characterized in that The following bee search strategy includes: Loop through the population and find the optimal solution p for the current population in the population best , for the current solution p i and the current population optimal solution p best Executing equations (13) and (14) yields two new solutions: c =[y1,…,y m ,…,y l ],m∈(1,2,…,l),p b =[y1,…,y h ,…,y l ],h∈(1,2,…,l): Among them, y m and l Represents the value of the mth and lth dimensions of the solution individual, y h and l represents the value of the hth and lth dimensions of the solution individual, x bj represents the j-th dimension value of the b-th individual, h represents the h-th dimension, and m represents the m-th dimension; P i and p c 、p b Execute the replacement search strategy respectively to obtain the updated population P * =F Fo (P), where F Fo () indicates the follow-bee search strategy.

8. The method according to claim 7, characterized in that The scout bee search strategy includes: Determine whether there is an infeasible solution p in the current population P nf , if it exists, for p nf , use the quantum random number generator to generate a new solution p that is not in the population q Replace; if it does not exist, find the repeated solution in the current population, and replace the repeated solution p1, p2, ..., p corresponding to the repeated individuals. d , keep the first repeated element p1, and the remaining repeated elements p2,…,p d Use a quantum random number generator to generate a new solution that is not in the population Replacement, after executing the scout bee search strategy, the population is updated, P * =F Sc (P), where F Sc () indicates the scout bee search strategy.

9. A wireless sensor network routing recovery device, characterized in that: The device comprises: The parameter acquisition unit is configured to acquire the connected undirected weighted graph model G(t)=(N,E,W), the number of solutions, the maximum number of iterations, the population, and the counter population of the wireless sensor network at any given time t, where E={e1,…,e i ,…,e l |e i =(v j ,v k )}, i∈(1,2,…,l), j, k∈(1,2,…,n), E is the set of communication links between sensors, l is the number of communication links, e i and e l denote the ith communication link and the lth communication link respectively, N = {v1,…v j ,…,v n }, j∈(1,2,…,n), N is a finite set of sensors, j and k are sensor numbers, n is the number of sensors, v j 、v k and v n denote the jth, kth, and nth sensors respectively, W is the weight set of communication links, and denote the weight values ​​corresponding to the ith communication link and the lth communication link respectively, and the population includes sn solutions; An initialization unit is configured to initialize each solution using a quantum random number generator, calculate the fitness values ​​of all solutions, and initialize all dimension values ​​of the counter population to 0; The iterative calculation unit is configured to execute the counter population strategy, the employed bee search strategy, the replacement search strategy, the follower bee search strategy, the replacement search strategy and the scout bee search strategy to update the population when the current iteration number T is less than or equal to the maximum iteration number, and update the current iteration number T=T+1, and re-compare the updated current iteration number with the maximum iteration number; when the current iteration number is greater than the maximum iteration number, output the final updated population. 10 . A non-transitory computer-readable storage medium storing instructions, which, when executed by a processor, perform the method according to claim 1 .

Citation Information

Patent Citations

  • Route recovery method and recovery protocol for mobile Sink wireless sensor network

    CN102196527A

  • Load balancing method for heterogeneous wireless network

    CN106060876A