Sensor network path optimization method, optimization device and computer equipment

By improving the lion hunting algorithm to optimize the number and location of aggregation nodes and combining it with the Dijkstra algorithm to determine the networking path of faulty sensors, the data transmission problem of traditional substation wireless sensor networks when the aggregation node fails is solved, ensuring that data is reliably transmitted to the central node, and improving the reliability and stability of the network.

CN114257981BActive Publication Date: 2025-10-03GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111512122.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-10-03
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

Traditional substation wireless sensor networks cannot guarantee the transmission of sensor data to the central node when the aggregation node fails, resulting in monitoring blind spots and network function failure.

Method used

The improved lion hunting algorithm is used to optimize the number and location of sink nodes to ensure that sensor data can be transmitted to the central node in the event of a fault, and the Dijkstra algorithm is combined to determine the networking path of the faulty sensor.

Benefits of technology

The reliable transmission of sensor data is achieved when the aggregation node fails, the monitoring blind area is avoided, and the reliability and stability of the wireless sensor network are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114257981B_ABST
    Figure CN114257981B_ABST
Patent Text Reader

Abstract

The present application relates to a sensor networking path optimization method, an optimization device, and a computer device. The networking path optimization method includes: obtaining the location information of multiple sensor nodes; wherein the sensor nodes are used to collect data; based on the location information of multiple sensor nodes, the number and position of the aggregation nodes are optimized using an improved lion hunting algorithm, so that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can all be transmitted to the central node; wherein the aggregation node is used to transmit the data collected by the sensor nodes that the aggregation node is responsible for to the central node; the sensor networking path is determined based on the number and position of the optimized aggregation nodes. The sensor networking path determined by the above-mentioned sensor networking path optimization method can avoid the phenomenon that in the event of a failure of a aggregation node, the data collected by the sensor nodes that the failed aggregation node is responsible for cannot be transmitted to the central node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sensor networking path technology, and in particular to a sensor networking path optimization method, optimization device, and computer equipment. Background Art

[0002] Substations based on digital twin technology utilize physical mathematical models and sensor data collection to integrate multi-domain, multi-physical parameter, multi-dimensional, and multi-probability simulation processes, complete mapping in virtual space, and achieve full lifecycle monitoring of physical equipment. This can comprehensively enhance the intelligence and modernization of substation operations and maintenance. The development and application of new intelligent substation technologies is an inevitable trend in the development of smart grids. By leveraging advanced wireless sensor and IoT technologies, these technologies enable multi-dimensional online monitoring of various environmental factors, operating conditions, and equipment parameters within the substation through collaborative sensing between multiple sensors. By fully utilizing advanced technologies such as communication data networks, artificial intelligence (AI), and mobile internet, the goal is to build smart substations with comprehensive equipment status awareness and interconnected substation information sharing. The key to achieving these technologies lies in efficient and effective communication networking among monitoring terminals. Therefore, the maturity of wireless sensor self-organizing networking technology for substations based on digital twins plays a decisive role in the development of intelligent substations.

[0003] Traditional substation online monitoring systems use wired communication methods that generally have problems such as difficult line deployment, poor network scalability, and relatively inflexible networking. The development of wireless sensor network communication technology has compensated for these disadvantages to a certain extent. However, due to the complexity of the working environment in substations, interference from various external factors such as temperature, vibration, and electromagnetic interference can easily cause equipment failures, including sensors. Currently, when a failure occurs at the aggregation terminal node in the sensor networking path, there is no guarantee that the sensor data contained in the aggregation node can be transmitted to the central node, resulting in a monitoring blind spot and causing the wireless sensor network to fail. Summary of the Invention

[0004] Based on this, it is necessary to provide a sensor network path optimization method, optimization device and computer equipment to address the above technical problems, which can still transmit the sensor data contained in the aggregation node to the central node when the aggregation node fails.

[0005] In a first aspect, the present application provides a sensor networking path optimization method, comprising: obtaining location information of multiple sensor nodes; wherein the sensor nodes are used to collect data; based on the location information of the multiple sensor nodes, using an improved lion hunting algorithm to optimize the number and position of the aggregation nodes, so that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can all be transmitted to the central node; wherein the aggregation node is used to transmit the data collected by the sensor nodes that the aggregation node is responsible for to the central node; and determining the sensor networking path based on the optimized number and position of the aggregation nodes.

[0006] In one embodiment, the step of optimizing the number and position of sink nodes using an improved lion hunting algorithm based on the position information of multiple sensor nodes includes: setting the number of sink nodes, the number of lions in the lion group N, lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and randomly generate the initial position of the prey; calculate the fitness value of each lion, and take the position of the lion with the largest fitness value as the lion king position; the fitness value is used to reflect the sum of the distances between the lion position and the sensor node that the lion is responsible for; update the lion king position; update the lioness position; update the cub position; calculate the fitness function according to the lion position, and update its own historical optimal position and the lion group's historical optimal position; determine whether the number of iterations reaches the maximum number of iterations; if not, return to calculate the fitness value of each lion, and take the position of the lion with the largest fitness value as the lion king position step to continue; if so, determine whether the optimal fitness value and the final position of the lion group meet the preset convergence conditions; if so, determine the lion king position as the convergence node position, and determine the number of convergence nodes to be arranged as the number of convergence nodes.

