Wireless sensor network positioning method and system

By adopting gravitational field-based collaborative optimization algorithms and machine learning technology in wireless sensor networks, the problem of difficulty in taking into account the accuracy, efficiency and energy consumption in complex scenarios is solved, and the positioning effect of high precision, real-time and robustness is achieved.

CN119729770AInactive Publication Date: 2025-03-28MUDANJIANG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411952512.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing wireless sensor network positioning methods are difficult to meet the comprehensive requirements of accuracy, efficiency and energy consumption in complex scenarios. Especially in big data environments, the scale of sensor nodes is growing rapidly, requiring higher real-time and robustness.

Method used

A collaborative optimization algorithm based on gravitational field is adopted to establish a gravitational field model through communication signal strength, path confidence and environmental data between sensor nodes, and the relative position of sensor nodes is calculated using gradients, synergistic effects between multiple target sensor nodes, correct the position error of a single sensor node, and achieve high-precision positioning. Combining machine learning algorithms to analyze data in real time, predict topological changes, and dynamically adjust gravitational field parameters to optimize the routing algorithm transmission positioning results.

Benefits of technology

It realizes high-precision positioning of the sensor node group, improves the real-time and robustness of positioning, reduces energy consumption, extends network life, and meets the efficient communication needs of large-scale wireless sensor networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729770A_ABST
    Figure CN119729770A_ABST
Patent Text Reader

Abstract

The invention discloses a wireless sensor network positioning method and system, and particularly relates to the technical field of sensor network positioning. Parameters such as signal strength and path confidence of sensor nodes are acquired through network initialization, and a network topology structure is established; a gravitational field model is constructed based on a gravitational field collaborative optimization algorithm, and a single sensor node error is corrected by using gradient calculation and a multi-sensor node collaborative effect, so that high-precision positioning of a sensor node group is realized; a machine learning algorithm is combined to dynamically predict network topology changes, gravitational field parameters are adjusted in real time, the real-time performance and robustness of positioning are improved, a positioning result is reliably transmitted to a data processing terminal through an optimized routing algorithm, and data are processed and output through extraction, conversion and loading technologies. The defects of neglect of a multi-sensor node synergistic effect and high energy consumption in a traditional method are effectively overcome, the positioning precision, the energy consumption efficiency and the real-time response capability are remarkably improved, and the complex scene requirements of disaster monitoring, battlefield monitoring and the like are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sensor network positioning, and in particular to a wireless sensor network positioning method and system. Background Art

[0002] Wireless sensor network (WSN) is a self-organizing network composed of many small, low-power sensor nodes, which is widely used in environmental monitoring, agricultural production, intelligent transportation, military reconnaissance and other fields. In these applications, the location information of sensor nodes is the key to data validity and system function realization. However, the current commonly used positioning methods, such as those based on signal strength (RSSI), arrival time (TOA / TDOA) and arrival angle (AOA), usually face problems such as signal multipath interference, dynamic environmental changes and high computational complexity, and it is difficult to meet the comprehensive requirements of accuracy, efficiency and energy consumption in complex scenarios. Especially in the big data environment, the amount of data and the scale of sensor nodes are growing rapidly, which puts forward higher real-time and robustness requirements for wireless sensor network positioning technology.

[0003] The prior art has the following deficiencies: In wireless sensor networks, the dynamic positioning of multi-target sensor nodes needs to consider the interdependence between sensor nodes and changes in the external environment. Traditional positioning methods are mostly optimized based on a single sensor node, ignoring the synergy between multiple sensor nodes. In practical applications, such as disaster monitoring or battlefield monitoring, multiple sensor nodes need to collaborate to complete target area coverage and real-time monitoring. The positioning deviation of a single sensor node may cause a decrease in the overall monitoring accuracy. In addition, high-precision positioning algorithms often require a lot of calculations and communications, resulting in increased energy consumption, which is not conducive to the long-term operation of wireless sensor nodes. Summary of the invention

[0004] The purpose of the present invention is to provide a wireless sensor network positioning method and system to solve the shortcomings of the background technology.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a wireless sensor network positioning method, comprising the following steps: S1: The control center issues an initialization command to initialize the wireless sensor network, deploy sensor nodes, collect environmental data and initial signal characteristic parameters of the sensor nodes, and establish a network topology structure; the initial signal characteristic parameters include signal strength and path confidence; S2: The control center uses a collaborative optimization algorithm based on the gravitational field to establish a gravitational field model through the communication signal strength, path confidence and environmental data between sensor nodes; S3: Using the gravitational field model, the relative positions of sensor nodes are calculated through gradients, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; S4: The control center combines machine learning algorithms to analyze the real-time data of sensor nodes in the network, predict network topology changes, and dynamically adjust the gravitational field parameters; S5: The control center sends the positioning results to the data processing terminal through the optimized routing algorithm; S6: At the data processing terminal, the control center uses extraction, conversion, and loading technology to process the transmitted final positioning results, extract the exact location of the sensor node, and output it to the control center.

