Smart power grid cloud edge collaborative heterogeneous data security access method

By combining a multimodal sensor network, a lightweight federated learning edge inference engine, and a power spatiotemporal knowledge graph fusion engine, the problems of low data access efficiency and insufficient security in smart grids are solved, enabling efficient and secure data analysis and grid optimization scheduling.

CN121151097APending Publication Date: 2025-12-16浙江浙能数字科技有限公司

Patent Information

Application Number
CN202511526562.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In smart grids, existing technologies suffer from low access efficiency and poor scalability during the data acquisition phase, making it difficult to extract deep semantic information from data. Data security also lacks a comprehensive verification mechanism, failing to meet complex analysis needs.

Method used

A multimodal sensor network is used to collect data from multi-source heterogeneous power equipment in real time. Adaptive semantic enhancement preprocessing is performed through a lightweight federated learning edge inference engine. Three-dimensional trusted security authentication is performed by combining a power spatiotemporal knowledge graph fusion engine. Finally, a federated blockchain-driven digital twin decision engine is used to perform spatiotemporal causal reasoning and twin mirror comparison to generate a dynamic security strategy graph.

Benefits of technology

It enables efficient access to multi-source heterogeneous data, significantly enhances data security and analysis capabilities, and supports the optimized scheduling and stable operation of smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151097A_ABST
    Figure CN121151097A_ABST
Patent Text Reader

Abstract

The invention provides a smart power grid cloud edge collaborative heterogeneous data security access method, which comprises the following steps: collecting multi-source heterogeneous power equipment data in real time based on a deployed multi-mode sensor network; based on a lightweight federated learning edge inference engine deployed on an edge end network, performing adaptive semantic enhancement preprocessing on the multi-source heterogeneous power equipment data to generate an edge encryption feature tensor; performing three-dimensional credible security authentication and knowledge fusion on the edge encryption feature tensor based on an electric power space-time knowledge graph fusion engine deployed on the cloud side to generate secure and credible electric power data; and performing space-time causal reasoning and twin mirror image comparison on the secure and credible power data based on a federated block chain-driven digital twin decision engine deployed at a cloud end to generate a dynamic security policy map and store the dynamic security policy map. According to the scheme, the data security is enhanced, intelligent analysis and dynamic decision can be performed according to the real-time state of the power grid, and optimal scheduling and stable operation of the power grid are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method for secure access to heterogeneous data in a smart grid cloud-edge collaborative manner. Background Technology

[0002] As a core infrastructure of the modern energy system, the smart grid achieves intelligent operation of the power system by integrating massive amounts of power equipment. In practical applications, photovoltaic inverters and wind turbines on the generation side, intelligent monitoring devices in the transmission and transformation links, and smart meters and load controllers on the distribution and consumption side continuously generate a large amount of data. This data not only comes from a wide range of sources and uses various communication protocols, but also has strong real-time and high security requirements. Its efficient collection, reliable processing, and intelligent decision-making are crucial for the stable operation and optimized scheduling of the power grid. Currently, in smart grid data access technologies, the data acquisition stage generally relies on manually configuring protocol parsing rules and using predefined device communication protocol templates for data interface. When new devices are connected, adaptation programs need to be rewritten, resulting in low access efficiency and poor scalability. In the data preprocessing stage, it is difficult to extract deep semantic information from the data, failing to meet complex analysis needs. In terms of data security, single-dimensional security authentication is mainly achieved through digital signatures and access control, lacking a comprehensive verification mechanism for the data source, transmission process, and content authenticity. Summary of the Invention

[0003] The purpose of this application is to propose a secure access method for heterogeneous data in a smart grid cloud-edge collaborative manner, as follows: A secure access method for heterogeneous data in a smart grid cloud-edge collaborative manner includes: Step 1, collecting multi-source heterogeneous power equipment data in real time based on a deployed multimodal sensor network; Step 2, performing adaptive semantic enhancement preprocessing on the multi-source heterogeneous power equipment data based on a lightweight federated learning edge inference engine deployed on the edge network to generate edge encrypted feature tensors; Step 3, performing three-dimensional trusted security authentication and knowledge fusion on the edge encrypted feature tensors based on a power spatiotemporal knowledge graph fusion engine deployed in the cloud to generate secure and trusted power data; Step 4, performing spatiotemporal causal inference and twin mirror comparison on the secure and trusted power data based on a federated blockchain-driven digital twin decision engine deployed in the cloud to generate and store a dynamic security policy graph.

[0004] The technical solution of this application can achieve the following technical benefits: First, through a lightweight federated learning edge inference engine deployed at the edge in step 2, adaptive semantic enhancement preprocessing is performed on multi-source heterogeneous power equipment data to generate edge encrypted feature tensors, effectively extracting deep semantics of the data and meeting complex analysis needs. Second, through a power spatiotemporal knowledge graph fusion engine deployed in the cloud in step 3, three-dimensional trusted security authentication and knowledge fusion are performed on the edge encrypted feature tensors, comprehensively verifying the data source, transmission process, and content authenticity from multiple dimensions to generate secure and reliable power data, greatly enhancing data security. Third, through a federated blockchain-driven digital twin decision engine deployed in the cloud in step 4, spatiotemporal causal inference and twin mirror comparison are performed on secure and reliable power data to generate and store a dynamic security strategy graph. This enables intelligent analysis and dynamic decision-making based on the real-time state of the power grid, achieving optimized scheduling and stable operation of the power grid. Attached Figure Description

[0005] Figure 1 This is a flowchart illustrating a method for secure access to heterogeneous data in a smart grid cloud-edge collaborative manner, according to an embodiment of this application. Detailed Implementation

[0006] like Figure 1 As shown, a method for secure access to heterogeneous data in a smart grid cloud-edge collaborative manner is provided, comprising: Step 1, collecting multi-source heterogeneous power equipment data in real time based on a deployed multimodal sensor network; Step 2, performing adaptive semantic enhancement preprocessing on the multi-source heterogeneous power equipment data based on a lightweight federated learning edge inference engine deployed on the edge network to generate edge encrypted feature tensors; Step 3, performing three-dimensional trusted security authentication and knowledge fusion on the edge encrypted feature tensors based on a power spatiotemporal knowledge graph fusion engine deployed in the cloud to generate secure and trusted power data; Step 4, performing spatiotemporal causal inference and twin mirror comparison on the secure and trusted power data based on a federated blockchain-driven digital twin decision engine deployed in the cloud to generate and store a dynamic security policy graph.

[0007] Preferably, step 1, based on the deployed multimodal sensor network, involves real-time acquisition of data from multi-source heterogeneous power equipment, including the following steps: Step 11, performing dynamic fingerprint recognition processing on the communication protocols of multi-source power equipment to generate protocol feature vectors; Step 12, generating a device protocol fingerprint library based on the protocol feature vectors; Step 13, performing adaptive communication adaptation processing on the device protocol fingerprint library to generate a unified interface for heterogeneous protocols; Step 14, based on the unified interface for heterogeneous protocols, performing real-time acquisition of multi-source heterogeneous power equipment data and spatiotemporal alignment to generate a timestamp-aligned spatiotemporal heterogeneous dataset. In step 1 above, feature extraction and analysis of the communication protocols of multi-source power equipment transforms key protocol information (such as data frame structure, communication frequency, encryption method, etc.) into quantifiable protocol feature vectors, achieving digital representation of different protocols. Protocol library construction: Based on the protocol feature vectors, through clustering, modeling, and other methods, the system integrates various device protocol information to generate a device protocol fingerprint library, forming a standardized reference template for device communication protocols. For the device protocol fingerprint database, protocol meta-models are extracted and dynamic middleware is synthesized. A unified interface for heterogeneous protocols is generated through self-organizing service orchestration, enabling format conversion and interoperability of data from different protocols. Based on this unified interface, multi-source heterogeneous data is collected in real time, and spatiotemporal heterogeneous datasets are generated through timestamp calibration and spatial coordinate matching, ensuring data consistency and correlation across time and space dimensions.

[0008] Therefore, the specific technical implementation of step 1 above has the following technical advantages: 1. Breaking through the limitations of traditional manual configuration of protocol parsing rules, the system significantly shortens the new device access cycle through dynamic fingerprint recognition and adaptive communication adaptation. When a new device is accessed, no manual adaptation program needs to be written; it only needs to match the protocol fingerprint database to automatically complete the protocol conversion, improving access efficiency by more than 80% and significantly enhancing system scalability. 2. By constructing a unified interface for heterogeneous protocols, multi-source heterogeneous power equipment data is transformed into a standardized format, eliminating data barriers caused by protocol differences. Spatiotemporal alignment further ensures accurate correspondence of data in time and space dimensions, providing a high-quality, structured data foundation for subsequent data analysis and reducing the workload of data cleaning and preprocessing. 3. The device protocol fingerprint database can be updated and expanded in real time, quickly adapting to changes in new power equipment or protocols. When a new protocol appears, the system automatically extracts features through dynamic fingerprint recognition and adds them to the database without interrupting the data acquisition process, ensuring the continuity and stability of data acquisition. 4. The automated protocol parsing and adaptation mechanism significantly reduces manual configuration and debugging costs; the unified interface design reduces the complexity of multi-protocol data processing, reduces the workload of developers in developing adaptation modules for different protocols, and lowers software development and maintenance costs.

[0009] Preferably, step 12, generating a device protocol fingerprint database based on protocol feature vectors, specifically includes the following steps: Step 121, performing spatiotemporal correlation clustering on the protocol feature vectors to generate protocol cluster prototypes; Step 122, performing uncertainty quantification on the protocol cluster prototypes to generate a device protocol mapping table with confidence; Step 123, performing spatiotemporal Bayesian network construction on the device protocol mapping table with confidence to generate a probabilistic protocol association graph; Step 124, performing domain knowledge injection on the probabilistic protocol association graph to generate a device protocol fingerprint database. In the specific technical implementation of step 12 above: 1. Based on the time-series characteristics and spatial distribution patterns of protocol feature vectors, clustering algorithms (such as DBSCAN and Kmeans) are applied to identify protocol clusters with similar communication patterns, generating protocol cluster prototypes to achieve preliminary classification and abstraction of protocols. 2. The feature distribution of the protocol cluster prototypes is sampled and analyzed using probabilistic statistical methods (such as Monte Carlo simulation), the confidence interval of each protocol mapping is calculated, and a device protocol mapping table with confidence is generated to quantify the reliability of protocol identification. 3. Based on a confidence-based mapping table, a spatiotemporal Bayesian network is constructed to transform protocol associations into conditional probability distributions, generating a probabilistic protocol association graph that reveals the causal dependencies and spatiotemporal evolution patterns among different protocols. 4. Power system expertise (such as equipment type, communication standards, and industry specifications) is encoded as constraints and integrated into the probabilistic graph to correct biases from purely data-driven approaches, ultimately forming a device protocol fingerprint database to ensure that the mapping relationships conform to the actual operating logic of the power system.

[0010] Therefore, the specific implementation of step 12 above has the following technical advantages: 1. The combination of spatiotemporal correlation clustering and uncertainty quantification improves the protocol classification accuracy to over 95%, especially in handling complex and dynamic protocol scenarios, effectively distinguishing similar protocol features and reducing the misjudgment rate. 2. The probabilistic protocol correlation graph supports online learning and updating. When new protocol variants appear, the system can quickly adjust the probability distribution through Bayesian inference and automatically expand the fingerprint database without manual remodeling, adapting to the needs of rapid iteration of new power equipment. 3. The injection of domain knowledge gives the protocol mapping relationship physical meaning, enhancing the interpretability of the model; the confidence index provides a quantitative reliability assessment of the protocol identification results, allowing maintenance personnel to formulate differentiated data verification strategies and improve the overall reliability of the system. 4. The spatiotemporal modeling capability of Bayesian networks enables the system to capture the correlation patterns of protocols in different time and space dimensions, such as identifying the collaborative communication patterns of cross-regional equipment, providing data support for power grid fault diagnosis and distributed energy collaborative control. 5. The constructed protocol fingerprint library can be reused across projects, reducing the system deployment cost in new scenarios; the formal expression of domain knowledge facilitates integration with other power system models (such as power flow calculation and equipment status assessment), promoting knowledge sharing and collaborative decision-making among various subsystems of the smart grid.

[0011] Preferably, step 13, performing adaptive communication adaptation processing on the device protocol fingerprint library to generate a unified interface for heterogeneous protocols, specifically includes: step 131, extracting the protocol metamodel from the device protocol fingerprint library to generate a protocol abstract syntax tree; step 132, performing dynamic middleware synthesis processing on the protocol abstract syntax tree to generate a protocol conversion middleware; and step 133, performing self-organizing service orchestration processing on the protocol conversion middleware to generate a unified interface for heterogeneous protocols. This scheme constructs an automated adaptation mechanism from the device protocol fingerprint library to the unified interface through a three-level processing architecture of dynamic service orchestration generated by the protocol metamodel abstract middleware. It extracts common features and differences in protocol attributes from the device protocol fingerprint library, constructs a protocol metamodel, and represents the protocol's syntactic structure, data fields, and interaction logic in the form of an abstract syntax tree (AST). For example, it transforms the Modbus protocol's function codes and data frame structures into tree nodes, and the IEC61850 protocol's object model into a hierarchical tree relationship, forming a standardized protocol syntax representation. Based on the protocol abstract syntax tree, protocol conversion middleware is automatically generated using code generation technologies (such as template engines and semantic mapping algorithms). The middleware includes a protocol parser, a data mapper, and a format converter, which can convert raw data from different protocols (such as binary frames and JSON messages) into a unified intermediate format, achieving lossless conversion of protocol semantics. Adopting a microservice architecture, the protocol conversion middleware is encapsulated as standardized service units, and the service orchestration engine dynamically combines service chains according to real-time protocol adaptation needs. For example, when a new device is connected, the system automatically identifies its protocol type, calls the corresponding parsing service, mapping service, and format conversion service, forming an end-to-end protocol conversion path, and ultimately generating a unified data access interface.

[0012] The specific technical implementation of the above steps offers the following advantages: It breaks through the traditional model of manually writing protocol adaptation code, automatically generating protocol conversion logic through meta-model and dynamic middleware technology. This improves adaptation efficiency by over 90% when new devices are connected, significantly reducing manual configuration costs and error probability. The generated unified interface is compatible with hundreds of power equipment protocols such as Modbus, IEC61850, and MQTT, eliminating protocol barriers. For example, Modbus data from photovoltaic inverters and DL / T645 protocol data from smart meters can be synchronously accessed through a unified interface, improving data access integrity to 99.5%. When a new protocol emerges, only the meta-model of the protocol fingerprint library needs to be updated, and the system can automatically generate the corresponding conversion middleware without modifying the underlying architecture. Actual test data from a provincial power grid shows that this solution reduces the support cycle for new protocols from two weeks in the traditional solution to two hours. The unified interface provides standardized data input for upper-layer applications, avoiding interface fragmentation problems caused by multi-protocol adaptation. Application developers do not need to worry about differences in underlying protocols, improving development efficiency by 40% and reducing system maintenance costs by 35%. The protocol conversion process ensures the integrity and accuracy of data during protocol conversion through semantic verification of the abstract syntax tree and format verification of the middleware. Compared with the traditional manual adaptation solution, the data conversion error rate is reduced from 0.3% to below 0.01%.

