A method and apparatus for locating wireless sensor network nodes

By constructing a positioning triangle and using an artificial fish swarm positioning method, combined with signal strength indicators to optimize the positioning nodes, the problem of low positioning accuracy of wireless sensor networks in indoor environments was solved, achieving higher positioning accuracy.

CN115802277BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2022-10-14
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing wireless sensor network positioning systems suffer from low positioning accuracy and large errors in indoor environments. In particular, traditional GPS positioning has poor indoor positioning accuracy and high power consumption, which cannot meet the energy constraints of wireless sensor nodes. Furthermore, positioning methods based on RSSI values ​​have increased errors when the circles do not intersect.

Method used

By combining artificial fish swarm positioning with signal strength indicators, a positioning triangle is constructed and the centroid coordinates are calculated by receiving the signal strength indicators of the positioning nodes. The artificial fish swarm positioning method is then used for optimization to reduce positioning errors.

Benefits of technology

It improves the positioning accuracy of wireless sensor network nodes, reduces positioning errors, and enhances positioning accuracy in complex indoor environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115802277B_ABST
    Figure CN115802277B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of wireless sensor network node positioning method and device, the method is applied to positioning server, the positioning server is connected with positioning node, the positioning node is used to receive the broadcast signal feedback signal strength indication value of preset anchor node;The method comprises: receiving the signal strength indication value sent by the positioning node;Determine three target nodes from the preset anchor node based on the signal strength indication value;Three target nodes are used to construct positioning triangle, and the positioning triangle includes vertex coordinates;Based on the vertex coordinates, the centroid coordinates corresponding to the positioning triangle are determined;Artificial fish school positioning mode is used to determine the coordinates of positioning node according to the centroid coordinates.Through the embodiment of the present application, the positioning error of wireless sensor network node can be reduced, and the positioning precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication technology, and in particular to a method for locating nodes in a wireless sensor network, a device for locating nodes in a wireless sensor network, an electronic device, and a storage medium. Background Technology

[0002] With the rapid development of IoT technology, Wireless Sensor Networks (WSNs) have become a hot research area. In recent years, advancements in communication and sensing have spurred the miniaturization and optimization of wireless devices, gradually changing our lifestyles and habits. WSNs consist of numerous small, low-power, low-cost sensors with computing, communication, storage, and even mobility capabilities. These sensors can spontaneously sense their environment, acquire and process data, and ultimately transmit the data to the observer. This dynamic sensing, processing, and message transmission capability of WSNs enables their application in all aspects of human life, including military, medical, daily, and commercial applications. Today, with the rapid development of IoT technology, WSNs have become an indispensable method for collecting and acquiring large amounts of physical data in the future.

[0003] In many WSN application scenarios, real-time node location is required. For example, when a warehouse fire occurs, even if surrounding sensors detect smoke signals and issue alarms, the exact location of the sensors cannot be determined. The alarm information does not include the location information of the sensor nodes, making rapid firefighting impossible, and the collected information meaningless. Therefore, including location information in the collected data is essential, which has promoted the development of various positioning technologies. Currently, the most widely used positioning system is the Global Positioning System (GPS). However, traditional GPS positioning has many limitations in wireless sensor network applications. First, GPS consumes a lot of power, and sensor nodes have limited energy, making it unsuitable for sensor node applications. Second, GPS has poor indoor positioning accuracy, making it unsuitable for indoor scenarios. Furthermore, it is costly, resulting in high costs in densely populated areas.

[0004] In existing technologies, RSSI (Received Signal Strength Indicator) values ​​are often used to construct circles, and the node positions are determined based on the intersection of these circles. However, when the circles do not intersect, directly selecting a set of anchor nodes for replacement discards larger RSSI values, increasing accuracy errors. Furthermore, due to the complexity and randomness of indoor environments, the collected signal strength may contain significant errors, further increasing node positioning errors and reducing positioning accuracy. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a wireless sensor network node localization method, a corresponding wireless sensor network node localization device, an electronic device, and a storage medium to overcome or at least partially solve the above problems.

[0006] In a first aspect, an embodiment of the present invention discloses a wireless sensor network node positioning method, applied to a positioning server, wherein the positioning server is connected to a positioning node, and the positioning node is used to receive a broadcast signal feedback signal strength indication value from a preset anchor node; the method includes:

[0007] Receive the signal strength indication value sent by the positioning node;

[0008] Based on the signal strength indication value, three target nodes are determined from the preset anchor nodes;

[0009] A positioning triangle is constructed based on three target nodes, and the positioning triangle includes vertex coordinates;

[0010] Based on the vertex coordinates, determine the centroid coordinates of the positioning triangle;

[0011] The coordinates of the positioning node are determined by using an artificial fish swarm positioning method based on the centroid coordinates.

[0012] Optionally, after the step of receiving the signal strength indication value sent by the positioning node, the method further includes:

[0013] The signal strength indication value is subjected to Gaussian filtering to obtain the signal strength indication filtered value;

[0014] From the signal strength indication values, a target signal strength indication value is determined, wherein the target signal strength indication value is a signal strength indication value located in a preset high probability occurrence zone;

[0015] Calculate the weighting coefficients based on the signal strength indicator filter value and the target signal strength indicator value;

[0016] The weighted average is calculated by combining the weighting coefficients and the signal strength indication value.

[0017] The signal strength indication value is updated using the weighted average.

[0018] Optionally, the step of calculating the weighting coefficients based on the signal strength indication filter value and the target signal strength indication value includes:

[0019] Calculate the difference between the target signal strength indication value and the signal strength indication filtered value;

[0020] Calculate the square of the difference;

[0021] The weighting coefficient is obtained by calculating the reciprocal of the squared value plus one.

[0022] Optionally, the step of determining three target nodes from the preset anchor nodes based on the signal strength indication value includes:

[0023] Based on the magnitude of the signal strength indication value, the preset anchor nodes are sorted in descending order to obtain a sorted set of anchor nodes;

[0024] The top three anchor nodes in the sorted set of anchor nodes are determined as the target nodes.

[0025] Optionally, the step of constructing a positioning triangle based on three target nodes includes:

[0026] For any of the target nodes, determine the signal strength indication value corresponding to the target node;

[0027] Convert the signal strength indicator value corresponding to the target node into a distance value;