[0006] Preferably, in S2, a collaborative optimization algorithm based on a gravitational field is used to establish a gravitational field model through the communication signal strength, path confidence and environmental data between sensor nodes, specifically: In the gravitational field model, each sensor node is regarded as an entity with mass, and its gravitational force is determined by the signal strength, path confidence and environmental data adaptability of the sensor node. The gravitational relationship between adjacent sensor nodes is expressed by the model as follows: ;in, is the gravitational field strength between sensor node i and sensor node j; G is the gravitational constant; is the quality of sensor node i, which is determined by the signal strength and the residual energy; is the square of the distance between sensor node i and sensor node j; is the path confidence coefficient between sensor node i and sensor node j; The quality of a sensor node represents the strength of the sensor node's attraction, which depends on the signal strength and the remaining energy. The formula is: ; In the formula, is the signal strength of sensor node i, is the residual energy of sensor node i; α, β are weight factors.

[0007] Preferably, in S3, the relative positions of the sensor nodes are calculated by gradient, the synergy between the multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved, specifically: Calculate the gravitational field gradient at each sensor node , the formula is: ; In the formula, is the partial derivative of the gravitational field F in the x-direction, which indicates the rate of change of the gravitational field intensity along the x-direction. The calculation expression is: ;in is the set of neighboring sensor nodes connected to sensor node i; is the partial derivative of the gravitational field F in the y-direction, which indicates the rate of change of the gravitational field intensity along the y-direction. The expression is: ; The position of the sensor node is adjusted according to the gravitational field gradient, and the update formula is: , ;in, , is the position coordinate of sensor node i at the tth iteration, , is the updated coordinate of sensor node i; η is the learning rate, which controls the step size of position adjustment.

[0008] Preferably, in S3, the synergistic effect of multi-target sensor nodes is integrated to perform global optimization: The total gravitational field of all sensor nodes Defined as: ; The position adjustment of the sensor node group needs to consider the overall objective function L, which is expressed as: ;in, represents the total strength of the network’s gravitational field, is the penalty term for position deviation, which reduces the over-dispersion of sensor nodes; λ is the weight factor, which balances the gravitational field strength and the uniformity of sensor node distribution; Optimize the position of the sensor node group by gradient descent method: ; In the collaborative positioning process, the error correction of a single sensor node is completed through the feedback information of neighboring sensor nodes, and the expression is: ; ; Correct the value and The error is then adjusted to the current sensor node position. The iterative process continues until the position change of all sensor nodes is less than the threshold. , the expression is: .

[0009] Preferably, in S4, the real-time data of sensor nodes in the network are analyzed in combination with a machine learning algorithm, network topology changes are predicted, and gravitational field parameters are dynamically adjusted, specifically: The real-time data is converted into an input feature vector of the machine learning model; the input feature vector ; Use LSTM long short-term memory network to predict signal changes and predict network topology changes: The real-time data specifically includes: residual energy , signal strength , signal-to-noise ratio SNR and variance Var(SNR), packet loss rate , the distance between sensor nodes , the number of neighbor sensor nodes and path reliability ; Input time series features , predict the signal strength and path confidence at the next moment, the expression is: in, is the predicted signal strength of sensor node i at time t+1; is the path confidence prediction value of sensor node i and sensor node j.

[0010] Preferably, the gravitational field model parameters are dynamically adjusted according to the prediction results, specifically including: Adjust the gravitational constant G: The gravitational constant G represents the overall strength of the gravitational field and is adjusted based on the sensor node density, signal strength distribution, and path confidence: ;in, Indicates the rate of change of signal strength; represents the rate of change of path confidence; α, β are adjustment factors used to balance the impact of signal and confidence on G; Update path confidence , based on the predicted path confidence, correct the current path parameters: ;in, is the weight factor of packet loss rate; Adjust sensor node quality , recalculate the sensor node quality by combining the predicted remaining energy and signal strength: ; The adjusted gravitational field model is calculated with new parameters, and the gravitational gradient and position are recalculated using the following formula: Recalculate the gravitational gradient, the expression is: ; ; Update the sensor node position according to the adjusted gradient, the expression is: ; .