[0013] Preferably, step 2, based on a lightweight federated learning edge inference engine deployed on the edge network, performs adaptive semantic enhancement preprocessing on multi-source heterogeneous power equipment data to generate edge encrypted feature tensors, including the following steps: Step 21, performs dynamic semantic mapping preprocessing on the multi-source heterogeneous power equipment data to generate semantically aligned intermediate data; Step 22, performs lightweight federated learning feature extraction on the semantically aligned intermediate data to generate federated feature aggregation data; Step 23, performs encryption compression and tensor transformation on the federated feature aggregation data to generate edge encrypted feature tensors. In this scheme, temporal features (such as the changing patterns of voltage and current over time) and spatial features (such as the geographical location of equipment and topological connections) are extracted from the multi-source heterogeneous power equipment data, and these features are mapped to a constructed dynamic semantic dictionary in the power field. This dictionary contains standardized semantic labels such as the operating status and fault type of power equipment. Through the association between features and labels, the original data is transformed into intermediate data with clear semantics, completing semantic alignment. Based on the constructed edge region cloud three-level federated learning framework, knowledge distillation is performed on the semantically aligned intermediate data. Knowledge distillation reduces computational complexity by transferring knowledge from complex models to lightweight models, making them adaptable to the resource constraints of edge devices. Based on this, the resulting lightweight feature extraction model at the edge is subjected to distributed collaborative training and parameter aggregation under differential privacy protection. Each edge node trains its model locally, uploading only encrypted model parameter updates. The cloud aggregates these parameters to obtain a global model, enabling multi-node collaborative feature extraction and generating federated feature aggregation data. A session key is generated using power line channel characteristics (such as channel noise and attenuation patterns) to encrypt the federated feature aggregation data, resulting in physically enhanced encrypted feature data. Subsequently, considering the characteristics of power data, the encrypted data undergoes power semantic compression, retaining key semantic information while reducing data volume, generating semantically preserved encrypted compressed data. Finally, tensor decomposition technology is used to convert the compressed data into structured edge encrypted feature tensors, facilitating efficient subsequent cloud processing.

[0014] The specific technical implementation of the above steps offers the following advantages: Dynamic semantic mapping achieves standardized semantic annotation of data through a power domain dictionary. Compared to traditional data preprocessing methods, it can extract deeper meanings from the data more accurately, improving semantic accuracy by 60% and providing a high-quality data foundation for subsequent analysis. Lightweight federated learning processes data at the edge, avoiding the uploading of raw data. Combined with differential privacy protection technology, it effectively prevents data privacy leaks. Simultaneously, the three-level federated learning framework enables multi-node data collaboration, improving model performance without sharing data, increasing feature extraction accuracy by 40%, and reducing cloud computing pressure. Encryption based on power line channel characteristics enhances data transmission security, making it difficult to crack. Power semantic compression and tensor transformation technologies significantly reduce data volume while protecting key information, lowering transmission bandwidth requirements by up to 70%, reducing cloud storage costs, and the structured tensor form facilitates efficient analysis and processing. The lightweight model obtained through knowledge distillation adapts to the limited computing and storage resources of edge devices, enabling data preprocessing to be completed at the edge, reducing data transmission latency, meeting the real-time requirements of smart grids, and improving response speed by 80%.

[0015] Preferably, step 21 involves performing dynamic semantic mapping preprocessing on the multi-source heterogeneous power equipment data to generate semantically aligned intermediate data. Specifically, this involves extracting temporal and spatial features from the multi-source heterogeneous power equipment data and mapping these extracted features to a constructed dynamic semantic dictionary for the power sector to generate semantically aligned intermediate data. In this scheme, in-depth analysis of the multi-source heterogeneous power equipment data is performed to separate temporal features (such as periodic fluctuations in voltage / current and equipment start-up / shutdown time sequences) and spatial features (such as equipment geographical location, power grid topology connections, and power transmission paths). Temporal patterns are captured using signal processing algorithms (such as Fourier transform and wavelet analysis), and spatial relationships are analyzed using Geographic Information System (GIS) data and power grid topology models to form structured feature vectors. Knowledge from power industry standards, equipment operation manuals, and fault cases is integrated to construct a dynamic dictionary containing semantic tags such as equipment status (normal / overload / fault), physical quantity thresholds (voltage upper limit, current safe range), and topological relationships (bus connection, feeder affiliation). The dictionary employs a hierarchical structure, supporting the addition or updating of semantic tags to adapt to changes in power grid operation. Extracted temporal and spatial features are matched against the semantic dictionary, and feature vectors are transformed into standardized semantic tags through similarity calculations (such as cosine similarity and Euclidean distance) or rule engines (such as threshold judgment and logical reasoning). For example, the temporal feature of a device's current continuously exceeding a threshold is mapped to the semantic tag "overload warning," ultimately generating semantically aligned intermediate data, realizing the transformation of raw data from "signals" to "knowledge."

[0016] The specific technical implementation of the above steps has the following advantages: Traditional data preprocessing only performs format conversion, making it difficult to uncover deeper meanings. This solution, through matching spatiotemporal features with a professional semantic dictionary, improves the semantic accuracy of data from 65% to 92%. For example, it can accurately identify the semantic association between "continuous rise in transformer oil temperature" and "cooling system failure," providing direct evidence for fault diagnosis. Multi-source heterogeneous data (such as real-time data from smart meters and historical data from SCADA systems) are difficult to analyze uniformly due to differences in protocols and formats. This solution, through semantic alignment, maps data from different sources to a unified semantic expression, improving data integration efficiency by 70% and supporting collaborative analysis of cross-system data. The dynamic semantic dictionary in the power field supports real-time updates. When new equipment is introduced to the power grid or operating standards change, semantic tags (such as new parameter semantics in new energy grid connection protocols) can be quickly added without modifying the underlying mapping logic, improving system adaptability by 80%. Semantic alignment intermediate data is presented in a standardized tag format, allowing data analysts to quickly conduct data mining without deeply understanding the complex formats of the original data. For example, non-power professionals can directly locate the problem of "abnormal voltage in a certain area" through semantic tags, improving analysis efficiency by 50%. 5. Knowledge accumulation and reuse: Matching rules and cases generated during semantic mapping are automatically fed back to the dictionary, forming a knowledge loop. Historical semantic alignment data can be used to train machine learning models, such as predicting equipment failure probabilities, increasing knowledge reuse rate by 60% and enhancing the intelligence level of the power grid.

[0017] Optionally, step 22 involves performing lightweight federated learning feature extraction on the semantically aligned intermediate data to generate federated feature aggregation data. Specifically, based on the constructed three-level federated learning framework in the edge region cloud, knowledge distillation is performed on the semantically aligned intermediate data to obtain a lightweight feature extraction model at the edge. This lightweight feature extraction model is then subjected to distributed collaborative training and parameter aggregation under differential privacy protection to generate federated feature aggregation data. This scheme achieves distributed feature extraction and privacy protection for multi-source heterogeneous power data by constructing a three-level federated learning architecture in the "edge region cloud" and combining knowledge distillation and differential privacy technologies. Its core lies in: Edge layer: deployed at edge nodes such as substations and distribution rooms, training local feature extraction models on the semantically aligned intermediate data, avoiding the uploading of raw data; Region layer: aggregating model parameters from edge nodes within the region, filtering noise, and extracting common features; Cloud layer: integrating model parameters from the entire network region to generate a global feature extraction model, and inversely optimizing the edge node models. Through transfer learning, the knowledge of complex cloud models (such as feature mapping relationships and decision boundaries) is compressed to the lightweight edge model. For example, by utilizing a teacher-student model architecture, the "student model" at the edge learns the output distribution of the "teacher model" in the cloud. This reduces the number of model parameters by more than 80% while maintaining feature extraction capabilities, adapting to the CPU / GPU resource limitations of edge devices. During edge node model training, noise conforming to a Laplace distribution is injected into gradient updates to satisfy the differential privacy definition. When aggregating parameters between the region layer and the cloud, homomorphic encryption technology ensures parameter privacy, preventing attackers from inferring original data features through model updates.

[0018] 4. Parameter Aggregation and Feature Generation: The FedAvg (Federated Average) algorithm is used for parameter aggregation.

[0019] ,in These are global model parameters. For edge nodes Local model parameters, This represents the amount of node data. The aggregated global model extracts features from the semantically aligned data, generating federated feature aggregated data that includes information such as spatiotemporal correlation and device status.

[0020] The specific technical implementation of the above steps offers the following advantages: Differential privacy and homomorphic encryption technologies block data leakage risks at the source. Tested by a third-party organization, it meets the protection requirements for critical infrastructure data under the "Data Security Law of the People's Republic of China" in 100,000 model updates. Knowledge distillation reduces the computing power requirements of edge models from GPU level to MCU level (such as STM32H7 chips), with model inference power consumption <1.5W, adapting to low-power devices such as smart meters and terminal sensors. Compared to traditional centralized cloud processing, edge computing resource utilization is improved by 300%. The three-tier architecture achieves a closed loop of "local learning, regional collaborative global optimization." Real-world testing in a provincial power grid shows that distributed feature extraction improves the recognition rate of new fault features from 78% to 94% compared to a single-machine model, and shortens the model update cycle from 24 hours to 15 minutes. The edge only uploads model parameters (approximately 10KB / time), rather than raw data (approximately 1MB / second), reducing communication traffic by more than 99% and solving the data transmission bottleneck problem caused by bandwidth limitations in remote power grids. Federated learning frameworks inherently support dynamic node addition / removal. When an edge node fails, the region layer can automatically adjust aggregation weights to ensure global model stability. In a simulated scenario with 30% of nodes offline, the feature extraction accuracy fluctuates by less than 3%, significantly outperforming traditional centralized approaches (fluctuation > 20%).

[0021] Optionally, step 23 involves encrypting, compressing, and performing tensor transformation on the federated feature aggregation data to generate an edge-encrypted feature tensor. Specifically, based on the session key generated using the power line channel characteristics, the federated feature aggregation data is encrypted to obtain physical layer enhanced encrypted feature data. This physical layer enhanced encrypted feature data is then subjected to power semantic compression processing to generate semantically preserved encrypted compressed data. Finally, the generated semantically preserved encrypted compressed data is subjected to tensor decomposition to generate the edge-encrypted feature tensor. This scheme integrates power line physical layer security characteristics, semantic compression, and tensor decomposition techniques to construct a closed loop for edge feature processing—"encryption-compression tensor transformation"—with the following core principle:

[0022] I. Key Generation Mechanism Based on Power Line Channel Characteristics: Due to factors such as load variations and line topology, power line channels exhibit time-varying fading characteristics (e.g., multipath effects, noise interference), and their channel impulse response (CIR) possesses unpredictable randomness at the millimeter spatial or millisecond temporal levels. By extracting the amplitude-phase characteristics (Hf,t) of the channel in a specific frequency band (e.g., 2MHz-10MHz), a random sequence with entropy > 8 bits / byte can be generated as the entropy source for the session key. The channel sampling sequence... Kalman filtering is performed for noise reduction, and a key is generated through SHA256 hash mapping. : ,in Use random numbers to ensure the uniqueness of each key generation.

[0023] II. Cooperative processing of physical layer enhanced encryption and semantic compression: First, the channel key is utilized. Aggregated data based on federal features Perform AES256 encryption to obtain AES256 encrypted federated feature aggregation data. Then, a dynamic mask is generated based on the time-varying characteristics of the channel. Perform physical layer bit flipping on the encrypted data: The physical layer of encryption, which forms a "one-time pad" encryption, can theoretically resist quantum computing attacks. The final data after physical layer enhanced encryption. This represents the channel response at frequency f and time t. An ontology library for the power industry is constructed (containing 128 feature labels such as transformer oil temperature and switch status). An attention mechanism is used to identify key semantic features: wavelet threshold compression (compression ratio 10:1) is applied to non-key features (such as background noise); key semantic features (such as fault feature vectors) retain full accuracy and are compressed without loss through domain knowledge mapping.

[0024] III. Tensor Decomposition and Edge Feature Tensor Generation: Representing Federated Feature Aggregation Data as a Three-Dimensional Tensor ,in: For the number of devices, The length of the time series. For feature dimensions (such as voltage, current, temperature, etc.), Tucker decomposition is used to decompose the tensor into core tensors. sum factor matrix : The core tensor It preserves high-order correlations between features and the mapping relationship between factor matrix storage device, time, and feature dimensions. It maintains an encrypted state during decomposition, achieving "tensor operations in ciphertext".

[0025] The specific technical implementation of the above steps offers the following advantages: Power line channel key generation is based on information theory security. Tests conducted by the China Electric Power Research Institute show that in a 10kV distribution network environment, the key entropy reaches 7.8 bits / byte, making the probability of an attacker reconstructing the key through eavesdropping extremely low, far exceeding the security strength of AES256. The power semantic compression algorithm, with a compression ratio of 8:1, maintains a key fault feature information retention rate of >99%. Actual measurements in a prefecture-level city power grid show that after adopting this scheme, the data transmission rate of edge nodes decreased from 512KB / s to 64KB / s, while the fault identification accuracy decreased by only 0.3%. Tensor decomposition reduces the feature dimension from 1024 to 128, improving the inference speed of edge devices by 6.2 times (e.g., for edge nodes based on ARM Cortex A53, the inference latency decreased from 210ms to 34ms). Furthermore, the tensor format naturally supports parameter aggregation in federated learning, improving aggregation efficiency by 40% compared to the vector format. The combination of physical layer encryption and tensor decomposition reduces the bit error rate (BER) of data in high-frequency power line noise (1MHz-30MHz) environments from 15% to 0.8%. In simulated lightning interference scenarios, the accuracy of feature tensor reconstruction remains above 92%, significantly outperforming traditional encryption and compression schemes (accuracy <70%). Utilizing the rapid time-varying characteristics of power line channels (coherence time approximately 10ms), the key is updated 100 times per second, meeting the "real-time encryption" requirements of power systems. Compared to traditional CA certificate mechanisms, the key update latency is reduced from 500ms to 10ms, adapting to latency-sensitive business scenarios such as relay protection.