[0028] Based on the distance values ​​corresponding to the three target nodes and the coordinates of the three target nodes, determine a proportional coordinate point that is proportional to the distance values, and determine the coordinates of the proportional coordinate point as the vertex coordinates;

[0029] Connect the proportional coordinate points to obtain the positioning triangle.

[0030] Optionally, the step of determining the centroid coordinates of the positioning triangle based on the vertex coordinates includes:

[0031] Determine the reciprocal sum of distances corresponding to the vertex coordinates. The reciprocal sum of distances is obtained by reversing the distance value of the target node corresponding to the vertex coordinates and adding the reciprocal distance values ​​together.

[0032] The sum of the reciprocals of the distances is determined as the weight value;

[0033] The centroid coordinates are obtained by combining the weight values ​​and the vertex coordinates.

[0034] Optionally, the step of determining the coordinates of the positioning node based on the centroid coordinates using the artificial fish swarm positioning method includes:

[0035] The initial fish swarm is determined based on the centroid coordinates, and the initial fish swarm includes multiple artificial fish and their corresponding state information;

[0036] By comparing the state information of the artificial fish, the initial target artificial fish is determined;

[0037] Determine whether the artificial fish meets the preset conditions for tail-chasing behavior and preset swarming behavior, and record the iteration number;

[0038] When the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, the artificial fish corresponding to the preset tail-chasing behavior or the artificial fish corresponding to the swarming behavior is determined as the iterative target fish;

[0039] When the artificial fish does not meet the preset tail-chasing behavior or preset grouping behavior conditions, it is determined whether the artificial fish meets the preset foraging behavior conditions.

[0040] When the artificial fish meets the preset foraging behavior conditions, the artificial fish corresponding to the foraging behavior is determined as the iterative target fish;

[0041] When the artificial fish does not meet the preset foraging behavior conditions, the artificial fish corresponding to the preset random behavior is determined as the iterative target fish;

[0042] Calculate the food concentration corresponding to the iterative target fish and the food concentration corresponding to the initial target artificial fish;

[0043] When the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish, the initial target artificial fish is updated using the iterative target fish.

[0044] Determine whether the number of iterations is greater than a preset iteration threshold;

[0045] When the number of iterations is greater than the preset iteration threshold, the updated initial target artificial fish coordinates are output as the positioning node coordinates;

[0046] When the number of iterations is not greater than the preset iteration threshold, the number of iterations is incremented, and the steps of determining whether the artificial fish meets the preset tail-chasing behavior and preset swarming behavior and recording the number of iterations are repeated until the number of iterations is greater than the preset iteration threshold.

[0047] Optionally, the step of determining the initial fish swarm based on the centroid coordinates includes:

[0048] Calculate the neighborhood of the centroid coordinates;

[0049] Random numbers are generated from a preset random number range;

[0050] By combining the centroid coordinates, the random number, and the neighborhood, a first coordinate value is obtained, the first coordinate value is determined to be state information, and the state information is marked as an artificial fish;

[0051] By combining multiple of the aforementioned artificial fish, an initial fish swarm is obtained.

[0052] In a second aspect, embodiments of the present invention disclose a wireless sensor network node positioning device, applied to a positioning server, wherein the positioning server is connected to a positioning node, and the positioning node is used to receive a broadcast signal feedback signal strength indication value from a preset anchor node; the device includes:

[0053] The receiving module is used to receive the signal strength indication value sent by the positioning node;

[0054] The target node determination module is used to determine three target nodes from the preset anchor nodes based on the signal strength indication value;

[0055] A construction module is used to construct a positioning triangle based on three target nodes, wherein the positioning triangle includes vertex coordinates;

[0056] The centroid coordinate determination module is used to determine the centroid coordinates of the positioning triangle based on the vertex coordinates.

[0057] The positioning node coordinate determination module is used to determine the positioning node coordinates based on the centroid coordinates using an artificial fish swarm positioning method.

[0058] In a third aspect, an embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the wireless sensor network node localization method as described above.

[0059] In a fourth aspect, embodiments of the present invention disclose a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the wireless sensor network node localization method as described above.

[0060] The embodiments of the present invention have the following advantages:

[0061] This invention embodiment receives signal strength indication values ​​sent by the positioning nodes; based on the signal strength indication values, three target nodes are determined from the preset anchor nodes; a positioning triangle is constructed based on the three target nodes, the positioning triangle including vertex coordinates; based on the vertex coordinates, the centroid coordinates corresponding to the positioning triangle are determined; and an artificial fish swarm positioning method is used to determine the coordinates of the positioning nodes based on the centroid coordinates. By constructing an artificial fish swarm using the coordinates of the positioning nodes and the position information of the anchor nodes, and then using the artificial fish swarm positioning method to optimize the estimation results of the positioning nodes, the positioning error is reduced and the positioning accuracy of the positioning nodes is improved. Attached Figure Description

[0062] Figure 1This is a flowchart illustrating the steps of an embodiment of a wireless sensor network node localization method according to the present invention;

[0063] Figure 2 This is a flowchart illustrating the steps of another embodiment of the wireless sensor network node localization method of the present invention;

[0064] Figure 3 This is a schematic diagram of vertex coordinates according to the present invention;

[0065] Figure 4 This is a flowchart illustrating the steps of an example of a wireless sensor network node localization method according to the present invention;

[0066] Figure 5 This is a flowchart illustrating the steps of an example of artificial fish swarm localization according to the present invention;

[0067] Figure 6 This is a structural block diagram of an embodiment of a wireless sensor network node positioning device according to the present invention. Detailed Implementation

[0068] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0069] Reference Figure 1 This document illustrates a flowchart of an embodiment of a wireless sensor network node localization method according to the present invention. The method is applied to a positioning server, which is connected to a positioning node. The positioning node receives a broadcast signal strength indication value from a preset anchor node. The positioning node is a wireless sensor network node with an unknown location, i.e., a node requiring localization. The preset anchor node is a wireless sensor network node with a known location. The positioning server is connected to the positioning node and can receive and process requests or information from the positioning node. The positioning server can also be connected to the preset anchor node, receiving and processing requests or information from it. During operation, the preset anchor node broadcasts signals to other wireless sensor network nodes. The positioning node receives the broadcast signal from the preset anchor node, calculates the signal strength, and sends a signal strength indication value back to the positioning server. This signal strength indication value can be represented by an RSSI value.

[0070] The wireless sensor network node localization method may specifically include the following steps:

[0071] Step 101: Receive the signal strength indication value sent by the positioning node;

[0072] The positioning node determines the corresponding signal strength indication value based on the broadcast signals sent by its surrounding anchor nodes, and then sends these signal strength indication values ​​to the positioning server. The timing of sending the signal strength indication values ​​can be real-time or periodic, without specific limitations.

[0073] When it is necessary to locate the position of a positioning node, the positioning server receives the signal strength indication value sent by the positioning node.

[0074] Step 102: Based on the signal strength indication value, determine three target nodes from the preset anchor nodes;

[0075] Based on the signal strength indication value corresponding to the broadcast signal received by the positioning node, three target nodes around the positioning node are determined from the preset anchor nodes. The positioning node is then located using these three target nodes as references.

[0076] Step 103: Construct a positioning triangle based on the three target nodes, wherein the positioning triangle includes vertex coordinates;

[0077] After identifying three target nodes, using these three target nodes as references, a position point is determined between two of the target nodes. This position point represents the distance ratio between the two target nodes that determined this point and the unknown node. This process of determining a position point between two target nodes is repeated to obtain three position points, which are the vertices of the positioning triangle. A positioning triangle is then constructed based on these three position points, including the vertex coordinates.

[0078] Step 104: Based on the vertex coordinates, determine the centroid coordinates of the positioning triangle;

[0079] After obtaining the positioning triangle, the centroid coordinates corresponding to the position of the centroid of the positioning triangle are determined based on the vertex coordinates of the three vertices of the triangle. Specifically, these centroid coordinates can be represented using relative coordinates in the coordinate system formed by the positioning triangle. These centroid coordinates characterize the positioning position where the positioning node has lower positioning accuracy.

[0080] Step 105: Using artificial fish swarm positioning, determine the coordinates of the positioning node based on the centroid coordinates.

[0081] Since the centroid coordinates represent the location of the positioning node with lower positioning accuracy (i.e., the actual location of the positioning node is located near these centroid coordinates), an artificial fish swarm positioning method can be used. This method calculates the optimal solution corresponding to the centroid coordinates from the surrounding area, and the result is the positioning node coordinate. This allows for the determination of the positioning node location with higher positioning accuracy.

[0082] This invention embodiment receives signal strength indication values ​​sent by the positioning nodes; based on the signal strength indication values, three target nodes are determined from the preset anchor nodes; a positioning triangle is constructed based on the three target nodes, the positioning triangle including vertex coordinates; based on the vertex coordinates, the centroid coordinates corresponding to the positioning triangle are determined; and an artificial fish swarm positioning method is used to determine the coordinates of the positioning nodes based on the centroid coordinates. By constructing an artificial fish swarm using the coordinates of the positioning nodes and the position information of the anchor nodes, and then using the artificial fish swarm positioning method to optimize the estimation results of the positioning nodes, the positioning error is reduced and the positioning accuracy of the positioning nodes is improved.

[0083] Reference Figure 2 This diagram illustrates a flowchart of another embodiment of the wireless sensor network node localization method of the present invention. The wireless sensor network node localization method is applied to a positioning server, which is connected to a positioning node. The positioning node receives a broadcast signal from a preset anchor node, providing feedback signal strength indication values. The preset anchor node has a fixed, known location, and its location information can be stored in the positioning server. The positioning server is connected to the positioning node and can interact with it. The preset anchor node periodically broadcasts signals to the outside world. After receiving the broadcast signal from the preset anchor node, the positioning node can measure the strength of the broadcast signal to obtain the corresponding signal strength indication value.

[0084] The wireless sensor network node localization method may specifically include the following steps:

[0085] Step 201: Receive the signal strength indication value sent by the positioning node;

[0086] When locating a positioning node, the positioning server receives the signal strength value sent by the positioning node. In this embodiment of the invention, the signal strength value is represented by the RSSI value.

[0087] Step 202: Perform Gaussian filtering on the signal strength indication value to obtain the filtered signal strength indication value;

[0088] After receiving the signal strength indication value, since there is noise in the signal, Gaussian filtering can be performed on the signal strength indication value received from the positioning node to filter out the noise in the signal strength indication value, and obtain the signal strength indication filtered value, that is, the signal strength indication filtered value is the signal strength indication value after Gaussian filtering.

[0089] Step 203: Determine the target signal strength indication value from the signal strength indication values. The target signal strength indication value is the signal strength indication value that is located in a preset high probability occurrence zone.

[0090] Since these signal strength indicators are based on the same positioning node, their corresponding values ​​follow a Gaussian function, i.e., a normal distribution. Signal strength indicators from high-probability occurrence areas can be selected as target signal strength indicators, eliminating outliers from the original indicators. The preset high-probability occurrence area refers to the high-probability occurrence area within the Gaussian function; its specific range can be set according to requirements and is not specifically limited here.

[0091] Based on this high-probability occurrence zone, the target signal strength indication value is determined from the signal strength indication values.

[0092] Step 204: Calculate the weighting coefficients based on the signal strength indicator filter value and the target signal strength indicator value;

[0093] By determining the deviation between the filtered signal strength indicator value and the target signal strength indicator value, a weighting coefficient is calculated based on this deviation. This allows for accurate correction of the signal strength indicator value.

[0094] Specifically, the step of calculating the weighting coefficients based on the signal strength indication filter value and the target signal strength indication value includes:

[0095] Sub-step S2041: Calculate the difference between the target signal strength indication value and the signal strength indication filter value;

[0096] The difference between the target signal strength indication value and the signal strength indication filter value is calculated by subtracting the target signal strength indication value from the signal strength indication filter value.

[0097] Sub-step S2042: Calculate the square of the difference;

[0098] Then calculate the squared value d of the difference. i That is, by combining sub-steps S2041 to S2042, we can obtain the formula:

[0099]

[0100] Wherein, RSSI is the target signal strength indication value; This is the filter value for signal strength indication.

[0101] Sub-step S2043: Calculate the reciprocal of the squared value plus one to obtain the weighting coefficient.

[0102] After obtaining the squared value, add one to the squared value and take the reciprocal of the value; this is the weighting coefficient w. i The formula can be obtained as follows:

[0103]

[0104] Step 205: Calculate the weighted average by combining the weighting coefficients and the signal strength indication value;

[0105] Step 206: Update the signal strength indication value using the weighted average.