[0011] Preferably, in S5, the positioning result is sent to the data processing terminal through an optimized routing algorithm, specifically: In the initialization phase, each sensor node uses the signal strength RSSI and path confidence Establish connections with neighboring sensor nodes and generate a neighbor table, which contains: neighboring sensor node ID, distance between sensor nodes , path confidence and the remaining energy of neighbor sensor nodes; Use the gravitational field-based optimization routing algorithm to select the optimal path and calculate the comprehensive score : ;in: is the path confidence between sensor node i and sensor node j, reflecting the reliability of the path. is the residual energy of sensor node j, is the maximum residual energy of the sensor nodes in the network, is the distance between sensor node i and sensor node j, representing the communication cost; q, p and k are weight factors respectively; The path with the highest score is selected from the neighbor table as the next hop. The data packet starts from the source sensor node and is forwarded hop by hop along the path with the highest score to the gateway sensor node. If the path is interrupted due to sensor node failure or channel interference, the routing algorithm dynamically reselects a new optimal path.

[0012] The present invention also provides a wireless sensor network positioning system, including a network initialization module, a gravitational field modeling module, a high-precision positioning module, a dynamic adjustment and prediction module, an optimization routing module and a data processing and output module: Network initialization module: initializes the wireless sensor network, deploys sensor nodes, collects environmental data and initial signal characteristic parameters of sensor nodes, the initial signal characteristic parameters include signal strength and path confidence, and establishes network topology; Gravitational field modeling module: Using the collaborative optimization algorithm based on the gravitational field, the gravitational field model is established through the communication signal strength, path confidence and environmental data between sensor nodes; High-precision positioning module: Using the gravitational field model, the relative position of sensor nodes is calculated through gradient, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; Dynamic adjustment and prediction module: Combines machine learning algorithms to analyze real-time data of sensor nodes in the network, predicts changes in network topology, and dynamically adjusts gravitational field parameters to improve real-time positioning. Optimized routing module: sends the positioning results to the data processing terminal through the optimized routing algorithm; Data processing and output module: In the data processing terminal, the extraction, conversion and loading techniques are used to process the transmitted data, extract the accurate location of the sensor node, and output it to the control center.

[0013] In the above technical solution, the technical effects and advantages provided by the present invention are: 1. The present invention overcomes the shortcomings of traditional wireless sensor network positioning methods by combining the gravitational field collaborative optimization algorithm with machine learning technology. In the gravitational field model, the communication signal strength, path confidence and environmental characteristics of each sensor node are used to dynamically construct the gravitational field of the network. Based on gradient calculation and collaborative optimization, the positioning algorithm can correct the position error of a single sensor node and achieve high-precision positioning of a group of sensor nodes. In addition, the machine learning algorithm is combined to analyze the data of network sensor nodes in real time, predict topological changes and dynamically adjust gravitational field parameters, so that the system can adapt to complex dynamic scenarios and improve the real-time and robustness of positioning. At the same time, by optimizing the routing algorithm, the positioning results are transmitted to the data processing terminal in an efficient and low-energy manner, meeting the efficient communication needs of large-scale wireless sensor networks.

[0014] 2. The present invention can not only accurately process the relative positions of sensor nodes in complex environments, but also effectively reduce energy consumption and extend network life by dynamically adjusting the gravitational field model and routing algorithm. At the same time, the data processing terminal uses extraction, conversion, and loading technology to efficiently process and accurately extract positioning data, and the output sensor node position can provide accurate real-time support for the control center. The overall system has achieved significant improvements in accuracy, real-time performance, energy efficiency, and adaptability, and is suitable for various dynamic and complex practical application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0016] Figure 1 The figure is a flow chart of the method of the present invention.

[0017] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Example 1, please refer to Figure 1 and Figure 2As shown, the wireless sensor network positioning method described in this embodiment includes the following steps: S1: Initialize the wireless sensor network, deploy sensor nodes, collect environmental data and initial signal characteristic parameters of the sensor nodes, the initial signal characteristic parameters include signal strength and path confidence, and establish a network topology structure; S2: Using the collaborative optimization algorithm based on the gravitational field, a gravitational field model is established through the communication signal strength, path confidence and environmental data between sensor nodes; S3: Using the gravitational field model, the relative positions of sensor nodes are calculated through gradients, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; S4: Combine machine learning algorithms to analyze real-time data of sensor nodes in the network, predict network topology changes, and dynamically adjust gravitational field parameters to improve the real-time performance of positioning; S5: Send the positioning result to the data processing terminal through the optimized routing algorithm; S6: At the data processing terminal, the transmitted data is processed using extraction, conversion, and loading techniques to extract the exact location of the sensor node and output it to the control center.