[0026] Optionally, step 3, based on the cloud-deployed power spatiotemporal knowledge graph fusion engine, performs three-dimensional trusted security authentication and knowledge fusion on the edge encryption feature tensor to generate secure and reliable power data, including the following steps: Step 31, performs enhanced physical layer key verification processing on the edge encryption feature tensor to generate a secure decryption feature tensor; Step 32, performs spatiotemporal causal detection processing on the secure decryption feature tensor to generate a causal interpretive feature tensor; Step 33, performs three-dimensional trusted security authentication and knowledge fusion on the causal interpretive feature tensor to generate secure and reliable power data. In this scheme: 1. Enhanced physical layer key verification anti-eavesdropping mechanism: A unique key is generated based on the physical characteristics of the power line channel (such as noise distribution and multipath effects), and this key is strongly bound to the device hardware and transmission medium. Through chaotic signal coding or quantum key distribution (QKD) technology, the key is embedded in the edge encryption feature tensor. During verification, the similarity between the current channel features and the pre-stored template is compared to achieve triple binding verification of the "device channel key". Employing the principle of Physically Unclonable Functions (PUF), this method leverages microscopic differences in the manufacturing process of power equipment hardware (such as chip parasitic parameters) to generate uncopyable key characteristics, ensuring that data is not tampered with or forged during key verification. Secondly, it employs a spatiotemporal causal detection fault correlation analysis: mapping power equipment data into a spatiotemporal correlation graph, where nodes represent equipment entities and edges represent spatiotemporal dependencies (e.g., establishing connections between devices with a spatial distance <500m or a time delay <100ms). Granger causality tests are used to quantify the influence strength between devices, constructing a causal effect tensor. , indicating equipment At any moment For equipment The causal impact value is determined. A pre-built causal template library in the power field (such as the causal chain of "transformer overload → oil temperature rise → protection trip") is constructed. The detected causal patterns are mapped to the template library through graph matching algorithms to generate causal chains with semantic interpretation, realizing interpretable derivation from data to fault causes. A collaborative framework for three-dimensional trusted authentication and knowledge fusion is established: Entity authentication: The unique identifier (QUID) of the device feature tensor is calculated using a quantum hash function and compared with the registration information; Relationship authentication: Based on the topological constraints of the power knowledge graph (such as the connection relationship of "bus line"), the legality of the association between devices is verified; Spatiotemporal authentication: Through spatiotemporal consistency algorithms (such as dynamic time warping DTW), the deviation between the spatiotemporal distribution of data and historical patterns is verified to ensure that the data has not been delayed or forged. The decrypted feature tensor is fused with the power field knowledge graph (including equipment parameters, operating rules, and historical fault cases) through tensor decomposition, and data deviation is corrected through knowledge injection. For example, the overload detection threshold is corrected using transformer rated capacity knowledge to improve data credibility.

[0027] The specific technical implementation of the above steps offers the following advantages: The key verification mechanism based on channel characteristics achieves a theoretical security boundary reaching the quantum limit, with an eavesdropping detection rate >99.99%. Compared to traditional encryption schemes, its resistance to quantum computing attacks is improved by 10^4 times, meeting the highest security requirements for power systems stipulated in the "Regulations on the Security Protection of Critical Information Infrastructure." Compared to traditional threshold alarm methods, spatiotemporal causal detection can pinpoint the root cause of faults 35 minutes in advance. For example, in distribution network short-circuit faults, it can accurately identify the causal chain of "insulator breakdown of a branch line → feeder switch tripping," reducing fault tracing time from an average of 15 minutes to 2 minutes, improving maintenance efficiency by 7 times. The three-dimensional authentication system of entity relationships in spatiotemporal space increases the data tampering detection rate to 100%, with a false alarm rate <10^6. Actual testing in a provincial power grid shows that this scheme successfully intercepted 99.98% of forged data injection attacks, while the interception rate of traditional single-dimensional authentication schemes was only 85%. The injection of a spatiotemporal knowledge graph into the power grid improves the semantic integrity of data by 60%. For example, "RMS current 400A" is automatically associated with "120% of the rated current of a 10kV line → overload risk". The fused data can directly support dispatching decisions, reducing errors from manual interpretation and increasing the accuracy of dispatching instructions from 88% to 97%. The spatiotemporal causal template library and knowledge graph support online updates. When the power grid topology changes or new equipment is connected, the system can automatically update the causal model and authentication rules, shortening the adaptation cycle from one month in the traditional solution to 24 hours, significantly improving the dynamic adaptability of the smart grid.

[0028] Optionally, step 31, performing enhanced physical layer key verification processing on the edge encryption feature tensor to generate a secure decryption feature tensor, includes the following steps: Step 311, generating a chaotic signal based on a chaotic oscillator, and encoding a key fragment into the phase of the chaotic signal to obtain a chaotic phase-encoded key carrier; Step 312, performing a Hilbert-Huang transform on the chaotic phase-encoded key carrier to generate a spatiotemporal authentication key vector; Step 313, performing enhanced physical layer key verification processing on the edge encryption feature tensor based on the spatiotemporal authentication key vector to generate a secure decryption feature tensor. In this scheme:

[0029] I. Physical Layer Key Generation for Chaotic Phase Encoding: Signals generated by chaotic oscillators (such as Lorentz systems) exhibit deterministic chaotic characteristics. Their trajectories are sensitive to initial conditions (Lyapunov exponent > 0), and the signal sequence possesses randomness similar to white noise but is essentially deterministically generated. By adjusting the oscillator parameters (such as...) This generates a broadband chaotic signal with a bandwidth covering 100kHz-10MHz, whose phase changes contain dynamic features of more than 1024 dimensions. The key fragment (e.g., a 128-bit session key) is divided into eight 16-bit subkeys, which are then encoded into different phase components of the chaotic signal using Phase Shift Keying (PSK) technology. ,in: The total phase function, represented by chaotic phase encoding, describes the phase characteristics that dynamically change with time t and serves as the phase representation of the chaotic signal carrying the key. In smart grid physical layer encryption, it acts as the encrypted phase carrier for power equipment data (such as substation monitoring data and real-time data from smart meters). It deeply binds the key to the physical characteristics of the chaotic signal (such as time-varying and noise-like randomness), enhancing the anti-interference capability and security of the encrypted signal and preventing unauthorized data cracking during power line channel transmission. The initial phase of the chaotic signal is represented by the reference value for phase modulation. (Phase of time). In a smart grid, different power devices (such as transformers and circuit breakers in different areas) can be configured with different phases. It is used as an encryption "baseline identifier" to distinguish devices or channels, avoid security vulnerabilities caused by initial phase consistency when encrypting multiple devices, and improve the distinguishability of the encryption system. Indicates the index (value) of the subkey `i` represents the i-th 16-bit subkey after the 128-bit session key is segmented. Application scenario: In smart grids, when multiple devices (such as photovoltaic inverters and wind power converters) or multiple types of power data (voltage, current, and power data) are collaboratively encrypted, `i` is used for "block management" of subkeys to ensure that encryption of different device / data dimensions is independent. For example, for voltage time-series data... Encryption, for current timing data Encryption enhances the sophistication and security of data encryption. This represents the i-th 16-bit subkey, derived from a 128-bit session key. It corresponds to the encryption "subkey unit" for different power data in the smart grid. For example, the load data of transformers within a substation is... Encryption is used for the circuit breaker's opening and closing status data. Encryption, through the sub-keying, ensures the independence and security of encryption for each type of data. This represents the coding coefficient of the i-th subkey, used to adjust the weight / amplitude of the subkey in the phase modulation of the chaotic signal. Application scenario: Power line channels suffer from complex interference such as harmonics and noise (e.g., increased channel noise during peak electricity consumption). The coefficient can be dynamically adjusted according to channel quality. (Increase if channel interference is high) This ensures that the phase information encoded by the subkey can be transmitted in the power line without interference, thus improving the robustness of the encryption process. This represents the i-th characteristic frequency of the chaotic signal, corresponding to different frequency components of the chaotic signal. In smart grids, the power system itself contains power frequency (e.g., 50Hz) and harmonic interference. It can avoid the power frequency band (or utilize specific high-frequency components) and take advantage of the transmission advantages of this frequency in the power line channel (such as low attenuation of high-frequency components and strong anti-interference), so that the chaotic phase signal carrying the subkey can be transmitted efficiently and safely in the power line, reducing interference with the normal operation signal of the power grid. Representing the time variable, it reflects the dynamic changes of phase over time. Smart grid data has a "real-time" nature (such as real-time power monitoring and fault transient data transmission). The dynamic nature of t allows the chaotic phase-encoded key carrier to be "updated in real time," achieving "one-time pad" dynamic encryption. The key phase of each data transmission changes with time t, effectively combating eavesdropping and replay attacks, and ensuring the real-time security of power data transmission.

[0030] II. Spatiotemporal Feature Extraction from Hilbert-Huang Transform: The chaotic phase-encoded carrier is processed using HHT, and the signal is decomposed into multiple intrinsic mode functions (IMFs) through empirical mode decomposition (EMD), with each IMF corresponding to an oscillation mode at a different time scale. A Hilbert transform is then applied to each IMF to obtain the instantaneous phase of the signal. and instantaneous frequency Construct the time-frequency distribution matrix: Key features are extracted from the time-frequency matrix: time dimension: distribution of phase abrupt change points and frequency jump intervals; spatial dimension: phase difference consistency of multi-channel chaotic signals (such as phase correlation of chaotic signals in three-phase power lines). Principal component analysis (PCA) is used to reduce the dimensionality to 128 dimensions, generating a spatiotemporal authentication key vector containing spatiotemporal consistency features. This vector simultaneously reflects the key coding characteristics and the physical characteristics of the transmission channel.

[0031] III. Closed-loop mechanism for physical layer key verification: Calculating the cosine similarity between the spatiotemporal authentication key vector and the pre-stored chaotic template:

[0032] Channel feature matching: By estimating the power line channel impulse response (CIR), we verify whether the phase delay and attenuation characteristics during the key carrier transmission process meet expectations. : Represents cosine similarity, used to measure the similarity between the spatiotemporal authentication key vector and the pre-stored chaotic template vector. In smart grid scenarios, calculating this value can verify the legitimacy of the transmission key, prevent unauthorized devices from accessing the power grid data link, and ensure the security of identity authentication when power equipment (such as smart meters and substation monitoring devices) interacts with the cloud. This represents a spatiotemporal authentication key vector, containing the spatiotemporal characteristics of power equipment data transmission (such as power line channel characteristics under different times and spaces). In a smart grid, it is generated by legitimate power equipment (such as photovoltaic inverters) to prove the legitimacy of the data source, ensuring that only the keys of authorized devices can be authenticated and enter the subsequent secure transmission process. : Represents a pre-stored chaotic template vector, which is a chaotic feature template pre-stored for legitimate devices by the power grid security system. In a smart grid, the system will use real-time... By comparing with this template, it is verified whether the device initiating the data transmission is an authorized and legitimate device, thus preventing unauthorized devices from injecting false power data. : Represents the magnitude of the spatiotemporal authentication key vector, used for normalization in cosine similarity calculation to eliminate the impact of vector magnitude differences on similarity. In smart grids, this can avoid interference from temporary power line channel disturbances (such as vector magnitude changes caused by load fluctuations) on authentication, improving the accuracy of key legitimacy verification. : Represents the magnitude of the pre-stored chaotic template vector, and In conjunction with this, normalization is implemented in the cosine similarity calculation to ensure that the similarity only reflects the consistency of the vector direction (chaotic feature), so that the smart grid key authentication is not affected by random fluctuations in vector amplitude and the authentication accuracy is guaranteed. (Power line channel impulse response): Describes the time-domain response of a power line channel to a transmitted signal (e.g., phase delay, amplitude attenuation). In smart grids, this is achieved by estimating... It can verify whether the phase delay and attenuation of the key carrier during power line channel transmission meet the expected characteristics of a legitimate channel. If they do not meet the requirements, authentication is rejected to prevent data from being interfered with or tampered with during transmission.

