A Method and System for Elastic Optimization Deployment of Sensor Networks Based on Core Causal Subgraph Discovery

CN122601469APending Publication Date: 2026-08-18TIANJIN NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611089578.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0006]本发明提供了一种基于核心因果子图发现的传感网弹性优化部署方法与系统解决上述问题,解决了现有技术中无法在扰动环境下显式建模时空因果依赖关系并 提取跨扰动条件保持稳定的核心因果子图,以支撑传感网高效部署的问题

Benefits of technology

(1)本发明引入因果驱动机制实现虚假关联的精准识别与抑制,即时空因果图构造模块,将时间滞后因果与空间交互因果统一至同一时空框架,构建出包含有向、加权、带符号因果关系的完整时空因果图;这种时空双维度联合建模的方式,从根本上区别于现有基于相关性统计的单维度拓扑构建方法,能够同时捕获跨时间片的因果传递路径与同时间片的空间交互机制,有效剔除了因环境噪声与时空混杂因素引入的虚假相关性干扰,使所识别的关键节点与核心结构具备跨环境稳定性,显著提升了部署方案在分布偏移与扰动条件下的泛化能力,同时从源头上抑制了因稠密相关性网络引发的风险级联效应。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601469A_ABST
    Figure CN122601469A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for resilient optimization deployment of sensor networks based on the discovery of core causal subgraphs. Applied to the field of sensor network technology, the method includes: acquiring multivariate raw temporal sensor data collected by each sensor node; constructing a spatiotemporal causal graph using a spatiotemporal causal graph construction module and constructing a correlation graph of the raw sensor data using the KNN algorithm; inputting the spatiotemporal causal graph and the correlation graph into a constructed causal adversarial decoupling graph neural network module for training, retaining the trained causal encoder; the causal adversarial decoupling graph neural network module includes a causal encoder; and based on the spatiotemporal causal graph and the trained causal encoder, identifying and extracting core causal invariant subgraphs in sensor network nodes through multi-perturbation view comparison learning. This invention solves the problems of insufficient robustness, poor generalization ability, and lack of interpretability of deployment decisions caused by spurious correlation interference in perturbation environments in existing sensor network deployment methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sensor network technology, and in particular to a method and system for resilient optimization deployment of sensor networks based on core causal subgraph discovery. Background Technology

[0002] With the deep integration of intelligent sensing technology and artificial intelligence, sensor networks have become a crucial infrastructure supporting complex systems such as intelligent transportation, environmental monitoring, and industrial process monitoring. By deploying a large number of sensor nodes in open spaces, sensor networks can acquire real-time information on system operating status and environmental dynamics. However, when application scenarios shift from closed, controllable environments to the open, dynamic, and highly uncertain real world, the optimized deployment of sensor networks faces severe challenges. Sensor nodes often fail due to energy depletion, hardware aging, or external shocks, while noise and non-stationary evolution processes in complex environments cause the network structure and observation relationships to constantly change. Against this backdrop, how to achieve highly energy-efficient, robust, and risk-controlled flexible optimization deployment of sensor networks while ensuring measurement accuracy has become a key problem that urgently needs to be solved in this field.

[0003] Current mainstream sensor network optimization deployment methods mostly rely on correlation statistics to construct network topology and guide node selection. Existing methods include coverage optimization based on geometric criteria, metaheuristic algorithms, and feature modeling based on graph neural networks. These methods utilize correlation coefficients, mutual information, or graph attention mechanisms to infer dependencies between nodes and perform well in static or weakly disturbed environments. However, in open and dynamic scenarios, environmental noise and spatiotemporal confounding factors can easily introduce spurious edges and redundant connections into the correlation connection structure, resulting in a lack of cross-environment stability for the identified key nodes or core structures. Furthermore, highly dense or symmetrical correlation networks can accelerate risk propagation when nodes fail, triggering a cascading effect of local failures leading to global performance degradation. Although some robust deployment algorithms introduce elastic optimization mechanisms to improve anti-interference capabilities, their optimization objectives are still based on statistical correlation indicators such as coverage and connectivity, failing to address the fundamental difference between statistical correlation and causal mechanisms, thus limiting the generalization ability of deployment schemes in distributed environments.

[0004] In recent years, causal-driven methods have provided new insights for sensor network optimization. Existing research has validated the effectiveness of causal mechanism modeling in fields such as industrial fault diagnosis and traffic prediction through causal prior constraints, causal decoupling, or causal intervention, which can alleviate the problem of spurious correlations to some extent. However, most of these methods still follow the correlation-based graph neural network modeling paradigm, whose graph structure is usually constructed by correlation weights between nodes or implicit learning mechanisms, lacking explicit representation of the directed weighted causal structure, and the decoupling of causal features from correlation features is still insufficient. Meanwhile, while existing research on causal discovery and invariant learning provides theoretical support for cross-environment stable representations, it rarely applies invariant constraints to the structural level of spatiotemporal causal graphs, and rarely addresses the problem of sensor network resilient optimization and deployment decisions.

[0005] Therefore, how to explicitly model spatiotemporal causal dependencies under perturbation conditions and extract core causal subgraphs that remain stable across perturbation conditions to support the efficient, robust, and risk-controllable elastic optimization deployment of sensor networks has become a pressing technical challenge. Summary of the Invention

[0006] This invention provides a method and system for the elastic optimization deployment of sensor networks based on the discovery of core causal subgraphs to solve the above-mentioned problems. It solves the problem that existing technologies cannot explicitly model spatiotemporal causal dependencies and extract core causal subgraphs that remain stable across perturbation conditions in order to support the efficient deployment of sensor networks.

[0007] According to a first aspect of the present invention, a method for resilient optimization deployment of a sensor network based on core causal subgraph discovery is provided. The method includes: acquiring multivariate time-varying raw sensor data collected by each sensor node; A spatiotemporal causal graph is constructed by a spatiotemporal causal graph construction module, and a correlation graph of the original sensing data is constructed using the KNN algorithm. The spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and fuse the two to obtain the spatiotemporal causal graph. The spatiotemporal causal graph and correlation graph are input into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features and spurious correlation bias features are separated, and the trained causal encoder is retained. The causal adversarial decoupling graph neural network module includes a causal encoder. Based on the spatiotemporal causal graph and the trained causal encoder, the core causal invariant subgraph in the sensor network node is identified and extracted through multi-perturbation view comparison learning, and the sensor network is deployed based on the core causal invariant subgraph.

[0008] Furthermore, the steps for constructing the spatiotemporal causal graph include: The original sensor data was processed using the PCMCI algorithm to obtain a time causality matrix block; The spatial causality matrix is ​​obtained by processing the raw sensor data using the SCMI algorithm; The temporal causal effect matrix block and the spatial causal effect matrix are fused to obtain the spatiotemporal causal adjacency matrix; the main diagonal block of the spatiotemporal causal adjacency matrix is ​​the spatial causal effect matrix, the upper triangular block is the temporal causal effect matrix block, and the lower triangular block is the zero matrix; The spatiotemporal causal adjacency matrix and the original sensor data are concatenated to obtain a spatiotemporal causal graph.

[0009] Furthermore, the causal adversarial decoupling graph neural network module includes a causal encoder, a bias encoder, a causal decoder, a bias decoder, and a discriminator; The causal encoder includes an input layer, several graph convolutional layers, and activation function layers. Each graph convolutional layer is equipped with a linear transformation unit to add self-loop causal information and has two parallel neighbor aggregation channels, namely a positive causal effect aggregation channel and a negative causal effect aggregation channel. Each channel has its own independent learnable weight matrix. The causal decoder includes an input layer, three parallel bilinear transform layers, and an optional activation function layer; the three parallel bilinear transform layers each have different learnable parameter matrices; wherein, the first and second bilinear transform layers are connected to nonlinear activation functions, while the third bilinear transform layer is not connected to an activation function.