[0007] In one embodiment, the step of optimizing the number and position of the sink nodes using the improved lion hunting algorithm based on the position information of the plurality of sensor nodes further includes: if the optimal fitness value and the final position of the lion group do not meet the preset convergence condition, the number of sink nodes arranged is increased by one, and the number of sink nodes arranged is returned to the set value, and the number of lions in the lion group N is lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion*(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the step of randomly generating the initial position of the prey continues to be executed until the preset convergence condition is met; the position of the lion king is determined as the position of the convergence node, and the number of the arrangement of the convergence nodes is determined as the number of convergence nodes.

[0008] In one embodiment, the convergence condition includes: the absolute value of the difference between the last two fitness values ​​is less than a preset accuracy.

[0009] In one embodiment, the convergence condition also includes: the distance between the first target sensor node and the target backup aggregation node is less than or equal to the maximum communication distance of the first target sensor node, and / or the number of sensor nodes responsible for the target aggregation node is less than or equal to the hop number of the first target sensor node; wherein, the target aggregation node is one of multiple aggregation nodes, the first target sensor node is the target sensor node closest to the target backup aggregation node among the target sensor nodes, the target backup aggregation node is the aggregation node with the smallest sum of distances to the target sensor nodes except the target aggregation node, the target sensor node is the sensor node responsible for the target aggregation node, and the hop number is the maximum amount of data that the sensor node can forward.

[0010] In one embodiment, it also includes: using the Dijkstra algorithm to obtain the fault sensor networking path corresponding to the failed aggregation node; wherein the fault sensor networking path is used to represent the networking path of the sensor node that the failed aggregation node is responsible for after the aggregation node fails.

[0011] In one embodiment, the step of using the Dijkstra algorithm to obtain the fault sensing networking path corresponding to the failed aggregation node includes: taking the position of the first target sensor node as the end point of the Dijkstra algorithm, and the position of the second target sensor node as the starting point of the Dijkstra algorithm, and obtaining the networking path after the target aggregation node fails through the Dijkstra algorithm; wherein, the second target sensor node is the target sensor node with the smallest number of hops among all the target sensor nodes.

[0012] In the second aspect, the present application also provides a sensor networking path optimization device, including: an acquisition module for acquiring location information of multiple sensor nodes; wherein the sensor nodes are used to collect data; an optimization module for optimizing the number and position of aggregation nodes based on the location information of multiple sensor nodes using an improved lion hunting algorithm, so that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can be transmitted to the central node; wherein the sensor nodes are used to collect data, and the aggregation node is used to transmit the data collected by the sensor nodes that the aggregation node is responsible for to the central node; a determination module for determining the sensor networking path based on the optimized number and position of the aggregation nodes.

[0013] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the sensor network path optimization method as described in any one of the first aspects above is implemented.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the sensor network path optimization method as described in any one of the first aspects above is implemented.

[0015] In a fifth aspect, the present application further provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements the sensor network path optimization method as described in any one of the first aspects above.

[0016] The above-mentioned sensor networking path optimization method uses an improved lion hunting algorithm to optimize the number and position of the aggregation nodes, so that when a aggregation node fails, the data of the sensor nodes responsible for the failed aggregation node can be transmitted to the monitoring center, thereby avoiding the situation where, when a aggregation node fails, the data collected by the sensor nodes responsible for the failed aggregation node cannot be transmitted to the central node, resulting in a monitoring blind spot and causing the wireless sensor network to fail. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A schematic diagram of a flow chart of a sensor networking path optimization method according to an embodiment;

[0019] Figure 2 Schematic diagram of a flow chart of a method for determining a fault networking path in one embodiment;

[0020] Figure 3 This is a schematic diagram of a digital twin sensor networking path in one embodiment;

[0021] Figure 4 1. A schematic diagram of a process for optimizing the number and positions of sink nodes using an improved lion hunting algorithm based on position information of multiple sensor nodes in one embodiment;

[0022] Figure 5 A schematic diagram of a process for optimizing the number and positions of sink nodes using an improved lion hunting algorithm based on position information of multiple sensor nodes in another embodiment;

[0023] Figure 6 This is a structural block diagram of a sensor network path optimization device in one embodiment;

[0024] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0026] As described in the background art, current sensor networking paths cannot guarantee that, in the event of a failure at a system's sink node, the data collected by the sensor nodes responsible for the failed sink node can be transmitted to the central node. Therefore, in the event of a failure at a sink node in the sensor networking path, a monitoring blind spot may be created, significantly reducing the reliability of the sensor nodes and weakening or rendering the wireless sensor network functional. In view of this, an embodiment of the present application provides a sensor networking path optimization method so that, in the event of a failure at any sink node in the sensor networking system, the sensor nodes responsible for the failed sink node can upload their collected data through other sink nodes, thereby ensuring the high reliability and stability of the sensor networking system.

[0027] Please refer to Figure 1 , which shows a flow chart of a sensor network path optimization method provided by an embodiment of the present application, such as Figure 1 As shown, the sensor networking path optimization method may include steps S102 to S106.