[0106] The obtained weighting coefficients are combined with the corresponding signal strength indication values, and the weighted average of the received signal strength indication values ​​is calculated. This weighted average is determined as the corrected signal strength indication value. The calculated weighted average is used to update the signal strength indication value, and the updated signal strength indication value is used for subsequent positioning.

[0107] The weighted average is calculated as follows:

[0108]

[0109] Step 207: Based on the signal strength indication value, determine three target nodes from the preset anchor nodes;

[0110] Based on the signal strength indication value corresponding to the broadcast signal emitted by the preset anchor node, three anchor nodes are selected as target nodes from the preset anchor nodes.

[0111] Specifically, the step of determining three target nodes from the preset anchor nodes based on the signal strength indication value includes:

[0112] Sub-step S2071: Based on the magnitude of the signal strength indication value, sort the preset anchor nodes in descending order to obtain the sorted set of anchor nodes;

[0113] All preset anchor nodes are sorted in descending order according to the magnitude of their signal strength indication values, that is, all preset anchor nodes are sorted from largest to smallest according to their signal strength indication values, resulting in a sorted set of anchor nodes.

[0114] Sub-step S2072: Determine the top three anchor nodes of the anchor node sorting set as the target nodes.

[0115] The top three anchor nodes in the sorted set are selected as target nodes; that is, the target nodes are the three anchor nodes with the strongest signal strength indicators. These three anchor nodes are used to participate in the localization of the positioning node.

[0116] Step 208: Construct a positioning triangle based on the three target nodes, wherein the positioning triangle includes vertex coordinates;

[0117] A positioning triangle is constructed based on three target nodes to locate the node positions. The positioning triangle includes the vertex coordinates of the three vertices.

[0118] Specifically, the step of constructing a positioning triangle based on three target nodes includes:

[0119] Sub-step S2081: For any of the target nodes, determine the signal strength indication value corresponding to the target node;

[0120] For any one of the three target nodes, determine the signal strength indication value corresponding to that target node.

[0121] Sub-step S2082: Convert the signal strength indication value corresponding to the target node into a distance value;

[0122] Based on the signal strength indication value corresponding to the target node, and according to the relationship between the signal strength indication value and the distance, the signal strength indication value is converted into a distance value d.

[0123] Sub-steps S2081 to S2082 can be repeated to calculate the distance values ​​of the three target nodes.

[0124] Sub-step S2083: Based on the distance values ​​corresponding to the three target nodes and the coordinates of the three target nodes, determine a proportional coordinate point that is proportional to the distance values, and determine the coordinates of the proportional coordinate point as the vertex coordinates;

[0125] Since the target node is essentially a preset anchor node, the actual location of the target node is known. The positioning server can obtain the coordinates of the three target nodes from the specified storage location by constructing a positioning triangle; or it can obtain the coordinates of all anchor nodes before positioning and determine the coordinates of the target node from them when determining the target node.

[0126] Then, on each of the three edges formed by the three target nodes, a point of equal proportion is determined, such that the distance between this point and the two target nodes forming the edge is in the same proportion as the distance value corresponding to the target node. This allows the unknown node to be located based on the signal strength indication value even when the circles formed by the distance values ​​corresponding to the three target nodes do not intersect. This avoids discarding the largest signal strength indication value for location due to the non-intersecting circles corresponding to the target nodes, thereby reducing ranging errors and improving subsequent positioning accuracy.

[0127] After determining three proportional coordinate points, the coordinates of the three proportional coordinate points are calculated based on the coordinates of the three target nodes. The coordinates of the proportional coordinate points are then used as the coordinates of the vertices of the positioning triangle.

[0128] To make the process of sub-step S2083 clear to those skilled in the art, refer to... Figure 3 The diagram shows a vertex coordinate schematic of the present invention.

[0129] The three target nodes are located at points A, B, and C. After obtaining the distance values ​​corresponding to the target nodes, circles are drawn based on these distances. Connecting the centers of the three circles yields three sides. Three proportionally aligned points, D, E, and F, are then determined at these three points. Taking point F as an example, the larger the radius of the circle, the farther the distance to the positioning node, and the greater the error. Point F should be moved closer to point A, which has a smaller radius, to maximize the effectiveness of circle A. Therefore, the position of point F should be... Based on the relationship between point F and points A, B, and C:

[0130]

[0131] We can obtain the coordinates of point F: F(x) F ,y F ).

[0132] Similarly, the coordinates of point D, D(x), can be calculated. D ,y D ); and the coordinates of point E, E(x) E ,y E ).

[0133] Sub-step S2084: Connect the proportional coordinate points to obtain the positioning triangle.

[0134] After obtaining three proportionally scaled coordinate points, connect them to form a positioning triangle. (Refer to...) Figure 3 Connecting D, E, and F, we obtain △DEF, which is the positioning triangle.

[0135] Step 209: Based on the vertex coordinates, determine the centroid coordinates of the positioning triangle;

[0136] Based on the vertex coordinates of the three vertices, calculate the coordinates of the centroid of the positioning triangle.

[0137] Specifically, the step of determining the centroid coordinates of the positioning triangle based on the vertex coordinates includes:

[0138] Sub-step S2091: Determine the reciprocal sum of distances corresponding to the vertex coordinates. The reciprocal sum of distances is obtained by reversing the distance value of the target node corresponding to the vertex coordinates and adding the reciprocal distance values ​​together.

[0139] Sub-step S2092: Determine the sum of the reciprocals of the distances as weight values;

[0140] In practical applications, when calculating the centroid coordinates, sub-steps S2091 to S2092 can be used to calculate the horizontal axis coordinates, and then sub-steps S2091 to S2092 can be repeated to calculate the vertical axis coordinates. The centroid coordinates can be obtained by combining the horizontal and vertical axis coordinates, thereby reducing the amount of calculation per operation.

[0141] When calculating the centroid coordinates, we can first determine the sum of the reciprocals of the distances corresponding to the vertex coordinates. Using this sum as a weight, we consider the impact of the distance between the positioning node and the anchor node on positioning. This ensures that the anchor node, being farther from the positioning node, plays a primary role, preventing secondary factors with greater distances from dominating, thus further improving positioning accuracy. Specifically, the sum of the reciprocals is obtained by reversing the distances from the vertex coordinates to the target node, and then summing all the reciprocal distance values.

[0142] Sub-step S2093: Combine the weight value and the vertex coordinates to obtain the centroid coordinates.

