A node positioning method based on a graph convolutional neural network
By using graph convolutional neural networks for semi-supervised training and normalization, the problem of low positioning accuracy caused by uneven node distribution and coverage holes in wireless sensor networks is solved, achieving high-precision node positioning that is applicable to various topologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUN YAT SEN UNIV
- Filing Date
- 2022-04-07
- Publication Date
- 2026-05-01
AI Technical Summary
Existing wireless sensor network localization algorithms have low localization accuracy when nodes are unevenly distributed and coverage gaps exist. Furthermore, the performance of existing methods fluctuates greatly in different deployment environments, making it difficult to achieve good localization performance in all environments.
A node localization method based on graph convolutional neural networks is adopted. Graph data is constructed by flooding anchor node information, and semi-supervised training is performed using graph convolutional neural networks. Normalization and denormalization are used to process features and labels to achieve the localization of unknown nodes.
It improves positioning accuracy, is suitable for networks with different topologies, has stable performance, strong adaptability, and can maintain good performance when the node density remains constant.
Smart Images

Figure CN114679694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless sensor network technology, and more specifically, to a node localization method based on graph convolutional neural networks. Background Technology
[0002] Wireless sensor networks (WSNs) are considered one of the 21 most influential technologies of this century, belonging to the interdisciplinary frontier field of computer science, communications, and mathematics. They are self-organizing data processing networks formed by multiple functional sensor nodes deployed within a monitoring area, collecting and transmitting data. Through the dense deployment of sensor nodes, data collection, quantification, aggregation, and data transmission can be achieved. As a modern intelligent network, WSNs have been widely applied in various fields such as military, the Internet of Things (IoT), environmental monitoring, modern transportation (e.g., shared bicycles in recent years), express delivery, modern medicine, industry, and space exploration, showing great promise for future development. In many WSN applications, the collected data is worthless without corresponding location information. Therefore, positioning technology is one of the hot topics in WSN research.
[0003] In wireless sensor networks, localization algorithms can be divided into two stages: top-level distance estimation and bottom-level position estimation. The main difference between range-based and range-free localization algorithms lies in the top-level distance estimation method. Based on whether direct hardware measurement of the distance between transceivers is required, wireless sensor network localization algorithms can be categorized into range-based and range-free types. Range-based localization algorithms mostly require specific hardware devices installed between the transceivers, and then estimate the distance between them based on the physical characteristics of the received signals. The four most commonly used physical characteristics are Time of Arrival (ToA), Time Difference of Arrival (TDoA), Received Signal Strength (RSS), and Angle of Arrival (AoA); among them, angle-of-arrival (AoA) localization algorithms require the receiver to be equipped with an antenna array. Range-free localization algorithms, on the other hand, utilize network connectivity to estimate the distance between nodes, such as the hop count of the shortest path between nodes. Since no additional hardware needs to be installed on the sensor nodes, low-cost non-range localization algorithms are particularly suitable for large-scale wireless sensor networks.
[0004] Depending on the specific methods used, range-free localization algorithms can be further divided into three categories: geometrically constrained, hop-progress based, and machine learning based. Below are some representative existing range-free localization methods:
[0005] DV-Hop is a jump-based positioning method. The anchor node calculates the average hop progress (AHP) based on the number of hops and distance information collected by flooding. Then, the distance between nodes is obtained by multiplying the number of hops between nodes by the AHP. Finally, the positioning method is used for positioning.
[0006] LAEP is a geometrically constrained localization method. Sensor nodes calculate the expected hop progress (EHP) based on the network node density, and then multiply the number of hops between nodes by the EHP to obtain the distance between nodes, thus achieving localization.
[0007] LSVM is a machine learning-based localization method that divides the network into multiple non-overlapping regions. Multiple support vector machines are used to train the anchor node information on the X and Y axes. Finally, the data of unknown nodes are input into the constructed support vector machine tree to determine the region in which they are located, and the center of the region is used as the approximate coordinate value of the unknown node.
[0008] Most existing positioning schemes make ideal assumptions about the environment in which the sensor network is deployed, so the positioning results of schemes DV-Hop and LAEP are acceptable under such circumstances. However, in actual large-scale sensor network deployments, sensor nodes are usually deployed via low-altitude seeding by aircraft, which leads to uneven distribution of nodes in the network. Since the LAEP method calculates the EHP value based on the node density in the network, this uneven distribution of network nodes will introduce significant positioning errors into the LAEP scheme. Furthermore, the environment to be monitored often contains areas such as obstacles and lakes where nodes cannot be deployed, thus creating "coverage holes" in the network. Figure 2 As shown, the appearance of "coverage holes" will cause the shortest routing path between nodes to become detours. In this case, schemes such as DV-Hop and LAEP, which estimate distance by multiplying the hop count by the distance per hop, will exhibit significant distance estimation errors. In existing distance-free algorithms, distance estimation typically relies on a uniform hop-length (PHL) metric between nodes. However, in anisotropic wireless sensor networks, the PHL between different nodes may vary considerably, leading to large distance estimation errors.
[0009] In practical applications, nodes are randomly distributed within the detection area, resulting in an irregular network topology. For networks with irregular topologies, the uneven distribution of nodes inevitably leads to the following drawbacks:
[0010] (1) The jump count information is unreasonable.
[0011] When positioning, WSN uses minimum hop count information to calculate the distance between nodes. However, most WSN nodes are randomly and unevenly distributed. Usually, when counting hops, all nodes within the transmission radius are accumulated as 1 hop. This statistical method is unreasonable. When the communication radius is large, the distance error within 1 hop is too large, which will lead to a large cumulative error in distance estimation.
[0012] For example, such as Figure 3 As shown, unknown nodes X1, X2, X3, and X4 are within the communication range of anchor node S. The hop count between the anchor node and the unknown nodes is recorded as 1 hop. According to the hop distance formula, we can obtain:
[0013]
[0014] Right now:
[0015] But from Figure 2 The actual distances between the four unknown nodes and the anchor node are clearly visible in the data.
[0016]
[0017] That is, there is an error between the actual distance from nodes X1, X2, X3, X4 to node S and the distance with an integer hop. In actual calculations, assuming that the number of hops is equal would introduce a large error. Therefore, the hop value cannot be directly recorded as 1, but should be adjusted according to the distance between nodes.
[0018] With the same anchor node distance, a higher hop count leads to a greater accumulated error. As node density increases, the number of neighboring nodes in a single hop for a beacon node also increases, resulting in more nodes with inaccurate hop count calculations and thus increasing the error. Therefore, it is necessary to correct the minimum hop count from the node to be located to the anchor node to reduce the impact of hop count on node positioning.
[0019] (2) The estimated average jump distance is inaccurate.
[0020] When using the DV-HOP algorithm for localization, the distances between nodes are not always straight lines; most are winding paths, such as... Figure 4 , Figure 5The lower the node density, the higher the polyline ratio. Therefore, when the hop count between an unknown node and a beacon node in the network is greater than one hop, using the hop segment distance of the polyline structure to approximate the straight-line distance will increase the error between the estimated and actual average hop distance, resulting in a larger deviation in hop segment distance, and the error is proportional to the hop count between nodes. (e.g.) Figure 4 , Figure 5 (As shown) However, when calculating distance, unknown nodes usually use the average jump distance of the same node to calculate their position coordinates, which inevitably leads to a certain positioning error.
[0021] (3) Calculation method for positioning with cumulative error
[0022] While multilateral measurement methods involve less complex calculations and have a lower computational cost, they are largely limited by the second-stage jump distance estimation. Maximum likelihood estimation, although offering higher computational accuracy, requires iterative calculations, resulting in relatively high complexity. Furthermore, the included matrices A and b significantly influence the solution, inevitably introducing errors into the positioning results. Additionally, the maximum likelihood estimation method involves numerous floating-point operations during coordinate calculations, leading to significant power consumption due to computational overhead.
[0023] In summary, the presence of anisotropic factors in wireless sensor networks will have a significant impact on the performance of localization algorithms. Moreover, the anisotropic factors vary greatly in different deployment environments, resulting in large performance fluctuations of the designed localization scheme in different networks. It is difficult to achieve good localization performance in all network environments. In addition, the coordinate calculation methods used by most current localization algorithms have inherent defects, which further limits the localization accuracy of the algorithms. Summary of the Invention
[0024] To address the problem of low positioning accuracy in the prior art, this invention provides a node localization method based on graph convolutional neural networks, which can effectively improve positioning accuracy.
[0025] To achieve the above-mentioned objectives of this invention, the technical solution adopted is as follows:
[0026] A node localization method based on graph convolutional neural networks, comprising the following steps:
[0027] S1: Through anchor node information flooding, all nodes in the wireless sensor network record the coordinates of all anchor nodes and the minimum hop count between the node and the anchor nodes in their anchor node information table.
[0028] S2: Construct graph data from the topology of the wireless sensor network, and use the minimum hop count between the node itself and the anchor node as features, and the coordinates of the anchor node as labels. Normalize the features and labels respectively, and scale the values of the features and labels to the unit size respectively.
[0029] S3: Semi-supervised training of the graph convolutional neural network is performed using normalized features and labels;
[0030] S4: Based on the mapping relationship between normalization and denormalization, the training results are denormalized, and the position of the unknown node is directly obtained after denormalization.
[0031] Preferably, all nodes in the wireless sensor network, including anchor nodes and unknown nodes, need to establish and maintain an anchor node information table AT in memory to store the collected anchor node information. The length of the information table AT is equal to the number of anchor nodes in the wireless sensor network.
[0032] Furthermore, the flooding of anchor node information is as follows:
[0033] Once the wireless sensor network is deployed, the anchor nodes in the wireless sensor network, after receiving the positioning command from the control center, begin to broadcast Message data packets containing three fields: their own ID information, location information, and Hop Count.
[0034] After receiving a Message data packet sent by the anchor node, all nodes, including anchor nodes and unknown nodes, need to check whether their own ID information in the Message data packet exists in the information table AT they maintain.
[0035] Furthermore, if the ID information in the Message packet does not exist in the information table AT maintained by the node, the node saves the information in the Message packet, namely the three fields, into its information table AT, increments the Hop Count field in the Message packet by one, and forwards it to its neighboring nodes.
[0036] If the node's own ID information exists in the information table AT maintained by the node, and the Hop Count field in the message packet is less than the Hop Count field of the record corresponding to its own ID information in the information table AT, then the record corresponding to its own ID information in the information table AT will be updated, that is, the Hop Count field of the record will be updated; finally, the node will increment the Hop Count field in the message packet by one and forward it to its neighboring nodes.
[0037] If the received message data packet does not meet the above two criteria, the node will discard the message data packet.
[0038] Furthermore, the normalization described herein specifically uses the maximum absolute value of the feature and label values to scale to a unit size.
[0039] Preferably, when symmetric normalization is used, the final single-layer form of the graph convolutional neural network is obtained:
[0040]
[0041] In the formula: I is the identity matrix; H is the feature of each layer; σ is the nonlinear activation function; yes The degree matrix is expressed by the formula:
[0042]
[0043] Furthermore, the graph convolutional neural network is constructed as follows: First, a two-layer graph convolutional neural network is defined, where the input dimension is the total number of nodes, the hidden layer dimension is set to 16, and the last layer of the graph convolutional neural network transforms the output dimension into a two-dimensional coordinate dimension of 2; the activation function used is ReLU, which refers to the ramp function in mathematics, and its specific form is as follows:
[0044] φ(x)=max(0,x) (3)
[0045] The RuLU function, as the activation function of a neuron, provides the neuron with the ability to activate under linear transformation W. T The non-linear output result after X+b; in other words, for the input vector x from the previous layer of the neural network entering the neuron, the neuron using the ReLU function will output max(0, W). T X+b) is passed to the next layer of neurons or used as the output of the entire neural network.
[0046] Furthermore, the semi-supervised training of the graph convolutional neural network is specifically performed as follows: the normalized root mean square error of the average localization error of the evaluation localization algorithm is used as the loss function to train the graph convolutional neural network.
[0047] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it performs the steps of the method described above.
[0048] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described above.
[0049] The beneficial effects of this invention are as follows:
[0050] This invention first floods anchor node information. All nodes in the wireless sensor network, including anchor nodes and unknown nodes, record the positions of all anchor nodes and the minimum hop count between each node and its anchor nodes in their anchor node information table. The features and labels of the input graph convolutional neural network are normalized. Then, the minimum hop count information between nodes is used as feature input, and the coordinates of the anchor nodes are used as labels to perform semi-supervised training of the model. Finally, the training results are de-normalized. This invention has the advantages of fast convergence and high positioning accuracy. It also has strong universality and can be applied to networks with different topologies; when the node density remains constant (i.e., the total number of nodes remains constant), the performance of this invention is stable. Attached Figure Description
[0051] Figure 1 These are some non-range-based node positioning methods in existing technologies.
[0052] Figure 2 This is a schematic diagram of a detour path caused by covering voids in existing technology.
[0053] Figure 3 This is a schematic diagram of the hop distance of a node in the existing technology.
[0054] Figure 4 It is a path trajectory diagram of nodes in a dense scene.
[0055] Figure 5 It is a path trajectory graph of nodes in a sparse scene.
[0056] Figure 6 This is a flowchart of the node positioning method described in this invention.
[0057] Figure 7 This is a diagram of a message data packet.
[0058] Figure 8 This is a flowchart of the processing of packets received by the sensor node from the anchor node.
[0059] Figure 9 This is a schematic diagram of a Square-shaped network.
[0060] Figure 10 This is a schematic diagram of an S-shaped network.
[0061] Figure 11 This is a schematic diagram of an O-shaped network.
[0062] Figure 12 It is the positioning error in a Square-shaped network when the node density changes.
[0063] Figure 13It is the positioning error in the S-shaped network when the node density changes.
[0064] Figure 14 It is the positioning error in the O-shaped network when the node density changes.
[0065] Figure 15 It is the positioning error of the Square network when the number of anchor nodes changes.
[0066] Figure 16 It is the positioning error of the S-shaped network when the number of anchor nodes changes.
[0067] Figure 17 This refers to the positioning error of the O-shaped network when the number of anchor nodes changes. Detailed Implementation
[0068] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0069] Example 1
[0070] This invention addresses the problem of locating unknown nodes in a wireless sensor network, where several anchor nodes have known locations. It leverages the connectivity between nodes, specifically the hop count of the shortest path between them. Since unknown nodes can communicate with all anchor nodes in the network via multi-hop transmission, the proposed graph convolutional neural network-based node localization method can locate all unknown nodes in the entire network, achieving 100% localization coverage. Figure 6 This is a flowchart of a specific solution of the present invention. The specific operations will be described below:
[0071] A node localization method based on graph convolutional neural networks, comprising the following steps:
[0072] S1: Through anchor node information flooding, all nodes in the wireless sensor network record the coordinates of all anchor nodes and the minimum hop count between the node and the anchor nodes in their anchor node information table.
[0073] S2: Construct graph data from the topology of the wireless sensor network, and use the minimum hop count between the node itself and the anchor node as features, and the coordinates of the anchor node as labels. Normalize the features and labels respectively, and scale the values of the features and labels to the unit size respectively.
[0074] S3: Semi-supervised training of the graph convolutional neural network is performed using normalized features and labels;
[0075] S4: Based on the mapping relationship between normalization and denormalization, the training results are denormalized, and the position of the unknown node is directly obtained after denormalization.
[0076] In one specific embodiment, all nodes in the wireless sensor network, including anchor nodes and unknown nodes, need to establish and maintain an anchor node information table AT in memory to store the collected anchor node information. The length of the information table AT is equal to the number of anchor nodes in the wireless sensor network.
[0077] Furthermore, the flooding of anchor node information is as follows:
[0078] Once the wireless sensor network is deployed, the anchor nodes in the wireless sensor network, after receiving the positioning command from the control center, begin to broadcast Message data packets containing three fields: their own ID information, location information, and Hop Count (initialized to 1) to the wireless sensor network.
[0079] Upon receiving a Message data packet from the anchor node, all nodes, including anchor nodes and unknown nodes, need to check whether their own ID information in the Message data packet exists in their maintained information table AT. In a specific embodiment, the process of checking whether the self-ID information in the Message data packet exists in its maintained information table AT is as follows:
[0080] If the ID information in the Message packet does not exist in the information table AT maintained by the node, the node saves the information in the Message packet, namely the three fields, into its information table AT, increments the Hop Count field in the Message packet by one, and forwards it to its neighboring nodes.
[0081] If the node's own ID information exists in the information table AT maintained by the node, and the Hop Count field in the message packet is less than the Hop Count field of the record corresponding to its own ID information in the information table AT, then the record corresponding to its own ID information in the information table AT will be updated, that is, the Hop Count field of the record will be updated; finally, the node will increment the Hop Count field in the message packet by one and forward it to its neighboring nodes.
[0082] If the received message data packet does not meet the above two criteria, the node will discard the message data packet.
[0083] Once a node in a wireless sensor network has received message data packets from all anchor nodes, the message data packet forwarding process ends. This process can be specifically implemented as follows: Figure 8 The process is shown below.
[0084] Through the process of flooding anchor node information, all nodes in the network, including anchor nodes and unknown nodes, record the positions of all anchor nodes in the network and the minimum hop count between the node itself and the anchor nodes in their anchor node information tables.
[0085] In this embodiment, a graph structure can be used to represent the connectivity information between nodes in a wireless sensor network. First, the node numbers that can communicate directly are used as the source and target endpoints of the edges, thus constructing graph data from the topological network structure. For non-range localization algorithms, in the process of locating unknown nodes, besides the hop count between the unknown node and the anchor node, the only usable information is the known location information of the anchor nodes in the network. Therefore, the minimum hop count between nodes is used as a feature, and the coordinates of the anchor nodes are used as labels for semi-supervised training of the graph convolutional neural network. In semi-supervised learning, it is generally necessary to make full use of a small number of labeled samples and a large number of unlabeled samples. Assume that the labels of M samples in the dataset are known, while the labels of NM samples are unknown, i.e., {x m ,y m}, m=1,2,…,M and {x n}, n=M+1,…,N.
[0086] After obtaining the above information, the features and labels of the input graph convolutional neural network are normalized, scaling the values of the features and labels to [0,1]. Specifically, the maximum absolute value of the feature and label values is scaled proportionally to a unit size. Normalization has two advantages: first, it accelerates gradient descent, thus improving the convergence speed of the graph convolutional neural network; second, it improves the accuracy of the graph convolutional neural network.
[0087] This embodiment constructs a graph convolutional neural network (GCN), which is a convolutional neural network that operates on graph structures. Currently, most graph neural network models share a common architecture. These are called graph convolutional neural networks (GCNs). GCNs are convolutional because filter parameters can be shared across all locations in the graph or at a local location. The goal of GCNs is to learn a mapping of signals or features on a graph G = (V, E). Their inputs include: the feature description x for each node i. i The feature description of a graph structure can be written as an N*D feature matrix (where N represents the number of nodes and D represents the number of input features), typically in the form of an adjacency matrix (or other forms). The convolutional neural network produces a node-level output Z (an N*F feature matrix, where F represents the number of output features for each node). Each neural network layer can be written as a non-linear function: H (l+1) =f(H(l) A).
[0088] Here, H (0) =X and H (L) =Z (Z can also be used as a graph-level output), L is the number of layers. The key to this convolutional neural network lies in how f(·,·) is chosen and parameterized. As an example, consider the following simple single-layer forward propagation form: f(H (l) ,A)=σ(AH (l) W (l) Here, W is the parameter matrix of the l-layer neural network, and σ(·) is a non-linear activation function such as ReLU. We can see two limitations of convolutional neural networks: First, multiplying by A means that for each node, the feature vectors of its neighboring nodes are integrated, but the node itself is not included (in case of self-loops in the graph). Therefore, this problem can be solved by forcibly adding self-loops to the graph, that is, by adding an identity matrix to matrix A.
[0089] The second limitation is that A is usually unnormalized, so multiplying by A will completely change the scale of the eigenvectors (this can be understood by looking at the eigenvalues of A). Normalization makes the sum of the rows of A equal to 1, such as D. -1 A, where D is a diagonal matrix representing the degree of nodes, thus solving the problem. Then, with D... -1 Multiplying A is essentially averaging the features of neighboring nodes. In practice, when using symmetric normalization, for example... Combining these two techniques essentially yields the final (single-layer) form of a graph convolutional neural network:
[0090]
[0091] In the formula: I is the identity matrix; H is the feature of each layer; σ is the nonlinear activation function; yes The degree matrix is expressed by the formula:
[0092]
[0093] After normalizing and preprocessing the features and labels using the steps above, a graph convolutional neural network can be constructed as follows: First, a two-layer graph convolutional neural network is defined, where the input dimension is the total number of nodes (because the feature input is the adjacency matrix of the nodes), the hidden layer dimension is set to 16, and the last layer of the graph convolutional neural network transforms the output dimension into a two-dimensional coordinate dimension of 2; the activation function used is ReLU, which refers to the ramp function in mathematics, and its specific form is as follows:
[0094] φ(x)=max(0,x) (3)
[0095] The RuLU function, as the activation function of a neuron, provides the neuron with the ability to activate under linear transformation W. T The non-linear output result after X+b; in other words, for the input vector x from the previous layer of the neural network entering the neuron, the neuron using the ReLU function will output max(0, W). T X+b) is passed to the next layer of neurons or used as the output of the entire neural network.
[0096] In a specific embodiment, semi-supervised training of the graph convolutional neural network is performed as follows: the normalized root mean square error (RMSE), which is the average localization error of the evaluation localization algorithm, is used as the loss function to train the graph convolutional neural network. The expression for the normalized root mean square error is as follows:
[0097]
[0098] Then, the training results are denormalized according to the relationship between normalization and denormalization in Table 1 below.
[0099] Table 1: Relationship between normalization and denormalization
[0100]
[0101] The graph convolutional neural network described in this embodiment trains the mapping relationship between hop count and coordinates, so the position of unknown nodes can be directly obtained after normalization.
[0102] To verify the effectiveness of the node localization method for wireless sensor networks in this invention, simulation experiments were conducted. The experimental environment consisted of a Core™ i5-10210U CPU, 16GB of RAM, Windows 10 operating system, and Python programming. Specific experimental parameters were set as follows: First, a network containing 300 nodes was generated within a 100m × 100m square area. In the simulation analysis, two variables were considered: the node density and the number of anchor nodes. The number of anchor nodes ranged from 10 to 50, and the node density ranged from 0.01 to 0.03. For a network containing N nodes, the node density λ was defined as the number of nodes per unit area in the network monitoring region A.
[0103]
[0104] Furthermore, the experiment will simulate three anisotropic network models: a uniform network, a network with O-shaped covering holes, and a network with S-shaped covering holes. In a uniform network, there are no covering holes, and the nodes are uniformly distributed throughout the network. Schematic diagrams of the three networks are shown below. Figure 9 , Figure 10 and Figure 11 As shown.
[0105] To evaluate the effectiveness of this invention, we introduce the normalized root mean square error (NRMSE) of positioning accuracy to evaluate the performance of the algorithm. The specific calculation method of the performance index is shown in formula (4).
[0106] Figure 12 This invention demonstrates that... Figure 9 In the simple square-shaped network shown, the positioning performance of the present invention is improved as the node density increases. For example... Figure 12 As shown, although the NRMSE curves of each algorithm fluctuate, except for the SM algorithm, the errors of other algorithms decrease with increasing node density. This is because most range-free localization algorithms are based on hops or hop counts. As node density increases, the connectivity between nodes increases. When using the hop distance of a piecewise linear structure to approximate the straight-line distance, the discount rate decreases with higher node density. Relay nodes in multi-hop transmission paths are more likely to fall on the line connecting the source and target nodes, causing the hop count between nodes to approach its lower bound, thus reducing error. SM is a localization algorithm proposed for anisotropic networks, so its trend is relatively gentle in uniform networks. GCN is a deep learning model used to process graph data structures. When node density increases, the amount of graph data available to GCN increases, allowing the model to better perform its function. Figure 12 As shown, regardless of density variations, the positioning error of this invention remains lower than that of all other algorithms, and consistently below 0.4R.
[0107] Figure 13 This invention demonstrates that... Figure 10 The localization performance of the S-shaped complex network varies with node density, as shown. Figure 13It is evident that in S-shaped networks, the fluctuations of various algorithms with changes in node density are not significant, but overall, the positioning error decreases as node density increases. SM is an algorithm suitable for anisotropic networks, thus exhibiting clear advantages and stable performance in complex S-shaped networks. In contrast, other algorithms besides the proposed one have errors as high as 0.9R or even higher. Due to two coverage gaps in S-shaped networks, significant detours occur in multi-hop communication paths between nodes, impacting the performance of positioning algorithms based on geometric constraints or hop counts. Algorithms like RANN have errors approaching R, rendering the positioning results unusable. This invention performs excellently even in extremely complex S-shaped networks, consistently exhibiting lower errors than other algorithms within the examined node density range, reaching as low as 0.2R. Compared to the better-performing SM algorithm, the positioning accuracy is improved by up to 45.9%. In conclusion, this invention demonstrates significant advantages in both simple uniform networks and complex S-shaped networks, indicating its strong universality.
[0108] Figure 14 This invention demonstrates that... Figure 11 The localization performance of the O-shaped complex network varies with node density. From... Figure 14 As can be seen, the overall trend of the broken line in the O-type network is roughly the same as that in the Square-type network. That is, except for the SM algorithm, the errors of the other algorithms decrease with increasing node density. The LAEP algorithm has a large error at low node density because it is based on mathematical analysis, and its performance is easily affected by parameters such as node density and communication radius, resulting in unstable performance. In contrast, this invention exhibits excellent performance even at node densities as low as 0.01, and its maximum positioning error is smaller than that of other algorithms, fully demonstrating its significant advantage. Compared to the uniform network, the errors of all algorithms increase. This is because in the O-type network, the existence of gaps in the coverage area causes detours in the paths between nodes, leading to varying degrees of increase in the positioning error of most algorithms. Compared to the Square-type network, the DV-maxHop algorithm has a more significant advantage over the DV-Hop algorithm in the O-type network because the DV-maxHop algorithm sets a hop count threshold, ensuring that unknown nodes can only receive information from the nearest anchor node, thus mitigating the impact of coverage gaps to some extent.
[0109] Figure 15 This invention demonstrates that... Figure 9 In the simple Square-shaped network shown, the positioning performance of the proposed scheme increases with the number of anchor nodes. For example... Figure 15 As shown, in a square network, the positioning performance of this invention is still superior to all compared algorithms, and its positioning error is much lower than other algorithms. Figure 15As shown, with the increase in the number of anchor nodes, more anchor nodes participate in the localization process of the unknown node, thus providing more orientation information. Therefore, the localization error of all comparison algorithms decreases with the increase in the number of anchor nodes. In this network, the SM algorithm performs similarly to that in the O-shaped network, but the localization accuracy of the DV-Hop, LAEP, and DV-maxHop algorithms is improved compared to the topology network with coverage gaps. Obviously, the RANN algorithm has a significant improvement over the above comparison algorithms in the Square-shaped network. When the number of anchor nodes is greater than 35, its localization error is less than 0.3R. This is because the RANN algorithm is a localization algorithm that combines geometric constraints and neural networks. This algorithm improves localization accuracy by correcting the estimated distance to reduce the interference of anisotropic signal attenuation on distance estimation.
[0110] Figure 16 This invention demonstrates that... Figure 10 The localization performance in the S-shaped complex network varies with the number of anchor nodes. In the S-shaped network, the localization errors of the DV-Hop algorithm and the present invention do not change significantly with the increase of the number of anchor nodes. The localization errors of other algorithms decrease with the increase of the number of anchor nodes, but the change is slow. Compared with the experimental results of O-shaped and Square-shaped networks with varying numbers of anchor nodes, the localization errors of other algorithms, except for the present invention, increase to varying degrees. The reason is that hop-distance-based non-range localization algorithms rely on multi-hop communication links between nodes, while in the S-shaped network, the communication links will have a large detour, which reduces the accuracy of distance estimation between nodes, resulting in a large error in the localization stage. Among them, the average localization accuracy of the LAEP algorithm, RANN algorithm, and DV-Hop algorithm in this network all show a significant deterioration, and the localization errors of these algorithms are close to or exceed 0.9R, indicating that they cannot work in this network. Figure 16 As can be seen, the present invention maintains excellent performance in complex S-shaped topology networks, and the present invention is not sensitive to changes in the number of anchor nodes. As the number of anchor nodes increases, the positioning error of the present invention remains around 0.2R. This is because deep neural network models are mainly sensitive to the amount of data. Therefore, when the node density remains unchanged, that is, when the total number of nodes remains unchanged, the performance of the present invention is stable.
[0111] Figure 17 This invention demonstrates that... Figure 11The localization performance of the O-shaped complex network varies with the number of anchor nodes. In the O-shaped network, except for this invention, the localization error of all algorithms decreases with the increase of the number of anchor nodes, but the decreasing trend is relatively gradual. When the number of anchor nodes is greater than 15, the SM algorithm shows a significant performance improvement. This is because this algorithm selects anchor nodes at unknown nodes and then uses the selected anchor node set for localization; as the number of anchor nodes increases, the available information increases. The localization error of this invention remains basically around 0.2R. Even when the number of anchor nodes is only 10, this invention still has good performance, indicating its strong economic applicability. Both the RANN algorithm and this invention use neural network models, but this invention improves the localization accuracy by an average of 51.5% compared to the RANN algorithm.
[0112] Example 2
[0113] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements any node localization method based on a graph convolutional neural network.
[0114] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0115] Example 3
[0116] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any node localization method based on a graph convolutional neural network.
[0117] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0118] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the claims of the present invention.
Claims
1. A node localization method based on graph convolutional neural networks, characterized in that: The method includes the following steps: S1: Through anchor node information flooding, all nodes in the wireless sensor network record the coordinates of all anchor nodes and the minimum hop count between the node and the anchor nodes in their anchor node information table. S2: Construct graph data from the topology of the wireless sensor network, and use the minimum hop count between the node itself and the anchor node as features, and the coordinates of the anchor node as labels. Normalize the features and labels respectively, and scale the values of the features and labels to the unit size respectively. S3: Semi-supervised training of the graph convolutional neural network is performed using normalized features and labels; S4: Based on the mapping relationship between normalization and denormalization, the training results are denormalized, and the position of the unknown node is directly obtained after denormalization; in, All nodes in a wireless sensor network, including anchor nodes and unknown nodes, need to establish and maintain an anchor node information table AT in memory to store the collected anchor node information. The length of the information table AT is equal to the number of anchor nodes in the wireless sensor network. Furthermore, the aforementioned anchor node information flooding is as follows: Once the wireless sensor network is deployed, the anchor nodes in the wireless sensor network, after receiving the positioning command from the control center, begin to broadcast Message data packets containing three fields: their own ID information, location information, and Hop Count. After receiving a Message data packet sent by the anchor node, all nodes, including anchor nodes and unknown nodes, need to check whether their own ID information in the Message data packet exists in the information table AT they maintain. Additionally, if the ID information in the Message packet does not exist in the information table AT maintained by the node, the node saves the information in the Message packet, namely the three fields, into its information table AT, increments the Hop Count field in the Message packet by one, and forwards it to its neighboring nodes. If the node's own ID information exists in the information table AT maintained by the node, and the Hop Count field in the message packet is less than the Hop Count field of the record corresponding to its own ID information in the information table AT, then the record corresponding to its own ID information in the information table AT will be updated, that is, the Hop Count field of the record will be updated; finally, the node will increment the Hop Count field in the message packet by one and forward it to its neighboring nodes. If the received message data packet does not meet the above two criteria, the node will discard the message data packet.
2. The node localization method based on graph convolutional neural networks according to claim 1, characterized in that: The normalization described herein specifically uses the maximum absolute value of the feature and label values to scale to a unit size.
3. The node localization method based on graph convolutional neural networks according to claim 1, characterized in that: When symmetric normalization is used, the final single-layer form of the graph convolutional neural network is obtained: In the formula: i is the identity matrix; H represents the feature of each layer; σ is a non-linear activation function; yes The degree matrix is expressed by the formula:
4. The node localization method based on graph convolutional neural networks according to claim 3, characterized in that: The specific steps for constructing a graph convolutional neural network are as follows: First, define a two-layer graph convolutional neural network, where the input dimension is the total number of nodes, the hidden layer dimension is set to 16, and the last layer of the graph convolutional neural network transforms the output dimension into a two-dimensional coordinate dimension of 2; the activation function used is ReLU, which refers to the ramp function in mathematics, and its specific form is as follows: φ(x)=max(0,x) (3) The ReLU function, as the activation function of a neuron, provides the neuron with the ability to activate under linear transformation W. T The non-linear output result after X+b; in other words, for the input vector x from the previous layer of the neural network entering the neuron, the neuron using the ReLU function will output max(0, W). T X+b) is passed to the next layer of neurons or used as the output of the entire neural network.
5. The node localization method based on graph convolutional neural networks according to claim 4, characterized in that: The semi-supervised training of the graph convolutional neural network is as follows: the normalized root mean square error of the average localization error of the evaluation localization algorithm is used as the loss function to train the graph convolutional neural network.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Polynomial approximation differential evolution node positioning method
CN113365371A
Method and device for deducing rainstorm peak position, medium and equipment
CN113435661A