A sensor network abnormal node identification method and system
By constructing a two-layer feature mapping and spatial consistency index correction method, combined with communication state parameters, the problem of accuracy and comprehensiveness in abnormal node identification in sensor networks is solved, and accurate identification of multiple abnormal types is achieved.
Patent Information
- Application Number
- CN202611509090.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to accurately identify anomalous nodes in sensor networks, especially when hardware failures, communication link anomalies, and environmental changes all contribute to a high false positive rate. Existing methods also fail to distinguish between real-world environmental events and node failures, and cannot effectively identify various anomaly types.
A two-layer feature mapping relationship is constructed, which maps the sensor node data feature vectors to the fault feature space and the event feature space respectively. The coordinates are corrected by calculating the spatial consistency index, and a communication anomaly offset vector is established by combining the communication status parameters. Vector synthesis and distance metric comparison are performed to determine the anomaly type.
It enables accurate differentiation between node faults and real-world events in sensor networks, reduces the misjudgment rate caused by environmental changes, and improves the accuracy and comprehensiveness of abnormal node identification. It can identify various anomaly types such as hardware faults, communication faults, sudden environmental changes, and data drift.
Smart Images

Figure CN123185579A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication identification and positioning technology, specifically to a method and system for identifying abnormal nodes in a sensor network. Background Technology
[0002] In the application of IoT and intelligent monitoring systems, the identification of abnormal nodes in sensor networks is crucial. In scenarios such as industrial production and environmental monitoring, the number of sensor nodes is large and they are widely distributed. Abnormal node identification systems are often used to detect and warn of node failures and to maximize the reliability of data acquisition.
[0003] Existing technologies use threshold discrimination or statistical analysis methods to mark abnormal nodes after detecting data deviations. However, sensor node anomalies can be caused by a combination of sensor hardware failures, communication link anomalies, data transmission packet loss, or environmental changes. Existing technologies typically only analyze the collected data, lacking a comprehensive assessment of the reliability of the data source, communication status, and node operating status, which can easily lead to misdiagnosis. Dynamic changes in network topology and application environment can affect the distribution characteristics of node data, making it difficult for existing methods to distinguish between real-world environmental events and node malfunctions. This inability to accurately locate the source of anomalies results in a high misjudgment rate. In the process of anomaly identification, existing technologies mainly use single feature space analysis or fixed threshold judgment to screen nodes. This can lead to insufficient drift fault identification capabilities, intermittent anomaly missed detections, and high parameter sensitivity, resulting in low accuracy in anomaly node identification.
[0004] Therefore, it is necessary to design a sensor network abnormal node identification method and system that can comprehensively judge node data characteristics and communication status and accurately distinguish fault types. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a method for identifying abnormal nodes in a sensor network, the method comprising the following steps: Acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates; Based on the neighboring node data, a spatial consistency index is calculated. The fault space coordinates and the event space coordinates are then corrected according to the spatial consistency index to generate corrected fault space coordinates and corrected event space coordinates. Obtain the communication status parameters of the target sensor node, and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters; The communication anomaly offset vector and the corrected fault space coordinates are vector synthesized to obtain comprehensive fault judgment coordinates. The distance metric values of the comprehensive fault judgment coordinates and the corrected event space coordinates in their respective feature spaces are compared, and the anomaly type of the target sensor node is determined according to the relationship between the magnitude of the distance metric values.
[0006] Based on the above technical solution, a two-layer feature mapping relationship is constructed to map the data feature vectors to the fault feature space and the event feature space respectively, obtaining fault space coordinates and event space coordinates, including: Extract the temporal change rate and numerical fluctuation amplitude of the current data and the neighboring node data within a preset time window, and slide the preset time window according to the timestamp differences of each node's data. A time-series mapping matrix is constructed based on the aligned time-series change rate, and a numerical mapping matrix is constructed based on the aligned numerical fluctuation amplitude. The spatial distance attenuation factor between the target sensor node and the neighboring node is calculated. The matrix elements of the time-series mapping matrix and the numerical mapping matrix are position-modulated according to the spatial distance attenuation factor to generate a spatially modulated time-series mapping matrix and a numerical mapping matrix. The spatially modulated temporal mapping matrix and the numerical mapping matrix are subjected to tensor product operation to generate a joint mapping tensor. The joint mapping tensor is then subjected to dimension reduction projection to obtain the fault projection vector and the event projection vector, respectively. The fault projection vector and the event projection vector are used as the fault space coordinates and the event space coordinates.
[0007] According to the above technical solution, the spatial consistency index is calculated based on the neighboring node data, including: A spatial association graph is constructed between the target sensor node and each neighboring node. The edge weights of the spatial association graph are determined by the spatial distance between the nodes and the data correlation. Calculate the directional deviation angle between the data gradient vector of the target sensor node and the data gradient vector of each neighboring node, and identify the neighboring nodes with gradient anomalies in the spatial correlation graph based on the directional deviation angle; After removing the neighboring nodes of the gradient anomaly, a data transmission path from the target sensor node to each neighboring node is constructed in the spatial correlation graph. The data transmission boundary is determined according to the connectivity and path length of each data transmission path. Within the data transmission boundary, the spatial covariance matrix between the neighboring node data and the target sensor node data is calculated. The spatial covariance matrix is decomposed into multiple eigenvalues. Based on the propagation attenuation rate of the eigenvectors corresponding to each eigenvalue in the spatial correlation graph, the eigenvalue with the smallest attenuation rate is selected as the principal eigenvalue, and the principal eigenvalue is used as the spatial consistency index.
[0008] According to the above technical solution, the fault space coordinates and the event space coordinates are corrected based on the spatial consistency index to generate corrected fault space coordinates and corrected event space coordinates, including: The spatial consistency index is compared with the fault persistence threshold to obtain the fault consistency deviation, and the spatial consistency index is compared with the event mutability threshold to obtain the event consistency deviation. Based on the fault consistency deviation and the components of each dimension of the fault spatial coordinates, a fault coupling equation is constructed. The gradient change of the fault spatial coordinates along each dimension is calculated. When the gradient change satisfies the continuity condition in each dimension, the fault spatial coordinates are determined to be in the correctable region. The fault correction vector is obtained by solving the fault coupling equation for the fault spatial coordinates in the correctable region and then corrected to obtain the corrected fault spatial coordinates. Based on the event consistency deviation and the components of each dimension of the event space coordinates, an event coupling equation is constructed. The distance between the event space coordinates and the preset event reference point in the event feature space is calculated. When the distance is less than the mutation response radius, the event space coordinates are determined to be in the correctable region. The event space coordinates in the correctable region are corrected by solving the event coupling equation to obtain the event correction vector and then corrected to obtain the corrected event space coordinates.
[0009] According to the above technical solution, a communication anomaly offset vector is established in the fault feature space based on the communication state parameters, including: The signal strength sequence, data packet loss rate sequence, and communication delay sequence of the target sensor node within a preset time period are obtained as the communication status parameters. The signal strength sequence values at each moment are mapped to the first dimension coordinates of the fault feature space, the data packet loss rate sequence values at each moment are mapped to the second dimension coordinates of the fault feature space, and the communication delay sequence values at each moment are mapped to the third dimension coordinates of the fault feature space. Spatial points in the fault feature space are formed by the three dimension coordinate values at the same moment. Spatial points at each moment within the preset time period are connected in time sequence to form a communication state trajectory. The displacement vector between adjacent spatial points is calculated along the communication state trajectory. The communication state trajectory of the neighboring nodes is obtained and the neighboring displacement vector is calculated. The directional difference between the displacement vector and the neighboring displacement vector is calculated. When the directional difference exceeds the consistency threshold, the dominant offset direction of the communication state is determined. The communication anomaly offset vector is constructed based on the spatial positional relationship between the dominant offset direction of the communication state and the corrected fault spatial coordinates.
[0010] According to the above technical solution, the communication anomaly offset vector and the corrected fault space coordinates are vector-synthesized to obtain comprehensive fault judgment coordinates, including: Calculate the vector angle between the communication anomaly offset vector and the corrected fault space coordinates. Divide the fault feature space into a same-direction fault region and an opposite-direction fault region based on the vector angle. When the vector angle is less than a right angle, it is determined to be a same-direction fault region. When the vector angle is greater than or equal to a right angle, it is determined to be an opposite-direction fault region. The communication anomaly offset vector located in the same direction fault area is vector superimposed with the corrected fault space coordinates. The starting point of the communication anomaly offset vector is translated to the ending point of the corrected fault space coordinates, and the ending point of the translated communication anomaly offset vector is used as the first composite coordinate. The communication anomaly offset vector located in the anomaly fault region and the corrected fault space coordinates are vector decomposed. The communication anomaly offset vector is projected along the direction of the corrected fault space coordinates to obtain radial and tangential components. The corrected fault space coordinates and the radial components are vector superimposed to obtain the second composite coordinates. The first composite coordinate or the second composite coordinate is used as the comprehensive fault determination coordinate.
[0011] According to the above technical solution, the distance metric values of the comprehensive fault determination coordinates and the corrected event space coordinates in their respective feature spaces are compared, and the anomaly type of the target sensor node is determined based on the magnitude relationship of the distance metric values, including: The Euclidean distance between the comprehensive fault determination coordinates and the origin of the fault feature space is calculated as the fault distance metric, and the Euclidean distance between the corrected event space coordinates and the origin of the event feature space is calculated as the event distance metric. When the fault distance metric is greater than the event distance metric, the sensor data integrity index and communication continuity index corresponding to the comprehensive fault judgment coordinates are extracted. When the sensor data integrity index is lower than the integrity threshold, it is determined to be a hardware fault. When the communication continuity index is lower than the continuity threshold, it is determined to be a communication fault. When the event distance metric is greater than the fault distance metric, the data mutation rate and data deviation magnitude corresponding to the corrected event space coordinates are extracted. When the data mutation rate is higher than the mutation threshold, it is determined to be an environmental mutation anomaly. When the data deviation magnitude is higher than the drift threshold, it is determined to be a data drift anomaly.
[0012] A second aspect of this application provides a sensor network abnormal node identification system, the system comprising: The feature mapping module is used to acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates. The coordinate correction module is used to calculate the spatial consistency index based on the neighboring node data, correct the fault space coordinates and the event space coordinates according to the spatial consistency index, and generate the corrected fault space coordinates and the corrected event space coordinates. The offset confirmation module is used to obtain the communication status parameters of the target sensor node and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters. The anomaly determination module is used to synthesize the communication anomaly offset vector and the corrected fault space coordinates to obtain comprehensive fault determination coordinates, compare the distance metric values of the comprehensive fault determination coordinates and the corrected event space coordinates in their respective feature spaces, and determine the anomaly type of the target sensor node based on the relationship between the magnitudes of the distance metric values.
[0013] A third aspect of this application provides an electronic device including 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 causes the electronic device to perform the method described in the first aspect of this application.
[0014] A fourth aspect of this application provides a computer-readable storage medium for storing a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect of this application.
[0015] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: This invention constructs a two-layer feature mapping relationship, mapping the sensor node data feature vectors to the fault feature space and the event feature space respectively, realizing the separation and representation of node faults and real environmental events. This solves the technical problem of existing technologies being unable to distinguish the source of data anomalies, effectively reducing the misjudgment rate caused by environmental changes. Based on the neighboring node data, a spatial consistency index is calculated and the feature space coordinates are corrected. By utilizing the spatial correlation characteristics of sensor networks, the independent abnormal behavior of nodes can be accurately identified, avoiding the limitations of single-node data analysis, improving the accuracy of abnormal node location, and obtaining the communication state parameters of the target sensor node to construct a communication anomaly bias. By shifting the communication anomaly offset vector and comparing the directional difference between the communication status of neighboring nodes, the system effectively distinguishes between data quality anomalies and communication link anomalies. This addresses the technical deficiency of existing technologies that cannot comprehensively judge the operating status of nodes, and improves the accuracy of anomaly type identification. The vector synthesis method integrates the communication anomaly offset vector with the corrected fault space coordinates and compares the distance metric between the comprehensive fault judgment coordinates and the corrected event space coordinates. This enables accurate identification of various anomaly types, such as hardware fault anomalies, communication fault anomalies, environmental mutation anomalies, and data drift anomalies. It overcomes the problem of uneven identification of different anomaly types in existing technologies and significantly improves the comprehensiveness and reliability of anomaly node identification in sensor networks. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of the steps of a sensor network abnormal node identification method provided according to an embodiment of this application.
[0017] Figure 2 This is a schematic diagram of the system modules for identifying abnormal nodes in a sensor network according to an embodiment of this application.
[0018] Figure 3 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Please see Figure 1 The present invention provides a technical solution: a method for identifying abnormal nodes in a sensor network, comprising: Acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates; The spatial consistency index is calculated based on the neighbor node data. The fault space coordinates and event space coordinates are corrected according to the spatial consistency index to generate the corrected fault space coordinates and event space coordinates. Obtain the communication status parameters of the target sensor node, and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters; The communication anomaly offset vector and the corrected fault space coordinates are vector synthesized to obtain the comprehensive fault judgment coordinates. The distance metric values of the comprehensive fault judgment coordinates and the corrected event space coordinates in their respective feature spaces are compared, and the anomaly type of the target sensor node is determined based on the relationship between the magnitudes of the distance metric values.
[0023] In some preferred embodiments, a two-layer feature mapping relationship is constructed to map data feature vectors to the fault feature space and the event feature space, respectively, to obtain fault space coordinates and event space coordinates, including: Extract the temporal change rate and numerical fluctuation amplitude of the current data and neighboring node data within a preset time window, and slide the preset time window according to the timestamp differences of each node's data. A time-series mapping matrix is constructed based on the aligned time-series change rate, and a numerical mapping matrix is constructed based on the aligned numerical fluctuation amplitude. The spatial distance attenuation factor between the target sensor node and its neighboring nodes is calculated. The matrix elements of the time-series mapping matrix and the numerical mapping matrix are position-modulated according to the spatial distance attenuation factor to generate a spatially modulated time-series mapping matrix and a numerical mapping matrix. The spatially modulated temporal mapping matrix and the numerical mapping matrix are multiplied by tensor to generate a joint mapping tensor. The joint mapping tensor is then subjected to dimension reduction projection to obtain the fault projection vector and the event projection vector, which are used as the fault space coordinates and the event space coordinates, respectively.
[0024] The fault feature space is a mathematical space used to characterize the abnormal state of the sensor node itself. Its coordinates are composed of fault projection vectors (a combination of left singular vectors of the joint mapping tensor), reflecting the technical problems inside the sensor system rather than the actual changes in the environment.
[0025] The feature dimensions include hardware fault dimensions, which capture the aging, drift, or damage characteristics of sensor elements, manifested as a systematic deviation from the temporal change rate of neighboring nodes and abnormal numerical fluctuation amplitude.
[0026] Including communication fault dimensions, it captures signal interference, data packet loss, or transmission delay characteristics, which manifest as abrupt changes, missing data, or disordered timestamps in the sampling sequence, and discontinuous jumps in the time-series mapping matrix.
[0027] Including the power depletion dimension, it captures the characteristics caused by insufficient battery power, which are manifested as a decrease in sampling frequency, a decrease in the amplitude of numerical fluctuations, and no correlation with environmental changes.
[0028] Spatial characteristics show that normal nodes cluster in low-value regions near the origin, while faulty nodes deviate from the origin, forming outliers. The magnitude of the fault's spatial coordinates reflects the severity of the fault, while the direction indicates the fault type. The core feature is spatial isolation—true sensor faults manifest as a strong inconsistency between the faulty node and its physical neighbors, and this inconsistency cannot be explained by changes in environmental gradients.
[0029] The event feature space is a mathematical space used to characterize the real physical changes of the monitored environment. Its coordinates are composed of event projection vectors (a combination of right singular vectors of the joint mapping tensor), reflecting the spatiotemporal evolution of objective environmental parameters.
[0030] The feature dimensions include a spatial continuity dimension, capturing the physical continuity of real-world environmental events (such as temperature rise and gas diffusion), and generating spatially correlated synchronous changes at the target node and its neighboring nodes. After being modulated by a spatial distance attenuation factor, nodes that are closer together exhibit more similar change patterns.
[0031] Including the temporal consistency dimension, it captures the continuous evolution characteristics of environmental events. The temporal change rate of multiple nodes within the time window exhibits a collaborative pattern, and the magnitude of change is related to the distance from the event source.
[0032] It includes the dimension of fluctuation correlation, capturing the spatial propagation characteristics and correlations of numerical fluctuations caused by environmental changes, and showing that the fluctuation amplitudes of adjacent nodes exhibit a correlation that conforms to the law of physical distance attenuation.
[0033] Spatial characteristics manifest as nodes clustering near the origin when no events occur, and collectively moving along specific directions when real events happen, forming spatial clusters rather than isolated points. The magnitude of the event space coordinates reflects the event intensity, and the direction indicates the event type. The core feature is **"spatial coherence"**—real events cause the coordinates of the target node and its neighboring nodes in the event space to exhibit a distribution pattern related to physical distance.
[0034] By using tensor product operations and singular value decomposition, the left singular vector and the right singular vector are extracted to extract mutually independent transformation patterns, making the coordinate axes of the two spaces orthogonal and achieving mathematical orthogonal separation.
[0035] The fault feature space emphasizes "spatial isolation," amplifying the differences between the target node and its neighboring nodes through a spatial distance attenuation factor. When a sensor fails, the fault spatial coordinates of the target node deviate significantly from the origin, while neighboring nodes maintain low values, forming an isolated outlier.
[0036] The event feature space emphasizes "spatial coherence" and captures the collaborative change patterns of neighboring nodes. Real events cause the target node and its neighboring nodes to move collaboratively in the event space; the closer the nodes are, the more similar their movements become, forming spatially continuous clusters.
[0037] The judgment logic is as follows: Sensor failure: The magnitude of the fault space coordinates exceeds the threshold and the event space coordinates are small, and the node exhibits isolated and out-of-group characteristics in the fault space.
[0038] Environmental events: Event space coordinate magnitude exceeds the threshold and is spatially correlated with neighboring nodes, the nodes and their neighbors form clusters in the event space.
[0039] Mixed anomalies: Both spatial coordinate magnitudes exceed the threshold, requiring comprehensive judgment based on the spatial distribution of neighboring nodes.
[0040] The dual-layer feature mapping effectively separates the sources of anomalies. The spatial distance attenuation factor fully utilizes network spatial topology information, while tensor product operations and dimensionality reduction projection unify and integrate temporal, numerical, and spatial features. Two orthogonal feature spaces characterize data anomalies from different physical mechanisms, avoiding misjudging sudden environmental changes as sensor failures or masking sensor failures as normal events.
[0041] For example, the sampling sequences of the current data of the target sensor node and the data of neighboring nodes within a preset time window are obtained. The preset time window is set to a length of 30s-120s, preferably 60s. The temporal change rate and numerical fluctuation amplitude are calculated for each sampling sequence. The temporal change rate is determined by the ratio of the numerical difference between adjacent sampling points to the time interval, and the numerical fluctuation amplitude is determined by the standard deviation of the sampling sequence within the time window. Since the clocks of nodes in a wireless sensor network are not synchronized, the timestamps of data collected by different nodes differ. Directly using unaligned data will lead to distortion of the feature mapping relationship. The preset time window is slid-aligned according to the timestamp differences of the data from each node. The first sampling time of the target sensor node is obtained as the reference time. The sampling sequences of each neighboring node are shifted according to the difference between the timestamp and the reference time, aligning the sampling times of each node to a unified time axis. For sampling points where the timestamps do not completely overlap, linear interpolation is used to fill in the gaps.
[0042] A time-series mapping matrix is constructed based on the aligned temporal change rate. The rows of the time-series mapping matrix correspond to each sampling time within a time window, the columns correspond to the target sensor node and each neighboring node, and the matrix elements represent the temporal change rate of the corresponding node at the corresponding time. A numerical mapping matrix is constructed based on the aligned numerical fluctuation amplitude. The rows of the numerical mapping matrix correspond to each time sub-window, with the time length of each sub-window set to 5s-15s and arranged sequentially within the preset time window. The columns correspond to the target sensor node and each neighboring node, and the matrix elements represent the numerical fluctuation amplitude of the corresponding node within the corresponding time sub-window.
[0043] In sensor networks, the spatial correlation between nodes decreases with increasing distance. Neighboring nodes closer to the target sensor node have higher reference value for anomaly detection. The spatial distance attenuation factor between the target sensor node and each neighboring node is calculated. This factor is derived from the physical distance between the target sensor node and its neighbors, and the formula is as follows: , where α i Let d be the spatial distance attenuation factor between the target sensor node and the i-th neighboring node. i σ is the physical distance between the target sensor node and the i-th neighboring node, in meters. d The distance attenuation coefficient is set within a range of 10m-50m, with 30m being the preferred value.
[0044] The matrix elements of the temporal mapping matrix and the numerical mapping matrix are positionally modulated according to the spatial distance attenuation factor. Each matrix element in the temporal mapping matrix corresponding to the i-th neighboring node column is multiplied by the spatial distance attenuation factor α. i Multiply each element of the numerical mapping matrix corresponding to the i-th neighboring node column by the spatial distance decay factor α. iThis generates spatially modulated temporal mapping and numerical mapping matrices. Spatial modulation reduces the contribution weight of neighboring nodes farther from the target sensor node to the feature mapping, thus avoiding interference from distant nodes affecting anomaly recognition accuracy.
[0045] A joint mapping tensor is generated by performing a tensor product operation on the spatially modulated temporal mapping matrix and the numerical mapping matrix. This tensor product operation calculates the outer product of each row of the temporal mapping matrix with each column of the numerical mapping matrix, resulting in a three-dimensional tensor structure that simultaneously contains temporal variation characteristics, numerical fluctuation characteristics, and spatial correlation characteristics. Dimensionality reduction projection is then performed on the joint mapping tensor to obtain fault projection vectors and event projection vectors. This dimensionality reduction projection is achieved using singular value decomposition (SVD), obtaining the left and right singular vectors corresponding to the first three principal singular values of the joint mapping tensor. The left singular vectors are combined to form the fault projection vector, and the right singular vectors are combined to form the event projection vector. The fault projection vector reflects the comprehensive characteristics of the sensor node hardware state and the communication link state, while the event projection vector reflects the characteristics of the actual changes in environmental parameters. The two types of projection vectors are independent of each other in their respective feature spaces. The fault projection vector serves as the fault space coordinate, and the event projection vector serves as the event space coordinate.
[0046] A two-layer feature mapping is constructed to separate the features representing node faults and environmental events. Spatial correlation is enhanced by using a spatial distance attenuation factor. Furthermore, heterogeneous feature representation is unified through tensor product and dimensionality reduction projection to improve the accuracy of anomaly source differentiation and type determination.
[0047] In some preferred embodiments, the spatial consistency index is calculated based on neighborhood node data, including: A spatial association graph is constructed between the target sensor node and each neighboring node. The edge weights of the spatial association graph are determined by the spatial distance between the nodes and the data correlation. Calculate the directional deviation angle between the data gradient vector of the target sensor node and the data gradient vector of each neighboring node, and identify the neighboring nodes with gradient anomalies in the spatial correlation map based on the directional deviation angle; After removing neighboring nodes with gradient anomalies, data transmission paths from the target sensor node to each neighboring node are constructed in the spatial correlation graph. Data transmission boundaries are determined based on the connectivity and path length of each data transmission path. Within the data transmission boundaries, the spatial covariance matrix between the neighboring node data and the target sensor node data is calculated. The spatial covariance matrix is decomposed into eigenvalues to obtain multiple eigenvalues. Based on the propagation attenuation rate of the eigenvectors corresponding to each eigenvalue in the spatial correlation graph, the eigenvalue with the smallest attenuation rate is selected as the principal eigenvalue, and the principal eigenvalue is used as the spatial consistency index.
[0048] For example, a spatial association graph is constructed between the target sensor node and its neighboring nodes. The spatial association graph uses each sensor node as a node and the connections between nodes as edges. The edge weights of the spatial association graph are determined by the spatial distance between nodes and the data relevance. The formula for calculating the edge weights is as follows: ,in, Let be the edge weight between the i-th node and the j-th node. The correlation between the data of the i-th node and the j-th node is determined by calculating the Pearson correlation coefficient of the sampled sequences of the two nodes within a preset time window. The distance between the i-th node and the j-th node is expressed in meters (m). The distance influence coefficient is set within a range of 15m-40m, with 25m being the preferred value. Edge weights simultaneously reflect the spatial proximity and data correlation strength between nodes, providing a quantitative basis for subsequent spatial consistency analysis.
[0049] The data gradient vector of the target sensor node within a preset time window is obtained. This gradient vector is calculated by numerically differencing the sampled sequence, with each component corresponding to the data change at different sampling times. The data gradient vectors of each neighboring node within the same time window are also obtained. The directional deviation angle between the target sensor node's data gradient vector and those of each neighboring node is calculated using the inverse cosine function of the cosine of the vector angle. This directional deviation angle is compared to a preset angle threshold, which is set between 45° and 75°, preferably 60°. When the directional deviation angle between a neighboring node and the target sensor node exceeds the preset threshold, this neighboring node is identified as a gradient-abnormal neighboring node in the spatial correlation graph. Gradient-abnormal neighboring nodes may have their own malfunctions or be affected by local environmental interference; their data change trends are significantly inconsistent with those of surrounding nodes, making them unsuitable as reference nodes for spatial consistency calculations.
[0050] After removing neighboring nodes with gradient anomalies, neighboring nodes whose data change trends are consistent with those of the target sensor node are retained in the spatial correlation graph. Data transmission paths are constructed from the target sensor node to each retained neighboring node. Each data transmission path is a sequence of edges connecting the target sensor node and its neighboring nodes in the spatial correlation graph, with the sum of edge weights serving as the path length. Data transmission boundaries are determined based on the connectivity and path length of each data transmission path. The path lengths of each reachable neighboring node from the target sensor node are obtained. Neighboring nodes with path lengths less than a preset path length threshold are included within the data transmission boundary. The preset path length threshold is determined based on the average edge weight of the spatial correlation graph and the neighborhood range of the target sensor node, and is set to 2 to 4 times the average edge weight, preferably 3 times. The data transmission boundary defines the set of neighboring nodes with strong spatial correlation to the target sensor node; nodes outside the boundary are excluded due to excessive distance or low data correlation.
[0051] Within the data transmission boundary, the current data of each neighboring node and the target sensor node are acquired, and the spatial covariance matrix between the neighboring node data and the target sensor node data is calculated. The rows and columns of the spatial covariance matrix correspond to each node within the data transmission boundary, and the matrix elements are the covariance values of the data sequences of the corresponding node pairs within a preset time window. The covariance values reflect the degree of synchronization between the data changes of the two nodes. Eigenvalue decomposition is performed on the spatial covariance matrix to obtain multiple eigenvalues and corresponding eigenvectors. The number of eigenvalues equals the number of nodes within the data transmission boundary, and the eigenvalues are arranged in descending order of their numerical values.
[0052] The eigenvectors corresponding to each eigenvalue are obtained, and these eigenvectors are used as initial signals for propagation simulation in a spatial correlation graph. The propagation attenuation rate of the eigenvectors in the spatial correlation graph is calculated. The propagation attenuation rate is determined by the amplitude attenuation ratio of the eigenvectors when they are transmitted between adjacent nodes. During propagation, each component of the eigenvector is transmitted along the edges of the spatial correlation graph with weights equal to the edge weights. After a preset number of propagation steps (3-7 steps, preferably 5), the attenuation ratio of the eigenvector amplitude is calculated. The eigenvalue with the smallest propagation attenuation rate is selected as the principal eigenvalue. The smallest propagation attenuation rate indicates that the eigenvector corresponding to this eigenvalue has the strongest propagation stability in the spatial correlation graph, reflecting the dominant consistency pattern of data changes within the data transmission boundary. The principal eigenvalue is used as a spatial consistency index. The larger the spatial consistency index value, the more consistent the data change trend between the target sensor node and its neighboring nodes.
[0053] The fault spatial coordinates are corrected based on the spatial consistency index to obtain a preset consistency benchmark value. This benchmark value is determined by statistical analysis of historical data from the sensor network under normal operating conditions and is set as the average of historical principal feature values. The deviation ratio between the spatial consistency index and the preset benchmark value is calculated. Based on this deviation ratio, the components of the fault spatial coordinates are scaled and adjusted. When the spatial consistency index is lower than the preset benchmark value, the values of each component are increased to make the fault characteristics more pronounced. When the spatial consistency index is higher than the benchmark value, the values of each component are decreased to avoid misjudging normal data fluctuations as faults, resulting in the corrected fault spatial coordinates. Simultaneously, the event spatial coordinates are corrected based on the spatial consistency index, using the opposite method: when the spatial consistency index is lower than the preset benchmark value, the values of each component are decreased; when the index is higher, the values are increased, resulting in the corrected event spatial coordinates.
[0054] A spatial correlation graph is constructed and abnormal neighboring nodes are removed. Spatial consistency index is extracted based on data gradient direction and spatial covariance features. Based on this, the spatial coordinates of faults and events are adaptively corrected to improve the accuracy and robustness of abnormal node identification.
[0055] In some preferred embodiments, the fault space coordinates and event space coordinates are corrected according to a spatial consistency index to generate corrected fault space coordinates and corrected event space coordinates, including: The spatial consistency index is compared with the fault persistence threshold to obtain the fault consistency deviation, and the spatial consistency index is compared with the event mutability threshold to obtain the event consistency deviation. Based on the fault consistency deviation and the components of each dimension of the fault space coordinates, a fault coupling equation is constructed. The gradient change of the fault space coordinates along each dimension is calculated. When the gradient change satisfies the continuity condition in each dimension, the fault space coordinates are determined to be in the correctable region. The fault correction vector is obtained by solving the fault coupling equation for the fault space coordinates in the correctable region and then corrected to obtain the corrected fault space coordinates. Based on the event consistency deviation and the components of each dimension of the event space coordinates, an event coupling equation is constructed. The distance between the event space coordinates and the preset event reference point in the event feature space is calculated. When the distance is less than the mutation response radius, the event space coordinates are determined to be in the correctable region. The event space coordinates in the correctable region are corrected by solving the event coupling equation to obtain the event correction vector and then corrected to obtain the corrected event space coordinates.
[0056] For example, a fault persistence threshold is obtained. This threshold is determined statistically based on the fault characteristics of sensor nodes. When a sensor node fails, its data anomalies typically persist for a relatively long time and exhibit inconsistent trends with the data changes of neighboring nodes. The fault persistence threshold is set in the range of 0.3-0.5, preferably 0.4. The spatial consistency index is compared with the fault persistence threshold, and the difference between the two is calculated as the fault consistency deviation. When the spatial consistency index is less than the fault persistence threshold, the fault consistency deviation is positive, indicating low data consistency between the target sensor node and its neighboring nodes, suggesting a possible fault in the target sensor node. An event mutability threshold is also obtained. This threshold is determined statistically based on the characteristics of environmental parameter mutation events. When environmental parameters mutate, the data of multiple nodes in the sensor network change synchronously, exhibiting high spatial consistency. The event mutability threshold is set in the range of 0.7-0.9, preferably 0.8. The spatial consistency index is compared with the event mutability threshold, and the difference between the two is calculated as the event consistency deviation. When the spatial consistency index is greater than the event mutability threshold, the event consistency deviation is positive, indicating high data consistency between the target sensor node and its neighboring nodes, suggesting a possible real environmental parameter mutation event.
[0057] A fault coupling equation is constructed based on the fault consistency deviation and the components of each dimension of the fault space coordinates. This equation uses the fault consistency deviation as the driving term and the components of each dimension of the fault space coordinates as state variables, establishing a coupling relationship between them. The form of the fault coupling equation is: Where ΔF is the fault correction vector. The fault deviation coefficient is set within the range of 0.5-1.5, preferably 1.0. For fault consistency deviation, For fault space coordinates, The gradient adjustment coefficient is set within the range of 0.1-0.3, preferably 0.2. The gradient vector of the fault space coordinates.
[0058] Calculate the gradient changes of the fault space coordinates along each dimension, obtain the adjacent coordinate points of the fault space coordinates in the feature space, and set the distance between adjacent coordinate points along each dimension as the unit step size of the feature space. The unit step size is set to 5%-10% of the value range of each dimension of the fault space coordinates. Calculate the numerical difference between the fault space coordinates and each adjacent coordinate point as the gradient change in the corresponding dimension. Determine whether the gradient changes satisfy the continuity condition in each dimension. The continuity condition requires that the ratio of the gradient changes in adjacent dimensions is within a preset continuity range, set to 0.5-2.0. When the ratio of the gradient changes in each dimension is within the preset continuity range, the fault space coordinates are determined to be in the correctable region. Fault space coordinates in the correctable region indicate that the feature space around the coordinate point has good smoothness and can be accurately corrected by the fault coupling equation. For fault space coordinates in the correctable region, substitute the fault consistency deviation and the components of each dimension of the fault space coordinates into the fault coupling equation to obtain the fault correction vector. Perform vector addition on the fault space coordinates and the fault correction vector to obtain the corrected fault space coordinates. For fault space coordinates that are not in the correctable region, keep the original fault space coordinates unchanged to avoid introducing additional errors during the correction process.
[0059] An event coupling equation is constructed based on the event consistency deviation and the components of each dimension of the event space coordinates. The event coupling equation uses the event consistency deviation as the driving term and the components of each dimension of the event space coordinates as state variables. The form of the event coupling equation is: Where ΔE is the event correction vector. The event deviation coefficient is set within the range of 0.6-1.4, preferably 1.0. E0 represents the event consistency deviation, and E0 represents the event space coordinates. The reference guiding coefficient is set in the range of 0.2-0.4, preferably 0.3, E b These are preset event reference points in the event feature space. These preset event reference points are determined based on the statistical characteristics of historical environmental parameter mutation events, representing the location of typical environmental parameter mutation events in the event feature space.
[0060] The Euclidean distance between the event space coordinates and the preset event reference point is calculated. The components of each dimension of the event space coordinates and the preset event reference point are obtained, and the square root of the sum of the squares of the differences between each dimension component is taken to obtain the Euclidean distance. This Euclidean distance is compared with the mutation response radius, which is determined based on the scale of the event feature space and the influence range of the environmental parameter mutation event, and is set to 20%-40% of the effective region radius of the event feature space, preferably 30%. When the Euclidean distance is less than the mutation response radius, the event space coordinates are determined to be in the correctable region. Event space coordinates in the correctable region indicate that the data change characteristics of the target sensor node are similar to those of typical environmental parameter mutation events, and can be corrected using the event coupling equation. For event space coordinates in the correctable region, the event consistency deviation, event space coordinates, and preset event reference point are substituted into the event coupling equation to obtain the event correction vector. The event space coordinates and the event correction vector are then added to obtain the corrected event space coordinates. For event space coordinates not in the correctable region, the original event space coordinates remain unchanged.
[0061] Fault coupling equations and event coupling equations are constructed to correct the spatial coordinates of faults and events respectively. By determining the correctable region, erroneous adjustments are avoided, the accuracy of coordinate correction is improved, the source of data anomalies is accurately reflected, and a reliable basis is provided for the identification of abnormal nodes.
[0062] In some preferred embodiments, a communication anomaly offset vector is established in the fault feature space based on communication state parameters, including: The signal strength sequence, data packet loss rate sequence, and communication delay sequence of the target sensor node within a preset time period are obtained as communication status parameters. The signal strength sequence values at each moment are mapped to the first dimension coordinates of the fault feature space, the data packet loss rate sequence values at each moment are mapped to the second dimension coordinates of the fault feature space, and the communication delay sequence values at each moment are mapped to the third dimension coordinates of the fault feature space. The three dimension coordinate values at the same moment constitute spatial points in the fault feature space, and the spatial points at each moment within the preset time period are connected in time sequence to form a communication state trajectory. Calculate the displacement vector between adjacent spatial points along the communication state trajectory, obtain the communication state trajectory of neighboring nodes and calculate the neighboring displacement vector, calculate the directional difference between the displacement vector and the neighboring displacement vector, and determine the dominant offset direction of the communication state when the directional difference exceeds the consistency threshold. Construct the communication anomaly offset vector based on the spatial positional relationship between the dominant offset direction of the communication state and the corrected fault spatial coordinates.
[0063] For example, the communication status parameters of the target sensor node are acquired within a preset time period, which is set to 10-30 minutes, preferably 20 minutes, covering multiple cycles of communication status changes of the sensor node. The communication status parameters include a signal strength sequence, a data packet loss rate sequence, and a communication delay sequence. The signal strength sequence records the received signal strength indication value of the target sensor node at each sampling moment within the preset time period, with a sampling interval of 1-5 seconds. The unit of signal strength is dBm, and the signal strength range during normal operation is -90dBm to -30dBm. The data packet loss rate sequence records the data packet loss rate of the target sensor node at each sampling moment. The data packet loss rate is calculated by the percentage difference between the total number of data packets sent and the number of successfully received data packets within a statistical unit time window, set to 30-60 seconds. During normal operation, the data packet loss rate is less than 5%. The communication delay sequence records the data transmission delay of the target sensor node at each sampling moment. The communication delay is the time difference between the sending and receiving acknowledgment of a data packet, measured in milliseconds (ms). During normal operation, the communication delay ranges from 10ms to 100ms.
[0064] The signal strength sequence, packet loss rate sequence, and communication delay sequence are mapped to three dimensions of the fault feature space, which is a three-dimensional space used to characterize the communication state of the sensor node. The signal strength sequence values at each time point are normalized, converting the actual signal strength values into normalized values between 0 and 1. The normalization formula is: subtract the minimum signal strength from the signal strength and divide by the signal strength range. The resulting normalized value serves as the first dimension of the fault feature space. The packet loss rate sequence values at each time point are also normalized, as the packet loss rate itself is a percentage value, which is converted into a small value between 0 and 1, serving as the second dimension of the fault feature space. The communication delay sequence values at each time point are normalized, by subtracting the minimum communication delay and dividing by the communication delay range. The resulting normalized value serves as the third dimension of the fault feature space. The normalized values of signal strength, packet loss rate, and communication delay at the same time point are extracted, and these three values form a three-dimensional coordinate point in the fault feature space. This coordinate point corresponds to the communication state of the target sensor node at that time. The three-dimensional coordinate points of each sampling time within the preset time period are connected in chronological order, and the coordinate points of adjacent time periods are connected by straight line segments to form a communication state trajectory. The communication state trajectory reflects the dynamic evolution process of the communication state of the target sensor node in the fault feature space.
[0065] The displacement vector between adjacent spatial points along the communication state trajectory is calculated. The coordinates of any two adjacent spatial points on the communication state trajectory are obtained. The displacement vector is obtained by subtracting the coordinates of the previous spatial point from the coordinates of the later spatial point. The displacement vector contains three dimensions, corresponding to changes in signal strength, packet loss rate, and communication delay. All adjacent spatial points on the communication state trajectory are traversed to calculate the complete set of displacement vectors within a preset time period. The communication state parameters of neighboring nodes are obtained. Neighboring nodes are other sensor nodes within the communication range of the target sensor node, with the number of neighboring nodes set to 3-8. Following the same processing method as the target sensor node, the signal strength sequence, packet loss rate sequence, and communication delay sequence of the neighboring nodes are mapped to coordinate points in the fault feature space. The communication state trajectory of the neighboring nodes is constructed, and the neighborhood displacement vector between adjacent spatial points on the communication state trajectory of the neighboring nodes is calculated.
[0066] The directional difference degree is calculated by comparing the displacement vector of the target sensor node with the displacement vectors of neighboring nodes. This directional difference degree reflects the degree of directional deviation between the two vectors. For the displacement vector of the target sensor node at a certain moment, the neighboring displacement vectors of the neighboring nodes at the same moment are obtained, and the cosine of the angle between the two vectors is calculated as the directional similarity. The directional similarity value ranges from -1 to 1; the closer the directional similarity is to 1, the closer the directions of the two vectors are. The directional difference degree is calculated by subtracting the absolute value of the directional similarity from 1. The directional difference degree ranges from 0 to 1; the larger the directional difference degree, the more significant the directional deviation between the two vectors. All displacement vectors within a preset time period are traversed, and the directional difference degree between each displacement vector and its corresponding neighboring displacement vector at that moment is calculated. The number of displacement vectors whose directional difference degree exceeds a consistency threshold is counted. The consistency threshold is set between 0.5 and 0.7, preferably 0.6. When the proportion of displacement vectors exceeding the consistency threshold to the total number of displacement vectors is greater than 50%, it is determined that the communication status change of the target sensor node is inconsistent with that of its neighboring nodes, indicating a communication anomaly. The displacement vectors exceeding the consistency threshold are summed, and the direction of the resulting composite vector is taken as the dominant offset direction of the communication state. The dominant offset direction of the communication state represents the main trend of change of the communication state of the target sensor node in the fault feature space.
[0067] A communication anomaly offset vector is constructed based on the spatial relationship between the dominant offset direction of the communication state and the corrected fault spatial coordinates. The corrected fault spatial coordinates represent the fault feature location obtained by the target sensor node based on spatial consistency analysis. The connection vector between the corrected fault spatial coordinates and the starting point of the communication state trajectory is calculated. This connection vector reflects the offset of the corrected fault spatial coordinates relative to the initial position of the communication state. The connection vector is projected onto the dominant offset direction of the communication state. The projection length represents the degree of offset of the corrected fault spatial coordinates in the dominant offset direction of the communication state; a larger projection length indicates a more significant impact of the communication anomaly on the fault feature. The direction of the communication anomaly offset vector is set to the dominant offset direction of the communication state. The magnitude of the communication anomaly offset vector is determined by multiplying the projection length by the communication weight coefficient. The communication weight coefficient is set according to the communication reliability requirements of the sensor network, ranging from 0.4 to 0.8, preferably 0.6. The formula for calculating the communication anomaly offset vector is: , where V c ω is the communication anomaly offset vector. c D is the communication weighting coefficient. m F is the unit vector representing the dominant offset direction of the communication state. a For the corrected fault space coordinates, P s The coordinates of the starting point of the communication status trajectory. The magnitude of the dominant offset direction vector of the communication state.
[0068] By mapping signal strength, packet loss rate, and communication delay to construct a communication state trajectory, the dominant offset direction is identified by the difference in direction with neighboring nodes, and a communication anomaly offset vector is constructed to quantify the impact of communication anomalies. This provides a basis for distinguishing between communication failures and node failures and improves the robustness of anomaly identification.
[0069] In some preferred embodiments, the communication anomaly offset vector and the corrected fault space coordinates are vector-synthesized to obtain comprehensive fault determination coordinates, including: Calculate the angle between the communication anomaly offset vector and the corrected fault space coordinates. Based on the vector angle, divide the fault feature space into a same-direction fault region and an opposite-direction fault region. When the vector angle is less than a right angle, it is determined to be a same-direction fault region. When the vector angle is greater than or equal to a right angle, it is determined to be an opposite-direction fault region. The communication anomaly offset vector located in the same direction fault area is superimposed with the corrected fault space coordinates. The starting point of the communication anomaly offset vector is translated to the ending point of the corrected fault space coordinates, and the ending point of the translated communication anomaly offset vector is used as the first composite coordinate. The communication anomaly offset vector located in the anomaly fault region and the corrected fault space coordinates are vector decomposed. The communication anomaly offset vector is projected along the direction of the corrected fault space coordinates to obtain radial and tangential components. The corrected fault space coordinates and the radial components are vector superimposed to obtain the second composite coordinates. Use the first or second composite coordinate as the coordinate for comprehensive fault determination.
[0070] For example, the angle between the communication anomaly offset vector and the corrected fault space coordinates is calculated. The three-dimensional components of the communication anomaly offset vector and the corrected fault space coordinates are obtained. The cosine of the angle between the two vectors is calculated using the vector dot product. The vector angle is calculated using the inverse cosine function, and its range is 0°-180°. Based on the vector angle, the fault feature space is divided into co-directional fault regions and anti-directional fault regions. Co-directional fault regions correspond to situations where the characteristic change directions of the communication anomaly and the sensor node's own fault are consistent. Anti-directional fault regions correspond to situations where the characteristic change directions of the communication anomaly and the sensor node's own fault are opposite or orthogonal. When the vector angle is <90°, the direction of the communication anomaly offset vector and the corrected fault space coordinates tends to be consistent, and this is identified as a co-directional fault region. This region indicates that the communication anomaly and the sensor node's own fault coexist and superimpose, leading to an aggravated shift in the fault feature space. When the vector angle is ≥90°, the communication anomaly offset vector deviates significantly from the direction of the corrected fault space coordinates, which is identified as an anomaly fault region. This region indicates that the communication anomaly has a different influence direction from the sensor node's own fault, and the communication anomaly may partially offset or change the characteristic behavior of the sensor node's own fault.
[0071] The communication anomaly offset vector located in the same-direction fault region is vector-superimposed with the corrected fault space coordinates to obtain the corrected fault space coordinates as the reference position. The corrected fault space coordinates represent the position of the sensor node's own fault in the fault feature space. The starting point of the communication anomaly offset vector is translated to the ending point of the corrected fault space coordinates, while keeping the direction and magnitude of the communication anomaly offset vector unchanged, only changing its starting position in the fault feature space. The translation operation is achieved by adding the three-dimensional components of the communication anomaly offset vector to the corresponding dimension coordinates of the corrected fault space coordinates. The ending coordinates of the translated communication anomaly offset vector are the first composite coordinates, and the three dimension components of the first composite coordinates are the sum of the corresponding dimension components of the corrected fault space coordinates and the corresponding dimension components of the communication anomaly offset vector. The first composite coordinates reflect the superposition effect of the communication anomaly and the sensor node's own fault. Since the characteristic changes of both are in the same direction, the superimposed comprehensive fault feature is farther from the normal operating area in the fault feature space, and the fault degree is more obvious. For the same-direction fault region, the vector superposition operation can accurately reflect the amplification effect of the communication anomaly on the sensor node's own fault features, avoiding the misjudgment of communication link quality degradation as normal sensor node performance.
[0072] Vector decomposition is performed on the communication anomaly offset vector located in the anomaly fault region and the corrected fault space coordinates to obtain the unit direction vector of the corrected fault space coordinates. The unit direction vector is calculated by dividing each dimensional component of the corrected fault space coordinates by its modulus. The communication anomaly offset vector is then projected along the direction of the corrected fault space coordinates. The projection decomposition includes radial and tangential components. The radial component represents the projection of the communication anomaly offset vector onto the direction of the corrected fault space coordinates, and the tangential component represents the component of the communication anomaly offset vector perpendicular to the direction of the corrected fault space coordinates. The radial component is calculated by taking the dot product of the communication anomaly offset vector and the unit direction vector of the corrected fault space coordinates to obtain the projection length. Multiplying the projection length by the unit direction vector yields the three-dimensional coordinate representation of the radial component. The tangential component is calculated by subtracting the radial component from the communication anomaly offset vector. The formula for calculating the tangential component is as follows: , where V t For the tangential component, V c F is the communication anomaly offset vector. a The corrected fault space coordinates, This is the modulus of the corrected fault space coordinates.
[0073] The second composite coordinate is obtained by vector superposition of the corrected fault space coordinates and the radial component. Vector superposition is achieved by adding the corresponding dimensional components of the corrected fault space coordinates to the radial component. The three dimensional components of the second composite coordinate are the sums of the corresponding dimensional components of the corrected fault space coordinates and the radial component. The radial component represents the influence of communication anomalies on the sensor node's own fault direction. When the vector angle is greater than 90°, the radial component is negative, indicating that the communication anomaly has, to some extent, offset the characteristic manifestations of the sensor node's own fault. The superimposed second composite coordinate is closer to the origin of the fault feature space than the corrected fault space coordinates, indicating a weakening of the fault severity. The tangential component is excluded from the synthesis process. The tangential component represents the influence of communication anomalies in the direction orthogonal to the sensor node's own fault. Changes in this direction do not change the main characteristics of the sensor node's own fault, only introducing additional noise interference. Removing the tangential component can reduce the misleading effect of communication anomalies on fault judgment. For anisotropic fault regions, vector decomposition and radial component superposition operations can accurately extract the corrective effect of communication anomalies on the sensor node's own fault characteristics, avoiding misjudging improved communication link quality as an aggravation of the sensor node's own fault.
[0074] The corresponding composite coordinates are selected as the comprehensive fault determination coordinates based on the fault region type of the target sensor node. When the target sensor node is located in a same-direction fault region, the first composite coordinate is used as the comprehensive fault determination coordinate; when the target sensor node is located in an opposite-direction fault region, the second composite coordinate is used as the comprehensive fault determination coordinate. The comprehensive fault determination coordinates comprehensively consider the interaction between communication anomalies and the sensor node's own faults. Compared with using the corrected fault space coordinates alone, the comprehensive fault determination coordinates can more accurately reflect the actual fault state of the sensor node. The distance from the comprehensive fault determination coordinates to the origin of the fault feature space is calculated as the comprehensive fault index. The comprehensive fault index is calculated by taking the square root of the sum of the squares of the components of the comprehensive fault determination coordinates, and the unit of the comprehensive fault index is normalized units. A comprehensive fault threshold is set, with a range of 0.6 to 0.85, preferably 0.75. When the comprehensive fault index is greater than the comprehensive fault threshold, the target sensor node is determined to be an abnormal node; when the comprehensive fault index is less than or equal to the comprehensive fault threshold, the target sensor node is determined to be a normal node.
[0075] By dividing the fault regions into unidirectional and heterodirectional regions using vector angles and employing a differentiated vector fusion strategy, the impact of communication anomalies on node faults can be distinguished, reducing false alarms and missed alarms caused by communication fluctuations and improving the accuracy and robustness of abnormal node identification in complex communication environments.
[0076] In some preferred embodiments, the distance metric values of the comprehensive fault determination coordinates and the corrected event space coordinates in their respective feature spaces are compared, and the anomaly type of the target sensor node is determined based on the magnitude relationship of the distance metric values, including: The Euclidean distance between the comprehensive fault determination coordinates and the origin of the fault feature space is calculated as the fault distance metric, and the Euclidean distance between the corrected event space coordinates and the origin of the event feature space is calculated as the event distance metric. When the fault distance metric is greater than the event distance metric, the sensor data integrity index and communication continuity index corresponding to the comprehensive fault judgment coordinates are extracted. When the sensor data integrity index is lower than the integrity threshold, it is judged as a hardware fault. When the communication continuity index is lower than the continuity threshold, it is judged as a communication fault. When the event distance metric is greater than the fault distance metric, the data mutation rate and data deviation magnitude corresponding to the corrected event space coordinates are extracted. When the data mutation rate is higher than the mutation threshold, it is determined to be an environmental mutation anomaly. When the data deviation magnitude is higher than the drift threshold, it is determined to be a data drift anomaly.
[0077] For example, the Euclidean distance between the comprehensive fault judgment coordinates and the origin of the fault feature space is calculated as the fault distance metric. Three components of the comprehensive fault judgment coordinates are obtained, corresponding to data quality deviation, temporal stability deviation, and spatial consistency deviation, respectively. The square root of the sum of the squares of the three components yields the fault distance metric. The fault distance metric reflects the comprehensive degree to which the target sensor node deviates from its normal operating state in the fault judgment dimension. A larger fault distance metric indicates a higher probability of a fault in the sensor node itself or its communication link. The unit of the fault distance metric is normalized units. Similarly, the Euclidean distance between the corrected event space coordinates and the origin of the event feature space is calculated as the event distance metric. Three components of the corrected event space coordinates are obtained, corresponding to the amplitude change characteristics, change rate characteristics, and change duration characteristics of the monitored data, respectively. The square root of the sum of the squares of the three components yields the event distance metric. The event distance metric reflects the combined degree of real physical events occurring in the environment where the target sensor node is located, or the drift in sensor measurement characteristics. A larger event distance metric indicates a higher probability of significant changes in environmental conditions or sensor performance degradation. The unit of the event distance metric is a normalized unit. A quantitative comparison of fault features and event features is achieved by calculating the Euclidean distance in two feature spaces. The Euclidean distance calculation method ensures that the contributions of different dimensional features to the distance metric are additive and symmetrical.
[0078] The difference between the fault distance metric and the event distance metric is used to determine the anomaly type. The absolute value of the difference reflects the degree of significance of the two anomaly characteristics, and the positive or negative sign of the difference indicates the dominant anomaly type. When the fault distance metric is greater than the event distance metric, the deviation of the target sensor node in the fault feature space exceeds its deviation in the event feature space, indicating that the data anomaly of the sensor node is mainly caused by the node's own fault or communication failure, rather than by actual environmental changes or sensor performance degradation. Sensor data integrity and communication continuity indices corresponding to the comprehensive fault determination coordinates are extracted. The sensor data integrity index is calculated by statistically analyzing the proportion of valid data frames to total expected data frames of the target sensor node within a preset time window. The preset time window length is set between 5 min and 30 min, preferably 10 min. The sensor data integrity index ranges from 0 to 1; a value closer to 1 indicates more complete data output from the sensor node, while a value closer to 0 indicates a large amount of missing data. The communication continuity index is calculated by comparing the number of successful communication sessions to the number of communication interruptions at a target sensor node within a preset time window. Successful communication sessions refer to the number of times a data packet is successfully transmitted between the sensor node and the network aggregation node and an acknowledgment is received. Communication interruptions refer to the number of times a sensor node sends a data packet but fails to receive an acknowledgment within a specified time limit. The specified time limit is set between 100ms and 500ms, preferably 200ms. A higher communication continuity index indicates better communication link stability, while a lower index indicates frequent communication link interruptions.
[0079] When the sensor data integrity index is below the integrity threshold, the proportion of valid data frames output by the sensor node is too low, indicating a hardware-level functional defect in the sensor node's data acquisition or data storage unit, and is thus judged as a hardware malfunction. The integrity threshold is set in the range of 0.6-0.8, preferably 0.7. The integrity threshold is set based on the minimum requirements of the sensor network for data availability. Sensor nodes below this threshold cannot provide sufficient valid monitoring data to support subsequent data analysis and decision-making. Hardware malfunctions include aging of sensor sensitive elements, failure of analog-to-digital conversion circuits, damage to memory chips, or abnormal power supply modules. Sensor nodes with hardware malfunctions require physical repair or replacement. When the communication continuity index is below the continuity threshold, data transmission between the sensor node and the network aggregation node frequently fails, indicating a malfunction in the sensor node's wireless communication module or severe interference to the signal propagation path between the sensor node and the network, and is thus judged as a communication malfunction. The continuity threshold is set in the range of 3-8, preferably 5. The continuity threshold is set based on the statistical characteristics of the communication success rate of the wireless sensor network under normal operating conditions. Sensor nodes below this threshold cannot meet the reliability requirements of network data transmission due to unreliable communication link quality. Communication failures include issues such as attenuated wireless transmission power, poor antenna contact, obstructions in the propagation path, or electromagnetic interference. Sensor nodes experiencing communication failures require adjustments to communication parameters or improvements to the communication environment. By separately determining sensor data integrity and communication continuity indicators, a clear distinction between hardware and communication failures is achieved. Hardware failures focus on the malfunction of internal functional modules within the sensor node, while communication failures focus on connection issues between the sensor node and the external network. The fault location and handling methods for these two types of failures are fundamentally different.
[0080] When the event distance metric is greater than the fault distance metric, the deviation of the target sensor node in the event feature space exceeds its deviation in the fault feature space. This indicates that the data anomalies of the sensor node are mainly caused by real physical changes in the environment or degradation of sensor measurement performance, rather than by hardware or communication failures of the node itself. The data mutation rate and data deviation magnitude corresponding to the corrected event space coordinates are extracted. The data mutation rate is obtained by calculating the ratio of the change in monitored data of the target sensor node per unit time to the time interval. The unit time is set within the range of 1s-10s, preferably 5s. The data mutation rate is calculated by dividing the difference in monitored data between two adjacent sampling times by the sampling time interval. The unit of the data mutation rate is determined according to the type of monitored physical quantity; for example, the unit of the data mutation rate for temperature monitoring is ℃ / s, and the unit of the data mutation rate for pressure monitoring is kPa / s. The data mutation rate reflects the drastic change of the monitored environmental parameters in the time dimension; a higher data mutation rate indicates a greater likelihood of rapid changes in the environmental state. The data deviation is calculated by taking the difference between the current monitoring data of the target sensor node and the average monitoring data during its historical normal operation period. The time span of the historical normal operation period is set to 24h-168h, preferably 72h. The unit of the data deviation is consistent with the unit of the monitored physical quantity. The data deviation reflects the degree of deviation of the monitoring data from the normal operation baseline. The larger the data deviation, the more significant the difference between the sensor measurement results and the historical normal state.
[0081] When the data mutation rate exceeds the mutation threshold, the monitored data undergoes a rapid change exceeding the normal fluctuation range within a short period, indicating a sudden physical event in the environment where the sensor node is located, and is thus identified as an environmental mutation anomaly. The mutation threshold is set according to the type of monitored physical quantity and the application scenario. For temperature monitoring, the mutation threshold is set in the range of 0.5℃ / s-2℃ / s, preferably 1℃ / s; for pressure monitoring, the mutation threshold is set in the range of 5kPa / s-20kPa / s, preferably 10kPa / s. Typical scenarios corresponding to environmental mutation anomalies include a sudden temperature rise due to a fire in the monitored area, a sudden pressure drop due to a pipeline rupture, or a surge in gas concentration due to a chemical leak. Sensor node data with environmental mutation anomalies reflects real changes in the physical world and is not due to a functional malfunction of the sensor node itself, but it requires triggering the corresponding emergency response mechanism. When the data deviation exceeds the drift threshold, the monitored data undergoes a continuous shift relative to the historical normal baseline, indicating a slow degradation of the sensor's measurement characteristics, and is thus identified as a data drift anomaly. The drift threshold is set according to the sensor's accuracy level and allowable error range, and is set in the range of 2%-10% of the sensor's range, preferably 5%. Typical scenarios corresponding to data drift anomalies include sensitivity decay of sensor sensitive elements, zero-point shift, or calibration parameter failure. Although sensor nodes with data drift anomalies can still output data normally, their measurement accuracy can no longer meet application requirements, necessitating recalibration or preventative replacement. By separately determining the data mutation rate and data deviation magnitude, a detailed identification of environmental mutation anomalies and data drift anomalies is achieved. Environmental mutation anomalies correspond to short-term rapid changes, while data drift anomalies correspond to long-term slow shifts. The temporal characteristics and processing strategies for the two differ significantly.
[0082] By using dual-feature spatial distance measurement, we can accurately identify four types of anomalies: hardware failure, communication failure, environmental mutation, and data drift, and match them with differentiated handling measures to avoid ineffective maintenance or monitoring blind spots caused by misjudgment, thereby improving the pertinence and efficiency of anomaly handling.
[0083] Please see Figure 2 Similar to the embodiments described above, this application also provides a sensor network abnormal node identification system, comprising: The feature mapping module is used to acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates. The coordinate correction module is used to calculate the spatial consistency index based on the neighboring node data, and to correct the fault space coordinates and event space coordinates according to the spatial consistency index, generating the corrected fault space coordinates and event space coordinates. The offset confirmation module is used to obtain the communication status parameters of the target sensor node and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters. The anomaly determination module is used to synthesize the communication anomaly offset vector and the corrected fault space coordinates to obtain the comprehensive fault determination coordinates. It compares the distance metric values of the comprehensive fault determination coordinates and the corrected event space coordinates in their respective feature spaces, and determines the anomaly type of the target sensor node based on the relationship between the magnitudes of the distance metric values.
[0084] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0085] Based on the same inventive concept as the above method embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it enables the electronic device to implement the control method described in the above embodiments.
[0086] In one embodiment, the electronic device may be a server, and in this embodiment, the structure of the electronic device may be as follows: Figure 3 As shown, it includes a memory 2001, a communication module 2003, and one or more processors 2002.
[0087] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0088] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0089] Finally, it should be noted that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying abnormal nodes in a sensor network, characterized in that: The method includes the following steps: Acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates; Based on the neighboring node data, a spatial consistency index is calculated. The fault space coordinates and the event space coordinates are then corrected according to the spatial consistency index to generate corrected fault space coordinates and corrected event space coordinates. Obtain the communication status parameters of the target sensor node, and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters; The communication anomaly offset vector and the corrected fault space coordinates are vector synthesized to obtain comprehensive fault judgment coordinates. The distance metric values of the comprehensive fault judgment coordinates and the corrected event space coordinates in their respective feature spaces are compared, and the anomaly type of the target sensor node is determined according to the relationship between the magnitude of the distance metric values.
2. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: A two-layer feature mapping relationship is constructed to map the data feature vectors to the fault feature space and the event feature space respectively, obtaining fault space coordinates and event space coordinates, including: Extract the temporal change rate and numerical fluctuation amplitude of the current data and the neighboring node data within a preset time window, and slide the preset time window according to the timestamp differences of each node's data. A time-series mapping matrix is constructed based on the aligned time-series change rate, and a numerical mapping matrix is constructed based on the aligned numerical fluctuation amplitude. The spatial distance attenuation factor between the target sensor node and the neighboring node is calculated. The matrix elements of the time-series mapping matrix and the numerical mapping matrix are position-modulated according to the spatial distance attenuation factor to generate a spatially modulated time-series mapping matrix and a numerical mapping matrix. The spatially modulated temporal mapping matrix and the numerical mapping matrix are subjected to tensor product operation to generate a joint mapping tensor. The joint mapping tensor is then subjected to dimension reduction projection to obtain the fault projection vector and the event projection vector, respectively. The fault projection vector and the event projection vector are used as the fault space coordinates and the event space coordinates.
3. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: The spatial consistency index is calculated based on the neighboring node data, including: A spatial association graph is constructed between the target sensor node and each neighboring node. The edge weights of the spatial association graph are determined by the spatial distance between the nodes and the data correlation. Calculate the directional deviation angle between the data gradient vector of the target sensor node and the data gradient vector of each neighboring node, and identify the neighboring nodes with gradient anomalies in the spatial correlation graph based on the directional deviation angle; After removing the neighboring nodes of the gradient anomaly, a data transmission path from the target sensor node to each neighboring node is constructed in the spatial correlation graph. The data transmission boundary is determined according to the connectivity and path length of each data transmission path. Within the data transmission boundary, the spatial covariance matrix between the neighboring node data and the target sensor node data is calculated. The spatial covariance matrix is decomposed into multiple eigenvalues. Based on the propagation attenuation rate of the eigenvectors corresponding to each eigenvalue in the spatial correlation graph, the eigenvalue with the smallest attenuation rate is selected as the principal eigenvalue, and the principal eigenvalue is used as the spatial consistency index.
4. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: Based on the spatial consistency index, the fault space coordinates and the event space coordinates are corrected to generate corrected fault space coordinates and corrected event space coordinates, including: The spatial consistency index is compared with the fault persistence threshold to obtain the fault consistency deviation, and the spatial consistency index is compared with the event mutability threshold to obtain the event consistency deviation. Based on the fault consistency deviation and the components of each dimension of the fault spatial coordinates, a fault coupling equation is constructed. The gradient change of the fault spatial coordinates along each dimension is calculated. When the gradient change satisfies the continuity condition in each dimension, the fault spatial coordinates are determined to be in the correctable region. The fault correction vector is obtained by solving the fault coupling equation for the fault spatial coordinates in the correctable region and then corrected to obtain the corrected fault spatial coordinates. Based on the event consistency deviation and the components of each dimension of the event space coordinates, an event coupling equation is constructed. The distance between the event space coordinates and the preset event reference point in the event feature space is calculated. When the distance is less than the mutation response radius, the event space coordinates are determined to be in the correctable region. The event space coordinates in the correctable region are corrected by solving the event coupling equation to obtain the event correction vector and then corrected to obtain the corrected event space coordinates.
5. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: Based on the communication state parameters, a communication anomaly offset vector is established in the fault feature space, including: The signal strength sequence, data packet loss rate sequence, and communication delay sequence of the target sensor node within a preset time period are obtained as the communication status parameters. The signal strength sequence values at each moment are mapped to the first dimension coordinates of the fault feature space, the data packet loss rate sequence values at each moment are mapped to the second dimension coordinates of the fault feature space, and the communication delay sequence values at each moment are mapped to the third dimension coordinates of the fault feature space. Spatial points in the fault feature space are formed by the three dimension coordinate values at the same moment. Spatial points at each moment within the preset time period are connected in time sequence to form a communication state trajectory. The displacement vector between adjacent spatial points is calculated along the communication state trajectory. The communication state trajectory of the neighboring nodes is obtained and the neighboring displacement vector is calculated. The directional difference between the displacement vector and the neighboring displacement vector is calculated. When the directional difference exceeds the consistency threshold, the dominant offset direction of the communication state is determined. The communication anomaly offset vector is constructed based on the spatial positional relationship between the dominant offset direction of the communication state and the corrected fault spatial coordinates.
6. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: The communication anomaly offset vector and the corrected fault space coordinates are combined to obtain the comprehensive fault determination coordinates, including: Calculate the vector angle between the communication anomaly offset vector and the corrected fault space coordinates. Divide the fault feature space into a same-direction fault region and an opposite-direction fault region based on the vector angle. When the vector angle is less than a right angle, it is determined to be a same-direction fault region. When the vector angle is greater than or equal to a right angle, it is determined to be an opposite-direction fault region. The communication anomaly offset vector located in the same direction fault area is vector superimposed with the corrected fault space coordinates. The starting point of the communication anomaly offset vector is translated to the ending point of the corrected fault space coordinates, and the ending point of the translated communication anomaly offset vector is used as the first composite coordinate. The communication anomaly offset vector located in the anomaly fault region and the corrected fault space coordinates are vector decomposed. The communication anomaly offset vector is projected along the direction of the corrected fault space coordinates to obtain radial and tangential components. The corrected fault space coordinates and the radial components are vector superimposed to obtain the second composite coordinates. The first composite coordinate or the second composite coordinate is used as the comprehensive fault determination coordinate.
7. The method for identifying abnormal nodes in a sensor network according to claim 1, characterized in that: Compare the distance metric values of the integrated fault determination coordinates and the corrected event space coordinates in their respective feature spaces, and determine the anomaly type of the target sensor node based on the magnitude relationship of the distance metric values, including: The Euclidean distance between the comprehensive fault determination coordinates and the origin of the fault feature space is calculated as the fault distance metric, and the Euclidean distance between the corrected event space coordinates and the origin of the event feature space is calculated as the event distance metric. When the fault distance metric is greater than the event distance metric, the sensor data integrity index and communication continuity index corresponding to the comprehensive fault judgment coordinates are extracted. When the sensor data integrity index is lower than the integrity threshold, it is determined to be a hardware fault. When the communication continuity index is lower than the continuity threshold, it is determined to be a communication fault. When the event distance metric is greater than the fault distance metric, the data mutation rate and data deviation magnitude corresponding to the corrected event space coordinates are extracted. When the data mutation rate is higher than the mutation threshold, it is determined to be an environmental mutation anomaly. When the data deviation magnitude is higher than the drift threshold, it is determined to be a data drift anomaly.
8. A sensor network abnormal node identification system, using the sensor network abnormal node identification method as described in any one of claims 1-7, characterized in that, Includes the following modules: The feature mapping module is used to acquire the current data of the target sensor node and its neighboring node data, extract the data feature vector of the current data, construct a two-layer feature mapping relationship, and map the data feature vector to the fault feature space and the event feature space respectively to obtain the fault space coordinates and the event space coordinates. The coordinate correction module is used to calculate the spatial consistency index based on the neighboring node data, correct the fault space coordinates and the event space coordinates according to the spatial consistency index, and generate the corrected fault space coordinates and the corrected event space coordinates. The offset confirmation module is used to obtain the communication status parameters of the target sensor node and establish a communication anomaly offset vector in the fault feature space based on the communication status parameters. The anomaly determination module is used to synthesize the communication anomaly offset vector and the corrected fault space coordinates to obtain comprehensive fault determination coordinates, compare the distance metric values of the comprehensive fault determination coordinates and the corrected event space coordinates in their respective feature spaces, and determine the anomaly type of the target sensor node based on the relationship between the magnitudes of the distance metric values.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 7.