[0143] Then, the weight value is multiplied by the corresponding vertex coordinates, and the weight value and vertex coordinates are combined to obtain the centroid coordinates.

[0144] Combining sub-steps S2091 to S2093, we can obtain the formula:

[0145]

[0146] Step 210: Using artificial fish swarm positioning, determine the coordinates of the positioning node based on the centroid coordinates.

[0147] In this embodiment of the invention, by establishing a moderate function for the artificial fish swarm using the centroid coordinates, and employing the artificial fish swarm positioning method, the centroid coordinates are optimized to obtain an accurate coordinate position, which is then determined as the positioning node coordinates.

[0148] Specifically, the step of determining the coordinates of the positioning node based on the centroid coordinates using the artificial fish swarm positioning method includes:

[0149] Sub-step S2101: Determine the initial fish swarm based on the centroid coordinates. The initial fish swarm includes multiple artificial fish and their corresponding state information.

[0150] In this embodiment of the invention, an initial fish swarm can be established based on the centroid coordinates, wherein the initial fish swarm includes multiple artificial fish and the state information corresponding to each artificial fish.

[0151] Furthermore, the step of determining the initial fish swarm based on the centroid coordinates may include: calculating the neighborhood of the centroid coordinates; obtaining a random number from a preset random number interval; combining the centroid coordinates, the random number, and the neighborhood to obtain a first coordinate value, determining the first coordinate value as state information, and marking the state information as artificial fish; and combining multiple artificial fish to obtain the initial fish swarm.

[0152] In practical applications, the centroid coordinates can be calculated first. The neighborhood of the centroid can be half the range corresponding to the centroid coordinates, i.e., the neighborhood is... in Then, random numbers are obtained from a preset random number interval T, where the preset random number interval can be [0,1]. The centroid coordinates, random numbers, and neighborhood are combined using the following formula:

[0153]

[0154] Multiple initial coordinate values ​​are obtained by randomly selecting different values. Each coordinate value is defined as a state information, and each state information is labeled as an artificial fish, thus obtaining multiple artificial fish to form an initial fish swarm.

[0155] Sub-step S2102: Compare the state information of the artificial fish to determine the initial target artificial fish;

[0156] In the artificial fish swarm, the state information of each artificial fish is compared, and the artificial fish with the best state information is selected as the initial target artificial fish. This initial target artificial fish can be recorded on the bulletin board.

[0157] Sub-step S2103: Determine whether the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, and record the iteration number;

[0158] Tail-chasing behavior is a logical manifestation of the behavior in artificial fish swarming methods, where when one or more fish in a school find food, their nearby companions will follow them to the food point quickly.

[0159] Swarming behavior, in artificial fish swarming methods, refers to the natural tendency of fish to gather in groups during swimming to ensure their survival and avoid harm. It represents the logical manifestation of the rules that fish follow when swarming. Since tail-chasing behavior and swarming behavior have different implementation methods, those skilled in the art can use different implementation methods to characterize the conditions for preset tail-chasing behavior and preset swarming behavior according to actual circumstances. This embodiment of the invention does not limit these methods.

[0160] After determining the initial target artificial fish, each artificial fish can be individually checked to see if it meets the preset conditions for chasing behavior and swarming behavior, and the iteration number is recorded. The initial iteration number can be 1.

[0161] Sub-step S2104: When the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, determine the artificial fish corresponding to the preset tail-chasing behavior or the artificial fish corresponding to the swarming behavior as the iterative target fish.

[0162] When an artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, that is, there exists an optimal solution for the current iteration among the artificial fish, the artificial fish that meets the preset tail-chasing behavior and preset swarming behavior can be determined as the target fish for iteration.

[0163] Sub-step S2105: When the artificial fish does not meet the preset tail-chasing behavior or preset grouping behavior conditions, determine whether the artificial fish meets the preset foraging behavior conditions.

[0164] When artificial fish meet the preset conditions for tail-chasing behavior and preset grouping behavior, it is necessary to further determine whether there is an optimal solution in the artificial fish group. This can be done by checking whether each artificial fish meets the preset foraging behavior conditions.

[0165] The foraging behavior simulates the random free movement of fish in water, and when food is found, the fish will quickly swim towards the direction where food gradually increases. Accordingly, the foraging behavior can be implemented in different ways. Those skilled in the art can use different implementation methods to represent the preset foraging behavior conditions according to the actual situation. The embodiments of the present invention are not limited here.

[0166] Sub-step S2106: When the artificial fish meets the preset foraging behavior conditions, determine the artificial fish corresponding to the foraging behavior as the iterative target fish;

[0167] When an artificial fish meets the preset foraging behavior conditions, there is an optimal solution, and the artificial fish corresponding to the foraging behavior can be identified as the target fish for iteration.

[0168] Sub-step S2107: When the artificial fish does not meet the preset foraging behavior conditions, determine the artificial fish corresponding to the preset random behavior as the iterative target fish;

[0169] When the artificial fish does not meet the preset foraging behavior conditions, that is, there is no optimal solution among the current artificial fish, the artificial fish can determine the artificial fish corresponding to the preset random behavior as the iterative target fish based on randomness.

[0170] Sub-step S2108: Calculate the food concentration corresponding to the iterative target fish and the food concentration corresponding to the initial target artificial fish;

[0171] Sub-steps S2104 to S2107 can identify an iterative target fish from the artificial fish, and the food concentration corresponding to the obtained iterative target fish can be calculated. The food concentration corresponding to the initial target artificial fish can also be calculated.

[0172] Sub-step S2109: When the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish, the initial target artificial fish is updated using the iterative target fish;

[0173] When the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish, that is, the state information of the iterative target fish is more accurate than that of the initial target artificial fish, the initial target artificial fish can be updated by using the iterative target fish, that is, the initial target artificial fish is replaced by the iterative target fish, and the current iterative target fish is recorded on the bulletin board.

[0174] When the food concentration corresponding to the iterative target fish is not greater than the food concentration of the initial target artificial fish, that is, the state information of the initial target artificial fish is more accurate than that of the iterative target fish, the initial target artificial fish is continued to be used.

[0175] Sub-step S21010: Determine whether the number of iterations is greater than a preset iteration threshold;

[0176] After determining the artificial fish, the next step is to determine whether the current iteration count (i.e., the number of iterations) is greater than a preset iteration threshold. This iteration threshold can be set to different numbers as needed. This embodiment of the invention does not limit this.