[0010] Furthermore, the spatiotemporal causal graph and correlation graph are input into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features and spurious correlation bias features are separated, including the following steps: The spatiotemporal causal graph is input into the causal encoder to calculate the hidden states of all sensor nodes, thereby obtaining the causal representation matrix. The correlation map and the original sensing data are input into the deviation encoder to calculate the hidden state of all sensor nodes and obtain the deviation representation matrix. The causal representation matrix is ​​input into the causal decoder to decouple positive and negative causality, resulting in parameterized positive connection probabilities, negative connection probabilities, and edge weights. The deviation representation matrix is ​​input into the deviation decoder to reconstruct the correlation adjacency matrix, resulting in a new correlation adjacency matrix; The bias representation matrix and the causality representation matrix are input into the discriminator to obtain the classification probability, and the adversarial loss is calculated based on the classification probability. Based on the positive connection probability, negative connection probability, edge weight, new correlation adjacency matrix, and adversarial loss, a total loss function is constructed, and a gradient reversal layer is introduced to update the parameters of each encoder, decoder, and discriminator to obtain a trained causal encoder.

[0011] Furthermore, the total loss function includes causal branch reconstruction loss, biased branch reconstruction loss, and adversarial loss; The causal branch reconstruction loss See the following formula: ; in, This represents the loss weights corresponding to the weighted regression loss. This represents the weighted regression loss. This represents the symbol classification loss; The symbol classification loss is given by the following formula: ; in, Indicates an indicator function, This represents the time position of the i-th sensor node. Let E represent the time of the j-th sensor node, and let E represent the set of causal edges. Representing the spatiotemporal causal adjacency matrix The element corresponding to the i-th row and j-th column, Indicates the probability of a positive connection. Indicates the probability of negative connections; The binary cross-entropy loss value is calculated using the following formula: ; in, Indicates a reference value. Indicates the predicted value; The weighted regression loss is given by the following formula: ; in, This represents the spatiotemporal causal adjacency matrix in the i-th row and j-th column. This represents the edge weight in the i-th row and j-th column; The deviation branch reconstruction loss is given by the following formula: ; in, Represents the relevance adjacency matrix. New relevance adjacency matrix.

[0012] Furthermore, based on the spatiotemporal causal graph and the trained causal encoder, the core causal invariant subgraph in the sensor network nodes is identified and extracted through multi-perturbation view contrastive learning, including: Based on the original sensor data, a set of perturbation views is constructed, and a mask corresponding to each perturbation view is generated. The perturbation spatiotemporal causal adjacency matrix of each perturbation view is weighted and filtered using the mask to obtain a causal perturbation soft subgraph. The trained causal encoder is used to extract features from the causal perturbation soft subgraphs of each perturbation view, and the features are stacked along the third dimension to obtain a third-order causal feature tensor. Based on the third-order causal feature tensor, a low-rank tensor residual loss function is constructed. This loss function is minimized to update the mask and obtain the core causal invariant subgraph mask. The core causal invariant subgraph mask is then used to perform weighted filtering on the spatiotemporal causal graph to obtain the final core causal subgraph.

[0013] Furthermore, a set of perturbation views is constructed based on the original sensor data, and a mask corresponding to each perturbation view is generated. The perturbation spatiotemporal causal adjacency matrix of each perturbation view is weighted and filtered using the mask to obtain a causal perturbation soft subgraph, including: Node-level perturbations are applied to the original sensing data to generate perturbation views; each perturbation view is reconstructed by the spatiotemporal causal graph construction module to obtain a set of perturbation views and the corresponding perturbation spatiotemporal causal adjacency matrix; Construct a mask tensor using a soft subgraph generator; For each perturbation view, the soft graph generator performs weighted filtering on each element in the perturbation spatiotemporal causal adjacency matrix using a mask tensor to obtain a causal perturbation soft graph.

[0014] According to a second aspect of the present invention, a sensor network resilient optimization deployment system based on core causal subgraph discovery is provided, comprising: The data acquisition unit is used to acquire multivariable raw time-varying sensor data collected by each sensor node; The graph construction unit, connected to the data acquisition unit, is used to construct a spatiotemporal causal graph through the constructed spatiotemporal causal graph construction module, and to construct a correlation graph of the original sensing data using the KNN algorithm; wherein, the spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and fuse the two to obtain the spatiotemporal causal graph; A pre-training unit, connected to the graph construction unit, is used to input the spatiotemporal causal graph and correlation graph into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features are separated from spurious correlation bias features, and the trained causal encoder is retained. The causal adversarial decoupling graph neural network module includes a causal encoder. The subgraph extraction unit, connected to the pre-training unit, is used to identify and extract the core causal invariant subgraph in the sensor network node based on the spatiotemporal causal graph and the trained causal encoder through multi-perturbation view comparison learning, and to deploy the sensor network based on the core causal invariant subgraph.

[0015] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement a sensor network resilient optimization deployment method based on core causal subgraph discovery.

[0016] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon; the computer program is executed by a processor to implement a sensor network resilient optimization deployment method based on core causal subgraph discovery.

[0017] The beneficial effects of this invention are: (1) This invention introduces a causal-driven mechanism to achieve accurate identification and suppression of false associations, namely, the spatiotemporal causal graph construction module, which unifies time-lag causality and spatial interaction causality into the same spatiotemporal framework, and constructs a complete spatiotemporal causal graph containing directed, weighted, and signed causal relationships. This spatiotemporal dual-dimensional joint modeling method is fundamentally different from the existing single-dimensional topology construction method based on correlation statistics. It can simultaneously capture the causal transmission path across time slices and the spatial interaction mechanism within the same time slice, effectively eliminating the false correlation interference introduced by environmental noise and spatiotemporal confounding factors, enabling the identified key nodes and core structures to have cross-environment stability, significantly improving the generalization ability of the deployment scheme under distribution offset and disturbance conditions, and suppressing the risk cascading effect caused by dense correlation networks from the source.

[0018] (2) To address the shortcomings of existing causal-driven methods in explicitly modeling causal structures and inadequate decoupling of causal and correlation features, this invention designs a causal adversarial decoupling graph neural network module to achieve explicit separation of causal and bias features. This module employs a dual-input strategy, simultaneously receiving spatiotemporal causal graphs and correlation graphs. Causal and bias encoders are used to extract causal and spurious correlation features respectively. A gradient reversal layer is introduced to achieve adversarial learning, forcing orthogonal separation of the two types of features. This mechanism enables the model to accurately distinguish between real causal dependencies and spurious associations under complex perturbation environments, avoiding the problem of causal features being contaminated by bias features in existing methods, and providing a clean and robust node causal representation for subsequent core causal subgraph extraction.

[0019] (3) In view of the limitations of existing causal discovery and invariant learning research in effectively serving the flexible optimization deployment of sensor networks and the difficulty in systematically extracting stable core causal subgraphs under perturbation environment, this invention constructs a core causal invariant subgraph extraction architecture based on low-rank tensor residuals to realize the automatic discovery of stable structures across perturbation environment. This mechanism is the first to apply invariance constraints to the structural level of spatiotemporal causal graphs, realizing end-to-end automatic discovery of stable core causal subgraphs across perturbation environment, and providing an interpretable, controllable and robust causal decision basis for the flexible optimization deployment of sensor networks.