[0028] S102: Acquire location information of multiple sensor nodes.

[0029] It should be noted that the sensor node is the sensing end of the substation wireless sensor network, and the sensor node can be used to collect data. The data collected by the sensor node is generally monitoring information at a certain point or within a certain range of the equipment or environment, so the layout position of the sensor node is relatively fixed. It is understandable that the sensor node can be determined based on the environment in which the substation is located and the technical guidance plan for online monitoring of each device. Optionally, the layout position of the sensor node remains unchanged. Optionally, the sensor node may include at least one type of wireless sensor. Among them, the wireless sensor includes a sensor for collecting environmental information and a sensor for collecting equipment information. Sensors for collecting environmental information include but are not limited to sensors for collecting information such as temperature, humidity, pressure, wind speed, wind direction, rainfall, smoke, light, etc. Sensors for collecting equipment information include but are not limited to sensors for collecting information such as voltage, current, infrared, surface temperature, ultrasound, insulator contamination, and lightning arrester leakage current.

[0030] In one embodiment, before the step of obtaining the location information of the plurality of sensor nodes, the step includes: establishing a spatial rectangular coordinate system with the first location of the substation as the origin. It is understood that the location information of the sensor node refers to the three-dimensional coordinate information (x i ,y i , z i In one embodiment, the sensor network path optimization method may further include the step of obtaining full-dimensional information of multiple sensor nodes. Optionally, the full-dimensional information may include, but is not limited to, the maximum communication distance R of the sensor nodes. In one embodiment, the location information and full-dimensional information of the multiple sensor nodes are fully displayed in the digital twin model.

[0031] S104, based on the location information of multiple sensor nodes, an improved lion hunting algorithm is used to optimize the number and location of sink nodes, so that in the event of a sink node failure, the data of the sensor nodes that the failed sink node is responsible for can all be transmitted to the central node.

[0032] It should be noted that the aggregation node is used to transmit the data collected by the sensor nodes that the aggregation node is responsible for to the central node. The sensor node sends the collected data to the aggregation node, and the aggregation node sends the data to the central node, then the sensor node is the sensor node that the aggregation node is responsible for. It is understandable that if the situation where the aggregation node fails is not considered when setting the sensor networking path, due to the limited propagation distance of the sensor node, the data collected by the sensor node may not be transmitted to the central node, resulting in a monitoring blind spot. The embodiment of the present application optimizes the number and position of the aggregation nodes by adopting an improved lion group hunting algorithm, so that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can all be transmitted to the central node, so as to avoid the occurrence of a monitoring blind spot, which leads to the failure of the wireless sensor network function. It should be noted that in one embodiment, the improved lion group hunting algorithm is an algorithm that improves the lion group hunting algorithm based on the marine life hunting algorithm.

[0033] S106: Determine the sensor networking path according to the optimized number and positions of the sink nodes.

[0034] In one embodiment, the sensor node transmits the collected data to the aggregation node closest to the sensor node to realize the transmission of the collected data to the central node, which can also be understood as the aggregation node being responsible for the sensor node. In one embodiment, after the step of determining the sensor networking path according to the number and position of the optimized aggregation nodes, it includes: constructing a corresponding digital twin model for the determined sensor networking path. By generating a digital twin model corresponding to the substation, it is used to provide visual monitoring of the sensor networking path to the monitoring personnel, thereby realizing the visualization of the sensor networking path. The full-dimensional information of the node is mapped into the digital twin model, and when the aggregation node fails, a prompt is given and the self-organizing network path after the failure is displayed, thereby comprehensively improving the intelligence level of the substation and providing a reliable basis for the operation and maintenance of the substation.

[0035] It should be noted that the installation and settings are carried out according to the determined sensor networking path, and all aggregation nodes are connected to the central node to ensure that all data can be uploaded.

[0036] The above embodiment provides a sensor networking path optimization method, which uses an improved lion hunting algorithm to optimize the number and position of aggregation nodes, so that when a aggregation node fails, the data of the sensor nodes responsible for the failed aggregation node can be transmitted to the monitoring center, thereby avoiding the phenomenon that when a aggregation node fails, the data collected by the sensor nodes responsible for the failed aggregation node cannot be transmitted to the central node. That is, the sensor networking path determined by the above sensor networking path optimization method can avoid the phenomenon that when a aggregation node fails, the data collected by the sensor nodes responsible for the failed aggregation node cannot be transmitted to the central node, resulting in a monitoring blind spot and causing the wireless sensor network to fail.

[0037] As described above, determining the sensor networking path according to the above embodiment can ensure that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can be transmitted to the central node. Then the following embodiment will provide a new networking path for determining the sensor nodes that the failed aggregation node is responsible for after the aggregation node fails.

[0038] Please refer to Figure 2 , which illustrates a method for determining a fault networking path provided by an embodiment of the present application, which is used to determine the networking path of the sensor nodes that the failed aggregation node is responsible for when a failure occurs at the aggregation node.

[0039] S202: Use the Dijkstra algorithm to obtain a faulty sensor networking path corresponding to the failed sink node.

[0040] It should be noted that the faulty sensor networking path represents the networking path of the sensor nodes that the failed sink node is responsible for after a faulty node fails. This means that after a sink node fails, data from the sensor nodes that the failed sink node is responsible for can no longer be sent to the failed sink node. To achieve this, the data collected by the sensor nodes can be transmitted to the central node. Therefore, it is necessary to determine the data upload path for the sensor nodes that the failed sink node is responsible for. This path is the faulty sensor networking path. The Dijkstra algorithm can be used to determine a single-source shortest path, calculating the shortest path from one node to all other nodes. Its main characteristic is that it expands outward layer by layer from the starting point to the end point.

[0041] In one embodiment, the step of using the Dijkstra algorithm to obtain a fault sensor networking path corresponding to a failed sink node includes: using the location of a first sensor node as the end point of the Dijkstra algorithm and the location of a second target sensor node as the starting point of the Dijkstra algorithm, and obtaining the networking path after the target sink node fails using the Dijkstra algorithm. It should be noted that the first target sensor node is the target sensor node closest to the target backup sink node among all target sensor nodes; the target backup sink node is the sink node with the smallest sum of distances to all target sensor nodes other than the target sink node; the target sensor node is the sensor node responsible for the target sink node; and the second target sensor node is the target sensor node with the smallest hop count among all target sensor nodes, where the hop count is the maximum amount of data that a sensor node can forward. It should be noted that if a target sensor node has a sensor node with the same smallest hop count, one of the sensor nodes is arbitrarily selected as the starting point.

[0042] In one embodiment, after the step of using the Dijkstra algorithm to obtain the fault sensing networking path corresponding to the failed convergence node, the following steps may also be included: if the distance between adjacent target sensor nodes is greater than the maximum communication distance of the third target sensor node, a relay node is set between the third target sensor node and the fourth target sensor node to ensure the smooth flow of the sensor networking path. It should be noted that the relay node is used to receive data collected by the third target sensor node and transmit the data collected by the third target sensor node to the fourth target sensor node. The third target sensor node and the fourth target sensor node are adjacent target sensor nodes, and according to the fault sensing networking path corresponding to the failed convergence node, it can be clearly determined that the third target sensor node transmits the data it collects to the fourth target sensor node, so as to realize the transmission of the data collected by the third target sensor node to the central node.

[0043] Please refer to Figure 3 , which shows a schematic diagram of a digital twin sensor networking path provided by an embodiment of the present application, such as Figure 3As shown, the sensor nodes responsible for the sink node c1 include sensor node s1, sensor node s2, and sensor node s3. Before the sink node c1 fails, sensor node s1, sensor node s2, and sensor node s3 all transmit the collected data to the sink node c1, so that the data collected by sensor nodes s1, sensor node s2, and sensor node s3 are transmitted to the central node. After the sink node c1 fails, sensor node s1 sends the collected data to relay node m1, relay node m1 transmits the data collected by sensor node s1 to sensor node s2, sensor node s2 sends the data collected by sensor node s1 and sensor node s2 to sensor node s3, and sensor node s3 transmits the data collected by sensor node s1, sensor node s2, and sensor node s3 to the sink node c2, so that the data collected by sensor nodes s1, sensor node s2, and sensor node s3 are transmitted to the central node. The sink node c2 is a backup sink node for the sink node c1, and the distance between the sensor nodes s1 and s2 is greater than the maximum communication distance of the sensor node s1. It should be noted that the networking paths of the other sensor nodes remain unchanged.

[0044] In one embodiment, the step of using a Dijkstra algorithm to obtain a faulty sensor networking path corresponding to a failed sink node includes: if the sink node fails, then using the Dijkstra algorithm to obtain a faulty sensor networking path corresponding to the failed sink node. It should be noted that after determining that the sink node has failed, the Dijkstra algorithm is then used to determine the transmission paths of the sensor nodes that the failed sink node is responsible for. In one embodiment, a determination is made as to whether the central node has received data from a target sink node. If so, the target sink node is not faulty; if not, the target sink node is faulty.

[0045] In one embodiment, the Dijkstra algorithm is used to obtain the faulty sensor networking path corresponding to the target sink node, and the obtained faulty sensor networking path corresponding to the target sink node is stored accordingly. The target sink node can be one of multiple sink nodes. It should be noted that by predetermining the faulty sensor networking path corresponding to each sink node, if a sink node fails, the corresponding faulty sensor networking path can be obtained by querying the pre-stored faulty sensor networking path corresponding to the target sink node. In one embodiment, if the center does not receive data from the target sink node, the digital twin network is updated based on the faulty sensor networking path corresponding to the target sink node to indicate the data upload path for the sensors responsible for the target sink node after the target sink node fails, thereby instructing monitoring personnel to perform repairs.

[0046] Please refer to Figure 4 , which shows a flow chart of optimizing the number and position of aggregation nodes using an improved lion hunting algorithm according to the position information of multiple sensor nodes provided by an embodiment of the present application, such as Figure 4 As shown, the step of optimizing the number and positions of sink nodes using the improved lion hunting algorithm according to the position information of the plurality of sensor nodes may include steps S402 to S418.

[0047] For ease of explanation, the following embodiment will take the location information of the sensor node as the three-dimensional coordinate information of the sensor node as an example, and briefly describe the steps of optimizing the number and position of the aggregation nodes using the improved lion hunting algorithm based on the location information of multiple sensor nodes.

[0048] S402, set the number of aggregation nodes, the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the random generation of the initial position of the prey.

[0049] This step is to initialize the parameters of the improved lion hunting algorithm. In one embodiment, the parameters of the improved lion hunting algorithm may include: the initial number of sink nodes is N c0 ; The number of lions in the initial lion group is N lion ; The ratio of adult lions in a lion group is β; the number of male lions is 1; the number of female lions is N lion *β-1; the number of cubs is N lion *(1-β); the position of each lion is X i =(x i ,y i ,z i ); Maximum number of algorithm iterations T max ; Randomly generate the initial position of prey i =(x i ,y i ,z i )=(L x *rand(0,1), L y *rand(0,1),L z *rand(0,1)), where L x ,L y ,L z The boundary areas within the three-dimensional space, i.e., length, width and height, are arranged for the monitoring points of the substation respectively.

[0050] S404, calculating the fitness value of each lion, and taking the position of the lion with the largest fitness value as the lion king position.

[0051] It should be noted that the fitness value is used to reflect the sum of the distances between the lion's position and the sensor nodes that the lion is responsible for. In one embodiment, the fitness function is the sum of the distances between the sink node and the sensor nodes that it is responsible for. In one embodiment, a method for determining the sensor nodes that a sink node is responsible for is provided. The method may include: calculating the Euclidean distance from each sensor node to each sink node, classifying the sensor nodes to the sink node with the closest Euclidean distance to the sensor node, and thereby determining all the sensor nodes that each sink node is responsible for. Optionally, the Euclidean distance from each sensor node to each sink node is calculated according to the following formula:

[0052]

[0053] in, It represents the Euclidean distance between the sth sensor node and the cth sink node. The three-dimensional coordinate information of the sth sensor node is (x S ,y S , z S ), the three-dimensional coordinate information of the c-th sink node is (x C ,y C , z C ).

[0054] To maximize the transmission performance of sink and sensor nodes and ensure the minimum number of sink nodes while meeting communication requirements, this embodiment defines the optimal solution as the maximum fitness function value. The position of each sink node in the initial population at the optimal solution is defined as the lion king position. In the first generation, the maximum value obtained is used as the lion king position. After the first generation, the formula can be updated according to subsequent steps.

[0055] S406, update the lion king's position.

[0056] In one embodiment, the lion king position can be updated according to the following formula:

[0057]

[0058] Among them, iter represents the number of iterations; represents the optimal position of the iter generation lion; γ is a random number that obeys the normal distribution N(0,1); represents the historical optimal position of the i-th lion; represents the updated lion's position. It should be noted that the optimal position refers to the position with the highest fitness among the lions of the same generation, that is, the position with the maximum sum of the distances between each sink node and the sensor nodes it is responsible for. The historical optimal position of the i-th lion is the position with the highest fitness among all positions of the i-th lion in the previous iter generations up to the current generation.

[0059] After the lion's position is updated, it can be ensured that the lion can always move in a small range at the best food location, thereby increasing the local search capability of the algorithm.

[0060] S408, update the position of the lioness.

[0061] In one embodiment, when the number of iterations is less than the maximum number of iterations That is to say

[0062]

[0063] Among them, T max is the maximum number of iterations.

[0064] During this stage, the predator's speed is faster than the prey's speed, and the step length update formula is:

[0065]

[0066] Among them, step is the update step vector of each prey; R B is the Brownian random walk vector based on the standard normal distribution; M best To select the lionesses with the best fitness (N lion* The top predator vector obtained after β-1) replications; prey is the prey vector; Represents the multiplication of corresponding elements in a vector.

[0067] After calculating the step length, the prey position is updated. The update formula is:

[0068]

[0069] Where R is a uniform random number vector between 0 and 1.

[0070] When the number of iterations is greater than or equal to the maximum number of iterations and less than or equal to the maximum number of iterations That is to say

[0071]

[0072] This stage is a transition from a global search of the solution space to a local search of the current optimal solution position in the solution space. At this time, the predator speed is equivalent to the prey speed. The prey is updated based on Levy flight, while the predator is updated based on Brownian walk. The update formula is:

[0073] Before (N lion The update rule for the β-1) / 2 lion group is:

[0074]

[0075] Among them, R L is a random vector based on Levy distribution, used to represent the Levy flight step length.

[0076] After (N lion The update rule for the β-1) / 2 lion group is:

[0077]

[0078] Among them, CF is the adaptive parameter of step size step, and the calculation method is:

[0079]

[0080] The remaining parameters have the same meanings as those in the previous stage.

[0081] When the number of iterations is greater than the maximum number of iterations That is to say

[0082]

[0083] In this stage, the predator's speed is slow. The predator is updated based on Levy walk, mainly for local search of the current optimal solution position in the solution space. The specific update formula is:

[0084]

[0085] To ensure that the algorithm can escape the local optimal solution, the aggregation effect should be solved in the predator algorithm, and the prey should be updated as follows:

[0086]

[0087] Among them, L max is the maximum spatial distance vector of the substation area, including length, width and height; F A = 0.2; U is a binary vector with the dimension of the number of lionesses (N lion* β-1), the algorithm generates a random number between 0 and 1, when random is less than or equal to F A When random is greater than FA When , the element in U takes 1; r is a random number between (0,1), and the subscripts r1 and r2 represent the random index vectors of the prey matrix.

[0088] Secondly, the step size generated by the above stage updates the lioness position and calculates the fitness. The update formula is:

[0089]

[0090] in, is the historical optimal position of the i-th lioness in the iter generation; represents the historical best position of a hunting partner randomly selected from the iter generation lioness pride; γ is the step size correction factor, the specific value of which is calculated by multiple experiments based on the step size calculation results, proportionally correcting the iterative step size of each stage within the range [0,1]; τ is a random number generated according to the normal distribution N(0,1).

[0091] S410, updating the position of the lion cub.

[0092] First, generate a uniform random number q between (0,1).

[0093] Since the lion cubs will search within a specified range when approaching the lion king for food or learning to hunt from the lioness, the lion cub movement range factor can enable the lion cubs to first search a large range within the range, and then search a small range after finding food. The step length shows a linear downward trend, that is, as the number of iterations increases, the step length decreases linearly. Therefore, the calculation formula for the linearly decreasing lion cub movement range factor κ is:

[0094] κ=α start -(α start -α end )·iter / T max

[0095] Among them, α start is the initial lion cub step length factor, α end To end the lion cub stride factor.

[0096] is the position where the i-th lion cub is driven away from the lion king within the hunting range. The calculation formula is:

[0097]

[0098] Among them, low′ and high′ are the minimum mean and maximum mean of each dimension in the lion group's activity area, respectively.

[0099] Finally, the position of the lion cub is updated according to the following formula: when q≤1 / 3, the lion cub moves toward the lion king and eats near the lion king; when 1 / 3≤q<2 / 3, the lion cub moves near the lioness and follows the lioness to learn hunting; when 2 / 3≤q<1, the lion cub is driven away from the lion king.

[0100]

[0101] in, The best historical position of the lion cub following the lioness in the iter generation; the meanings of the other parameters are the same as above.

[0102] It should be noted that the lion king position is the best sink node position, and the lioness position and the cub position refer to the sink node positions generated by the lioness and cub update formulas during the optimization process.

[0103] S412, calculating the fitness function according to the lion's position, and updating its own historical optimal position and the lion group's historical optimal position.

[0104] S414, determine whether the number of iterations reaches the maximum number of iterations, if not, return to step S404, if so, execute step S416.

[0105] S416, determine whether the optimal fitness value and the final position of the lion group meet the convergence condition; if so, execute step S418.

[0106] In one embodiment, the convergence condition may include that the absolute value of the difference between the last two fitness values ​​is less than a preset precision, that is:

[0107]

[0108] Wherein, ε is a preset precision. It is understandable that the preset precision can be set as needed, and the embodiment of the present application does not limit this.

[0109] In one embodiment, the convergence condition may further include: the distance between the first target sensor node and the backup aggregation node is less than or equal to the maximum communication distance of the first target sensor node, and / or the number of sensor nodes that the target aggregation node is responsible for is less than or equal to the hop count of the first target sensor node. In this embodiment, by adding the convergence condition ① that the distance between the first target sensor node and the backup aggregation node is less than or equal to the maximum communication distance of the first target sensor node, and the convergence condition ② that the number of sensor nodes that the target aggregation node is responsible for is less than or equal to the hop count of the first target sensor node, it can be ensured that when any aggregation node fails, all sensor nodes that the failed aggregation node is responsible for can automatically connect to the nearest aggregation node in the form of an ad hoc network.

[0110] In one embodiment, if the optimal fitness value and the final position of the lion group do not meet the preset convergence condition, the number of sink nodes is increased by one, and the number of sink nodes is returned to the set number of sink nodes. The number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the random generation of the initial position of the prey step continue to execute until the preset convergence condition is met; the position of the lion king is determined as the position of the sink node, and the number of sink nodes is determined as the number of sink nodes.

[0111] S418: Determine the lion king position as the sink node position, and determine the number of sink nodes as the number of sink nodes.

[0112] Please refer to Figure 5 , which shows a flow chart of optimizing the number and position of aggregation nodes using an improved lion hunting algorithm based on the position information of multiple sensor nodes provided by another embodiment of the present application, such as Figure 5 As shown, the step of optimizing the number and positions of sink nodes using the improved lion hunting algorithm according to the position information of the plurality of sensor nodes may include steps S502 to S522.

[0113] S502, set the number of aggregation nodes, the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the random generation of the initial position of the prey.

[0114] S504, calculating the fitness value of each lion, and taking the position of the lion with the largest fitness value as the lion king position.

[0115] S506, update the lion king's position.

[0116] S508, update the position of the lioness.

[0117] S510, updating the position of the lion cub.

[0118] S512, calculating the fitness function according to the lion's position, and updating its own historical optimal position and the lion group's historical optimal position.

[0119] S514, determine whether the number of iterations reaches the maximum number of iterations, if not, return to step S504, if so, execute step S516.

[0120] S516, determine whether the optimal fitness value and the final position of the lion group meet the absolute value of the difference between the last two fitness values ​​is less than a preset accuracy; if not, execute step S518, if so, execute step S520.

[0121] S518: Increase the number of sink nodes by one, and return to step S502.

[0122] S520, determine whether the distance between the first target sensor node and the target backup aggregation node is less than or equal to the maximum communication distance of the first target sensor node, and whether the number of sensor nodes responsible for the target aggregation node is less than or equal to the number of hops of the first target sensor node. If so, execute step S522, if not, return to step S518.

[0123] S522: Determine the lion king position as the sink node position, and determine the number of sink nodes as the number of sink nodes.

[0124] It should be noted that the method provided by this embodiment can obtain the minimum number of sink nodes.

[0125] The above embodiment provides a method for optimizing the number and position of aggregation nodes based on the location information of multiple sensor nodes by using an improved lion group hunting algorithm. Based on the different hunting stages in the marine hunting algorithm, the traditional lion group algorithm is improved. The improved algorithm can ensure the global and local search capabilities of the algorithm and improve the convergence of the algorithm. Two optimization conditions, communication distance and maximum number of hops, are introduced into the algorithm convergence conditions, which can meet the requirement that when any aggregation node fails, all the sensor nodes it is responsible for can be connected to the nearest aggregation node through the optimal networking path through self-organizing networking, thereby ensuring uninterrupted and continuous collection of online monitoring data.

[0126] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0127] Based on the same inventive concept, embodiments of the present application also provide a sensor network path optimization device for implementing the aforementioned sensor network path optimization method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the sensor network path optimization device provided below can be found in the aforementioned limitations of the sensor network path optimization method and will not be further elaborated here.