[0177] Sub-step S21011: When the number of iterations is greater than the preset iteration threshold, the updated initial target artificial fish coordinates are output as the positioning node coordinates.

[0178] When the number of iterations exceeds the preset iteration threshold, the result after several iterations can be used as the output result. The coordinates of the current updated initial target artificial fish are output as the positioning node coordinates to obtain positioning node coordinates with higher positioning accuracy.

[0179] Sub-step S21012: When the number of iterations is not greater than the preset iteration threshold, increment the number of iterations and repeat the step of determining whether the artificial fish meets the preset tail-chasing behavior and preset swarming behavior, and recording the number of iterations, until the number of iterations is greater than the preset iteration threshold.

[0180] When the number of iterations is not greater than the preset iteration threshold, meaning the result output by the current iteration still has a large error, it is necessary to continue iterating and calculating to find the optimal solution. The iteration number can be incremented, for example, by adding one. Then, the steps of determining whether the artificial fish meets the preset tail-chasing behavior and preset swarming behavior, and recording the iteration number, are repeated. Multiple iterations are performed to calculate a better solution until the number of iterations exceeds the preset iteration threshold, at which point the result is output.

[0181] In an optional embodiment of the present invention, it can be based on the formula:

[0182]

[0183] Where X is the actual x-coordinate of the positioning node, Y is the actual y-coordinate of the positioning node, x is the x-coordinate of the node coordinate, and y is the y-coordinate of the node coordinate.

[0184] The absolute positioning error of the positioning node coordinates is calculated to determine the positioning accuracy for this operation.

[0185] This invention employs Gaussian filtering to filter the received signal strength indication value, using the filtered value as the final value for distance conversion, thereby reducing ranging errors and improving positioning accuracy. Furthermore, by using weighted value correction to determine the centroid coordinates of the positioning triangle where the positioning node is located, and constructing an artificial fish swarm using the centroid coordinates and anchor node position information, the centroid coordinates of the positioning node are optimized using the artificial fish swarm positioning method; this further reduces positioning errors and improves positioning accuracy.

[0186] To enable those skilled in the art to better understand the embodiments of the present invention, an example is provided below to illustrate the embodiments of the present invention:

[0187] Reference Figure 4 The diagram illustrates a step-by-step flowchart of an example of a wireless sensor network node localization method according to the present invention.

[0188] 1) Initialize anchor node settings to determine the location of anchor nodes.

[0189] 2) Anchor nodes periodically broadcast information (i.e., send broadcast signals).

[0190] 3) The unknown node (location node) receives broadcast information and measures and records RSSI values.

[0191] 4) Determine if the RSSI value exceeds the threshold. If it does, the RSSI value can be used for positioning. Otherwise, the RSSI value is too small to locate the location node.

[0192] 5) When the RSSI value exceeds the threshold, the location server receives the RSSI value and stops receiving subsequent RSSI values.

[0193] 6) The received RSSI is filtered using an improved Gaussian filter to obtain the final RSSI value (i.e., the updated signal strength indication value).

[0194] 7) Sort the RSSI values ​​from largest to smallest and locate the three nodes with the strongest signals.

[0195] 8) Based on the RSSI ranging model, convert RSSI to distance value d.

[0196] 9) Use the distance ratio model, i.e., construct a positioning triangle to obtain the coordinates of the three vertices of the triangle.

[0197] 10) Substitute the values ​​into the weighted centroid localization algorithm based on weight correction to calculate the coordinates of the unknown node (centroid coordinates).

[0198] 11) The coordinates of the located nodes are obtained by optimizing the estimated coordinates of the nodes using the artificial fish swarm centroid localization algorithm.

[0199] Specifically, the centroid positioning of artificial fish swarms can be referenced. Figure 5 The diagram shows a flowchart illustrating an example of artificial fish swarm localization according to the present invention.

[0200] Step 1: Based on unknown nodes Let T be a random number within the region [0,1], and then use the following formula to... neighborhood Within, candidate solutions for the initial fish swarm are generated (where... ).

[0201]

[0202] Step 2: Initialize settings.

[0203] Step 3: Compare the current status of each artificial fish and select the best artificial fish status information to record in the bulletin board.

[0204] Step 4: Determine if the conditions for tailgating or swarming behavior are met. If they are, use the optimal value of the two behaviors; otherwise, execute foraging behavior. If none of the three conditions are met, use random behavior. After each behavior is executed, calculate the food concentration around each artificial fish. If the calculated optimal value is better than the bulletin board, update the bulletin board.

[0205] Step 5: Check if the maximum number of iterations is met. If it is, end the algorithm and output the optimal value of the bulletin board. If not, return to Step 4 and increment the iteration count by 1.

[0206] 12) Calculate the positioning error.

[0207] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0208] Reference Figure 6This diagram illustrates a structural block diagram of an embodiment of a wireless sensor network node positioning device according to the present invention. The wireless sensor network node positioning device is applied to a positioning server, which is connected to a positioning node. The positioning node is used to receive broadcast signal feedback signal strength indication values ​​from a preset anchor node; specifically, it may include the following modules:

[0209] The receiving module 601 is used to receive the signal strength indication value sent by the positioning node;

[0210] The target node determination module 602 is used to determine three target nodes from the preset anchor nodes based on the signal strength indication value;

[0211] Construction module 603 is used to construct a positioning triangle based on three target nodes, the positioning triangle including vertex coordinates;

[0212] The centroid coordinate determination module 604 is used to determine the centroid coordinates corresponding to the positioning triangle based on the vertex coordinates.

[0213] The positioning node coordinate determination module 605 is used to determine the positioning node coordinates based on the centroid coordinates using an artificial fish swarm positioning method.

[0214] In an optional embodiment of the present invention, the device further includes:

[0215] The filtering module is used to perform Gaussian filtering on the signal strength indication value to obtain the filtered signal strength indication value;

[0216] The target signal strength indication value determination module is used to determine a target signal strength indication value from the signal strength indication values, wherein the target signal strength indication value is a signal strength indication value located in a preset high probability occurrence zone;

[0217] The weighting coefficient calculation module is used to calculate the weighting coefficients based on the signal strength indicator filter value and the target signal strength indicator value.

[0218] The weighted average calculation module is used to calculate the weighted average by combining the weighting coefficients and the signal strength indication value;