[0020] (4) In view of the problem that existing causal discovery and invariant learning research has failed to effectively serve the flexible optimization deployment of sensor networks and the disconnect between causal structure and deployment decision, this invention integrates the spatiotemporal causal graph construction module, the causal adversarial decoupling graph neural network module and the core causal invariant subgraph extraction architecture into a unified end-to-end flexible optimization framework to achieve synergistic optimization of efficiency, robustness and risk controllability.

[0021] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the invention. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 The flowchart illustrates a method for resilient optimization deployment of sensor networks based on core causal subgraph discovery, as provided in an embodiment of the present invention. Figure 2 This diagram illustrates the framework of a sensor network resilient optimization deployment method based on core causal subgraph discovery provided in an embodiment of the present invention. Figure 3 This diagram illustrates the structure of a causal adversarial decoupling graph neural network module provided in an embodiment of the present invention. Figure 4 This diagram illustrates the structure of the core causal invariant subgraph extraction architecture based on low-rank tensor residuals provided in an embodiment of the present invention. Figure 5 This diagram illustrates a framework of a sensor network resilient optimization deployment system based on core causal subgraph discovery, as provided in an embodiment of the present invention. Figure 6 A block diagram of an electronic device according to an embodiment of the present invention is shown; Figure 7 A schematic diagram of a synthetic causal dataset provided in an embodiment of the present invention is shown; Figure 8 This illustrates a truth core causal subgraph provided in an embodiment of the present invention; Figure 9 The figure shows the spatiotemporal causal graph prediction results provided by an embodiment of the present invention; Figure 10 This figure shows a visualization of the core sub-graph of the method of the present invention provided in an embodiment of the present invention; Figure 11 This figure shows a visualization result of the MGC-RM core subgraph provided in an embodiment of the present invention; Figure 12 This illustrates a spatiotemporal causal graph based on the STC-GCM prediction of the PeMS dataset, provided by an embodiment of the present invention. Figure 13 This diagram illustrates the network efficiency maintenance rate under random attacks based on the PeMS dataset, as provided in an embodiment of the present invention. Figure 14 This illustration shows a schematic diagram of POI analysis within 500 meters of the nearest bus stop based on PeMS data, provided by an embodiment of the present invention. Figure 15 This illustration shows a schematic diagram of POI analysis within 300 meters of the nearest bus stop based on PeMS data, provided by an embodiment of the present invention. Figure 16 This illustration shows a schematic diagram of POI analysis based on PeMS data within a 500-meter range, provided by an embodiment of the present invention. Figure 17 This illustrates a visualization of the core subgraph of the PeMS dataset obtained using the method of this invention, as provided in an embodiment of the invention. Figure 18 This paper presents a visualization of the core subgraph of the PeMS dataset obtained using MGC-RM, as provided in an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.

[0024] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0025] This invention provides a method for resilient optimization deployment of sensor networks based on core causal subgraph discovery. See [link to relevant documentation]. Figures 1 to 4 The method specifically includes the following steps: S1. Acquire the multivariable time-based raw sensor data collected by each sensor node. , This represents the time step, and N represents the number of sensor nodes. This represents the data collected by the first sensor node, and so on. Let represent the data collected by the Nth sensor node, and [·]' denotes the transpose.

[0026] Each node continuously collects environmental physical quantities (such as traffic flow, vehicle speed, pollutant concentration, etc.) to form raw sensor data.

[0027] S2. A spatiotemporal causal graph is constructed using the constructed spatiotemporal causal graph construction module, and a correlation graph of the original sensing data is constructed using the KNN algorithm; wherein, the spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and the two are fused to obtain the spatiotemporal causal graph.

[0028] (I) Spatiotemporal Causal Graph By constructing a spatiotemporal causal graph module, time-lag causality and spatial interaction causality are unified into the same spatiotemporal framework.

[0029] Specifically, the spatiotemporal causal graph construction module includes the parallel PCMCI algorithm and SCMI algorithm.

[0030] The PCMCI (Peter and Clark Momentary Conditional Independence) algorithm is used to estimate the lagged causal dependencies between nodes from multivariate time series (i.e., raw sensor data), and outputs a causal effect matrix block across time slices. The SCMI (Spatial Conditional Mutual Information) algorithm is used to estimate the spatial causal effects between different sensor nodes under the adjacency constraint at the current time, and outputs a spatial causal effect matrix. The temporal lagged causality and spatial causality are fused to generate a directed, weighted, signed spatiotemporal causal adjacency matrix, which serves as the input structure for subsequent core causal subgraph learning.