[0128] In one embodiment, Figure 6 As shown, a sensor networking path optimization device is provided, including: an acquisition module 602, an optimization module 604 and a determination module 606. The acquisition module 602 is used to obtain the location information of multiple sensor nodes. The optimization module 604 is used to optimize the number and position of the aggregation nodes based on the location information of multiple sensor nodes using an improved lion hunting algorithm, so that in the event of a failure of the aggregation node, the data of the sensor nodes that the failed aggregation node is responsible for can be transmitted to the central node. The determination module 606 is used to determine the sensor networking path based on the optimized number and position of the aggregation nodes. The sensor nodes are used to collect data, the sensor nodes are used to collect data, and the aggregation nodes are used to transmit the data collected by the sensor nodes that the aggregation nodes are responsible for to the central node.

[0129] In one embodiment, the optimization module can also be used to set the number of sink nodes to be arranged, and the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the randomly generated initial position of the prey. The optimization module can also be used to calculate the fitness value of each lion, with the position of the lion with the highest fitness value being the lion king position. The fitness value reflects the sum of the distances between the lion's position and the sensor nodes for which the lion is responsible. The optimization module can also be used to update the position of the lion king. The optimization module can also be used to update the position of the lioness. The optimization module can also be used to update the position of the cubs. The optimization module can also be used to calculate the fitness function based on the lion's position and update its own historical optimal position and the lion group's historical optimal position. The optimization module can also be used to determine whether the number of iterations has reached the maximum number of iterations. If not, the optimization module returns to the step of calculating the fitness function of each lion, with the position of the lion with the highest fitness function being the lion king position. If so, the optimization module determines whether the optimal fitness value and the final position of the lion group meet the preset convergence conditions. If so, the lion king position is determined as the sink node position, and the number of sink nodes arranged is determined as the number of sink nodes.