[0219] An update module is used to update the signal strength indication value using the weighted average.

[0220] In an optional embodiment of the present invention, the weighted average calculation module includes:

[0221] The difference calculation submodule is used to calculate the difference between the target signal strength indication value and the signal strength indication filter value;

[0222] A square value calculation submodule is used to calculate the square value of the difference;

[0223] The weighting coefficient calculation submodule is used to calculate the reciprocal of the squared value plus one to obtain the weighting coefficient.

[0224] In an optional embodiment of the present invention, the target node determination module 601 includes:

[0225] The sorting submodule is used to sort the preset anchor nodes in descending order according to the magnitude of the signal strength indication value, so as to obtain a sorted set of anchor nodes;

[0226] The target node determination submodule is used to determine the top three anchor nodes of the anchor node sorting set as target nodes.

[0227] In an optional embodiment of the present invention, the building module 603 includes:

[0228] The signal strength indication value determination submodule is used to determine the signal strength indication value corresponding to any of the target nodes.

[0229] The conversion submodule is used to convert the signal strength indication value corresponding to the target node into a distance value;

[0230] The proportional coordinate point determination submodule is used to determine proportional coordinate points that are proportional to the distance values ​​corresponding to the three target nodes and the coordinates of the three target nodes, and to determine the coordinates of the proportional coordinate points as vertex coordinates.

[0231] The connection submodule is used to connect the proportional coordinate points to obtain the positioning triangle.

[0232] In an optional embodiment of the present invention, the centroid coordinate determination module 604 includes:

[0233] The distance reciprocal sum determination submodule is used to determine the distance reciprocal sum corresponding to the vertex coordinates. The distance reciprocal sum is obtained by reversing the distance value of the target node corresponding to the vertex coordinates and adding the reciprocated distance values.

[0234] The weight value determination submodule is used to determine the sum of the reciprocals of the distances as weight values;

[0235] The centroid coordinate determination submodule is used to combine the weight value and the vertex coordinates to obtain the centroid coordinates.

[0236] In an optional embodiment of the present invention, the positioning node coordinate determination module 605 includes:

[0237] The initial fish swarm determination submodule is used to determine the initial fish swarm based on the centroid coordinates. The initial fish swarm includes multiple artificial fish and their corresponding state information.

[0238] The comparison submodule is used to compare the state information of the artificial fish and determine the initial target artificial fish;

[0239] The first judgment submodule is used to determine whether the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, and to record the iteration number;

[0240] The first execution submodule is used to determine the artificial fish corresponding to the preset tail-chasing behavior or the artificial fish corresponding to the preset swarming behavior as the iterative target fish when the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior.

[0241] The second execution submodule is used to determine whether the artificial fish meets the preset foraging behavior conditions when the artificial fish does not meet the preset tail-chasing behavior or preset grouping behavior conditions.

[0242] The third execution submodule is used to determine the artificial fish corresponding to the foraging behavior as the iterative target fish when the artificial fish meets the preset foraging behavior conditions;

[0243] The fourth execution submodule is used to determine the artificial fish corresponding to the preset random behavior as the iterative target fish when the artificial fish does not meet the preset foraging behavior conditions;

[0244] The food concentration calculation submodule is used to calculate the food concentration corresponding to the iterative target fish and the food concentration corresponding to the initial target artificial fish;

[0245] The initial target artificial fish update submodule is used to update the initial target artificial fish with the iterative target fish when the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish.

[0246] The second judgment submodule is used to determine whether the number of iterations is greater than a preset iteration threshold.

[0247] The fifth execution submodule is used to output the updated initial target artificial fish coordinates as the positioning node coordinates when the number of iterations is greater than the preset iteration threshold.

[0248] The sixth execution submodule is used to increment the iteration number when the iteration number is not greater than the preset iteration threshold, and repeatedly execute the steps of judging whether the artificial fish meets the preset tailing behavior and preset swarming behavior, and recording the iteration number, until the iteration number is greater than the preset iteration threshold.

[0249] In an optional embodiment of the present invention, the initial fish swarm determination submodule includes:

[0250] A neighborhood calculation unit is used to calculate the neighborhood of the centroid coordinates;

[0251] The acquisition unit is used to acquire random numbers from a preset random number range;

[0252] The unit is used to combine the centroid coordinates, the random number, and the neighborhood to obtain a first coordinate value, determine the first coordinate value as state information, and mark the state information as an artificial fish.

[0253] The combining unit is used to combine multiple artificial fish to obtain an initial fish swarm.

[0254] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0255] This invention also provides an electronic device, comprising:

[0256] The device includes a processor and a storage medium, the storage medium storing a computer program executable by the processor. When the electronic device is running, the processor executes the computer program to perform the method described in any of the embodiments of the present invention. The specific implementation and technical effects are similar to those in the method embodiments, and will not be repeated here.

[0257] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method described in any one of the embodiments of this invention. The specific implementation and technical effects are similar to those in the method embodiments, and will not be repeated here.

[0258] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0259] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0260] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0261] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0263] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0264] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0265] The present invention provides a detailed description of a wireless sensor network node positioning method and apparatus. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for locating nodes in a wireless sensor network, characterized in that, The method is applied to a positioning server, which is connected to a positioning node, and the positioning node is used to receive a broadcast signal feedback signal strength indication value from a preset anchor node; the method includes: Receive the signal strength indication value sent by the positioning node; Based on the signal strength indication value, three target nodes are determined from the preset anchor nodes; A positioning triangle is constructed based on three target nodes, and the positioning triangle includes vertex coordinates; Based on the vertex coordinates, determine the centroid coordinates of the positioning triangle; The coordinates of the positioning node are determined based on the centroid coordinates using an artificial fish swarm positioning method. The step of determining the coordinates of the positioning node based on the centroid coordinates using the artificial fish swarm positioning method includes: The initial fish swarm is determined based on the centroid coordinates, and the initial fish swarm includes multiple artificial fish and their corresponding state information; By comparing the state information of the artificial fish, the initial target artificial fish is determined; Determine whether the artificial fish meets the preset conditions for tail-chasing behavior and preset swarming behavior, and record the iteration number; When the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, the artificial fish corresponding to the preset tail-chasing behavior or the artificial fish corresponding to the swarming behavior is determined as the iterative target fish; When the artificial fish does not meet the preset tail-chasing behavior or preset grouping behavior conditions, it is determined whether the artificial fish meets the preset foraging behavior conditions. When the artificial fish meets the preset foraging behavior conditions, the artificial fish corresponding to the foraging behavior is determined as the iterative target fish; When the artificial fish does not meet the preset foraging behavior conditions, the artificial fish corresponding to the preset random behavior is determined as the iterative target fish; Calculate the food concentration corresponding to the iterative target fish and the food concentration corresponding to the initial target artificial fish; When the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish, the initial target artificial fish is updated using the iterative target fish. Determine whether the number of iterations is greater than a preset iteration threshold; When the number of iterations is greater than the preset iteration threshold, the updated initial target artificial fish coordinates are output as the positioning node coordinates; When the number of iterations is not greater than the preset iteration threshold, the number of iterations is incremented, and the steps of determining whether the artificial fish meets the preset tail-chasing behavior and preset swarming behavior and recording the number of iterations are repeated until the number of iterations is greater than the preset iteration threshold.