[0031] See Figure 2 Specifically, it includes the following steps: The PCMCI algorithm estimates hysteresis causal connections in the raw sensor data using a two-stage framework, and outputs a cross-time-slice temporal causal effect matrix block. ,in, and This represents different lag times, that is, the time distance between the past and the present. The larger the lag, the further away from the present. , This represents the maximum temporal causal lag, i.e., the maximum time distance at which the past exerts a causal influence on the present. The element in the i-th row and j-th column of the temporal causal effect matrix block. Indicates time lag Below, the i-th sensor node At any moment For the j-th sensor node At any moment The strength of causal influence. The time causal effect matrix block satisfies the constraints. That is, only unidirectional causality "from the past to the present" is allowed, and immediate causality is prohibited. ) and reverse causality ( The edge weight symbol distinguishes between causal promoting and inhibiting effects.

[0032] The SCMI algorithm estimates the spatial causal effects between nodes under spatial constraints and outputs a spatial causal effect matrix. The element in its i-th row and j-th column This represents the i-th sensor node at the current time. For the j-th sensor node The intensity of spatial causal influence.

[0033] Block of the time causality matrix Spatial causal effect matrix Merged into the same spatiotemporal causal adjacency matrix In, among them, This represents the maximum time causal lag plus the current time point, i.e., all time points considered. The merged matrix has the following block structure (in terms of...). (For example) ; Each block is The matrix, with the main diagonal block representing the spatial causal effect matrix. The upper triangular block represents the temporal causal effect matrix, and the lower triangular block represents the zero matrix (reverse causality is prohibited). This ultimately yields a spacetime causal graph. This serves as the input for subsequent core causal subgraph learning.

[0034] (ii) Correlation plot In this invention, the K-Nearest Neighbors (KNN) algorithm is used to process the original sensor data. Processing is performed to construct a correlation plot. ,in This is a correlation adjacency matrix constructed based on the correlation measurement between various sensor nodes, used to capture potential spurious correlation patterns.

[0035] S3. Input the spatiotemporal causal graph and correlation graph into the constructed causal adversarial decoupling graph neural network module for training. Separate causal features from spurious correlation bias features through adversarial learning and retain the trained causal encoder. The causal adversarial decoupling graph neural network module includes a causal encoder. Spacetime causality diagram The spatiotemporal causal adjacency matrix Correlation diagram The relevance adjacency matrix in and raw sensor data The input is used to pre-train the causal adversarial decoupling graph neural network module.

[0036] See Figure 3 The causal adversarial decoupling graph neural network module includes a causal encoder, a bias encoder, a causal decoder, a bias decoder, and a discriminator. It separates causal features from spurious correlation bias features through an adversarial game mechanism. During training, the distinguishability between causal and bias features is the core optimization objective. After training convergence, only the parameters of the causal encoder are retained. Specifically, it includes the following: S31. Input the spatiotemporal causal graph into the causal encoder, calculate the hidden states of all sensor nodes, and obtain the causal representation matrix.

[0037] Causal encoder A signed graph convolutional network is employed to explicitly consider the direction and sign of edges during message passing, capturing positive and negative causal effects respectively. Specifically, during convolution, positive causal in-degree neighbor node features and negative causal in-degree neighbor node features are selectively processed separately to capture positive and negative causal effects. Layer sensor node The hidden state update rules are shown in the following formula: ; in, Represents a non-linear activation function. This represents self-loop causal information, that is, the information that the sensor node retains when it is updated. Indicates the first Layer sensor node The hidden state, The learnable weight matrix representing self-loop causal effects. Indicates the first Layer sensor node The hidden state; This indicates positive causal in-degree neighbor aggregation. , Representing the spatiotemporal causal adjacency matrix The element corresponding to the i-th row and j-th column represents Time sensor node right Time sensor node The strength of causal influence Represents sensor nodes The set of positive causal in-degree neighbors, i.e. All sensor nodes , Represents the learnable weight matrix for handling positive causal effects; This indicates negative causal in-degree neighbor aggregation. Represents sensor nodes The set of negative causal in-degree neighbors. This represents the learnable weight matrix for handling negative causal effects. .

[0038] go through After message passing in the layered graph convolutional network, the causal representation matrix of all sensor nodes is obtained. : ; in, This represents the length of the feature vector of a single node. Represents the set of hidden states in a causal encoder. They represent the first Layer sensor node , , , The hidden state.

[0039] The causal encoder consists of an input layer, several graph convolutional layers, and activation function layers, wherein the graph convolutional layers and activation function layers are stacked together in L layers.

[0040] Each graph convolutional layer includes a linear transformation unit to incorporate self-loop causal information. This linear transformation unit uses a learnable weight matrix to map the previous layer representation of a node and then directly feeds it into the adder. Simultaneously, the graph convolutional layer also includes two parallel neighbor aggregation channels: a positive causal effect aggregation channel and a negative causal effect aggregation channel. Each channel is equipped with an independent learnable weight matrix and performs weighted summation on incoming neighbors pointing to the current node with positive edge weights and incoming neighbors with negative edge weights, respectively.

[0041] The above self-loop causal information output, positive causal in-degree neighbor aggregation output, and negative causal in-degree neighbor aggregation output are added together and then processed by an activation function to obtain the node representation of the current layer, thereby explicitly distinguishing self-loop, positive and negative causal effects and causal direction during the encoding process.

[0042] In summary, the improvements in the causal encoder structure of this invention are mainly reflected in: 1. Incorporate self-loop causal information, i.e., add autocorrelation components to the traditional encoder. An independent linear transformation unit is set in each graph convolutional layer, based on the current layer hidden state of the sensor node. As input, through a learnable weight matrix Perform a linear transformation and add its output directly to the neighbor aggregation result.

[0043] 2. Explicitly distinguish between positive and negative causal effects, encoding neighbors separately for each. Specifically, two parallel neighbor aggregation channels are set up—a positive effect channel and a negative effect channel. The positive effect channel is equipped with a learnable weight matrix. Weighted summation is performed only on incoming neighbors with positive edge weights; the negative effect channel is equipped with an independent learnable weight matrix. We only perform weighted summation on incoming neighbors with negative edge weights. The outputs of the two channels are added to the output of the self-loop and then passed through an activation function to obtain a new representation.

[0044] 3. Explicitly distinguishing causal directions is reflected in the encoding by only incorporating causal in-degree neighbors, that is, only considering causal nodes that affect the sensor node, rather than including all connected nodes. This is based on the spatiotemporal causal adjacency matrix. For each sensor node, its causal in-degree neighbor set is defined and further divided into positive causal in-degree neighbor aggregation and negative causal in-degree neighbor aggregation. The aggregation operation uses the in-degree mask of the adjacency matrix to traverse only the causal in-degree neighbor set, thus strictly following the causal direction.

[0045] S32. Input the correlation map and the original sensing data into the deviation encoder, calculate the hidden state of all sensor nodes, and obtain the deviation representation matrix.

[0046] Deviation encoder A standard graph convolutional network is used to extract the adjacency matrix from the correlation graph and the deviation features from the original sensor data, and then... The hidden states of the layer sensor nodes are updated through multi-layer convolution, enabling the network to learn the bias feature representations in the data during training, as shown in the following formula: ; in, Indicates the deviation encoder number Layer sensor node The hidden state, , Represents the identity matrix. yes The degree matrix, This represents the learnable weight matrix in the bias encoder. After L layers of message passing, the bias representation matrix is ​​obtained. : .

[0047] in, This represents the set of hidden states in the deviation encoder.

[0048] S33. Input the causal representation matrix into the causal decoder to decouple the positive and negative causality, and obtain the parameterized positive connection probability, negative connection probability and edge weight; Causal decoder For spacetime causal graphs The directed, weighted, and signed properties are utilized to apply independent bilinear transformation layers to the positive connection probability. Negative connection probability and edge weight For parameterization, see the following formula: , , ; in, , and All represent learnable parameter matrices. and Representing sensor nodes and The causal representation.

[0049] The separation of positive and negative channels makes it possible to... Decoupling positive and negative causality in the middle Predict the strength of causal effects.

[0050] In this invention, the causal decoder consists of three independent bilinear transform layers. The causal decoder includes an input layer, three parallel bilinear transform layers, and an optional activation function layer. The first bilinear transform layer is equipped with a learnable parameter matrix. A nonlinear activation function is connected in parallel to output the positive connection probability of positive causality; the second bilinear transform layer is equipped with a learnable parameter matrix. It is connected to a nonlinear activation function to output the negative connection probability of negative causality; the third bilinear transform layer is equipped with a learnable parameter matrix. It does not connect to any numerical range compression function and is used to directly output the real-valued edge weights between node pairs.

[0051] Each bilinear transform layer is computed with a fixed left multiplication of the target node representation and a right multiplication of the source node representation. By utilizing the asymmetry of matrix multiplication, the directed edges are predicted independently, thereby simultaneously outputting the sign, weight, and direction of the edges during the decoding stage.

[0052] In summary, the structural improvements are mainly reflected in: 1. Predict connection weights, not just whether a connection exists. Set up a weighted regression bilinear transformation layer whose input is the causal representation matrix between two sensor nodes, and whose output is scalar weights. The bilinear transformation layer does not undergo any numerical range compression (e.g., ...). (Nonlinear activation function), which enables the prediction of causal connection strength for any real value.

[0053] 2. Explicitly distinguish between positive and negative causal effects, and predict probabilities for positive and negative causal effects separately. Structurally, the edge type prediction in the decoder is divided into two independent sub-networks: a positive edge prediction sub-network (parameter...). ) and negative edge prediction subnetwork (parameters) Each sub-network structure consists of a bilinear transform layer and It consists of non-linear activation functions that output the positive connection probability and the negative connection probability, respectively.

[0054] 3. Explicitly distinguish causal directions. Due to the asymmetry of matrix multiplication, the model is allowed to make independent predictions for directed edges. No symmetry constraints are imposed on the outputs (positive probabilities, negative probabilities, weights) of all bilinear transform layers in the decoder; that is, the parameter matrices are not forced. , , Since it is a symmetric matrix, the inner product result is not forced to be symmetric. The calculation order is fixed, with the target node on the left. Node representation The source node is on the right. Node representation This makes the predicted values ​​naturally directional.

[0055] S34. Input the deviation representation matrix into the deviation decoder to reconstruct the correlation adjacency matrix and obtain a new correlation adjacency matrix.

[0056] Deviation decoder The relevance adjacency matrix is ​​reconstructed using a standard inner product decoder: ; in, Represents the new relevance adjacency matrix. This indicates the learnable parameters of the bias decoder. and Representing sensor nodes and The deviation is represented.