[0020] In S1, the wireless sensor network is initialized, sensor nodes are deployed, environmental data and initial signal characteristic parameters of the sensor nodes are collected, the initial signal characteristic parameters include signal strength and path confidence, and the network topology is established, specifically: The initialization of a wired sensor network (WSN) is a basic step in the implementation of positioning methods, which aims to complete the reasonable deployment of sensor nodes, collect initial signal characteristic parameters and environmental data, and establish the network topology based on this information. The quality of initialization directly affects the performance of the network, including positioning accuracy, energy consumption balance, and data transmission efficiency.

[0021] The deployment mode of sensor nodes is determined by the application requirements and the characteristics of the target area, and is mainly divided into the following forms: Random deployment: Often used in areas where manual deployment is difficult (such as disaster monitoring scenarios), sensor nodes are randomly distributed through airdrops or placements.

[0022] Regular deployment: In more regular scenarios (such as agricultural production monitoring or infrastructure status monitoring), regular layout methods such as grid and honeycomb are adopted to achieve uniform coverage of sensor nodes.

[0023] Hybrid deployment: Combining the advantages of random and regular deployment, sensor nodes are deployed in a hierarchical manner, with high-precision sensor nodes used in key areas and ordinary sensor nodes used in edge areas.

[0024] After the sensor nodes are deployed, each sensor node begins to collect environmental data around it, including: physical characteristics: environmental characteristics such as temperature, humidity, and air pressure; channel characteristics: multipath interference and noise intensity in the signal propagation path; sensor node energy consumption status: remaining power and energy consumption rate, which are used for subsequent routing and energy consumption optimization.

[0025] The following signal characteristic parameters need to be measured between each sensor node and its neighboring sensor nodes: Signal strength (RSSI): records the received signal power, used to estimate the distance between sensor nodes and reflect the signal attenuation characteristics; Path confidence: Evaluates the reliability of the path between sensor nodes, taking into account the volatility of signal strength, the stability of the communication link, and the historical transmission success rate. Path confidence is expressed as: ;in, is the number of packets successfully transmitted, is the total number of packets sent, SNR is the signal-to-noise ratio, and Var(SNR) is the variance of the signal-to-noise ratio.

[0026] According to the collected sensor node environmental data and signal characteristic parameters, the topology of the wireless sensor network is established: according to the physical distance, signal strength and path confidence between sensor nodes, determine whether there is a communication link between sensor nodes; construct a star, tree or mesh topology, and select the appropriate structure according to the actual application scenario; generate a neighbor table for each sensor node, record the sensor nodes that directly communicate with it and the corresponding signal characteristic parameters; based on the path confidence and energy consumption between sensor nodes, calculate the weight of the path as a reference for subsequent routing algorithms. Ensure that all sensor nodes can be connected to the network gateway directly or in multiple hops. Use path confidence to filter reliable communication paths, remove inefficient or high-energy consumption paths, and improve the overall performance of the network. Verify whether the network covers the target monitoring area. If there are blind spots, add sensor nodes or adjust the positions of sensor nodes to supplement coverage.

[0027] After completing the network initialization, the location information, neighbor table, path confidence matrix and network topology of the sensor nodes are output to provide basic information for the positioning algorithm and subsequent data processing.

[0028] S2: Using the collaborative optimization algorithm based on the gravitational field, a gravitational field model is established through the communication signal strength, path confidence and environmental data between sensor nodes.

[0029] In the gravitational field model, each sensor node is regarded as an entity with mass, and its gravitational force is determined by the signal strength, path confidence and environmental adaptability of the sensor node. The gravitational relationship between adjacent sensor nodes is expressed as: ;in, is the gravitational field strength between sensor nodes i and j; G is the gravitational constant, which can be adjusted according to the network size and density; is the quality of the sensor node, which is determined by the signal strength and the remaining energy; is the square of the distance between sensor nodes; is the path confidence coefficient.

[0030] The quality of a sensor node represents its attractiveness strength, which depends on the signal strength and the residual energy, and the formula is: ; In the formula, is the signal strength of sensor node i, is the residual energy of sensor node i; α, β are weight factors, which balance the impact of signal strength and energy on quality according to actual needs.

[0031] Calculate the gravitational strength between each sensor node , and distributes it in the two-dimensional or three-dimensional space of the entire network to form a gravitational field map. The stronger the gravitational path, the higher the communication quality between sensor nodes, and it is preferred for data transmission. Sensor nodes at the edge of the network are subject to weaker gravitational force, and redundant mechanisms need to be considered to compensate for communication performance.

[0032] S3: Using the gravitational field model, the relative positions of sensor nodes are calculated through gradients, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved.