2. The method according to claim 1, characterized in that, After the step of receiving the signal strength indication value sent by the positioning node, the method further includes: The signal strength indication value is subjected to Gaussian filtering to obtain the signal strength indication filtered value; From the signal strength indication values, a target signal strength indication value is determined, wherein the target signal strength indication value is a signal strength indication value located in a preset high probability occurrence zone; Calculate the weighting coefficients based on the signal strength indicator filter value and the target signal strength indicator value; The weighted average is calculated by combining the weighting coefficients and the signal strength indication value. The signal strength indication value is updated using the weighted average.

3. The method according to claim 2, characterized in that, The step of calculating the weighting coefficient based on the signal strength indicator filter value and the target signal strength indicator value includes: Calculate the difference between the target signal strength indication value and the signal strength indication filtered value; Calculate the square of the difference; The weighting coefficient is obtained by calculating the reciprocal of the squared value plus one.

4. The method according to claim 1, characterized in that, The step of determining three target nodes from the preset anchor nodes based on the signal strength indication value includes: Based on the magnitude of the signal strength indication value, the preset anchor nodes are sorted in descending order to obtain a sorted set of anchor nodes; The top three anchor nodes in the sorted set of anchor nodes are determined as the target nodes.

5. The method according to claim 1, characterized in that, The steps for constructing a positioning triangle based on three target nodes include: For any of the target nodes, determine the signal strength indication value corresponding to the target node; Convert the signal strength indicator value corresponding to the target node into a distance value; Based on the distance values ​​corresponding to the three target nodes and the coordinates of the three target nodes, determine a proportional coordinate point that is proportional to the distance values, and determine the coordinates of the proportional coordinate point as the vertex coordinates; Connect the proportional coordinate points to obtain the positioning triangle.

6. The method according to claim 5, characterized in that, The step of determining the centroid coordinates of the positioning triangle based on the vertex coordinates includes: Determine the reciprocal sum of distances corresponding to the vertex coordinates. The reciprocal sum of distances is obtained by reversing the distance value of the target node corresponding to the vertex coordinates and adding the reciprocal distance values ​​together. The sum of the reciprocals of the distances is determined as the weight value; The centroid coordinates are obtained by combining the weight values ​​and the vertex coordinates.

7. The method according to claim 1, characterized in that, The steps for determining the initial fish swarm based on the centroid coordinates include: Calculate the neighborhood of the centroid coordinates; Random numbers are generated from a preset random number range; By combining the centroid coordinates, the random number, and the neighborhood, a first coordinate value is obtained, the first coordinate value is determined to be state information, and the state information is marked as an artificial fish; By combining multiple of the aforementioned artificial fish, an initial fish swarm is obtained.

8. A wireless sensor network node positioning device, characterized in that, An application in a positioning server, wherein the positioning server is connected to a positioning node, and the positioning node is used to receive a broadcast signal feedback signal strength indication value from a preset anchor node; the device includes: The receiving module is used to receive the signal strength indication value sent by the positioning node; The target node determination module is used to determine three target nodes from the preset anchor nodes based on the signal strength indication value; A construction module is used to construct a positioning triangle based on three target nodes, wherein the positioning triangle includes vertex coordinates; The centroid coordinate determination module is used to determine the centroid coordinates of the positioning triangle based on the vertex coordinates. The positioning node coordinate determination module is used to determine the positioning node coordinates based on the centroid coordinates using an artificial fish swarm positioning method. The positioning node coordinate determination module includes: The initial fish swarm determination submodule is used to determine the initial fish swarm based on the centroid coordinates. The initial fish swarm includes multiple artificial fish and their corresponding state information. The comparison submodule is used to compare the state information of the artificial fish and determine the initial target artificial fish; The first judgment submodule is used to determine whether the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior, and to record the iteration number; The first execution submodule is used to determine the artificial fish corresponding to the preset tail-chasing behavior or the artificial fish corresponding to the preset swarming behavior as the iterative target fish when the artificial fish meets the conditions of preset tail-chasing behavior and preset swarming behavior. The second execution submodule is used to determine whether the artificial fish meets the preset foraging behavior conditions when the artificial fish does not meet the preset tail-chasing behavior or preset grouping behavior conditions. The third execution submodule is used to determine the artificial fish corresponding to the foraging behavior as the iterative target fish when the artificial fish meets the preset foraging behavior conditions; The fourth execution submodule is used to determine the artificial fish corresponding to the preset random behavior as the iterative target fish when the artificial fish does not meet the preset foraging behavior conditions; The food concentration calculation submodule is used to calculate the food concentration corresponding to the iterative target fish and the food concentration corresponding to the initial target artificial fish; The initial target artificial fish update submodule is used to update the initial target artificial fish with the iterative target fish when the food concentration corresponding to the iterative target fish is greater than the food concentration of the initial target artificial fish. The second judgment submodule is used to determine whether the number of iterations is greater than a preset iteration threshold. The fifth execution submodule is used to output the updated initial target artificial fish coordinates as the positioning node coordinates when the number of iterations is greater than the preset iteration threshold. The sixth execution submodule is used to increment the iteration number when the iteration number is not greater than the preset iteration threshold, and repeatedly execute the steps of judging whether the artificial fish meets the preset tailing behavior and preset swarming behavior, and recording the iteration number, until the iteration number is greater than the preset iteration threshold.

9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the wireless sensor network node localization method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the wireless sensor network node localization method as described in any one of claims 1 to 7.