[0057] S35. Input the bias representation matrix and causality representation matrix into the discriminator to obtain the classification probability, and calculate the adversarial loss based on the classification probability; To achieve orthogonal separation between causal features and spurious correlation bias features, an adversarial learning mechanism is constructed by introducing a gradient inversion layer and a discriminator with a binary classifier structure, based on the above-mentioned causal and bias feature extraction and graph structure reconstruction.

[0058] Minimizing the reconstruction loss alone cannot guarantee the orthogonality between the causal representation and the bias representation. To explicitly force decoupling, this invention introduces a gradient reversal layer to achieve adversarial learning.

[0059] Specifically, the latent vector z is obtained by mixing causal features with spurious correlation bias features, that is, by merging the bias representation matrix and the causal representation matrix, and a discriminator with a binary classifier structure is adopted. Distinguishing latent vectors From the deviation representation matrix Or causal representation matrix Output classification probability See the following formula: ; in, and All of these represent learnable parameters for the discriminator. The discriminator D aims to minimize the classification error, while the causal encoder and the bias encoder aim to maximize the classification error to generate an indistinguishable distribution.

[0060] Combating losses Please refer to the following formula for details: ; During the backpropagation process, originating from The gradient is inverted by the gradient inversion layer before being passed to each encoder and encoder, realizing a game between minimization and maximization.

[0061] S36. Based on the positive connection probability, negative connection probability, edge weight, new correlation adjacency matrix, and adversarial loss, construct the total loss function, and introduce a gradient reversal layer to update the parameters of each encoder, decoder, and discriminator to obtain the trained causal encoder.

[0062] The total loss function is composed of a weighted sum of the causal branch reconstruction loss, the bias branch reconstruction loss, and the adversarial loss. The parameters of the aforementioned encoders, decoders, and discriminators are updated through end-to-end optimization.

[0063] 1) Causal branch reconstruction loss

[0064] This loss combines symbolic classification and weighted regression, as detailed in the following formula: ; in, This represents the loss weight corresponding to the weighted regression loss. It can be calibrated through multiple experiments, such as setting it to 0.5, which is the sign of the classification loss. Using binary cross-entropy: ; ; in, Let E represent the indicator function, and E represent the set of causal edges. Indicates a reference value, substitute it. or , Represent the predicted value, substitute it into or middle, This represents the binary cross-entropy loss value. Weighted regression loss. The formula is calculated based on the edge weights and using the mean squared error (MSE), as shown in the following formula: ; in, This represents the spatiotemporal causal adjacency matrix in the i-th row and j-th column. This represents the edge weight in the i-th row and j-th column.

[0065] 2) Deviation branch reconstruction loss

[0066] This loss-forced bias encoder captures spurious correlation patterns, as shown in the following formula: .

[0067] The total loss function is a weighted sum of the causal branch reconstruction loss, the biased branch reconstruction loss, and the adversarial loss, as shown in the following formula: ; in, same Similarly, it represents the relative weight of the corresponding loss item, which can be set according to the actual situation.

[0068] In each training epoch, forward propagation is performed to generate causal and bias representations, reconstruct the corresponding graph structure, and then backpropagation is performed. The gradient update parameters include all the aforementioned learnable parameters. After convergence, only the gradient update parameters are retained. parameters Used for subsequent subgraph discovery tasks, where... This represents the set of all trainable parameters in a causal encoder.

[0069] It should be noted that the gradient inversion layer first sums up multiple losses, then calculates the gradient, and then inverts the sign of the gradient of the adversarial loss. Only the gradient of the adversarial loss passed from the discriminator to the causal encoder and the bias encoder is inverted, while the gradient of the total loss flowing to the discriminator and the decoder is not inverted.

[0070] S4. Based on the spatiotemporal causal graph and the trained causal encoder, identify and extract the core causal invariant subgraph in the sensor network node through multi-perturbation view comparison learning, and deploy the sensor network based on the core causal invariant subgraph.

[0071] Based on the previously obtained spatiotemporal causality graph and This invention constructs an end-to-end optimization framework, see [link / reference]. Figure 4 The identification of core causal invariant subgraphs is achieved through comparative learning from multiple perturbation views.

[0072] Specifically, the following steps are included: S41. Construct a set of perturbation views based on the original sensing data, generate a mask corresponding to each perturbation view, and use the mask to perform weighted filtering on the perturbation spatiotemporal causal adjacency matrix of each perturbation view to obtain a causal perturbation soft subgraph.

[0073] raw sensor data Apply node-level perturbations to simulate environmental changes and generate K perturbation views. In a perturbation sensor network, any sensor node can have its data deleted, but the perturbed sensor will still be retained in the network, thus obtaining a perturbation view. Perturbation is performed K times to obtain K perturbation views.

[0074] Each perturbation view is reconstructed by the aforementioned spatiotemporal causal graph construction module to obtain a set of perturbation views. and the corresponding perturbation spatiotemporal causal adjacency matrix .

[0075] Specifically, an end-to-end learnable soft subgraph generator is introduced to construct a shared soft mask tensor. An activation function is used to ensure that the mask values ​​are in the range [0,1]. It also represents the learnable parameter matrix. Middle elements express Time-lag causal edge The activated soft selection strength, i.e. the importance of being retained, the higher the value, the more likely it is to be retained.

[0076] For each perturbation view, the soft graph generator performs weighted filtering on each element in the perturbation spatiotemporal causal adjacency matrix using a mask tensor to obtain the causal perturbation soft graph. : , Represents element-wise product. Let represent the adjacency matrix of the causal perturbation soft subgraph under the k-th perturbation view.

[0077] The above settings enable continuous and differentiable behavior, avoid combinatorial explosion in discrete subgraph search, and allow multiple sides to be activated collaboratively.

[0078] S42. Use the trained causal encoder to extract features from the causal perturbation soft graphs of each perturbation view, and stack them along the third dimension to obtain a third-order causal feature tensor.

[0079] Causal Feature Extraction and Tensor Construction: After obtaining the causal perturbation soft graph, a causal encoder is constructed using a pre-trained causal adversarial decoupling graph neural network module. Representation learning is performed on each perturbation view to extract causal features of the sensor nodes. See the following formula: ; Then, through a causal-gated bilinear projection layer... For asymmetric modeling, see the following formula: ; in, This represents a learnable bilinear mapping matrix. This represents a slice of the causal strength matrix for the k-th perturbation view.

[0080] The causal-gated bilinear projection layer first performs a bilinear transformation on the input features. Because it has learnable parameters Therefore, it is a bilinear transformation layer of the causal adversarial decoupling graph neural network module; then, after mask weighting, i.e., gating unit, the causal relationship strength matrix slice is obtained.

[0081] Will The causal relationship strength matrix slices of each view are stacked along the third dimension to construct a third-order causal feature tensor. This tensor encodes the causal mechanism change pattern of the same system under different perturbation environments.

[0082] S43. Construct a low-rank tensor residual loss function based on the third-order causal feature tensor, minimize the loss function to update the mask to obtain the core causal invariant subgraph mask, and use the core causal invariant subgraph mask to perform weighted filtering on the spatiotemporal causal graph to obtain the final core causal subgraph.

[0083] Calculate the arithmetic mean of the causal relationship strength matrix slices for each view. .

[0084] The low-rank tensor residual loss function is defined by the following formula: ; This loss function directly drives the soft mask. Suppress spurious edges that change with perturbations while preserving a stable core causal structure.