[0033] Calculate the gravitational field gradient at each sensor node , the formula is: ; In the formula, is the partial derivative of the gravitational field F in the x-direction, which represents the rate of change of the gravitational field intensity along the x-direction. >0, the gravitational field strength F increases with the x-coordinate; if <0, then F decreases as the x-coordinate increases. It is used to adjust the position of the sensor node in the x-direction so that it moves in the direction with a stronger gravitational field. The calculation expression is: ;in is the set of neighboring sensor nodes connected to sensor node i; is the partial derivative of the gravitational field F in the y-direction, indicating the rate of change of the gravitational field intensity along the y-direction. The gravitational field gradient indicates the position change trend of the sensor node in the gravitational field. The relative position of the sensor node is corrected using the gradient information to ensure positioning accuracy. The expression is: .

[0034] The position of the sensor node is adjusted according to the gravitational field gradient, and the update formula is: , ;in, , is the position coordinate of sensor node i at the tth iteration, , is the updated coordinate of sensor node i; η is the learning rate, which controls the step size of position adjustment. Through multiple iterations, the position of the sensor node gradually converges to the equilibrium point of the gravitational field.

[0035] In wireless sensor networks, the position adjustment of a single sensor node may affect the positioning accuracy of the entire network, so it is necessary to integrate the synergy effect of multiple target sensor nodes and perform global optimization. The synergy effect is reflected in the following two aspects: The total gravitational field of all sensor nodes Defined as: ; The goal is to optimize , so that it can be maximized while satisfying the network connectivity constraints. The position adjustment of the sensor node group needs to consider the overall objective function L, which is expressed as: ;in, Represents the total strength of the network's gravitational field, the larger the better, is the penalty term for position deviation, which reduces the over-dispersion of sensor nodes; λ is the weight factor, which balances the gravitational field strength and the uniformity of sensor node distribution.

[0036] Optimize the position of the sensor node group by gradient descent method: ; After multiple rounds of iterations, the position of the sensor node group gradually stabilizes, achieving a global optimization effect.

[0037] In the collaborative positioning process, the error correction of a single sensor node is completed through the feedback information of neighboring sensor nodes, and the expression is: ; ; Correct the value and The error is then adjusted automatically. The iteration process continues until the position change of all sensor nodes is less than the threshold. , the expression is: .

[0038] S4: Combine machine learning algorithms to analyze the real-time data of sensor nodes in the network, predict network topology changes, and dynamically adjust gravitational field parameters to improve the real-time performance of positioning.

[0039] In wireless sensor networks, real-time data specifically includes: remaining energy , signal strength , signal-to-noise ratio SNR and its variance Var(SNR), packet loss rate , the distance between sensor nodes , the number of neighbor sensor nodes and path reliability ; Convert the data into the input feature vector of the machine learning model: ; Use LSTM long short-term memory network to predict signal changes and predict network topology changes: Input time series features (the sensor node status of the past k time steps), predict the signal strength and path confidence at the next moment, the expression is: in, is the predicted signal strength of sensor node i at time t+1; is the path confidence prediction value of sensor nodes i and j.

[0040] Dynamically adjust the gravitational field model parameters according to the prediction results, including: Adjust the gravitational constant G: The gravitational constant G represents the overall strength of the gravitational field and is adjusted according to the sensor node density, signal strength distribution and path confidence: ;in, Indicates the rate of change of signal strength; represents the rate of change of path confidence; α, β are adjustment factors used to balance the impact of signal and confidence on G.

[0041] Update path confidence , based on the predicted path confidence, correct the current path parameters: ;in, is the weight factor of the packet loss rate; adjust the sensor node quality , recalculate the sensor node quality by combining the predicted remaining energy and signal strength: The adjusted gravitational field model is calculated with new parameters, and the gravitational gradient and position are recalculated using the following formula: The gravitational gradient is recalculated as: ; ; Update the sensor node position according to the adjusted gradient, the expression is: ; .

[0042] S5: Send the positioning result to the data processing terminal through the optimized routing algorithm.

[0043] Each sensor node determines its own position coordinates (such as x, y) under the guidance of the positioning algorithm, and packages the positioning results and other perception data (such as signal strength, energy status, etc.) into a data packet, forming the following structure: sensor node ID: identifies the sending sensor node of the data packet; positioning coordinates: the calculated position of the sensor node (x, y); status information: signal strength, remaining energy, path confidence, etc.; timestamp: data generation time, used to ensure the timeliness of the data. These data need to be sent to the data processing terminal through routing for centralized processing.

[0044] When transmitting positioning results, the optimization goals of the routing algorithm include: minimizing energy consumption: giving priority to paths with lower energy consumption to extend network life; load balancing: avoiding overload of specific sensor nodes and evenly distributing the communication burden within the network; path reliability: selecting routes with high stability through path confidence (such as signal quality); low latency: ensuring that positioning data can reach the terminal quickly to meet real-time requirements.