[0130] In one embodiment, the optimization module can also be used to increase the number of sink nodes by one if the optimal fitness value and the final position of the lion group do not meet the preset convergence condition, return to the set number of sink nodes, and the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the step of randomly generating the initial position of the prey are continued until a preset convergence condition is met. The optimization module can also be used to determine the position of the lion king as the position of the sink node and the number of the sink nodes to be arranged as the number of sink nodes.

[0131] In one embodiment, the sensor network path optimization device may include a fault module. The fault module may be configured to employ a Dijkstra algorithm to obtain a faulty sensor network path corresponding to the failed sink node. The faulty sensor network path represents the network path of sensor nodes that the failed sink node is responsible for after the sink node fails.

[0132] In one embodiment, the fault module can also be configured to use the location of the first target sensor node as the end point of a Dijkstra algorithm and the location of the second target sensor node as the starting point of the Dijkstra algorithm to obtain a network path after a failure of the target sink node. The second target sensor node is the target sensor node with the smallest number of hops among the target sensor nodes.

[0133] Each module in the sensor network path optimization device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0134] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store fault sensor network path data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a sensor network path optimization method is implemented.

[0135] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0136] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above-mentioned sensor networking path optimization method embodiments when executing the computer program.

[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned sensor network path optimization method embodiments are implemented.

[0138] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above-mentioned sensor network path optimization method embodiments are implemented.

[0139] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0140] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A sensor network path optimization method, characterized in that: include: Obtaining location information of a plurality of sensor nodes; wherein the sensor nodes are used to collect data; Set the number of sink nodes, the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the random generation of the initial position of the prey; Calculate the fitness value of each lion, and take the position of the lion with the largest fitness value as the lion king position; the fitness value is used to reflect the sum of the distances between the lion position and the sensor node that the lion is responsible for; Updating the lion king's position; Update the lioness's position; Updated lion cub position; Calculate the fitness function based on the lion's position and update its own historical optimal position and the lion group's historical optimal position; Determine whether the number of iterations reaches the maximum number of iterations; If not, return to calculating the fitness value of each lion, and continue with the step of taking the position of the lion with the largest fitness value as the lion king position; If so, it is determined whether the optimal fitness value and the final position of the lion group meet the preset convergence conditions; if so, the lion king position is determined as the sink node position, and the number of sink nodes is determined as the number of sink nodes; if the optimal fitness value and the final position of the lion group do not meet the preset convergence conditions, the number of sink nodes is increased by one, and the number of sink nodes is returned to the setting. The number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the step of randomly generating the initial position of the prey continue to be executed until the preset convergence condition is met; the position of the lion king is determined as the position of the sink node, and the number of the sink nodes is determined as the number of sink nodes, so that in the event of a failure of the sink node, the data of the sensor nodes responsible for the failed sink node can all be transmitted to the central node; wherein the sink node is used to transmit the data collected by the sensor nodes responsible for the sink node to the central node; The sensor networking path is determined according to the optimized number and positions of the sink nodes.