[0085] Optimize the mask through backpropagation to minimize Finally, the core causal invariant subgraph mask is obtained. The final core causal subgraph is obtained by weighted filtering of the spatiotemporal causal graph using this mask. , Let these represent the final set of nodes, the final set of edges, and the final adjacency matrix, respectively. All by It is derived that, That is The edges corresponding to the non-zero elements in the array. These are the starting and ending nodes of the edges in the final edge set.

[0086] The core causal invariant subgraph calculated by this invention provides the most stable and critical causal structure information in sensor networks. It serves as the basis for sensor network deployment decisions or as a constraint priority. During deployment, priority is given to ensuring the existence of nodes in the core causal invariant subgraph (if necessary). Redundancy can be reduced for nodes not in the core causal invariant subgraph but necessary for overall coverage. Alternatively, low-latency, high-reliability communication links can be prioritized along directed causal edges in the core causal invariant subgraph.

[0087] This invention provides a specific embodiment, see the following: A. Experimental Setup (1) Synthetic causal dataset A synthetic dataset is generated based on the nonlinear Granger causal dynamics equation, containing the spatial coordinates of N=100 sensor nodes, a preset causal topology, a truth core causal subgraph, and T=1000 time-series observations. Dynamic configuration is supported. Nodes are divided into hub node sets. With ordinary node set Connection types include core causal connections, variable connections, and autoregressive connections. The truth-valued core causal subgraph is defined as... , This represents the set of core causal edges. For example... Figure 7 As shown, directed edges represent the direction of causal connections, and triangular arrows represent autoregressive dependencies; Figure 8 The red nodes in the middle identify the hub nodes, forming the core causal framework.

[0088] (2) Real traffic sensor network dataset The PeMSD7(M) traffic flow dataset, sourced from a local transportation bureau's Performance Measurement System (PeMS), was used. It covers 228 traffic intersections, with a sampling interval of 5 minutes and a data collection period of 7 months, including geospatial information. The experiment selected the core urban area between 118.1°W and 118.5°W longitude and 33.9°N and 34.2°N latitude, resampling to 1-hour intervals over a period from January to July of a given year. After data quality assessment, 100 stable sensor nodes were selected for the experiment.

[0089] B. Baseline Description An unsupervised graph optimization method, MGC-RM, was selected as the baseline method. This method employs a graph similarity learning framework based on multi-granularity cross-representation matching, achieving state-of-the-art performance in node contribution evaluation and sensor network optimization deployment. MGC-RM first constructs a basic topology based on KNN, then perturbs the nodes, using multi-granularity cross-representation to predict the similarity between the perturbated graph and the baseline graph, and finally quantifies the node's contribution to the sensor network using a weighted PageRank algorithm. This method relies on feature similarity for graph construction and evaluation, without explicitly modeling causal relationships.

[0090] C. Description of Evaluation Indicators (1) Accuracy of causal structure identification Predict the set of causal edges as Predicted node set Define the following evaluation metrics: a) Hard match metrics: used to measure the accuracy of capturing causal structures, including hit rate (TP), precision (P), recall (R), and F1 score. See the following formulas for details.

[0091] ; ; ; ; In the above formula, adding an absolute value sign outside the set indicates the total number of elements contained in the set.

[0092] b) Weighted metrics: Introducing edge-weighted recall (wER) to incorporate the accuracy of causal strength prediction into the evaluation: ; in, Indicates the lag time.

[0093] c) Soft matching metrics: Considering physical proximity, define soft node recall (sNR) and soft edge recall (sER). , , All are temperature parameters. denoted as Euclidean distance between nodes.

[0094] ; ; in, and This represents two edges that are being compared. and Represents the lag time corresponding to the two edges. (2) Sensor network elastic optimization performance In real-world scenarios where causal truth values ​​are lacking, multi-dimensional surrogate metrics are used to evaluate the performance and robustness of the optimized sensor network: Task performance metrics: Use RMSE to evaluate selected core nodes. Errors in reconstructing the entire network data, verifying information retention rate, and reconstructing the data as follows: .

[0095] ; in, Indicates the total number of data points. The denominator represents the global average of the cumulative squared errors over all nodes and all time points. This represents the observation value of sensor node i at time t. This represents the reconstructed data of the observations of sensor node i at time t.

[0096] Logarithmic determinant entropy (Ent) measures the amount of information contained in a set of nodes; the entropy value is defined as follows: ,in, Indicates the selected subset of nodes The corresponding data matrix The operation det( represents the covariance matrix operation) ) represents matrix determinant operations.

[0097] Network topology and energy consumption (Cost): Energy consumption Connection density is used to measure the physical cost of maintaining a network connection. It is used to reflect the sparsity of a network and serves as a network optimization metric.

[0098] Causal indicator: Real physical propagation has a clear directionality and hierarchical structure, defining reciprocity. It is a two-way side ratio, that is ,in, Describes a set of bidirectional edges. Represents the set of all directed edges obtained from the prediction; flow hierarchy Measuring the proportion of non-cyclic edges, Represents the set of edges participating in the ring structure; V represents the number of structures ( ) refers to the shape of The number of triples; the source node is a node with an in-degree of zero, and the sink node is a node with an out-degree of zero.

[0099] Intervention Performance: Simulates random node failure attacks to evaluate the scope of the disturbance and the network efficiency maintenance rate. Test target node set. The selection strategy is as follows , This represents the set of source nodes, referring to nodes in the current prediction graph with an out-degree greater than 0 (i.e., having directed edges pointing to other nodes), representing potential propagation sources or upstream hubs. Represents any node. This means taking the first K items. .

[0100] The average affected range (AR) is defined as the average number of downstream nodes affected when intervening in a single test target node. For each test target node... The set of downstream nodes affected It can be accessed from It is obtained by starting with a breadth-first search (BFS).

[0101] Define perturbation specificity This is used to measure the precision of the intervention. Let the failure rate be . Under these circumstances, the network efficiency maintenance rate is defined as... ,in, Indicates the remaining graph according to The subgraph remaining after proportionally removing the target node (and all its associated edges) from the test. This represents the initial complete graph, i.e., the original predicted causal graph (containing all nodes and edges) without any node removal; the remaining network's global efficiency is... .

[0102] ; .

[0103] Physical semantic verification: Point of interest (POI) analysis based on OpenStreetMap (OSM) data. For each core node... Calculate radius Number of POIs within To the nearest critical facility distance To verify whether the hub nodes selected by the model correspond to key physical entities in reality, among which... This refers to a subset of key facility points of interest, which are physical entities in a specific field, such as schools, bus stops, hospitals, and other facilities in a city that have hub characteristics or high traffic flow.

[0104] D. Results Analysis (1) Synthetic causal dataset Figure 9 The image shows the prediction results of the spatiotemporal causality graph. (And...) Figure 7 Compared to truth-based structures, the spatiotemporal causal graph construction module accurately captures the dominant causal path (the left half and the lower right strong connections), while effectively filtering out... Figure 8 The right half of the graph shows spurious dense connections. Weak causal signals still exhibit misjudgment in noisy environments (e.g., node 67→57), validating the necessity of introducing a causal adversarial decoupling graph neural network module and a subgraph extraction unit.

[0105] Table 1. Accuracy Assessment of Causal Prediction Based on Synthetic Causal Dataset

[0106] Table 2. Resilient optimization performance of sensor networks based on synthetic causal datasets

[0107] Table 3. Performance of PeMS Dataset Sensor Network Elastic Optimization