[0045] In the initialization phase, each sensor node uses the signal strength RSSI and path confidence Establish connections with neighboring sensor nodes and generate a neighbor table, including: neighboring sensor node ID, distance between sensor nodes , path confidence ; The remaining energy of neighbor sensor nodes. This neighbor table provides basic data for routing selection.

[0046] Use the gravitational field-based optimization routing algorithm to select the optimal path and calculate the comprehensive score : ;in: is the path confidence, reflecting the reliability of the path. is the residual energy of neighbor sensor node j, is the maximum residual energy of the sensor nodes in the network, is the distance between sensor nodes, indicating the communication cost; q, p, k are weight factors, which adjust the priority of each factor in the path score. The path with the highest score is selected from the neighbor table as the next hop. The data packet starts from the source sensor node and is forwarded hop by hop along the path with the highest score to the gateway sensor node. If the path is interrupted due to sensor node failure or channel interference, the routing algorithm dynamically reselects a new optimal path.

[0047] Prioritize sensor nodes with higher residual energy for data forwarding to avoid premature failure of individual sensor nodes due to overload and extend the life of the entire network. When multiple sensor nodes are in the same area, the positioning results and other perception data are aggregated before transmission to reduce the number of data packets and transmission overhead. Set a backup path for each optimal path and quickly switch when the main path is interrupted to ensure reliable data transmission.

[0048] After being centrally gathered by the gateway sensor nodes, the positioning data is transmitted to the data processing terminal. The data processing terminal analyzes the received positioning data: verifies the integrity and timeliness of the data; removes redundant and abnormal data; and visualizes the positioning results or uses them as input for subsequent decisions.

[0049] S6: At the data processing terminal, the transmitted data is processed using extraction, conversion, and loading techniques to extract the exact location of the sensor node and output it to the control center.

[0050] ETL (Extract, Transform, Load) is the core technical framework of data processing, which is divided into three main steps: Extraction: Receive positioning data and sensor node status information from the sensor network. Transformation: Clean, verify, aggregate and transform the data to extract the accurate location of the sensor node. Loading: Store the processed positioning results in the database and output them to the control center or application system.

[0051] The data processing terminal receives positioning data packets from the gateway sensor node. The data packet structure is as follows: sensor node ID: uniquely identifies the sensor node from which the data packet comes; positioning coordinates: the location of the sensor node (x, y); timestamp: the time when the data is generated, used to synchronize the data of multiple sensor nodes; sensor node status: including signal strength, remaining energy, path confidence, etc. The received data is first written into the temporary storage area as input data for subsequent processing. The temporary storage area adopts a buffering mechanism to ensure real-time performance and data integrity and prevent packet loss. Check the integrity of the data (whether key fields are missing) and the correctness of the format. Abnormal data is marked as invalid data and logged for subsequent analysis.

[0052] Sort data by timestamp to eliminate disorder caused by network delays. If multiple gateway sensor nodes receive data packets from the same sensor node, only the latest or best quality data packets are retained. Detect and eliminate obviously abnormal positioning results through rules or machine learning models, such as: the position of the sensor node deviates from the normal range; correct the position of the sensor node based on the collaborative data provided by the neighboring sensor nodes. When the data of a sensor node is transmitted to the terminal through multiple paths, the data is fused based on the path quality. Aggregate the positioning data of the sensor node with other perception data (such as sensor node status, signal strength) to provide comprehensive information to the control center: The processed data is loaded into the database of the data processing terminal as the basis for long-term storage and analysis. The positioning results are output to the control center in real time through interfaces (such as REST API, MQTT) for: Visual display: Display the distribution and status of sensor nodes on the map. The control center can perform regional coverage analysis, equipment maintenance plan, etc. based on the positioning data. Back up historical data regularly to prevent data loss and support subsequent trend analysis and model optimization.

[0053] The data output to the control center includes: displaying the precise location of each sensor node. Providing comprehensive information such as the remaining energy, path confidence, and signal quality of the sensor node. Real-time tracking of sensor node distribution and identification of abnormal sensor nodes; optimizing routing or redeploying sensor nodes based on positioning data; analyzing the energy consumption distribution of sensor nodes and formulating energy-saving strategies.

[0054] In this embodiment, in view of the positioning requirements of the wireless sensor network, the sensor nodes are first deployed by initialization, environmental data and initial parameters such as signal strength and path confidence are collected, and the network topology is established. Subsequently, the communication signal strength, path confidence and environmental data between sensor nodes are modeled as a gravitational field model using a collaborative optimization algorithm based on the gravitational field. Based on this model, the relative position of the sensor nodes is obtained by calculating the gravitational field gradient, and the position error of a single sensor node is corrected by integrating the synergistic effect of multi-target sensor nodes to achieve high-precision positioning of the sensor node group. In combination with the machine learning algorithm, the sensor node data is analyzed in real time, the network topology changes are predicted and the gravitational field parameters are dynamically adjusted to improve the real-time and robustness of positioning. The positioning results are transmitted to the data processing terminal through the optimized routing algorithm, and the extraction, transformation and loading (ETL) technology is used to process the data at the terminal, and the accurate position of the sensor node is extracted and output to the control center to provide support for subsequent monitoring and management.