2. The sensor network path optimization method according to claim 1, characterized in that: The convergence conditions include: The absolute value of the difference between the last two fitness values ​​is less than the preset accuracy.

3. The sensor network path optimization method according to claim 2, characterized in that: The convergence conditions also include: The distance between the first target sensor node and the target backup aggregation node is less than or equal to the maximum communication distance of the first target sensor node, and / or the number of sensor nodes responsible for the target aggregation node is less than or equal to the hop count of the first target sensor node; wherein, the target aggregation node is one of multiple aggregation nodes, the first target sensor node is the target sensor node closest to the target backup aggregation node among the target sensor nodes, the target backup aggregation node is the aggregation node with the smallest sum of distances to the target sensor nodes except the target aggregation node, the target sensor node is the sensor node responsible for the target aggregation node, and the hop count is the maximum amount of data that the sensor node can forward.

4. The sensor network path optimization method according to claim 1, characterized in that: Also includes: The Dijkstra algorithm is used to obtain the fault sensor networking path corresponding to the failed sink node; wherein the fault sensor networking path is used to represent the networking path of the sensor nodes that the failed sink node is responsible for after the sink node fails.

5. The sensor network path optimization method according to claim 4, characterized in that: The step of using the Dijkstra algorithm to obtain the fault sensing networking path corresponding to the failed sink node includes: The position of the first target sensor node is used as the end point of the Dijkstra algorithm, and the position of the second target sensor node is used as the starting point of the Dijkstra algorithm. The networking path after the target aggregation node fails is obtained through the Dijkstra algorithm; wherein, the second target sensor node is the target sensor node with the smallest number of hops among all the target sensor nodes.