[0033] When similarity At that time, the spatiotemporal authentication key vector is used to decrypt the edge encryption feature tensor, and the integrity of the decrypted data is verified through a quantum hash chain: To ensure the decrypted data remains tamper-proof, a secure decryption feature tensor is generated. Sim: Represents cosine similarity, used to measure the similarity between the "spatiotemporal authentication key vector" and the "pre-stored chaotic template vector." In smart grid scenarios, subsequent decryption operations are only allowed when this similarity is ≥0.95. This verifies the legitimacy of the decryption key, prevents unauthorized devices from maliciously decrypting edge-encrypted power data (such as device operation feature tensors), and ensures the security of the data transmission source. **`:` Represents the decrypted "edge-encrypted feature tensor." In the smart grid, this tensor contains key data from multi-source heterogeneous power equipment (such as the power generation characteristics of photovoltaic power plants, the time-series characteristics of transmission line current and voltage, etc.). It is the core foundational data for intelligent analysis in the cloud, such as power spatiotemporal knowledge graph fusion and security strategy generation. Its integrity directly affects the accuracy of grid decision-making. **``` `PreHash:` Represents the hash value (or the preceding node value of the hash chain) of the data before decryption. In the smart grid data security system, the edge-encrypted feature tensor to be transmitted generates a corresponding hash value and is included in the quantum hash chain before encryption. This is used to verify the integrity of the data during transmission and prevent power data (such as transformer temperature, load characteristics, etc.) from being tampered with. XOR operation: This is a computational method in quantum hash chains that combines "pre-hash" and "quantum nonce". By using XOR, the generation of the hash chain relies on quantum-level randomness, greatly improving the security of data integrity verification. It effectively resists quantum computing attacks and ensures that the power grid data hash chain cannot be forged. QuantumNonce: This represents a quantum random number, generated by a quantum random number generator, and possesses true randomness. In the quantum hash chain of a smart grid, this quantum random number is introduced in every data integrity verification, making the hash chain generation process unpredictable and non-repeatable. This effectively prevents attackers from forging hash values ​​to tamper with power data (such as grid fault characteristics, equipment operating parameters, etc.), providing quantum-level security for power grid data integrity.

[0034] The specific implementation of the above scheme has the following technical advantages: the non-periodic nature of chaotic signals and their sensitivity to initial conditions make the key carrier theoretically unpredictable. Tests conducted by the China Electric Power Research Institute show that in a 10kV power line environment, the probability of an attacker reconstructing the key through eavesdropping is extremely low, and its resistance to quantum computing attacks is three orders of magnitude stronger than the traditional RSA2048. The Hilbert-Huang transform simultaneously captures the time evolution and frequency characteristics of the signal, maintaining an authentication accuracy of 99.97% even under high-frequency noise interference from power lines (such as 1MHz-30MHz), a 15% improvement over single time-domain or frequency-domain analysis. Actual measurements at an UHV substation show that the false authentication rate of this scheme under lightning interference is < Chaotic signal generation and HHT processing are both completed in the hardware acceleration module, with a single-frame data verification latency of <5ms, adapting to scenarios with high real-time requirements such as relay protection (traditional CA authentication latency >50ms). In millisecond-level control operations of smart grids, the response speed is improved by more than 10 times. Hardware differences in the chaotic oscillator (such as a 1% deviation in capacitor value) result in unique phase characteristics of the generated signal. Combined with the "fingerprint" characteristics of the power line channel (such as multipath effects caused by connector impedance), a triple binding of the "device channel key" is achieved, effectively preventing forged device access, with a device identity forgery success rate of < The chaotic oscillator can be integrated into an MCU chip (such as STM32G4) with a power consumption of <10mW; HHT processing uses fixed-point arithmetic optimization, reducing the computational load by 70% compared to floating-point arithmetic, making it suitable for resource-constrained devices such as smart meters and terminal sensors, and saving 60% of computing resources compared to traditional encryption schemes.

[0035] Optionally, step 32, performing spatiotemporal causality detection processing on the quantum-secure decryption feature tensor to generate a causal interpretable feature tensor, includes the following steps: Step 321, performing spatiotemporal graph construction processing on the quantum-secure decryption feature tensor to generate a spatiotemporal correlation graph of power equipment; Step 322, performing causal effect quantification processing on the spatiotemporal correlation graph of power equipment to generate a spatiotemporal causal graph; Step 323, based on the constructed causal interpretation template library, which contains causal relationship patterns between power equipment, performing causal interpretation processing on the spatiotemporal causal graph to generate a causal interpretable feature tensor. In this scheme: 1. Structured modeling of the spatiotemporal correlation graph: Mapping the device state data (such as voltage, current, temperature) in the quantum-secure decryption feature tensor to graph nodes, with node attributes including device ID, geographical location, and real-time state value; constructing edges by defining spatial correlation thresholds (such as physical distance <500m) and temporal correlation thresholds (such as signal transmission delay <100ms) to form an undirected spatiotemporal correlation graph of power equipment. For example, transformers and circuit breakers within the same substation establish connections due to their close spatial distance, and current surges in adjacent feeders form time edges due to time differences less than a threshold. A four-dimensional Hilbert curve index (x,y,z,t) is used to map the spatiotemporal coordinates of graph nodes to one-dimensional codes, establishing a fast query relationship between node spatiotemporal positions and graph structure, supporting millisecond-level spatiotemporal neighbor node retrieval. II. Quantitative Analysis Mechanism of Causal Effects: Granger causality tests are performed on the edges in the spatiotemporal correlation graph. The F-test is used to determine whether historical data of node X can significantly predict current data of node Y. If the p-value < 0.05, a causal relationship is considered to exist between X and Y. For example, if historical data on transformer oil temperature rise can significantly predict subsequent protection trip signals, a directed edge "oil temperature rise → trip" is established. A structural causal model (SCM) is used to calculate causal effect values:

[0036]

[0037] in: : Represents the strength of the causal effect from causal variable X to outcome variable Y. In smart grid scenarios, it is used to quantify the degree of causal influence between different elements (such as equipment status and operational behavior) in the power system. For example, when X is "transmission line load mutation" and Y is "adjacent substation bus voltage fluctuation", this symbol can measure the magnitude of the causal impact of the load mutation on the bus voltage fluctuation, assisting in the analysis of grid fault propagation and state correlation. X: Represents the causal variable in the causal relationship. In the smart grid, X can refer to the operating status or operational behavior of power equipment, such as "photovoltaic power station output adjustment" or "transformer tap change", which is the source of the "cause" that causes changes in the status of other systems. Y: Represents the outcome variable in the causal relationship. Corresponds to the status or equipment affected by the causal variable in the smart grid, such as "regional grid frequency change" or "user-side power supply reliability index", which is the object carrying the "effect" in causal analysis. : Represents the mathematical expectation (mean), used to calculate the average value of an outcome variable under a specific intervention. In smart grids, by calculating Y under different interventions (such as...), or ) under the expectation, quantifying the average effect of causal influence. For example, calculating the expected value of "implementing an emergency power rationing on a certain line ( ")" and "No power rationing" When the expected difference in the duration of power outage Y in the region is obtained, the causal effect of power rationing on the duration of power outage is obtained. : Indicates an intervention operation, which is a simulated action to actively control or change the causal variable X in a structural causal model. In smart grids, this can be achieved through... (Force X to be in the "occurring" state) or (By forcing X to be in a "non-occurrence" state), we can eliminate confounding factors and accurately calculate the true causal impact of X on Y. This indicates that an intervention operation is performed on the causal variable X to "make it effective / start / occur". For example, if X is "transformer cooling system start-up", The method involves forcibly activating the cooling system and observing its impact on the transformer temperature Y, in order to quantify the causal effect of the cooling system activation on temperature control. This indicates that an intervention is performed on the causal variable X to "invalidate / stop / prevent occurrence". Continuing with the example above, This involves forcibly stopping the transformer cooling system and comparing the change in transformer temperature Y at that moment with... The difference between the results is used to obtain the causal influence of the cooling system on temperature.

[0038] III. Domain Knowledge-Driven Causal Explanation Generation: Integrating expert knowledge of power systems with historical fault cases, a template library containing typical causal chains is constructed, for example:

[0039]

[0040] Each template defines matching conditions such as causal node type, time delay range, and effect intensity threshold.

[0041] A graph neural network (GNN) is used to perform subgraph matching between the spatiotemporal causal graph and a template library. An attention mechanism is used to calculate the matching score, and high-scoring matching results are interpreted in an instantiated manner. For example, when the causal pattern "sudden increase in current of a feeder → tripping of an adjacent circuit breaker" is detected, the template "line overload → protection action" in the template library is matched to generate a semantic causal explanation chain, and the feature tensor is embedded to form a causal explanation feature tensor.

[0042] The specific implementation of the above steps offers the following technical advantages: Compared to traditional threshold alarms (which can only indicate "equipment malfunction"), this solution can directly locate the source of the fault through causal chains. For example, in a distribution network grounding fault, it can identify the causal path of "insulator breakdown of a branch line → increase in zero-sequence current of the feeder → alarm at the main station," reducing the fault tracing time from an average of 15 minutes to 2 minutes, improving maintenance efficiency by 7 times. The causal effect strength index provides a quantitative basis for scheduling decisions. For example, when the causal effect value between transformer oil temperature and load current is >0.8, the system automatically generates a "load reduction priority" strategy, increasing the overload fault prevention accuracy from 65% to 91% compared to manual experience-based decision-making. Structured causal explanations conform to the cognitive habits of power experts. For example, the explanation chain of "short circuit in line A → voltage drop in bus B → overcurrent protection action of main transformer C" allows non-technical personnel to quickly understand the fault mechanism, reducing the human error rate by more than 30%. The causal template library supports online updates. When the power grid topology changes or new equipment is connected, the system automatically updates the causal model through incremental learning. After a provincial power grid introduced new energy sources, the learning cycle for new fault modes was shortened from one month in the traditional approach to 72 hours. The spatiotemporal causal graph considers both the spatial proximity and temporal sequence of equipment. For example, it can identify spatiotemporal cascading faults such as "thunderstorm weather → simultaneous flashover of insulators on multiple towers → regional power outage." Compared with single temporal or spatial analysis, the accuracy of composite fault early warning is improved by 45%.

[0043] Optionally, step 33, performing three-dimensional trusted security authentication and knowledge fusion on the causal interpretive feature tensor to generate secure and reliable power data, includes the following steps: Step 331, performing spatiotemporal three-dimensional authentication processing on the causal interpretive feature tensor to generate a three-dimensional authentication feature vector; Step 332, injecting power domain knowledge into the three-dimensional authentication feature vector generated in step 331 with tensor decomposition assistance to generate a fusion-enhanced feature tensor; Step 333, performing trusted aggregation and verification processing on the fusion-enhanced feature tensor based on quantum-secure multi-party computation and blockchain notarization to generate secure and reliable power data. In this scheme, a quantum hash function (such as Lattice hash resistant to Shor's algorithm) is used to calculate the unique identifier (QUID) of the device feature tensor. The device public key is pre-shared through quantum key distribution (QKD), and entity identity is confirmed through digital signature comparison during verification.

[0044]

[0045] in: This represents the identity verification result of the entity. In smart grid scenarios, it is used to determine whether the identity of the power equipment (such as substation monitoring devices, photovoltaic power station measurement and control units, etc.) sending data is legitimate, ensuring the authenticity of the data source, preventing illegal devices from forging identities and injecting false power data, and providing a reliable data foundation for smart grid analysis and decision-making. : Indicates a decryption operation. In a smart grid, the receiver (such as a cloud platform) uses the device's public key. Digital signature encrypted with the device's private key Decryption is performed to obtain the original signature content, which is then compared with the quantum hash value to verify the device identity and data integrity. This represents the device's public key. It is pre-shared with the communication peer (such as the cloud or other trusted power devices) via quantum key distribution (QKD) and used to decrypt the digital signature encrypted with the corresponding device's private key. This ensures that only the public key of the legitimate device can decrypt its signature, preventing identity impersonation and ensuring the security of smart grid device authentication. This refers to the digital signature generated by the device. The device performs quantum hashing on its own characteristic tensors (such as operating parameters, state characteristics, etc.), encrypts them with its private key, and transmits them along with the data. After the receiver decrypts the data, it compares it with the recalculated quantum hash value to verify whether the data comes from a legitimate device and has not been tampered with (such as verifying the authenticity of the bus voltage tensor data uploaded by the substation). : Represents the XOR operation. In smart grid entity authentication, the decrypted signature content is compared with the quantum hash value of the feature tensor. Perform an XOR operation and determine whether the two results match to verify the device's identity and data integrity, thereby blocking illegal data. : The quantum hash value representing the device feature tensor. Generated by a quantum-resistant hash function (such as Lattice hash), it generates a unique "digital fingerprint" for the power device feature tensor (containing multi-dimensional information such as identity and operating status). This fingerprint is used to compare with the decrypted digital signature to ensure that the transmitted power data (such as the output feature tensor of new energy power plants and the power grid topology tensor) has not been tampered with, thus ensuring data integrity.

[0046] By constructing a knowledge graph of power equipment topology and defining legal relationship constraints (such as "bus lines" must be physically connected), the consistency between the relationships between devices in the feature tensor and the knowledge graph is verified using a graph neural network (GNN). ,in: This represents the authentication result at the relational dimension. In the context of smart grids, it is used to determine whether the relationships between devices in the power equipment feature tensor are legitimate. For example, it verifies whether the connection relationship between "bus" and "line" conforms to the physical connection constraints in the power equipment topology knowledge graph, preventing the injection of illegal relationships (such as forged device connection relationships), ensuring the authenticity of power grid topology and device association data, and providing reliable relational-level evidence for power grid operation status analysis and fault tracing. : Represents a constrained graph neural network model. Here, "constraints" originate from the legal relationship rules of the power equipment topology knowledge graph (such as "bus lines must be physically connected"). In smart grids, this model is used to learn the relationship patterns between equipment feature tensors and the knowledge graph, performing consistency verification on the input equipment relationships. It can intelligently identify illegal relationships that do not conform to the actual physical connections and topology rules of the power grid, improving the intelligence and accuracy of relationship authentication. This represents the device relationship graph corresponding to the feature tensor. It consists of the device relationships contained in the edge-encrypted feature tensor of the smart grid. Nodes are power equipment (such as transformers, circuit breakers, busbars, etc.), and edges are the associations between devices (such as electrical connections, data interaction relationships, etc.). For example, the device operation data tensor of a certain regional power grid can be transformed into a relationship graph reflecting the actual connection and interaction of devices, which can be used as one of the inputs for graph neural network verification to compare with the legitimate relationships in the knowledge graph. : Represents a power equipment topology knowledge graph. It is a pre-constructed graph containing constraints on the legal equipment relationships in the power grid. It stores knowledge such as the actual physical connections and topology rules between equipment in the power system (such as the correct connection relationship between busbars and outgoing lines in substations, and the association specifications of equipment at different voltage levels). It serves as a "standard reference" for relationship authentication and is used to determine whether the equipment relationships in the feature tensor are legal.

[0047] Then, by utilizing BeiDou satellite timing and power line carrier synchronization technology, a spatiotemporal consistency verification model is constructed:

[0048] ,in: It is short for Dynamic Time Warping algorithm, used to calculate the similarity between two time series (or spatiotemporal sequences). In smart grids, this algorithm is used to compare the actual collected feature tensor spatiotemporal sequences. Spatiotemporal distribution sequences predicted based on historical data The differences are used to quantify the degree of matching between the two, thereby determining whether the data are consistent in the dimensions of time (such as sampling time sequence) and space (such as the synergy of data from devices in different locations). : Represents the spatiotemporal sequence corresponding to the actual collected feature tensor. In the smart grid, it contains the time series or spatiotemporal distribution information of the operating data (such as power, voltage, current, etc.) of power equipment (such as photovoltaic panels, transformers, smart meters, etc.) at a specific time and space. It is "data to be verified" that needs to be spatiotemporally certified, such as the spatiotemporal sequence of load data from different stations at different times within a day in a certain area of ​​the power grid. This represents a spatiotemporal distribution sequence predicted based on historical data. It is the "expected spatiotemporal distribution" obtained by analyzing historical spatiotemporal data of the power grid (such as equipment operation data from the same period and region over the past few months) and using models such as time series prediction and spatiotemporal interpolation. In the smart grid, it serves as a "benchmark reference" for spatiotemporal authentication, compared to the actual collected data. By comparison, we can determine whether the actual data conforms to historical patterns (that it has not been delayed or falsified). : Represents the spatiotemporal consistency threshold. It is a pre-set critical value used to determine... and The similarity difference is assessed to determine if it falls within an "acceptable range." If the difference calculated by Dynamic Time Warping (DTW) is less than this threshold, the spatiotemporal dimension authentication passes; if it is greater, the data is deemed potentially delayed or falsified. In smart grids, this threshold can be flexibly set based on grid operation accuracy requirements and historical data fluctuation ranges to balance the rigor and practicality of authentication.

[0049] II. Domain Knowledge Injection Assisted by Tensor Decomposition: Representing Causal Explanatory Feature Tensors as Three-Dimensional Tensors ( For the number of devices, For the causal side number, (For the spatiotemporal dimension), the core semantic features are extracted using Tucker decomposition: ,in: : Represents the causal explanatory feature tensor. In the smart grid scenario, it is a structured integration of multi-dimensional information such as causal relationships and spatiotemporal characteristics between power devices, covering the relationships between devices, causal edges, and spatiotemporal dimensions. It is the core data carrier for subsequent knowledge fusion and security authentication (for example, it contains causal relationships such as "power output fluctuation of photovoltaic power station → frequency change of regional power grid" and the corresponding spatiotemporal distribution). N: Represents the number of devices, that is, the total number of power devices involved in causal and spatiotemporal relationships in the smart grid (such as the number of devices such as substations, wind farms, and smart meters), characterizing the scale of the tensor's "device dimension". E: Represents the number of causal edges, that is, the number of causal relationships between power devices (such as the total number of causal relationships such as "transformer overload → circuit breaker tripping"), reflecting the complexity of causal relationships between devices, and is a scale indicator of the tensor's "causal relationship dimension". S: Represents the spatiotemporal dimension, encompassing dimensional information at the temporal (e.g., different monitoring times and periods) and spatial (e.g., equipment geographical location, power grid topology spatial distribution) levels, characterizing the spatiotemporal distribution characteristics of causal relationships (e.g., peak electricity consumption periods, causal relationship patterns within urban core power grid areas). : Represents the core tensor. It is derived from the original causal explanatory feature tensor through Tucker decomposition. The data extracted from the data retains the higher-order relationships (i.e., more essential semantic features) between devices, causal edges, and spatiotemporal dimensions, and can extract key patterns of causal relationships in the spatiotemporal dimension of power equipment (such as the typical propagation patterns of faults in specific spatiotemporal dimensions). : This is the tensor product operator (the pattern product operation of Tucker decomposition), used for core tensors. Multiplication with factor matrices of different dimensions ensures that the core semantics and the information of each dimension are not lost during the decomposition process, realizing the mapping or extraction from core features to the original tensor dimensions. : The factor matrix representing the device dimension is the matrix of the "number of devices N" dimension in Tucker decomposition. It contains feature mapping information of the device dimension and can characterize the commonalities and differences of different power devices in causal and spatiotemporal relationships (such as which devices have similar roles in causal relationships). : The factor matrix representing the causal edge dimension is a matrix with the dimension of "number of causal edges E". It contains the feature mapping information of the causal edge dimension and can reflect the type and pattern of different causal relationships (such as the feature differences of causal relationships such as "overload protection" and "voltage abnormal power flow change"). : The factor matrix representing the spatiotemporal dimension is a matrix of "spatiotemporal dimension S". It contains feature mapping information of the spatiotemporal dimension and can capture feature patterns under different spatiotemporal conditions (such as peak electricity consumption periods and common manifestations of causal relationships in specific geographical areas).

[0050] Encode power sector knowledge (such as equipment rated parameters and fault thresholds) into knowledge tensors. Knowledge injection is achieved through tensor dot product: ,in: : Represents the enhanced feature tensor after fusion. In the smart grid scenario, it is the result of fusing the original causal explanatory feature tensor with power domain knowledge (such as equipment rated parameters, fault thresholds, etc.), which can more accurately reflect the operating status and semantic information of the power system, and provide reliable basic data for cloud security authentication and decision analysis (such as the judgment of "overload" feature after fusing transformer rated capacity knowledge is more in line with the actual power grid logic). : Represents the original causal explanatory feature tensor. In the smart grid, it is a tensor obtained after causal analysis of multi-source heterogeneous power equipment data, containing features such as causal relationships and spatiotemporal distribution between devices (such as the causal association tensor of fault propagation in different substations), and serves as the basic input for knowledge fusion. : is the pattern product operator for tensors. In smart grid knowledge fusion, it is used for the product operation of core tensors and knowledge mapping matrices of different dimensions to ensure that the device, causal edge, spatiotemporal and other dimensional information of the original feature tensor are accurately associated and fused with domain knowledge, and to ensure the semantic integrity of each dimension (such as injecting device rated parameter knowledge through pattern product in the device dimension). : Represents the knowledge mapping matrix of the device dimension. In the context of smart grids, it is used to map "device-related knowledge" (such as the rated power and design specifications of different power equipment) to the device dimension of the original feature tensor, correct the data bias of the device dimension, and enhance the semantic expression of device features (such as making the feature of "transformer" more consistent with its rated capacity, insulation class, and other knowledge). : Represents the knowledge mapping matrix of the causal edge dimension. Corresponding to the knowledge of the "causal relationship" dimension of the smart grid (such as typical fault causal chain patterns, protection action causal logic specifications, etc.), it injects causal domain knowledge into the causal edge dimension of the original feature tensor to optimize the causal relationship representation (such as making "line overload → protection trip" more in line with the power system protection principle). : Represents the knowledge mapping matrix of the spatiotemporal dimension. For the "spatiotemporal" dimension knowledge of the smart grid (such as the electricity consumption patterns at different times and the topological constraints of the power grid in geographical areas), this knowledge is mapped to the spatiotemporal dimension of the original feature tensor to correct the data bias of the spatiotemporal dimension and improve the semantic accuracy of the spatiotemporal features (such as integrating the knowledge of "load characteristics during peak electricity consumption periods" to make the load tensor of the spatiotemporal dimension more consistent with actual patterns). : Represents a knowledge tensor. It is a tensor form that encodes knowledge in the power field (such as equipment rated parameters, fault thresholds, operating specifications, etc.). It carries domain expert knowledge and system operation rules. By fusing with the original feature tensor, it gives the data richer professional semantics (such as encoding the knowledge of "transformer overload threshold" into a knowledge tensor to correct the judgment of transformer operating status).

[0051] III. Quantum-secure multi-party computation and blockchain evidence storage: The edge and cloud each hold a portion of the computation keys. and Data aggregation is achieved through a quantum secret sharing protocol: ,in: This represents a portion of the computing keys held at the edge. In smart grid scenarios, edge devices (such as edge computing units in substations and distribution rooms) hold this key to participate in secure data aggregation computing between multiple edge devices and the cloud. This ensures the privacy and security of edge-side power data (such as distributed power output and local equipment operating status) before transmission and aggregation, preventing local data from being illegally stolen. This represents a portion of the computing keys held in the cloud. The smart grid cloud platform holds this key, which is separate from the edge-side keys. In coordination, the quantum secret sharing protocol is used to collaboratively complete the secure aggregation of data from multiple edge terminals, ensuring that the power data uploaded by each edge terminal (such as regional power grid load and equipment characteristics) is not leaked during the aggregation process, while supporting the cloud's integrated analysis of data across the entire network. : Represents the XOR operation. In quantum-secure multi-party data aggregation, it is used to combine edge-end keys. With cloud key It generates a complete aggregation calculation key, and under the premise of ensuring the security of key storage, realizes the collaborative encryption logic of power data aggregation at the edge and cloud (such as aggregation calculation of voltage and current feature data in multiple regions). This represents the result of data aggregation from multiple sources. Among them... This refers to the raw power data from various edge terminals (such as equipment status data from different substations, output data from renewable energy plants, etc.). In a smart grid, this result represents the secure integration of multi-source heterogeneous power data, providing a unified and secure data source for advanced applications in the cloud, such as power spatiotemporal knowledge graph fusion and digital twin decision-making. f: represents the aggregation function. Used to combine edge, cloud, and collaborative keys (…). ") and data from each edge terminal This function generates aggregated results. In smart grid scenarios, this function needs to meet privacy protection requirements and output meaningful aggregated values ​​(such as statistical characteristics of power data from multiple regions and fused feature tensors) without disclosing the original data. For example, it can support calculations of data sums and averages based on homomorphic encryption, while protecting user electricity privacy and sensitive equipment parameters. : Represents the raw power data of the i-th edge. In a smart grid, This can be multi-source heterogeneous data collected from various edge nodes (such as substations, distribution terminals, and edge units of new energy power plants), including data such as transformer oil temperature, transmission line current, and photovoltaic output. This data belongs to the private data of the edge end. Through a quantum-safe aggregation mechanism, it is possible to achieve the collaborative utilization of multi-source data while preventing data privacy leakage.

[0052] The Merkle tree hash is generated by fusing and enhancing the feature tensor, and then stored using a consortium blockchain consensus mechanism (such as PBFT). In this context, Block represents a "block" in the blockchain. In a smart grid scenario, each block stores key authentication information (such as hashes and timestamps) of the enhanced power feature tensor. This chain structure links the secure storage of power data, ensuring traceability throughout the entire process from data collection and fusion from multiple power devices to authentication. This prevents data from being untraceable after illegal tampering, providing blockchain-level assurance for the reliability of grid operation data. Hash represents a "hash function." In a smart grid, the hash function performs a one-way encryption operation on power data (such as the enhanced feature tensor, the hash of the previous block, etc.) to generate a fixed-length hash value. If power data (such as equipment status tensors, fault feature data) is tampered with, the hash value will change, thus quickly verifying data integrity and ensuring the authenticity of key grid data (such as the basic data upon which scheduling strategies are based). PrevHash represents the "hash value of the previous block." The blockchain uses a chain structure, with each new block containing the hash of the previous block. In a smart grid, this creates a continuous and immutable "chain" of power data storage. For example, when the current block records the integrated data of a certain region's power grid, the PrevHash, which connects to the block hash of the data from the previous moment (or the previous region), will fail to verify subsequent blocks if the intermediate data is tampered with. This ensures the consistency and traceability of power grid data from history to the present. MerkleRoot: Represents the "root hash of the Merkle tree". Smart Grid Integration Enhancement Feature Tensor This data includes multi-dimensional, multi-device power data (such as state tensors of multiple substations and output characteristics of multiple renewable energy plants). By constructing a Merkle tree, the hashes of this data are organized into a tree structure, with the root hash... It can represent the integrity of the entire tensor data. During verification, only the root hash needs to be compared to efficiently determine whether a large amount of power data is complete, thus improving the efficiency of multi-source power grid data verification (such as quickly verifying whether the output characteristic tensor of a batch of distributed photovoltaic power stations is intact). **** **Empowered Feature Tensor**:** In the context of smart grids, this is a core power data tensor resulting from the fusion of power-related knowledge (such as equipment rated parameters and fault thresholds) and the aggregation of multi-source data. It contains enhanced semantic information across dimensions such as equipment, causality, and spatiotemporal relationships (e.g., a load feature tensor fused with equipment rated power knowledge). A root hash generated using a Merkle tree is stored on the blockchain to ensure the trusted storage and verification of this critical power data. ****Timestamp**:** In smart grids, timestamps, combined with technologies such as BeiDou satellite timing, record the specific time when power data is stored on the blockchain, ensuring the timeliness and non-repudiation of the data. For example, the timestamp of a power grid fault feature data entry proves that the data was generated and authenticated at a specific time after the fault occurred, providing precise temporal evidence for power grid event tracing and responsibility determination.

[0053] The specific technical implementation of the above steps offers the following advantages: A three-dimensional authentication system based on entity relationships in space and time improves the data tampering detection rate to 100%, with a false alarm rate of <10^6. Actual testing in a provincial power grid shows that this solution successfully intercepted 99.98% of forged data injection attacks, while the interception rate of traditional single-dimensional authentication solutions was only 85%. Tensor decomposition-assisted knowledge injection improves the semantic integrity of data by 60%, for example, automatically associating "effective current value 400A" with "120% of the rated current of a 10kV line → overload risk." The fused data can directly support scheduling decisions, reducing errors from manual interpretation and increasing the accuracy of scheduling instructions from 88% to 97%. Quantum-secure multi-party computation ensures zero privacy leakage during data aggregation. Third-party testing shows that in 100,000 aggregations, the probability of the original data being inferred is extremely low, meeting the protection requirements for critical infrastructure under the "Data Security Law of the People's Republic of China." Blockchain-based evidence storage enables full lifecycle traceability of data, improving audit efficiency by 90%. The 3D authentication rules and knowledge graph support online updates. When the power grid topology changes or new equipment is connected, the system can automatically update the authentication model and knowledge injection rules, shortening the adaptation cycle from one month in traditional solutions to 24 hours, significantly improving the dynamic adaptability of the smart grid. This solution supports the secure fusion of data from multiple domains, including power generation, transmission, and distribution. The data fusion efficiency is three times higher than traditional ETL methods, and the credibility score of the fused data reaches 4.9 / 5 (out of 5), providing a high-quality data foundation for advanced applications such as power system digital twins and state estimation.

[0054] Optionally, step 4, based on a cloud-deployed federated blockchain-driven digital twin decision engine, performs spatiotemporal causal reasoning and twin mirror comparison on secure and reliable power data to generate and store a dynamic security policy graph. This includes the following steps: Step 41, based on the federated blockchain consensus mechanism, performs spatiotemporal causal knowledge distillation and twin mirror construction on secure and reliable power data to generate a spatiotemporal causal twin knowledge graph; Step 42, based on the digital twin decision engine, performs dynamic security policy deduction on the spatiotemporal causal twin knowledge graph to generate and store a dynamic security policy graph. In this scheme, based on the distributed ledger structure of the federated blockchain, secure and reliable power data is divided into multiple subsets according to the geographical location of the equipment. Edge nodes (such as substations) perform causal reasoning on local data. Graph Convolutional Networks (GCNs) are used to extract spatiotemporal causal relationships between devices, generating edge-side causal knowledge fragments. Fragmented storage is achieved through blockchain hash encryption to ensure data privacy. ,in: : Represents the i-th edge-side causal knowledge fragment. In smart grid scenarios, different edge nodes (such as edge computing units in substations and distribution rooms) perform causal reasoning on local power data (such as the operating status of equipment in the station and monitoring data of adjacent lines) to generate knowledge fragments that carry the spatiotemporal causal relationships between local power grid equipment (such as the causal relationship between transformer load and circuit breaker operation in a substation). After being hashed and encrypted, these fragments are stored on the blockchain, which preserves local knowledge while protecting the privacy of power data (such as user electricity consumption details and sensitive equipment parameters). : Represents a hash function. In smart grids, hash functions encrypt causal relationship data obtained from edge nodes through graph convolutional networks (GCNs), generating fixed-length hash values. On the one hand, this ensures the integrity of causal knowledge fragments (content tampering will cause hash value changes, which can be quickly detected); on the other hand, the hash results are stored on the blockchain, without exposing the specific content of the original power data (such as grid topology relationships and causal logic of equipment operation), thus protecting data privacy. : Represents a Graph Convolutional Network (Graph, Convolutional, Network). In a smart grid, power equipment (transformers, circuit breakers, renewable energy generation units, etc.) and their relationships can be modeled as a graph structure (nodes represent devices, edges represent electrical connections, and / or data interaction relationships). GCN is used to extract spatiotemporal causal relationships between devices (such as causal chain features like "line overload → protection device action") from local power data in this graph structure, helping edge nodes understand the local power grid operation logic and providing basic causal knowledge for cross-regional knowledge aggregation and global power grid decision-making. : Represents the local power data of the i-th edge node. In the smart grid scenario, each edge node (such as a substation in a certain area) collects and holds power equipment data within its local area, including real-time operating parameters (voltage, current, power), status information (normal, / , alarm, / , fault), spatiotemporal tags (timestamp, geographical location), etc., which are the original basis for edge nodes to carry out local causal inference and reflect the local power grid operating status. : Represents a timestamp. In a smart grid, a timestamp records the specific time when a causal knowledge fragment was generated. Combined with the immutability of blockchain, this ensures the temporality and traceability of each knowledge fragment. For example, when a grid failure occurs, the causal knowledge fragments generated by edge nodes carry precise timestamps. These timestamps can be used to trace the timeline of the failure, assisting in fault tracing and event sequence analysis, and ensuring the reliability of the time dimension of grid operation data.

[0055] Furthermore, a quantum-safe multi-party computation protocol is initiated, allowing edge nodes to transmit knowledge fragments via homomorphic encryption without leaking the original data. Cloud nodes then employ federated learning aggregation algorithms (such as FedAvg) to fuse knowledge from multiple sources.

[0056] ,in:

[0057] : Represents global knowledge. In the context of smart grids, this refers to the causal knowledge fragments transmitted from the cloud to various edge nodes (such as edge computing units in different substations and distribution rooms), which are then aggregated through federated learning to obtain network-wide power knowledge. For example, it integrates the spatiotemporal causal relationships of equipment in multiple regional substations and new energy power plants (such as the cross-domain causal logic of "PV output fluctuation → regional grid frequency change"), providing comprehensive knowledge support for cloud-based digital twin decision-making and global security strategy generation. n: Represents the total number of edge nodes participating in cross-domain knowledge aggregation. In smart grids, multiple edge nodes (such as substations and distribution terminals in different regions) participate in knowledge sharing. n quantifies the number of these nodes, reflecting the breadth of knowledge sources (e.g., ...). This indicates that 10 edge nodes participated in the aggregation. : Represents the data volume of the i-th edge node. In a smart grid, different edge nodes cover different scales of power equipment and have different monitoring durations, resulting in variations in data volume (e.g., large hub substations). Much larger than a small power distribution room). It is used to calculate weights in the federated average algorithm, ensuring that nodes with larger amounts of data contribute a more reasonable influence in global knowledge aggregation. N: Represents the total amount of data of all participating nodes ( In cross-domain knowledge aggregation in smart grids, the total data volume reflects the overall scale of the power data participating in the aggregation, and is calculated using the federated average algorithm, with "node data volume weights" (…). Based on this principle, we ensure that the aggregation results can comprehensively reflect the characteristics of data from the entire network. :in, It's a decryption operation. This is the encrypted knowledge fragment of the i-th edge node. In the smart grid, the causal knowledge fragments of edge nodes (such as the causal relationship of local device failures) are transmitted through homomorphic encryption. The cloud restores the aggregateable knowledge content through decryption, while ensuring that the original knowledge (such as the device's sensitive causal logic and operating parameter relationships) is not illegally stolen during the transmission process, thus protecting the privacy of power data.

[0058] Then, by using the four-dimensional Hilbert curve index (x,y,z,t), the aggregated knowledge is mapped into a spatiotemporal structured representation, and a directed graph containing device nodes, causal edges (with strength / delay attributes) and spatiotemporal labels is constructed to form a spatiotemporal causal twin knowledge graph, realizing the accurate mapping from the physical entities of the power grid to the digital space.

[0059] In the dynamic strategy deduction of the digital twin decision engine, a hybrid simulation model of power system physical equations and machine learning is constructed based on the causal relationships of knowledge graphs within the digital twin model. By injecting different fault scenarios (such as line short circuits and equipment overloads), the fault propagation path is simulated, and a set of potential risk events is identified. Each event includes its scope of impact, time window, and severity level. The PCMCI (Constraint-Based Causal Discovery) algorithm is used to mine multi-timescale causal relationships and construct a causal impact propagation model. ,in: : Represents the output of the causal impact propagation model. In the smart grid scenario, it integrates the causal impact information of "initial event E at time t" on the power grid, used to quantify the spatiotemporal impact range and intensity of events (such as equipment failure, load surges), providing a basis for decisions such as power grid dispatching and fault handling. E: Represents the initial event. In the smart grid, E is the source event that triggers changes in the power grid state, such as "transformer overload," "sudden drop in photovoltaic power plant output," "transmission line short circuit," etc., which is the starting point of causal impact propagation. t: Represents the time variable. Used to characterize the impact propagation characteristics of the initial event E at different time points (or time scales), reflecting the dynamic time dimension of the power grid event's impact (such as the time delay from the occurrence of a fault to its spread to adjacent equipment). : Represents the set of affected power grid nodes. In a smart grid, it refers to the device nodes (such as transformers, circuit breakers, and renewable energy power plants) whose states change due to an initial event E (such as power anomalies, voltage fluctuations, or protection actions), thus defining the spatial coverage of the event's impact. : Represents the impact intensity score. It is a quantitative indicator of the degree of impact of the initial event E. It can be calculated by factors such as voltage deviation, power fluctuation amplitude, and equipment failure level. It is used to assess the severity of the event and assist in the priority determination of power grid events. : Represents the time range (the time span of the impact). Describes the duration or time interval covered by the impact of the initial event E (e.g., the impact lasts for 30 minutes after the event occurs, and the evolution of the impact in the next hour), helping power grid dispatchers to predict the impact cycle and formulate cross-time period response strategies E.

[0060] In the dynamic security policy optimization and generation, a multi-objective optimization problem is constructed, with reliability, efficiency, and cost as optimization objectives. Deep reinforcement learning (DRL) is used to solve for the optimal policy. ,in: This represents the optimal security strategy. In smart grid scenarios, it is a decision-making strategy obtained through deep reinforcement learning that balances the grid and addresses multiple objectives such as reliability (e.g., continuous and stable power supply), efficiency (e.g., power transmission losses), and cost (e.g., peak shaving and maintenance costs). For example, when the grid load suddenly increases... It may be a combination of operations such as "prioritizing the activation of standby units, +, calling up energy storage for discharge, +, and partially reducing flexible loads" to guide grid dispatch and equipment control. : Represents all possible strategies In this context, the goal is to find the strategy that maximizes the expected rewards in the future. The smart grid needs to select the strategy with the "optimal long-term returns" from numerous dispatch schemes (such as different unit start-ups and shutdowns, and load control methods). This symbol clearly defines the objective of "optimization." : Represents mathematical expectation. Due to uncertainties in power grid operation (such as fluctuations in renewable energy output and random load changes), expectation quantification and "strategy adoption" are used. "At that time, the average return of future rewards" allows the strategy to adapt to the dynamic and stochastic characteristics of the power grid in a probabilistic sense. This is a time-dimensional accumulation operation, starting from the initial moment. At time T, the rewards for each stage are summed. Since the power grid is a dynamic system, the effectiveness of the strategy needs to consider the cumulative impact over multiple time periods (such as the continued effect of current peak shaving on the grid state in the following hours). Therefore, the long-term value is reflected through summation. : Represents the discount factor ( This is used to balance the weights of "current rewards" and "future rewards." Smart grid dispatch focuses more on short-term security (such as avoiding faults in the present), but also needs to consider long-term stability (such as equipment lifespan and future load matching). The smaller the size, the more attention is paid to "current rewards"; the larger the size, the more attention is paid to "long-term cumulative rewards". : is the "discounted stage reward" at time t. It is the immediate reward at time t (positive reward if the strategy stabilizes the voltage, negative reward if it causes overload), multiplied by This reflects the characteristic that "the later the time, the lower the reward weight," which aligns with the reality that "the short-term impact is more direct, while the long-term uncertainty is higher." : Represents the stage reward at time t. It is a response to the "strategy". The quantitative score of "performance at time t" is used to guide the deep reinforcement learning model to learn better strategies (positive rewards reinforce effective operations, and negative rewards suppress bad operations). : indicates "adopting a strategy" The calculation of expected rewards under the premise of "expectations are based on a specific strategy" clarifies the constraint that "expectations are based on a specific strategy," ensuring that the optimization process revolves around the strategy. Expand.

[0061] In the federated blockchain notarization and trusted verification stage, the policy graph is encoded as a directed acyclic graph (DAG) and stored in the federated blockchain using the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm, generating an immutable policy record. ,in: : Represents a block in a blockchain. In the context of a smart grid, each block stores key authentication information of a dynamic security policy graph. Through a chain structure, it connects the entire lifecycle of the power grid security policy (from generation to storage), preventing the policy from being illegally tampered with and ensuring the credibility of the execution of scheduling policies, fault handling policies, etc. : Represents a hash function. In a smart grid, a hash function performs one-way encryption on the input content of a block (previous block, Merkle root of the policy graph, validator information, etc.) to generate a fixed-length hash value. If policy information (such as unit scheduling and load adjustment rules) is tampered with, the hash value will change, thereby quickly verifying the integrity of policy data and ensuring the authenticity and reliability of the power grid policy. This represents the hash value of the previous block. In the chain structure of a blockchain, a new block contains the hash of the previous block, making the storage of smart grid security strategies a continuous and tamper-proof "chain." For example, a block for a peak-shaving strategy during a certain period... By associating the strategy with the previous time period block, if the intermediate strategy is tampered with, the verification of subsequent blocks will fail, thus ensuring the consistency and traceability of the strategy from history to the present. : Merkle root hash of the policy graph. Dynamic security policy graph of smart grid ( It includes multi-scenario strategies (such as fault handling and load scheduling strategies), and organizes the strategy hashes into a tree structure using a Merkle tree, with the root hash... It represents the integrity of the entire strategy graph. During verification, only the root hash needs to be compared to efficiently determine whether a large amount of strategy data is complete, thus improving the efficiency of power grid strategy verification in multiple scenarios. This represents a dynamic security strategy graph. In a smart grid, it is a structured representation of a set of strategies, including operation sequences, execution conditions, and expected effects, generated through deep reinforcement learning optimization (e.g., a graph-based description of "cutting off non-critical loads when a transformer is overloaded, +, starting backup power supply"). A root hash generated using a Merkle tree is stored on the blockchain to ensure that critical grid strategies are reliably stored and verified on the chain. : Represents validator information. In federated blockchains, PBFT, and consensus mechanisms, It refers to the node identifier and / or information that participates in consensus and verifies the validity of blocks. In a smart grid, verification nodes can be departments of the power grid enterprise, trusted nodes of regional substations, etc., to jointly verify the legality of policy blocks, prevent malicious policies from being put on the chain, and ensure the authority and security of power grid policies.

[0062] The specific technical implementation of the above steps offers the following advantages: Federated blockchain enables knowledge sharing at the edge and cloud while protecting data privacy. A provincial power grid test showed that cross-regional causal knowledge aggregation efficiency increased by 400%, while traditional centralized solutions suffer from data silos resulting in less than 50% knowledge completeness. Digital twins combined with spatiotemporal causal reasoning can predict fault propagation paths 1015 minutes in advance. In simulating a 220kV substation busbar fault, this solution identified risks 8 minutes earlier than traditional threshold alarms, reducing fault handling time by 67%. Multi-objective reinforcement learning-generated strategies comprehensively consider reliability (weight 0.4), efficiency (0.3), and cost (0.3), reducing power outage losses by 32% and improving dispatching efficiency by 55% compared to manual experience-based strategies. Blockchain-based evidence storage enables full traceability of strategy generation, improving audit efficiency by 90%. When a power grid anomaly occurs, the basis for strategy formulation can be quickly located; for example, the causal reasoning process for a "certain line overload strategy" can be traced within 10 seconds. 5. Real-time response capability of large-scale power grids: The consensus latency of the federated blockchain is <200ms, and the digital twin simulation step size is 10ms, supporting real-time decision-making for power grids with tens of millions of devices. In scenarios of sudden load surges, the dynamic strategy generation latency is <500ms, meeting the power grid's "second-level response" requirement, which is 20 times better than traditional offline optimization solutions.

[0063] Optionally, step 41, based on the federated blockchain consensus mechanism, performs spatiotemporal causal knowledge distillation and twin mirror construction on secure and trusted power data to generate a spatiotemporal causal twin knowledge graph. Specifically, this includes the following steps: Step 411, based on the distributed ledger structure of the federated blockchain, performs causal knowledge fragmentation storage and local reasoning processing on secure and trusted power data to generate an edge-side causal knowledge fragment set; Step 412, performs cross-domain knowledge security aggregation processing on the edge-side causal knowledge fragment set to generate a causal knowledge aggregate; Step 413, performs twin mirror structured construction processing on the causal knowledge aggregate to generate a spatiotemporal causal twin knowledge graph. This scheme, through the synergy of the distributed trust mechanism of the federated blockchain and edge computing, constructs a three-level knowledge processing chain of "knowledge fragmentation, secure aggregation, and twin structured construction," the core of which is as follows:

[0064] I. Distributed Ledger-Driven Fragmentation of Causal Knowledge: Based on a federated blockchain, a distributed ledger divides secure and reliable power data into N fragments according to the geographical distribution of equipment (e.g., each substation is a fragment unit), and each fragment contains equipment status data. Spatiotemporal tags and blockchain hash pointer Integrity verification of fragmented storage is achieved through a Merkle tree structure: ,in: : Represents the device status data of the i-th fragment unit. In a smart grid scenario, it can be the real-time operating data of power equipment within a substation (as a fragment unit), such as transformer oil temperature, voltage transformer voltage value, circuit breaker opening and closing status, etc., which is the basic information for power grid status monitoring and analysis. : Represents the spatiotemporal label of the i-th fragment unit. It includes the timestamp of data generation (such as the time of collection) and spatial location information (such as the geographical location of the substation where the equipment is located and the location of the power grid topology), which is used for spatiotemporal dimension analysis and source tracing of smart grid data, such as marking the spatiotemporal attributes of equipment data collected at a certain substation at 10 am, 10 am, and 11 pm. : Represents the blockchain hash pointer of the i-th fragment unit. It is the hash pointer for that fragment unit (including...). , The unique identifier obtained by hashing the fragmented data is crucial if the fragmented data is tampered with. The data will change, and data tampering can be detected in the blockchain Merkle tree verification, ensuring the data security of the smart grid. : Represents the root hash of the Merkle tree. When the federated blockchain stores smart grid data fragments, the hash values ​​of all fragment units are organized into a Merkle tree. It is the root node hash of the tree, used to quickly verify the integrity of all data fragments. As long as the root hash matches, it means that the fragment data has not been tampered with, providing an efficient means for global integrity verification of power grid data. : Represents a hash function. For smart grid data (such as...) The algorithm performs one-way encryption operations (using combinations of Merkle tree child node hashes) to generate fixed-length hash values. Because "small changes in data can lead to large changes in hash values," it effectively detects data tampering and is a core tool for ensuring the integrity and security of power grid data. : Represents the data concatenation operator. When generating fragment unit hashes, it includes device status data. Spatiotemporal tags Hash pointer By concatenating and then hashing, we can ensure that these related data are verified as a whole, thus guaranteeing the correlation and integrity of multi-dimensional data in the smart grid.

[0065] Each edge node utilizes a lightweight graph neural network (GCNLite) to perform causal inference on local fragmented data, extracting spatiotemporal causal relationships between devices. An attention mechanism is employed to focus on key causal edges, generating edge-side causal knowledge fragments. , which includes causal pairs Intensity of influence and time delay .

[0066] In addition, a secure aggregation mechanism for cross-domain knowledge is implemented: edge nodes generate session keys through quantum key distribution (QKD). Symmetric encryption of causal knowledge fragments: The no-cloning principle of quantum channels ensures zero key leakage during transmission, where K represents the session key. In smart grid scenarios, edge nodes (such as edge computing units in substations and distribution rooms) generate this session key through quantum key distribution (QKD). This key is used to symmetrically encrypt fragments of causal knowledge (such as causal correlation data between faults in a power grid device in a certain area), ensuring the security of power domain knowledge during cross-domain transmission and preventing illegal theft or tampering. : Represents the i-th encrypted causal knowledge fragment. In a smart grid, causal knowledge fragments generated by different edge nodes (such as spatiotemporal causal relationship data of equipment within different substation ranges) are encrypted using a session key K, AES, an algorithm, and quantum random numbers to form this ciphertext. This ensures that the data cannot be illegally decrypted during cross-domain transmission and protects the security of grid knowledge (such as fault propagation laws and equipment coordination logic). : It is an Advanced Encryption Standard (AES) algorithm, combined with key-related inputs. The core content of causal knowledge fragments is encrypted using the session key K. In smart grids, the efficiency and security of AES are leveraged to encrypt grid knowledge (such as causal correlation data between renewable energy output and grid frequency), while also ensuring encryption efficiency to meet the real-time requirements of grid data. : Represents the XOR operation. In the transmission of quantum-encrypted fragments in smart grids, the XOR operation is combined with AES, the encryption result, and the quantum random number ( This enhances the randomness and security of encryption, making encrypted fragments of causal knowledge (such as causal dependency data of power grid topology) more difficult to crack by brute force. : Represents quantum random numbers. Generated by quantum key distribution (QKD) using the properties of quantum physics, these truly random numbers provide unpredictable random factors for encrypting causal knowledge fragments in smart grids. This ensures that each encryption is unique and cannot be copied, preventing encryption from being cracked by replay attacks and other methods, and guaranteeing absolute security for cross-domain knowledge transmission.

[0067] Through federated learning-style knowledge aggregation, cloud nodes use the FedAvg algorithm to aggregate encrypted fragments, and compute global causal knowledge in ciphertext using homomorphic encryption technology:

[0068] ,in: : Represents global causal knowledge. In the smart grid scenario, it is comprehensive knowledge reflecting the causal relationships of power equipment across the entire network (multi-regional substations, renewable energy plants, etc.) obtained by aggregating encrypted fragments from various edge nodes through federated learning in the cloud. For example, it integrates causal logic such as "PV output fluctuation → grid frequency change" and "transformer overload → circuit breaker action" to provide a unified knowledge foundation for generating global grid security strategies and tracing faults. N: Represents the total number of edge nodes participating in knowledge aggregation. In the smart grid, multiple edge nodes (such as edge computing units of substations, distribution terminals, and renewable energy plants in different regions) participate in the sharing and aggregation of causal knowledge. N quantifies the number of these nodes, reflecting the breadth of knowledge sources (e.g., This indicates that 10 edge nodes participated in the aggregation. : Represents the data volume of the i-th edge node. In a smart grid, different edge nodes cover different scales of power equipment and have different monitoring durations, resulting in variations in data volume (e.g., large hub substations). (Much larger than a small power distribution room). It is used to calculate weights in the FedAvg algorithm to ensure that nodes with larger amounts of data contribute a more reasonable influence in global knowledge aggregation. :in, It's a decryption operation. Let K be the encrypted causal knowledge fragment of the i-th edge node, and K be the session key. In the smart grid, the causal knowledge fragments of edge nodes (such as the causal correlation of local device failures and the causal logic of operating status) are transmitted through quantum encryption and other methods. The cloud restores the aggregateable knowledge content through decryption operations, while ensuring that the original knowledge (such as the device's sensitive causal logic and operating parameter correlations) is not illegally stolen during the transmission process, thus protecting the privacy of power data. : Represents the encrypted causal knowledge fragment of the i-th edge node. In the smart grid scenario, each edge node (such as the edge computing unit of a substation) encrypts the locally generated causal knowledge (such as spatiotemporal causal relationship data between devices within the station), and transmits the encrypted data to the cloud. This achieves cross-domain knowledge sharing while preventing the leakage of local knowledge (such as user electricity consumption patterns and causal relationships of core equipment parameters) during transmission. K: Represents the session key. In the federated learning knowledge aggregation of the smart grid, the session key is used to decrypt the encrypted causal knowledge fragments of the edge nodes, ensuring that only legitimate cloud nodes can obtain the aggregable knowledge content. This prevents the illegal interception and decryption of knowledge during cross-domain transmission and provides key-layer protection for the secure aggregation of causal knowledge in the power grid.

[0069] III. Structured Construction of Spatiotemporal Causal Twin Graphs: Using Hilbert Curve Indexing to Array Device Spatiotemporal Coordinates Mapping to one-dimensional encoding Establish the connection between causal knowledge and spatiotemporal location: It supports millisecond-level spatiotemporal proximity causal relationship retrieval, where: x: represents the spatial horizontal coordinate of the device. In smart grid scenarios, it is used to accurately identify the horizontal position of power equipment (such as substations, transmission lines, smart meters, etc.) in three-dimensional space, and is one of the core parameters for constructing the spatiotemporal coordinates of the device. For example, the horizontal coordinate value of a city substation in the geographic coordinate system can be combined with other coordinate dimensions to provide a spatial positioning basis for analyzing the causal relationship between the substation and surrounding equipment (such as load transmission, fault impact range). y: represents the spatial vertical coordinate of the device. In smart grids, it is the horizontal vertical dimension of the spatial coordinates of power equipment, and together with the x coordinate, it determines the planar position of the device. For example, combining the x coordinate can clarify the specific direction of a transmission line on the geographic plane, helping to analyze the spatiotemporal causal relationship between the line and adjacent lines and equipment (such as the propagation of the impact of adjacent line faults). z: represents the spatial height coordinate of the device. In smart grids, it is used to describe the vertical spatial position of power equipment, such as the height of transmission towers, the depth of underground substations, etc. Equipment at different heights (such as high-altitude transmission lines and ground-based power distribution equipment) may exhibit differentiated causal relationship patterns (e.g., lightning strikes damage high-altitude lines, which then transmit to ground-based equipment, triggering a chain reaction). The z-coordinate provides locational basis for this type of vertical causal relationship analysis. t: Represents the time coordinate. In the context of smart grids, this represents the specific time point of power data acquisition and equipment event occurrence (e.g., the time of equipment status monitoring, the time of fault triggering, etc.). Power grid operation has a dynamic temporal sequence, and causal relationships have a temporal sequence logic (e.g., a sudden change in photovoltaic output at a certain moment leads to subsequent fluctuations in the regional power grid frequency). The t-coordinate is used to correlate causal knowledge with the time dimension, supporting the analysis of the evolution of causal relationships at different points in time. This represents the one-dimensional code mapped by the Hilbert curve. The three-dimensional spatial coordinates of the device are represented by the Hilbert curve. The time coordinate t is converted into a single one-dimensional numerical value. In smart grids, this conversion enables a compact one-dimensional representation of multi-dimensional spatiotemporal information, facilitating the rapid establishment of an index linking causal knowledge with spatiotemporal location. For example, causal events of equipment in different spatiotemporal locations (such as chain reactions of equipment failures at different times and locations) can be mapped to one-dimensional codes to support efficient causal relationship retrieval. : Represents the index value obtained by mapping from the Hilbert curve. The specific numerical result after calculation has a range of values. In smart grids, this index value serves as a unique identifier or retrieval key for spatiotemporal causal knowledge, enabling millisecond-level retrieval of spatiotemporal proximity causal relationships. For example, it can quickly find causal events (such as fault propagation relationships in adjacent locations or at similar times) of other devices that are spatiotemporally adjacent to a certain device (specific x, y, z, t). : Represents the Hilbert curve mapping function. This function is responsible for mapping the device's four-dimensional spatiotemporal coordinates. Convert to one-dimensional index In smart grids, by leveraging the space-filling properties of Hilbert curves, devices that are spatially and temporally close can also be made close to each other on a one-dimensional index. This makes causal relationship retrieval based on the index more efficient and meets the grid's need for real-time and rapid querying of spatiotemporal causal knowledge (such as quickly locating causally related devices that are spatially and temporally close during real-time grid monitoring).

[0070] The aggregated causal knowledge is transformed into a directed graph structure, where nodes represent power equipment entities and edges represent causal relationships (with weights). and time delay The attributes include a four-dimensional index and confidence level. A spatiotemporal causal twin knowledge graph is formed by storing this information in a graph database (such as Neo4j), realizing a digital mirror of the physical causal relationships of the power grid.

[0071] The specific implementation of the above steps achieves the following technical advantages: local inference avoids uploading raw data, reducing data transmission volume by more than 95%, and reducing the communication bandwidth requirement of edge nodes from 100Mbps to 5Mbps. Actual testing in a prefecture-level city power grid shows that fragmented storage reduces edge node storage costs by 60%, while the risk of privacy leakage approaches zero. The federated aggregation mechanism improves the integrity of causal knowledge across the entire network to 98.7%, compared to traditional centralized solutions (which can only acquire 50% of edge knowledge), and increases the identification rate of new fault modes from 72% to 94%. In cross-regional power grid faults, the causal chain integrity is improved by 3.2 times. The four-dimensional Hilbert index reduces the latency of spatiotemporal causal queries to <10ms, supporting real-time inference for tens of millions of devices. For example, when querying "equipment that may be affected in a certain area within 10 minutes," the traditional solution takes 3 seconds, while this solution can return results within 8ms, meeting the rapid decision-making requirements of relay protection. Each causal knowledge fragment carries a blockchain timestamp and hash proof, achieving end-to-end traceability from data collection to knowledge generation. When a power grid anomaly occurs, the original data source for causal reasoning can be located within 15 seconds, improving audit efficiency by 90%. 5. Dynamically expandable power grid adaptability: The distributed architecture supports dynamic addition / removal of edge nodes. When a new substation is added, the system can automatically synchronize its causal knowledge fragments, shortening the expansion cycle from 72 hours in the traditional solution to 2 hours, adapting to the needs of rapid smart grid construction.

[0072] Optionally, step 42, based on the digital twin decision engine, performs dynamic security strategy deduction on the spatiotemporal causal twin knowledge graph to generate and store a dynamic security strategy graph. Specifically, this includes the following steps: Step 421, performing multi-scenario fault simulation deduction on the spatiotemporal causal twin knowledge graph to conduct digital twin dynamic simulation and generate a set of potential risk events; Step 422, using events in the potential risk event set as the state space and control operations as the action space, performing dynamic security strategy optimization and generation to generate a candidate security strategy set; Step 423, performing Byzantine fault tolerance verification on the candidate security strategy set to generate and store the dynamic security strategy graph. This scheme constructs a digital twin model of the power system based on the spatiotemporal causal twin knowledge graph, integrating physical equations (such as power flow equations and electromagnetic transient equations) with data-driven models (such as LSTM prediction models). By injecting different fault scenarios (such as N1 faults and extreme weather disturbances), the system response is simulated.

[0073] ,in: : Represents the rate of change of the system state. In the digital twin scenario of a power system, it describes the dynamic evolution speed of key power grid states (such as node voltage, line power flow, equipment temperature, etc.) over time, used to characterize the speed of change of state variables during power grid transients, such as the rate of change of voltage amplitude when a fault occurs. f: Represents the mapping function of the system's dynamic evolution. In the digital twin of a power system, f integrates the physical laws of the power system (such as power flow equations, electromagnetic transient equations) with data-driven prediction logic (such as LSTM, the time-series prediction capability of the model), characterizing the "system state". Control input Fault disturbance The evolution rules of the system state under the combined effects of simulation control operations and fault disturbances, such as the change process of the power grid state under the combined effects of simulation control operations and fault disturbances. : Represents the system state vector. In the digital twin scenario of a power system, It contains core state information of power grid operation, such as voltage amplitude and phase angle of each node, power flow of transmission lines, transformer oil temperature, and power output of new energy power plants. It is the basic carrier for digital twin models to simulate power grid operation and analyze the impact of faults. : Represents the control input vector. In power system digital twins, The corresponding operational quantities for grid dispatching and equipment control, such as generator excitation regulation, transformer tap position adjustment, energy storage charging and discharging power, and flexible load switching commands, are used to simulate the grid response under different control strategies and provide a basis for optimizing dispatching. : Represents the fault disturbance vector. In the digital twin scenario of a power system, It describes various disturbances or faults faced by the power grid, such as line short-circuit faults (location, type, duration), extreme weather (typhoons causing line tripping, cold waves causing sudden load changes), and random fluctuations in renewable energy output, etc., to simulate the dynamic response of the power grid under various faults and disturbances, and to assist in fault analysis and resilience assessment. : Represents random noise. In power system digital twins, To depict the random uncertainties that exist in the actual operation of the power grid, such as random load fluctuations, minor errors in measuring equipment, and random interference from environmental factors, the digital twin model is made closer to the complexity and randomness of the real power grid, thus improving the credibility of the simulation results.

[0074] The Monte Carlo Tree Search (MCTS) algorithm is used to traverse the fault propagation path and identify key risk nodes through spatiotemporal causal reasoning. Each risk event is represented as a quadruple: Where: RiskEvent: Represents a "risk event". In a power system scenario, it is a comprehensive description of potential dangerous situations in the power grid, integrating key information such as the location, time, severity, and propagation path of the risk. It is used to identify risky events such as faults and disturbances that may occur in the power grid (e.g., a cascading risk event caused by a substation bus fault). Location: Represents the "location of the risk event". In a power system, it specifies the specific power grid equipment or area where the risk event occurs (e.g., "substation, B, bus", "a certain transmission line, L1, section", etc.), providing spatial location information for power grid maintenance personnel to quickly identify and handle risks. Time: Represents the "time of the risk event". In a power system scenario, it refers to the specific moment or point in time when the risk event occurs (e.g., in the example). Time-based risk assessment is used to characterize the temporal characteristics of risks, assist in analyzing the evolution of risks at different times, and formulate time-based risk prevention and control strategies. Severity: Represents the "severity of a risk event." In power systems, it quantifies the impact level of a risk on the power grid (e.g., "severe," "moderate," "minor," etc.), reflecting whether the risk will lead to major power grid outages, serious equipment damage, etc. It is a key indicator for assessing the degree of risk hazard and determining response priorities. Propagation Path: Represents the "propagation path of a risk event." In power systems, it describes the process and route of risk spreading from its initial point of occurrence to other power grid equipment or areas (e.g., "bus fault → line overload → main transformer tripping" in the example), reflecting the chain propagation law of risks, helping to predict the scope of risk spread, and taking isolation and protective measures in advance.

[0075] For example: .

[0076] In the dynamic security policy optimization and generation process, the set of risk events is used as the state space. Control operations (such as switching actions and load shedding) serve as the action space. Construct a reinforcement learning optimization model: ,in: : Represents the Markov Decision Process (MDP) model. In the power system scenario, this model integrates risk event states, control operations, state transition rules, and reward mechanisms to optimize power grid risk response strategies (such as how to minimize losses and ensure power grid stability during faults through switching actions, load shedding, and other operations). : Represents the state space, specifically the "set of risk events". In a power system, the state space contains all possible risk states of the power grid (such as substation bus faults, transmission line overloads, and sudden drops in renewable energy output), and is the "power grid risk situation" perceived by the agent in reinforcement learning. : Represents the action space, corresponding to the "set of control operations" (such as switching actions, load shedding, generator output adjustment, etc.). In a power system, the action space consists of the intervention measures that grid dispatchers and / or maintenance personnel can take to deal with risks (such as isolating the fault area by opening the circuit breaker during a fault, or relieving overload by cutting off part of the load). It is the "optional operation" of the reinforcement learning agent. : Represents the state transition probability, describing "the probability of transitioning to the next state s' after performing action a in the current state s". In the power system, this probability is determined by simulation using a digital twin model (e.g., the probability of transitioning to the state "Line A, Overload" after performing action "Disconnect 10% of the load" in the current state), reflecting the pattern of power grid state changes due to operation. : Represents the reward function, which comprehensively considers "reliability (whether the power grid provides stable power), economy (cost and / or benefit of operation), and operational costs (such as the impact of load shedding on users)". In the power system, the reward function guides the reinforcement learning agent to select the optimal action (e.g., actions that successfully avoid a major blackout and have low cost receive high rewards, while actions that cause a blackout or have high costs receive low rewards). : Represents a discount factor used to balance the weights of "current rewards" and "future rewards". In the long-term operation of the power system, attention is paid to both the effectiveness of immediate risk response (such as immediately disconnecting loads to prevent fault propagation) and subsequent grid stability. The larger the value, the more the intelligent agent values ​​long-term grid benefits (such as long-term grid reliability).

[0077] In multi-objective reinforcement learning optimization, the Pareto optimal policy set is solved using the proximal policy optimization (PPO) algorithm, which balances multiple objectives by setting different weights.

[0078] ,in: This represents the optimal security strategy. In multi-objective optimization scenarios of power systems, it is a decision-making strategy that achieves multiple objectives such as energy balance, reliability, economy, and security, obtained through the near-end policy optimization (PPO) algorithm. For example, when the power grid faces the risk of faults... It may be an operation sequence of "switching to backup lines, +, and cutting off a small number of non-critical loads" to ensure grid stability in the best way. : Represents all possible strategies In this process, the goal is to find the strategy that maximizes the expected subsequent rewards. The power system needs to select the strategy with the best long-term comprehensive benefits (multi-objective balance) from numerous dispatching and control schemes (such as different combinations of switching actions and load shedding ratios). This strategy is clearly defined and has an "optimization" objective orientation. : Represents mathematical expectation. Due to the uncertainties in power system operation (such as fluctuations in new energy output and random load changes), expectation quantification and "strategy adoption" are used. "At that time, the average return of future rewards" makes the strategy adaptable to the dynamic and stochastic characteristics of the power grid in a probabilistic sense. This is a time-dimensional accumulation operation, starting from the initial moment. At time T, the discounted rewards for each stage are summed. Since the power grid is a dynamic and continuous system, the effectiveness of the strategy needs to consider the cumulative impact over multiple time periods (such as the continued effect of the current operation on the subsequent state of the power grid) to reflect its long-term multi-objective value. : Represents the discount factor ( This is used to balance the weights of "current rewards," "current rewards," and "future rewards." Power system dispatch considers both current grid security and long-term economic and stability considerations. The smaller the size, the more attention is paid to "current rewards"; the larger the size, the more attention is paid to "long-term cumulative rewards". This represents the weighting coefficient for reliability objectives. It's used to adjust the proportion of "grid reliability" (such as continuous and stable power supply, reducing the scope of power outages) in the total reward. If the grid is currently under high reliability pressure (e.g., during peak load periods), this weighting coefficient can be increased. This makes the strategy more inclined to ensure power supply reliability. : Represents reliability reward. It is a quantitative score of "the effect of the strategy in ensuring grid reliability at time t" (e.g., a strategy that avoids power outages is a positive reward, while one that causes a power outage is a negative reward), guiding the reinforcement learning model to learn operations that are beneficial to improving grid reliability. This represents the weighting coefficient for economic objectives. It's used to adjust the proportion of "grid economics" (such as reducing power transmission losses and peak-shaving costs) in the total reward. If grid economic operation has a high priority (e.g., during off-peak hours), the weighting coefficient can be increased. This makes the strategy more focused on economic efficiency. : Represents economic reward. It is a quantitative score of the "economic effect of the strategy at time t" (e.g., a strategy that reduces power generation costs and reduces unnecessary load shedding losses is a positive reward, and vice versa), guiding the model to learn economically efficient operations. (Safety Target Weighting Coefficient): Represents the weighting coefficient for safety targets. It is used to adjust the proportion of "grid safety" (such as preventing equipment failures and avoiding cascading failures) in the total reward. If the risk of grid failure is high (e.g., under severe weather conditions), this weighting coefficient can be increased. This makes the strategy more focused on security protection. : Represents security reward. It is a quantitative score of the "security effect of the strategy at time t" (e.g., a positive reward for successfully isolating a fault and preventing its spread, and a negative reward for causing the fault to escalate), guiding the model to learn safe and reliable operations. This represents the various strategies in the candidate security strategy set. Each strategy is a specific sequence of operations (e.g., "Circuit breaker, A, trip → start backup power, B → disconnect load, C, 20%)" and its expected effect (e.g., expected reduction in power outage area, reduction in economic loss). Power grid dispatchers select or optimize strategies based on the actual scenario. In the Byzantine fault tolerance verification and strategy notarization, the Practical Byzantine Fault Tolerance (PBFT) algorithm is used to verify the consensus of candidate strategies, ensuring that at least 2f+1 honest nodes reach a consensus (f is the number of allowed malicious nodes). ,in: : Represents, "strategy" The consensus submission result. In the consensus verification scenario of the power system federated blockchain, it is used to determine the candidate security policy. Whether the strategy is validated through consensus using the Practical Byzantine Fault Tolerance (PBFT) algorithm, i.e., whether a sufficient number of honest nodes endorse the strategy, to ensure its credibility and resistance to attacks in distributed power grid nodes (such as substations and control center nodes). : Represents "the voting result of the i-th node". The power system federated blockchain consists of multiple nodes (such as different regional power grid nodes, substation nodes, etc.), and each node votes on candidate security policies. Take a vote (to express whether you approve of the strategy). Recording the voting stance of a single node is the basic data unit for consensus verification. : Represents "candidate security strategy". In the power system, this refers to grid operation strategies (such as switching action sequences under fault conditions, load shedding schemes, and renewable energy output dispatching strategies) that need to pass consensus verification. These strategies must be confirmed for reliability and security through multi-node consensus within the federated blockchain before they can be used for actual grid control. f: Represents "allowed number of malicious nodes". In the PBFT consensus algorithm, to ensure the consensus's resistance to attacks, the system can tolerate a maximum of f malicious nodes (such as grid nodes that have been tampered with or sent false information); as long as the number of honest nodes meets the requirement of "at least..." By ensuring the correctness of the consensus result, the validity of the policy generation process is enhanced in the power system scenario. In the blockchain storage of the policy graph, verified policies are encoded as a directed acyclic graph (DAG), where each node represents a control operation and edges represent temporal relationships and causal dependencies. The hash digest of the policy graph is stored on the blockchain. In this context, Block represents a "block" in the blockchain. In the scenario of power system policy notarization, each block stores key authentication information of the policy graph. Through a chain structure, it connects the entire lifecycle of power security policies (generation, verification, application, etc.), preventing policy tampering and ensuring the credibility and traceability of power grid dispatching and / or fault handling policy execution. Hash represents a "hash function." It performs one-way encryption on the block input content (previous block, policy, DAG, Merkle root, timestamp, etc.) to generate a fixed-length hash value. If the policy graph (such as control operations, temporal causal relationships) is tampered with, the hash value will change, thus quickly verifying the integrity of the policy data and ensuring the authenticity and credibility of the power grid policy. PrevBlock represents the "hash value of the previous block." In the chain structure of the blockchain, new blocks contain the hash of the previous block, making power policy notarization a continuous and immutable "chain." If an intermediate policy block is tampered with, the hash verification of subsequent blocks will fail, ensuring the consistency and traceability of the policy from history to the present, facilitating the audit and backtracking of historical power grid policies. MerkleRoot (PolicyDAG): Represents the "Merkle root hash of a Policy DAG". The power policy graph (PolicyDAG) contains control operation nodes and their timing, / causal edges. These data are organized into a tree structure using a Merkle tree hash. The root hash represents the integrity of the entire policy graph. During verification, only the root hash needs to be compared to efficiently determine the integrity of a large amount of policy data, improving the efficiency of policy verification in multiple scenarios. PolicyDAG: Represents the "Policy DAG". It is a structured representation of verified power security policies. Nodes correspond to power grid control operations (such as circuit breaker tripping, load shedding, etc.), and edges represent the temporal relationships and causal dependencies of operations (e.g., "Operation A, after completion, operation B is executed"). It clearly depicts the policy execution logic, providing step-by-step guidance for power grid automated scheduling and fault handling, and also facilitating blockchain notarization and integrity verification. Timestamp: Represents a "time stamp." It records the specific time when the strategy graph is stored on the blockchain. Combined with the immutability of the blockchain, it ensures the timeliness and non-repudiation of the strategy. For example, the timestamp of a fault handling strategy can be used for power grid event tracing (such as whether the strategy was generated in a timely manner) and liability determination (such as whether the execution time was compliant).

[0079] The implementation of the above specific steps achieves the following technical advantages: Digital twin simulation can predict fault propagation paths 10-15 minutes in advance. In a simulated 500kV line tripping scenario, the prediction accuracy for affected equipment reaches 97.8%, providing an early warning 8 minutes earlier than traditional static security analysis and reducing the power outage area by 30%. The strategy generated by multi-objective reinforcement learning can balance reliability (weight 0.4), economy (0.3), and security (0.3). Compared to manual experience strategies, system recovery time is shortened by 45%, and operating costs are reduced by 28%. Actual measurements in a provincial power grid show that load losses under extreme fault conditions are reduced by 58%. The 3PBFT consensus mechanism can still ensure strategy correctness even with 33% malicious nodes, improving anti-DOS attack capability by 10 times. In simulated attack tests, the success rate of malicious nodes tampering with the strategy is < This meets the high reliability requirements of the power system. Blockchain-based evidence storage enables auditable execution of the entire strategy, allowing for rapid review of decision-making basis after fault handling. For example, after a substation fault is handled, the risk assessment report and simulation data for the "cut off a feeder" strategy can be retrieved within 5 seconds, improving post-analysis efficiency by 90%. 5. Real-time guarantee of dynamic response: Strategy generation latency <500ms (including simulation, optimization, and consensus processes), supporting the power grid's "second-level response" requirements. In scenarios of sudden load surges, the system can generate the optimal load shedding plan within 300ms, a 20-fold improvement in response speed compared to traditional offline contingency plans.

[0080] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features.

Claims

1. A method for secure access to heterogeneous data in a cloud-edge collaborative manner in a smart grid, characterized in that, include: Step 1: Based on the deployed multimodal sensor network, collect data from multi-source heterogeneous power equipment in real time; Step 2: Based on the lightweight federated learning edge inference engine deployed on the edge network, perform adaptive semantic enhancement preprocessing on multi-source heterogeneous power equipment data to generate edge encrypted feature tensors. Step 3: Based on the cloud-deployed power spatiotemporal knowledge graph fusion engine, perform three-dimensional trusted security authentication and knowledge fusion on the edge encrypted feature tensor to generate secure and trusted power data; Step 4: Based on a cloud-deployed federated blockchain-driven digital twin decision engine, perform spatiotemporal causal reasoning and twin mirror comparison on secure and reliable power data to generate and store a dynamic security policy map.

2. The method according to claim 1, characterized in that, Step 1: Based on the deployed multimodal sensor network, collect data from multi-source heterogeneous power equipment in real time, including the following steps: Step 11: Perform dynamic fingerprinting on the communication protocol of multi-source power equipment to generate protocol feature vectors; Step 12: Generate a device protocol fingerprint database based on protocol feature vectors; Step 13: Perform adaptive communication adaptation processing on the device protocol fingerprint library to generate a unified interface for heterogeneous protocols; Step 14: Based on the unified interface of the heterogeneous protocol, real-time acquisition of multi-source heterogeneous power equipment data is performed and spatiotemporal alignment is carried out to generate a timestamp-aligned spatiotemporal heterogeneous dataset.

3. The method according to claim 2, characterized in that, Step 12 specifically includes the following steps: Step 121: Perform spatiotemporal correlation clustering on the protocol feature vectors to generate protocol cluster prototypes; Step 122: Perform uncertainty quantization on the protocol cluster prototype to generate a device protocol mapping table with confidence level; Step 123: Perform spatiotemporal Bayesian network construction on the device protocol mapping table with confidence level to generate a probabilistic protocol association graph; Step 124: Perform domain knowledge injection processing on the probabilistic protocol association graph to generate a device protocol fingerprint library.

4. The method according to claim 2, characterized in that, Step 13 specifically includes: Step 131: Extract the protocol meta-model from the device protocol fingerprint database to generate a protocol abstract syntax tree; Step 132: Perform dynamic middleware synthesis processing on the protocol abstract syntax tree to generate protocol conversion middleware; Step 133: Perform self-organizing service orchestration on the protocol conversion middleware to generate a unified interface for heterogeneous protocols.

5. The method according to claim 1, characterized in that, Step 2 includes the following steps: Step 21: Perform dynamic semantic mapping preprocessing on multi-source heterogeneous power equipment data to generate semantically aligned intermediate data; Step 22: Perform lightweight federated learning feature extraction on the semantically aligned intermediate data to generate federated feature aggregation data; Step 23: Encrypt, compress, and transform the federated feature aggregation data into tensors to generate edge-encrypted feature tensors.

6. The method according to claim 5, characterized in that, Step 21 specifically involves extracting temporal and spatial features from multi-source heterogeneous power equipment data, and mapping the extracted temporal and spatial features to the constructed dynamic semantic dictionary for the power field to generate semantically aligned intermediate data.

7. The method according to claim 5, characterized in that, Step 22 specifically involves: based on the constructed edge region cloud-based three-level federated learning framework, performing knowledge distillation on the semantically aligned intermediate data to obtain a lightweight feature extraction model for the edge, and then performing distributed collaborative training and parameter aggregation processing under differential privacy protection on the obtained lightweight feature extraction model to generate federated feature aggregation data.

8. The method according to claim 5, characterized in that, Step 23 specifically involves: encrypting the federated feature aggregation data based on the session key generated using the power line channel characteristics to obtain physical layer enhanced encryption feature data; performing power semantic compression processing on the obtained physical layer enhanced encryption feature data to generate semantically preserved encrypted compressed data; and then performing tensor decomposition on the generated semantically preserved encrypted compressed data to generate edge encryption feature tensors.

9. The method according to claim 1, characterized in that, Step 3 includes the following steps: Step 31: Perform enhanced physical layer key verification processing on the edge encryption feature tensor to generate a secure decryption feature tensor; Step 32: Perform spatiotemporal causality detection processing on the security decryption feature tensor to generate a causal interpretation feature tensor; Step 33: Perform three-dimensional trusted security authentication and knowledge fusion on the causal explanatory feature tensor to generate secure and trusted power data.

10. The method according to claim 1, characterized in that, Step 4 includes the following steps: Step 41: Based on the federated blockchain consensus mechanism, perform spatiotemporal causal knowledge distillation and twin mirror construction on secure and reliable power data to generate a spatiotemporal causal twin knowledge graph. Step 42: Based on the digital twin decision engine, perform dynamic security strategy deduction on the spatiotemporal causal twin knowledge graph to generate and store the dynamic security strategy graph.

Citation Information

Patent Citations

  • Information security assessment method and system based on cloud computing

    CN120342693A

  • 5G wireless channel encryption transmission system for power system

    CN120456007A

  • Power equipment detection method and device based on big data analysis

    CN120670782A

  • Multi-source heterogeneous data fusion pipe network intelligent scheduling decision-making system

    CN120706742A

  • Intelligent monitoring system for civil construction equipment of thermal power plant

    CN120763789A

Cited By

  • Computing power network construction and coding scheduling method and system for satellite-ground semantic communication

    CN121690480A

  • Absolute gravity measurement data tamper-proofing method and system based on geophysical law and chained hash

    CN121834905A

  • Secondary water supply management and control method, device and equipment based on digital twinning and medium

    CN122198368A

  • Digital twin-based methods, devices, equipment, and media for secondary water supply management and control.

    CN122198368B