[0055] Embodiment 2: A wireless sensor network positioning system described in this embodiment includes a network initialization module, a gravitational field modeling module, a high-precision positioning module, a dynamic adjustment and prediction module, an optimization routing module, and a data processing and output module: Network initialization module: initializes the wireless sensor network, deploys sensor nodes, collects environmental data and initial signal characteristic parameters of sensor nodes, the initial signal characteristic parameters include signal strength and path confidence, and establishes network topology; Gravitational field modeling module: Using the collaborative optimization algorithm based on the gravitational field, the gravitational field model is established through the communication signal strength, path confidence and environmental data between sensor nodes; High-precision positioning module: Using the gravitational field model, the relative position of sensor nodes is calculated through gradient, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; Dynamic adjustment and prediction module: Combines machine learning algorithms to analyze real-time data of sensor nodes in the network, predicts changes in network topology, and dynamically adjusts gravitational field parameters to improve real-time positioning. Optimized routing module: sends the positioning results to the data processing terminal through the optimized routing algorithm; Data processing and output module: In the data processing terminal, the extraction, conversion and loading techniques are used to process the transmitted data, extract the accurate location of the sensor node, and output it to the control center.

[0056] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0057] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0058] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0059] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A wireless sensor network positioning method, characterized in that: The following steps are involved: S1: The control center issues an initialization command to initialize the wireless sensor network, deploy sensor nodes, collect environmental data and initial signal characteristic parameters of the sensor nodes, and establish a network topology structure; the initial signal characteristic parameters include signal strength and path confidence; S2: The control center uses a collaborative optimization algorithm based on the gravitational field to establish a gravitational field model through the communication signal strength, path confidence and environmental data between sensor nodes; S3: Using the gravitational field model, the relative positions of sensor nodes are calculated through gradients, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; S4: The control center combines machine learning algorithms to analyze the real-time data of sensor nodes in the network, predict network topology changes, and dynamically adjust the gravitational field parameters; S5: The control center sends the positioning results to the data processing terminal through the optimized routing algorithm; S6: At the data processing terminal, the control center uses extraction, conversion, and loading technology to process the transmitted final positioning results, extract the exact location of the sensor node, and output it to the control center.

2. A wireless sensor network positioning method according to claim 1, characterized in that: In S2, a collaborative optimization algorithm based on gravitational field is used to establish a gravitational field model through the communication signal strength, path confidence and environmental data between sensor nodes. Specifically: In the gravitational field model, each sensor node is regarded as an entity with mass, and its gravitational force is determined by the signal strength, path confidence and environmental data adaptability of the sensor node. The gravitational relationship between adjacent sensor nodes is expressed by the model as follows: ;in, is the gravitational field strength between sensor node i and sensor node j; G is the gravitational constant; is the quality of sensor node i, which is determined by the signal strength and the residual energy; is the square of the distance between sensor node i and sensor node j; is the path confidence coefficient between sensor node i and sensor node j; The quality of a sensor node represents the strength of the sensor node's attraction, which depends on the signal strength and the remaining energy. The formula is: ; In the formula, is the signal strength of sensor node i, is the residual energy of sensor node i; α, β are weight factors.

3. A wireless sensor network positioning method according to claim 2, characterized in that: In S3, the relative position of the sensor node is calculated by the gradient, specifically: Calculate the gravitational field gradient at each sensor node , the formula is: ; In the formula, is the partial derivative of the gravitational field F in the x-direction, which indicates the rate of change of the gravitational field intensity along the x-direction. The calculation expression is: ;in is the set of neighboring sensor nodes connected to sensor node i; is the partial derivative of the gravitational field F in the y-direction, which indicates the rate of change of the gravitational field intensity along the y-direction. The expression is: ; The position of the sensor node is adjusted according to the gravitational field gradient, and the update formula is: , ;in, , is the position coordinate of sensor node i at the tth iteration, , is the updated coordinate of sensor node i; η is the learning rate, which controls the step size of position adjustment.