6. A sensor network path optimization device, characterized in that: include: An acquisition module, configured to acquire location information of a plurality of sensor nodes, wherein the sensor nodes are configured to collect data; Optimization module, used to set the number of aggregation nodes, the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and randomly generate the initial position of the prey; calculate the fitness value of each lion, and take the position of the lion with the largest fitness value as the lion king position; the fitness value is used to reflect the sum of the distances between the lion position and the sensor node for which the lion is responsible; update the lion king position; update the lioness position; update the cub position; calculate the fitness function according to the lion's position, and update its own historical optimal position and the lion group's historical optimal position; judge whether the number of iterations has reached the maximum number of iterations; if not, return to the step of calculating the fitness value of each lion, and take the position of the lion with the largest fitness value as the lion king position to continue; if so, judge whether the optimal fitness value and the final position of the lion group meet the preset convergence conditions; if so, determine the lion king position as the sink node position, and determine the number of sink nodes to be arranged as the number of sink nodes; if the optimal fitness value and the final position of the lion group do not meet the preset convergence conditions, increase the number of sink nodes to be arranged by one, return to the step of setting the number of sink nodes to be arranged, and the number of lions in the lion group N lion , the adult lion ratio factor β in the lion group, the number of male lions is 1; the number of female lions is N lion *β-1, the number of lion cubs is N lion *(1-β), the position of each lion, the maximum number of iterations of the lion group algorithm, and the step of randomly generating the initial position of the prey continue to be executed until the preset convergence condition is met; the position of the lion king is determined as the position of the sink node, and the number of the sink nodes is determined as the number of sink nodes, so that in the event of a failure of the sink node, the data of the sensor nodes responsible for the failed sink node can all be transmitted to the central node; wherein the sensor node is used to collect data, and the sink node is used to transmit the data collected by the sensor nodes responsible for the sink node to the central node; The determination module is used to determine the sensor networking path according to the optimized number and position of the sink nodes.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Multi-sink deployment and fault tolerance method for wireless sensor network

    CN105915451A