[0108] Table 1 summarizes the quantitative evaluation results of causal structure identification, based on the core causal structure extracted by the method of this invention (see Table 1). Figure 10 ) and the core causal structure extracted by baseline methods (see Figure 11The results were obtained from calculations. The proposed method significantly outperforms the baseline method in all three metrics: hard matching, weighted matching, and soft matching. The edge-level F1 score is improved by 75.08%, the weighted edge recall (wER) is improved by 66.64%, and the node soft recall (sNR) reaches 98.72%. These results demonstrate that the causal representation decoupling mechanism of the proposed method effectively suppresses spurious associations, allowing the model to focus on true causal links; low-rank tensor residual optimization ensures the stability of the core subgraph under multiple perturbation views.

[0109] Table 2 shows a comparison of the performance of sensor network resilient optimization. The proposed method achieves significant network structure optimization with a slight compromise in task performance (RMSE increased by 4.58%): connection density reduced by 55.21% and system energy consumption reduced by 53.05%. Regarding causal interpretability, the proposed method identifies a clear propagation hierarchy (reciprocity 0.2, flow hierarchy 0.3) and 11 pooling nodes and 4 V-structures, while the baseline method fails to capture any directed causal patterns. Intervention robustness assessment shows that the proposed method improves perturbation specificity by 14.80%, indicating that the core causal subgraph effectively suppresses the range of risk propagation and supports accurate localization of anomaly sources.

[0110] (2) Real traffic sensor network dataset Figure 12 The causal graph prediction results on the PeMSD7(M) dataset are shown. Table 3 shows the core causal structure extracted based on the method of this invention (see Table 3). Figure 17 ) and the core causal structure extracted by baseline methods (see Figure 18 The calculations in Table 3 show that the quantitative evaluation of the present invention continues the trend of the synthetic dataset in real-world scenarios: the RMSE is slightly higher than the baseline (+9.20%), but the network density is reduced by 76.61% and the energy consumption is reduced by 30.61%. The causal interpretability index further verifies the effectiveness of the method: the output graph of the present invention has clear directionality and hierarchy (reciprocity 0.21, flow hierarchy 0.5), detecting 7 source nodes, 20 sink nodes, and 30 V-structures; in contrast, the baseline method outputs a completely reciprocal graph (…). It lacks causal semantics.

[0111] Figures 14 to 16 POI analysis verified the physical semantic consistency of the core nodes. The average distance from the hub nodes selected by the method of this invention to the nearest station and school is significantly shorter than that of unselected nodes and nodes selected by the baseline method (see [link]). Figure 14 and Figure 15 Regarding the density of surrounding POIs, the method of this invention selects nodes comparable to the unselected nodes, while the baseline method selects significantly fewer nodes than the unselected nodes (see [link to relevant documentation]). Figure 16The above results show that the hub nodes identified by the method of the present invention are spatially close to the actual traffic and functional center of gravity, and the screening mechanism is consistent with physical importance.

[0112] Figure 13 The figure shows the network efficiency maintenance curve. Under a random node failure attack, the network based on the causal subgraph maintains stable efficiency (≈1.0) until the failure rate reaches 17%, while the network based on correlation drops to 0.6 efficiency after 3 nodes fail and remains low. This result confirms that the core causal framework of the method of this invention has stronger structural resilience.

[0113] Based on the above technical solutions, the present invention has the following advantages: (1) This invention introduces a causal-driven mechanism to achieve accurate identification and suppression of false associations, namely, the spatiotemporal causal graph construction module, which unifies time-lag causality and spatial interaction causality into the same spatiotemporal framework, and constructs a complete spatiotemporal causal graph containing directed, weighted, and signed causal relationships. This spatiotemporal dual-dimensional joint modeling method is fundamentally different from the existing single-dimensional topology construction method based on correlation statistics. It can simultaneously capture the causal transmission path across time slices and the spatial interaction mechanism within the same time slice, effectively eliminating the false correlation interference introduced by environmental noise and spatiotemporal confounding factors, enabling the identified key nodes and core structures to have cross-environment stability, significantly improving the generalization ability of the deployment scheme under distribution offset and disturbance conditions, and suppressing the risk cascading effect caused by dense correlation networks from the source.

[0114] (2) To address the shortcomings of existing causal-driven methods in explicitly modeling causal structures and inadequate decoupling of causal and correlation features, this invention designs a causal adversarial decoupling graph neural network module to achieve explicit separation of causal and bias features. This module employs a dual-input strategy, simultaneously receiving spatiotemporal causal graphs and correlation graphs. Causal and bias encoders are used to extract causal and spurious correlation features respectively. A gradient reversal layer is introduced to achieve adversarial learning, forcing orthogonal separation of the two types of features. This mechanism enables the model to accurately distinguish between real causal dependencies and spurious associations under complex perturbation environments, avoiding the problem of causal features being contaminated by bias features in existing methods, and providing a clean and robust node causal representation for subsequent core causal subgraph extraction.

[0115] (3) In view of the limitations of existing causal discovery and invariant learning research in effectively serving the flexible optimization deployment of sensor networks and the difficulty in systematically extracting stable core causal subgraphs under perturbation environment, this invention constructs a core causal invariant subgraph extraction architecture based on low-rank tensor residuals to realize the automatic discovery of stable structures across perturbation environment. This mechanism applies invariance constraints to the structural level of spatiotemporal causal graphs for the first time, realizing end-to-end automatic discovery of stable core causal subgraphs across perturbation environment, and providing an interpretable, controllable and robust causal decision basis for the flexible optimization deployment of sensor networks.

[0116] (4) In view of the problem that existing causal discovery and invariant learning research has failed to effectively serve the flexible optimization deployment of sensor networks and the disconnect between causal structure and deployment decision, this invention integrates the spatiotemporal causal graph construction module, the causal adversarial decoupling graph neural network module and the core causal invariant subgraph extraction architecture into a unified end-to-end flexible optimization framework to achieve synergistic optimization of efficiency, robustness and risk controllability.

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

[0118] The acquisition, storage, and application of user personal information involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0119] This invention also provides a sensor network elastic optimization deployment system 500 based on core causal subgraph discovery, see [link to relevant documentation]. Figure 5 Specifically, it includes: The data acquisition unit 510 is used to acquire multivariable raw time sensing data collected by each sensor node; The graph construction unit 520, connected to the data acquisition unit 510, is used to construct a spatiotemporal causal graph through the constructed spatiotemporal causal graph construction module, and to construct a correlation graph of the original sensing data using the KNN algorithm; wherein, the spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and to fuse the two to obtain the spatiotemporal causal graph. The pre-training unit 530, connected to the graph construction unit 520, is used to input the spatiotemporal causal graph and correlation graph into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features are separated from spurious correlation bias features, and the trained causal encoder is retained. The causal adversarial decoupling graph neural network module includes a causal encoder. The subgraph extraction unit 540, connected to the pre-training unit 530, is used to identify and extract the core causal invariant subgraph in the sensor network node through multi-perturbation view comparison learning based on the spatiotemporal causal graph and the trained causal encoder, and to deploy the sensor network based on the core causal invariant subgraph.

[0120] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the aforementioned method, and will not be repeated here.

[0121] Figure 6 A schematic block diagram of an electronic device 600 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0122] Electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in ROM 602 or a computer program loaded into RAM 603 from storage unit 608. RAM 603 may also store various programs and data required for the operation of electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. I / O interface 605 is also connected to bus 604.

[0123] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0124] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various processes described above. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609.

[0125] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0126] The program code used to implement the embodiments of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0127] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).