4. A wireless sensor network positioning method according to claim 3, characterized in that: In S3, the synergistic effect of multi-target sensor nodes is integrated to perform global optimization: The total gravitational field of all sensor nodes Defined as: ; The position adjustment of the sensor node group needs to consider the overall objective function L, which is expressed as: ;in, represents the total gravitational field strength of the network, is the penalty term for position deviation, which reduces the over-dispersion of sensor nodes; λ is the weight factor, which balances the gravitational field strength and the uniformity of sensor node distribution; Optimize the position of the sensor node group by gradient descent method: ; In the collaborative positioning process, the error correction of a single sensor node is completed through the feedback information of neighboring sensor nodes, and the expression is: ; ; Correct the value and The error is then adjusted to the current sensor node position. The iterative process continues until the position change of all sensor nodes is less than the threshold. , the expression is: .

5. A wireless sensor network positioning method according to claim 4, characterized in that: In S4, the real-time data of sensor nodes in the network are analyzed by combining machine learning algorithms to predict network topology changes, specifically: The real-time data is converted into an input feature vector of a machine learning model; the input feature vector ; The LSTM long short-term memory network is used to predict signal changes and predict network topology changes: the real-time data specifically includes: residual energy , signal strength , signal-to-noise ratio SNR and variance Var(SNR), packet loss rate , the distance between sensor nodes , the number of neighbor sensor nodes and path reliability ; Input time series features , predict the signal strength and path confidence at the next moment, the expression is: ;in, is the predicted signal strength of sensor node i at time t+1; is the path confidence prediction value of sensor node i and sensor node j.

6. A wireless sensor network positioning method according to claim 5, characterized in that: Dynamically adjust the gravitational field model parameters according to the prediction results, including: Adjust the gravitational constant G: The gravitational constant G represents the overall strength of the gravitational field and is adjusted based on the sensor node density, signal strength distribution, and path confidence: ;in, Indicates the rate of change of signal strength; represents the rate of change of path confidence; α, β are adjustment factors used to balance the impact of signal and confidence on G; Update path confidence , based on the predicted path confidence, correct the current path parameters: ;in, is the weight factor of packet loss rate; Adjust sensor node quality , recalculate the sensor node quality by combining the predicted remaining energy and signal strength: ; The adjusted gravitational field model is calculated with new parameters, and the gravitational gradient and position are recalculated using the following formula: Recalculate the gravitational gradient, the expression is: ; ; Update the sensor node position according to the adjusted gradient, the expression is: ; .

7. A wireless sensor network positioning method according to claim 1, characterized in that: In S5, the positioning result is sent to the data processing terminal through the optimized routing algorithm, specifically: In the initialization phase, each sensor node uses the signal strength RSSI and path confidence Establish connections with neighboring sensor nodes and generate a neighbor table, which contains: neighboring sensor node ID, distance between sensor nodes , path confidence and the remaining energy of neighbor sensor nodes; Use the gravitational field-based optimization routing algorithm to select the optimal path and calculate the comprehensive score of the optimal path : ;in: is the path confidence between sensor node i and sensor node j, reflecting the reliability of the path. is the residual energy of sensor node j, is the maximum residual energy of the sensor nodes in the network, is the distance between sensor node i and sensor node j, representing the communication cost; q, p and k are weight factors respectively; The path with the highest score is selected from the neighbor table as the next hop. The data packet starts from the source sensor node and is forwarded hop by hop along the path with the highest score to the gateway sensor node; If the path is interrupted due to sensor node failure or channel interference, the routing algorithm dynamically reselects a new optimal path.

8. A wireless sensor network positioning system, used to implement a wireless sensor network positioning method according to any one of claims 1 to 7, characterized in that: It includes network initialization module, gravitational field modeling module, high-precision positioning module, dynamic adjustment and prediction module, optimized routing module and data processing and output module: Network initialization module: initializes the wireless sensor network, deploys sensor nodes, collects environmental data and initial signal characteristic parameters of sensor nodes, the initial signal characteristic parameters include signal strength and path confidence, and establishes network topology; Gravitational field modeling module: Using the collaborative optimization algorithm based on the gravitational field, the gravitational field model is established through the communication signal strength, path confidence and environmental data between sensor nodes; High-precision positioning module: Using the gravitational field model, the relative position of sensor nodes is calculated through gradient, the synergy between multi-target sensor nodes is integrated, the position error of a single sensor node is corrected, and high-precision positioning of the sensor node group is achieved; Dynamic adjustment and prediction module: Combines machine learning algorithms to analyze real-time data of sensor nodes in the network, predicts changes in network topology, and dynamically adjusts gravitational field parameters to improve real-time positioning. Optimized routing module: sends the positioning results to the data processing terminal through the optimized routing algorithm; Data processing and output module: In the data processing terminal, the extraction, conversion and loading techniques are used to process the transmitted data, extract the accurate location of the sensor node, and output it to the control center.