[0129] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0130] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0131] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for elastically optimizing the deployment of sensor networks based on core causal subgraph discovery, characterized in that, Includes the following steps: Acquire multivariable raw time-based sensor data collected from each sensor node; A spatiotemporal causal graph is constructed by a spatiotemporal causal graph construction module, and a correlation graph of the original sensing data is constructed using the KNN algorithm. The spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and fuse the two to obtain the spatiotemporal causal graph. The spatiotemporal causal graph and correlation graph are input into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features and spurious correlation bias features are separated, and the trained causal encoder is retained. The causal adversarial decoupling graph neural network module includes a causal encoder. Based on the spatiotemporal causal graph and the trained causal encoder, the core causal invariant subgraph in the sensor network node is identified and extracted through multi-perturbation view comparison learning, and the sensor network is deployed based on the core causal invariant subgraph.

2. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 1, characterized in that, The steps for constructing the spatiotemporal causal graph include: The original sensor data was processed using the PCMCI algorithm to obtain a time causality matrix block; The spatial causality matrix is ​​obtained by processing the raw sensor data using the SCMI algorithm; The temporal causal effect matrix block and the spatial causal effect matrix are fused to obtain the spatiotemporal causal adjacency matrix; the main diagonal block of the spatiotemporal causal adjacency matrix is ​​the spatial causal effect matrix, the upper triangular block is the temporal causal effect matrix block, and the lower triangular block is the zero matrix; The spatiotemporal causal adjacency matrix and the original sensor data are concatenated to obtain a spatiotemporal causal graph.

3. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 1, characterized in that, The causal adversarial decoupling graph neural network module includes a causal encoder, a bias encoder, a causal decoder, a bias decoder, and a discriminator; The causal encoder includes an input layer, several graph convolutional layers, and activation function layers. Each graph convolutional layer is equipped with a linear transformation unit to add self-loop causal information and has two parallel neighbor aggregation channels, namely a positive causal effect aggregation channel and a negative causal effect aggregation channel. Each channel has its own independent learnable weight matrix. The causal decoder includes an input layer, three parallel bilinear transform layers, and an optional activation function layer; the three parallel bilinear transform layers each have different learnable parameter matrices; wherein, the first and second bilinear transform layers are connected to nonlinear activation functions, while the third bilinear transform layer is not connected to an activation function.

4. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 3, characterized in that, The spatiotemporal causal graph and correlation graph are input into the constructed causal adversarial decoupling graph neural network module for training. Adversarial learning is used to separate causal features from spurious correlation bias features, including the following steps: The spatiotemporal causal graph is input into the causal encoder to calculate the hidden states of all sensor nodes, thereby obtaining the causal representation matrix. The correlation map and the original sensing data are input into the deviation encoder to calculate the hidden state of all sensor nodes and obtain the deviation representation matrix. The causal representation matrix is ​​input into the causal decoder to decouple positive and negative causality, resulting in parameterized positive connection probabilities, negative connection probabilities, and edge weights. The deviation representation matrix is ​​input into the deviation decoder to reconstruct the correlation adjacency matrix, resulting in a new correlation adjacency matrix; The bias representation matrix and the causality representation matrix are input into the discriminator to obtain the classification probability, and the adversarial loss is calculated based on the classification probability. Based on the positive connection probability, negative connection probability, edge weight, new correlation adjacency matrix, and adversarial loss, a total loss function is constructed, and a gradient reversal layer is introduced to update the parameters of each encoder, decoder, and discriminator to obtain a trained causal encoder.

5. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 4, characterized in that, The total loss function includes causal branch reconstruction loss, biased branch reconstruction loss, and adversarial loss; The causal branch reconstruction loss See the following formula: ; in, This represents the loss weights corresponding to the weighted regression loss. This represents the weighted regression loss. This represents the symbol classification loss; The symbol classification loss is given by the following formula: ; in, Indicates an indicator function, This represents the time position of the i-th sensor node. Let E represent the time of the j-th sensor node, and let E represent the set of causal edges. Representing the spatiotemporal causal adjacency matrix The element corresponding to the i-th row and j-th column, Indicates the probability of a positive connection. Indicates the probability of negative connections; The binary cross-entropy loss value is calculated using the following formula: ; in, Indicates a reference value. Indicates the predicted value; The weighted regression loss is given by the following formula: ; in, This represents the spatiotemporal causal adjacency matrix in the i-th row and j-th column. This represents the edge weight in the i-th row and j-th column; The deviation branch reconstruction loss is given by the following formula: ; in, Represents the relevance adjacency matrix. New relevance adjacency matrix.

6. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 1, characterized in that, Based on the spatiotemporal causal graph and the trained causal encoder, the core causal invariant subgraph in the sensor network nodes is identified and extracted through multi-perturbation view contrastive learning, including: Based on the original sensor data, a set of perturbation views is constructed, and a mask corresponding to each perturbation view is generated. The perturbation spatiotemporal causal adjacency matrix of each perturbation view is weighted and filtered using the mask to obtain a causal perturbation soft subgraph. The trained causal encoder is used to extract features from the causal perturbation soft subgraphs of each perturbation view, and the features are stacked along the third dimension to obtain a third-order causal feature tensor. Based on the third-order causal feature tensor, a low-rank tensor residual loss function is constructed. This loss function is minimized to update the mask and obtain the core causal invariant subgraph mask. The core causal invariant subgraph mask is then used to perform weighted filtering on the spatiotemporal causal graph to obtain the final core causal subgraph.

7. The sensor network elastic optimization deployment method based on core causal subgraph discovery according to claim 6, characterized in that, Based on the original sensor data, a set of perturbation views is constructed, and a mask corresponding to each perturbation view is generated. The perturbation spatiotemporal causal adjacency matrix of each perturbation view is then weighted and filtered using the mask to obtain a causal perturbation soft subgraph, including: Node-level perturbations are applied to the original sensing data to generate perturbation views; each perturbation view is reconstructed by the spatiotemporal causal graph construction module to obtain a set of perturbation views and the corresponding perturbation spatiotemporal causal adjacency matrix; Construct a mask tensor using a soft subgraph generator; For each perturbation view, the soft graph generator performs weighted filtering on each element in the perturbation spatiotemporal causal adjacency matrix using a mask tensor to obtain a causal perturbation soft graph.

8. A sensor network resilient optimization deployment system based on core causal subgraph discovery, used to implement the sensor network resilient optimization deployment method based on core causal subgraph discovery as described in any one of claims 1-7, characterized in that, The system includes: The data acquisition unit is used to acquire multivariable raw time-varying sensor data collected by each sensor node; The graph construction unit, connected to the data acquisition unit, is used to construct a spatiotemporal causal graph through the constructed spatiotemporal causal graph construction module, and to construct a correlation graph of the original sensing data using the KNN algorithm; wherein, the spatiotemporal causal graph construction module is used to extract the temporal causal effect matrix block of each sensor node and the spatial causal effect matrix between sensor nodes in the original sensing data, and fuse the two to obtain the spatiotemporal causal graph; A pre-training unit, connected to the graph construction unit, is used to input the spatiotemporal causal graph and correlation graph into the constructed causal adversarial decoupling graph neural network module for training. Through adversarial learning, causal features are separated from spurious correlation bias features, and the trained causal encoder is retained. The causal adversarial decoupling graph neural network module includes a causal encoder. The subgraph extraction unit, connected to the pre-training unit, is used to identify and extract the core causal invariant subgraph in the sensor network node based on the spatiotemporal causal graph and the trained causal encoder through multi-perturbation view comparison learning, and to deploy the sensor network based on the core causal invariant subgraph.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement the sensor network resilient optimization deployment method based on core causal subgraph discovery as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program; the computer program is executed by a processor to implement a sensor network resilient optimization deployment method based on core causal subgraph discovery as described in any one of claims 1 to 7.