Electric power data leakage identification method and system based on deep learning

Through the power data leakage identification method based on deep learning, using wavelet packet decomposition, mutual information screening and Osprey optimization algorithm, Mamba selective state space network is built, which solves the shortcomings of micro leakage identification in traditional methods, and achieves efficient, accurate identification and rapid response to weak leakage signals.

CN120579221AActive Publication Date: 2025-09-02STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT +1

Patent Information

Application Number
CN202511086086.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-09-02
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify trace leakage in power data, especially in the case of malicious load injection and subthreshold feature tampering, traditional methods cannot sensitively identify weak leaked signals, and deep learning models have insufficient generalization capabilities in hyperparameter regulation and state space modeling.

Method used

A deep learning-based method is adopted, combining wavelet packet decomposition, mutual information screening and Osprey optimization algorithm to build a Mamba selective state space network, introduce adaptive signal-to-noise ratio regulation and gated state selection mechanism, dynamically adjust hyperparameters and state updates, and improve sensitivity and recognition capabilities to weakly leaked signals.

Benefits of technology

It significantly improves the recognition accuracy and response ability of weakly leaked signals, reduces the false alarm rate, and realizes efficient identification under low signal-to-noise ratio conditions. The average inference delay is controlled within 47ms, which is feasible for engineering deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579221A_ABST
    Figure CN120579221A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power data leakage identification method and system based on deep learning. The method comprises the following steps: S1, generating a differential privacy annotation power utilization data set; s2, feature mapping is carried out on the differential privacy labeling power utilization data set based on wavelet packet decomposition and mutual information screening, and a multi-scale key feature tensor is obtained; s3, the multi-scale key feature tensor is put into an eagle optimization algorithm engine, local fine optimization is completed, and an optimal hyper-parameter set of eagle optimization is output; s4, dynamically injecting the optimal hyper-parameter set for eagle optimization into the Mama selective state space network, constructing an optimized Mama selective state space network structure, and outputting a state path highly related to leakage by using a gating state selection mechanism; and S5, sending the state path highly related to the leakage into an online decision module, and generating a trace data leakage early warning result according to a self-organizing threshold verification mechanism. According to the invention, the optimization strategy is more sensitive to a weak leakage signal area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power data technology, and in particular relates to a power data leakage identification method and system based on deep learning. Background Art

[0002] With the popularization of smart grids and terminal-side sensing devices, power meters, as key metering nodes on the user side, collect high-frequency, low-granularity electricity consumption data that is increasingly becoming an important basis for energy scheduling, refined billing, and behavioral profiling. At the same time, power meters are also facing increasingly serious data security and privacy leakage risks during data upload and interaction with concentrators. Especially in the context of malicious load injection and sub-threshold feature tampering covert attack methods, extremely small amounts of power data leakage often do not have significant power fluctuation characteristics, but exist in the form of sparse frame-by-frame penetration in a high-noise background.

[0003] To address this situation, traditional power data security monitoring solutions rely on rules for identifying abnormal power surges and load disturbance patterns, assuming that a leakage event will result in frame structure disruption and significant statistical power anomalies. However, this assumption is significantly flawed in real-world attack scenarios. Actual attackers often exploit modulation techniques below the system threshold to covertly extract critical information without disrupting the overall energy consumption structure. This causes the leakage signal strength to fall far below the system noise floor. In these situations, traditional methods based on fixed thresholds and power boundary detection are unable to effectively identify the abnormal signal. Furthermore, some current research has attempted to incorporate deep learning methods to model electricity usage behavior. However, when faced with minute amounts of leakage data, achieving high recall requires lowering the detection threshold and introducing a large feature space. This not only significantly increases inference latency but also leads to high false positive rates. Conversely, reducing the network size to improve real-time performance can easily lead to false negatives, making it difficult to strike an effective balance between accuracy and timeliness.

[0004] On the other hand, the hyperparameter adjustment of existing swarm intelligence optimization algorithms in deep detection models still relies heavily on offline grid search or static optimization processes, and lacks the ability to dynamically adapt based on task feedback and signal-noise conditions, resulting in insufficient generalization capabilities of the model when facing changes in the data environment. At the same time, the existing state-space modeling network has not yet undergone structural adjustments to address the poor local observability and weak long-term dependency characteristics of power data in time series leakage, and the gating and state selection mechanisms generally have defects such as inaccurate activation and high computational overhead.

[0005] In summary, a new identification method with stronger targeting and more flexible structural response is urgently needed to solve the problem. Summary of the Invention

[0006] This paper aims to propose a power data leakage identification method based on deep learning, so that the optimization strategy is more sensitive to weak leakage signal areas.

[0007] In order to achieve the above-mentioned purpose of the invention, the present invention specifically adopts the following technical solutions.

[0008] The present invention discloses a method for identifying power data leakage based on deep learning, comprising the following steps: S1. Collect raw electricity consumption data from electric meters and generate a differentially private labeled electricity consumption dataset; S2. Feature mapping of the differentially private labeled electricity consumption dataset is performed based on wavelet packet decomposition and mutual information screening to obtain multi-scale key feature tensors; S3. Place the multi-scale key feature tensor into the Osprey optimization algorithm engine, perform a circling search to obtain a set of candidate hyperparameters, submit the candidate hyperparameters set and the multi-scale key feature tensor together to the Osprey optimization algorithm dive phase, complete the local fine optimization and output the Osprey optimization optimal hyperparameter set; S4. Dynamically inject the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network to construct an optimized Mamba selective state space network structure. Stream the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network. Using the gated state selection mechanism, filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. Combine the filtered state vectors in the order they were generated in the time series to obtain a state path set. S5. Send the state path set to the online decision-making module, generate a trace data leakage warning result based on the self-organizing threshold verification mechanism, and push it to the dispatching center and security operation and maintenance platform through an encrypted communication channel to complete the identification of trace data leakage of power meters.

[0009] More preferably, The raw electricity usage data of the electric power meter includes a timestamp, a power value, a voltage value, a current value and a unique device identifier.

[0010] More preferably, The differential privacy labeled electricity consumption dataset is generated in the following way: The Laplace mechanism is used to perturb the power values ​​in the original electricity consumption data of the electric meter to generate a differentially private perturbation result set. Based on the differentially private perturbation result set, the unique device identifier and timestamp attached to the original collection are integrated, and the data is labeled according to the trace data leakage labeling strategy to generate a leakage label. The leakage label sequence and the differentially private perturbation result set together constitute the differentially private labeled electricity consumption dataset.

[0011] More preferably, The multi-scale key feature tensor obtained as described in S2 specifically includes: Construct feature extraction tensors, where each feature extraction tensor represents the feature dimension consisting of the corresponding perturbed power value, voltage value, current value, and timestamp in the time series; Applying a wavelet packet transform operation to the perturbed power value sequence in the feature extraction tensor to construct a set of wavelet packet feature coefficients; The mutual information between each dimension feature and the leakage label sequence in the wavelet packet feature coefficient set is calculated, and the feature coefficients are sorted according to the mutual information value. The first h features with the largest mutual information values ​​are selected to form a key feature index set. The corresponding feature coefficients in the key feature index set are extracted from the original wavelet packet feature coefficient set, and the original voltage value sequence and current value sequence are fused to construct a multi-scale key feature tensor.

[0012] More preferably, The output of the optimal hyperparameter set for Osprey optimization described in S3 is as follows: A dual-objective hyperparameter optimization framework is constructed for the power meter trace data leakage identification scenario, and the corresponding objective loss function is obtained; Initialize the global search space and construct the osprey individual population; In the circling search phase of the osprey optimization algorithm, an adaptive dynamic search step size mechanism based on the signal-to-noise ratio of individual ospreys is introduced. The dynamic search step size is used to control the update of the hyperparameter configuration of each individual osprey. In the diving fine search phase, the dynamic search step size of each candidate osprey individual is retained, and a fine tuning update based on the difference normalized gradient is designed. When the set number of iterations or population convergence threshold is reached, the final Osprey optimization optimal hyperparameter set is output.

[0013] More preferably, The adaptive dynamic search step size of the Osprey individual signal-to-noise ratio is specifically: Define the dynamic search step length of the mth osprey individual in the tth round :

[0014] in, is the basic step size factor, is the mth osprey individual The signal-to-noise ratio corresponding to the round is defined as the ratio of the variance of the power signal after disturbance to the variance of the background noise. is the reference signal-to-noise ratio threshold.

[0015] More preferably, In the dive fine search phase of the Osprey optimization algorithm, a fine tuning update based on the difference normalized gradient is designed. The specific calculation formula is:

[0016] in, Indicates the In the round of iteration The current hyperparameter configuration of each osprey individual, Indicates the In the round of iteration The updated hyperparameter configuration of each osprey individual, is a fixed adjustment factor under the leakage identification task, Indicates the The target loss function of all candidate osprey individuals in the round The smallest optimal hyperparameter configuration, Indicates the Round The performance difference between the osprey individuals and the current best individual in the leakage recognition loss function, It represents the difference between the current osprey individual and the global optimal loss, and K is the final classification level number of the leakage identification result.

[0017] More preferably, In S4, in the process of Mamba selective state space network state transfer, a linear time-invariant kernel structure based on gated state selection mechanism is introduced to The state vector The calculation is performed according to the following state update rules: ; in, For each time step The state vector of Indicates the The feature vector of differential privacy labeled electricity consumption data, Indicates a temperature coefficient The gate activation function controls the degree of opening of the state gate; Indicates the dimension The linear time-invariant state transfer kernel acts on the state of the previous time step ; is the optimal state space dimension of the Mamba selective state space network, is the optimal gate temperature coefficient, is the optimal residual scaling factor, is the weight of the network, is the bias of the network.

[0018] More preferably, S5 specifically includes: Perform leakage risk scoring on each state vector in the state path set and output the state risk score value corresponding to each state; Establish a self-organizing threshold verification mechanism based on historical reasoning statistical results and construct an adaptive threshold for leakage risk; Compare the state risk score value sequence with the leakage risk threshold. When the warning conditions are met, the trace data leakage warning event generation mechanism is triggered. The trace data leakage warning event is composed of a set of state path segments that meet the conditions. The generated trace data leakage warning results are organized into warning messages in a structured format and pushed through two channels through encrypted communication channels. The first channel is sent to the power dispatching center, and the second channel is sent to the power grid security operation and maintenance platform.

[0019] Another aspect of the present invention discloses a power data leakage identification system based on deep learning, comprising a power consumption dataset generation module, a multi-scale key feature tensor generation module, an Osprey optimization optimal hyperparameter module, a state path set generation module, and a trace data leakage early warning identification module; The electricity consumption dataset generation module collects raw electricity consumption data from electric meters and generates a differentially private labeled electricity consumption dataset; The multi-scale key feature tensor generation module performs feature mapping on the differentially private labeled electricity dataset based on wavelet packet decomposition and mutual information screening to obtain a multi-scale key feature tensor; The Osprey Optimization Optimal Hyperparameter Module places the multi-scale key feature tensor into the Osprey Optimization Algorithm Engine, performs a circling search to obtain a set of candidate hyperparameters, and submits the candidate hyperparameters and the multi-scale key feature tensor together to the Osprey Optimization Algorithm Dive Phase to complete the local fine optimization and output the Osprey Optimization Optimization Optimal Hyperparameter Set; The state path set generation module dynamically injects the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network, constructs an optimized Mamba selective state space network structure, streams the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network, and uses the gated state selection mechanism to filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. The filtered state vectors are sequentially combined according to their generation order in the time series to obtain the state path set. The trace data leakage warning identification module sends the state path set to the online decision-making module, generates the trace data leakage warning results based on the self-organizing threshold verification mechanism, and pushes them to the dispatching center and security operation and maintenance platform through the encrypted communication channel to complete the trace data leakage identification of the power meter.

[0020] The beneficial effects of the present invention are as follows: (1) The present invention introduces a dynamic search step based on the adaptive control mechanism of signal-to-noise ratio into the Osprey optimization algorithm. By constructing an exponential adjustment function driven by signal-to-noise ratio, the step is coupled with the observability of the leakage signal. The lower the signal-to-noise ratio, the larger the step, thereby expanding the search range and avoiding the local optimal trap. The higher the signal-to-noise ratio, the smaller the step to enhance the convergence accuracy. At the same time, in the dive phase, the difference normalized gradient adjustment mechanism is combined to dynamically update the weight ratio according to the relative gradient of individual risk loss, and finally the optimal network structure hyperparameter combination is output, making the optimization strategy more sensitive to the weak leakage signal area, and the efficiency and accuracy of the hyperparameter search are significantly improved.

[0021] (2) Based on the Mamba selective state space network, the present invention constructs a state update model that couples a gated state selection mechanism with a perturbation residual fusion mechanism. The gated temperature coefficient, residual scaling coefficient, and state dimension generated by the Osprey optimization algorithm are introduced. During the state update, the state activation distribution is controlled by a temperature-controlled gate function. At the same time, a residual path is introduced to achieve compensation and retention of the input signal, thereby significantly enhancing the observability and propagation continuity of low-intensity leakage signals in the state path. It can effectively compress redundant state calculation paths and only activate state paths that are significantly related to leakage patterns. On the basis of controlling the average inference delay at 47ms, the accurate activation rate of the state path is improved, and the model's sensitive response ability to leakage signals is essentially enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a flowchart of a power data leakage identification method based on deep learning proposed by the present invention. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0024] like Figure 1 As shown, the present invention discloses a method for identifying power data leakage based on deep learning, comprising the following steps: S1. Collect the original electricity consumption data of the power meter to form the original electricity consumption data packet of the power meter, input the original electricity consumption data packet of the power meter into the differential privacy processing module, and generate the differential privacy labeled electricity consumption dataset; Specifically, the S1 includes the following steps: S11. Within the set time window, continuously collect the original electricity consumption data of the power meter and construct the original electricity consumption data set of the power meter , where each piece of raw electricity consumption data of an electric meter consists of a timestamp, power value, voltage value, current value and a unique device identifier. The timestamp is used to mark the precise moment of data collection, the power value is the active power at that moment, the voltage value is the real-time voltage of the circuit, the current value is the load current, and the unique device identifier is used to distinguish different electric meter terminals. The entire data set contains records; S12. Input the original electricity consumption data set of the power meter into the differential privacy processing module, use the Laplace mechanism to perturb the power value, and generate a differential privacy perturbation result set ; S13. In the differential privacy perturbation result set Based on the original data, the unique device identifier and timestamp attached to the original data collection are integrated, and the data is marked according to the trace data leakage annotation strategy to form a differential privacy annotated electricity consumption dataset. Each differential privacy-labeled electricity consumption data includes the perturbed power value, voltage value, current value, timestamp, device unique identifier, and leakage label. The leakage label is used to indicate whether the data belongs to a trace data leakage sample. The leakage label is 1 for leaked data and 0 for non-leaked data.

[0025] The micro-data leakage labeling strategy specifically includes: During the data generation or playback stage, a disturbance lower than the set amplitude is injected into the selected meter collection sequence, sensitive features are extracted frame by frame, or abnormal components are implanted based on the inversion of the known load curve. The electricity consumption data with injected disturbance, extracted sensitive features or implanted variables are marked as "leaked data" and the label value is set to 1; conversely, electricity consumption data samples that do not inject any abnormal disturbance, extract sensitive features frame by frame, or implant abnormal variables and only reflect the user's actual daily electricity consumption fluctuations are marked as "non-leaked data" and the label value is set to 0.

[0026] S2. Feed the differentially private labeled electricity consumption dataset into the multi-scale feature mapping module, and obtain the multi-scale key feature tensor based on wavelet packet decomposition and mutual information screening; Specifically, the S2 includes the following steps: S21. Input the differential privacy labeled electricity consumption dataset into the multi-scale feature mapping module to construct the feature extraction tensor , where each feature extraction tensor represents the corresponding perturbation power value in the time series , voltage value , current value , timestamp The characteristic dimensions constituted; S22. Extract feature tensors The perturbation power value sequence in Apply wavelet packet transform operation to construct wavelet packet feature coefficient set : ; in, Indicates in The first layer of wavelet packet decomposition The characteristic coefficients of the frequency bands, is the number of decomposition layers, For the The number of wavelet bands of the layer, represents the wavelet packet transform operation, is the power value sequence after disturbance; S23. Wavelet packet characteristic coefficient set Each dimension feature With leaked label sequence Perform mutual information calculation and construct mutual information score function: ; in, For the Tier The mutual information between features and leaked labels, represents the joint probability distribution of features and labels, 、 are marginal probability distributions respectively; S24. Based on mutual information Sort the feature coefficients and select the first h features with the largest mutual information values ​​to form a key feature index set ; S25. Set the key feature index The corresponding characteristic coefficients are from the original wavelet packet characteristic coefficient set Extract and fuse the original voltage value sequence With current value sequence , construct multi-scale key feature tensors : .

[0027] S3. Place the multi-scale key feature tensor into the Osprey optimization algorithm engine, initialize the global search space for hyperparameters including the network state dimension, gate temperature, and residual scaling factor, perform a spiral search to obtain a set of candidate hyperparameters, and submit the candidate hyperparameters and the multi-scale key feature tensor together to the Osprey optimization algorithm's dive phase to complete the local fine optimization and output the Osprey optimization's optimal hyperparameter set. Specifically, S3 includes the following steps: S31. Multi-scale key feature tensor The Osprey optimization algorithm engine is used to build a dual-objective hyperparameter optimization framework for the power meter trace data leakage identification scenario. The accuracy of power meter trace data leakage detection and inference latency are used as optimization objectives, and the target loss function is defined as: ; in, is the set of hyperparameters to be optimized, is the Mamba selective state space network state space dimension, is the gate temperature coefficient, is the residual scaling factor; To leak the label, is the predicted label; is the cross entropy loss function of the leakage identification result, which measures the accuracy of trace data leakage detection. is the inference delay function, which measures the inference delay of the network corresponding to the hyperparameter combination; 、 Balance weights for tasks; Specifically, the cross entropy loss function of the leakage recognition result is constructed as follows: In order to evaluate different hyperparameter combinations during the optimization process of the Osprey optimization algorithm The impact on model performance: In each iteration, the system temporarily constructs a set of Mamba network structure templates based on the current hyperparameter combination, performs a limited number of forward propagation simulations on the training set, and extracts the feature tensor for each labeled differentially private electricity usage sample and calculates the predicted probability of the network output under the current hyperparameter configuration. , and the true label For comparison, construct the binary cross entropy loss.

[0028] Cross-entropy loss measures the classification accuracy of the current network structure. The system averages the loss values ​​of all samples and uses this loss as an evaluation indicator of the recognition ability of the current hyperparameter combination. This is used to guide the Osprey optimization algorithm in determining whether the parameter configuration is worth retaining or further searching. This process is not performed in the actual deployment model, but rather completed in the "parameter adaptation test" of the search phase. The results are not used directly for predicting output, but are used to drive optimization.

[0029] Specifically, the inference delay function is constructed as follows: The inference delay function is used to evaluate the impact of different hyperparameter combinations on the model's operating efficiency. In each round of Osprey optimization search, the system will be based on the current candidate hyperparameter combination. , build the corresponding Mamba network structure diagram, and perform batch forward reasoning simulation on the predefined test set.

[0030] The actual computation time of the Mamba template constructed by the system statistics under the given input is affected by the state dimension , gated temperature The gate convergence speed and residual path coefficient brought by Impact on the distribution of computation paths,The system performs forward computation for each sample, records the start and end times, and calculates the average inference time.

[0031] The obtained delay value represents the average computation time required for the model to perform the inference task under the parameter combination, and serves as a real-time constraint indicator in the Osprey optimization algorithm to balance recognition accuracy and execution efficiency.

[0032] S32. Initialize the global search space , constructing an individual population of ospreys ,in For the Initial osprey individuals; each osprey individual is configured with a dynamic search step ; S33. In the circling search phase, the characteristics of weak signal and strong noise in identifying trace data leakage of electric meters are optimized, and an adaptive dynamic search step mechanism based on the signal-to-noise ratio of the individual osprey is introduced to define the number of steps in each round. The dynamic search step length of an osprey individual is: ; in, is the basic step size factor, For the Osprey individual The signal-to-noise ratio (SNR) of the round estimate is defined as the ratio of the variance of the power signal after the perturbation to the variance of the background noise. The dynamic search step mechanism enables low-SNR osprey individuals to have a larger exploration span to enhance their adaptability to potential leakage patterns. The lower the SNR value, the larger the dynamic search step coefficient, and the higher the SNR value, the smaller the dynamic search step coefficient. S34. In the circling search phase, the dynamic search step size is used to control the hyperparameter configuration update process of each osprey individual. In each round of iteration, according to the current Each osprey individual calculates the vector difference between the current osprey individual and the optimal osprey individual, which is expressed as the direction the osprey individual needs to move towards the optimal solution in this round of iteration. The vector difference is perturbed and corrected by multiplying it by a perturbation factor generated by a standard normal distribution. The perturbation factor is used to simulate the natural unstable trajectory of the osprey when circling in the air. The perturbed vector difference is then multiplied by the current dynamic search step of the osprey individual. , the operation makes the osprey individuals with lower signal-to-noise ratio have greater jumping ability when searching, so as to increase their possibility of escaping from the local optimal area, and add the perturbed and adjusted direction increment to the original hyperparameter configuration On the next page, we get the updated hyperparameter configuration , the entire update process is done by dynamic search step Working together with the disturbance factor, each Osprey individual can flexibly adjust its search path under different signal-to-noise ratio conditions, thereby improving the search efficiency and adaptability of the Osprey optimization algorithm in identifying trace data leakage in power meters; S35. During the dive search phase, continue to maintain the dynamic search step length of each candidate osprey individual , and design a fine-tuned update based on the difference normalized gradient: ; in, Indicates the In the round of iteration The current hyperparameter configuration of each osprey individual, Indicates the In the round of iteration The updated hyperparameter configuration of each osprey individual, is a fixed adjustment factor under the leakage identification task, Indicates the The target loss function of all candidate osprey individuals in the round The smallest optimal hyperparameter configuration, Indicates the Round The performance difference between the osprey individuals and the current best individual in the leakage recognition loss function, represents the difference between the current osprey individual and the global optimal loss, K is the final classification and grading number of the leakage identification result, and the mechanism combines the signal-to-noise ratio control and the task loss gradient to guide the osprey individual to carefully search within the parameter range that is most likely to hide trace leakage; S36. When the set number of iterations or population convergence threshold is reached, the final Osprey optimization optimal hyperparameter set is output , ensuring that the Mamba selective state space network has the ability to adaptively optimize the structure and amplify fine features when facing the task of power meter trace data leakage under low SNR conditions, among which, The state space dimension of the Mamba selective state space network determines the parallel processing capability of each state channel. is the gate temperature coefficient, which controls the smoothness of the state activation distribution in the gating mechanism. is the residual scaling factor, which is used to adjust the fusion ratio of the original input features during the state update process.

[0033] S4. Dynamically inject the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network to construct an optimized Mamba selective state space network structure. Stream the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network. Using the gated state selection mechanism, filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. Combine the filtered state vectors in the order they were generated in the time series to obtain a state path set. Specifically, the S4 includes the following steps: S41. Optimal hyperparameter set based on injection Construct an optimized Mamba selective state-space network structure, reconstruct the parameters of the state transfer module, gating module, and residual connection module in the Mamba selective state-space network structure, and retain the dynamic configuration path during hyperparameter injection; S42. Input the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network in a streaming manner. The input data is organized into a continuous feature sequence in timestamp order. The input feature vector for each time step is: ; in, Indicates the The feature vector of differential privacy labeled electricity consumption data, is the power value after disturbance, is the voltage value, is the current value; S43. In the state transfer process of Mamba selective state space network, a linear time-invariant kernel structure based on gated state selection mechanism is introduced to The state vector The calculation is performed according to the following state update rules: ; in, Indicates a temperature coefficient The gate activation function controls the degree of opening of the state gate. Indicates the dimension The linear time-invariant state transfer kernel acts on the state of the previous time step , Indicates the weight of the residual input part; S44. After the state vectors of all time steps are calculated, the state paths are screened based on the gated state selection mechanism to extract the state path set that is highly correlated with the leakage of trace data of power meters. , the state path set is used to indicate which time nodes are identified by the network as significantly activated leakage-sensitive states under the action of the gating mechanism during the network reasoning process.

[0034] Specifically, in this embodiment, the state path set extraction rule is: The gate activation value is calculated for each time step. The gate activation value is used to measure whether the state vector corresponding to the current time step is considered by the network to have high leakage correlation. The gate activation value is calculated by linearly mapping the current time step input vector with the gate weight matrix, adding the bias term, and inputting the gate activation function. At the same time, the gate temperature coefficient is used. Control the smoothness of the activation function's response and ultimately output the gated activation value corresponding to the current time step; The state path selection threshold is used to compare the gate activation values ​​of all time steps, and the state vectors corresponding to the time steps with gate activation values ​​greater than the state path selection threshold are filtered out and retained as part of the state path set. The state path selection threshold is a fixed hyperparameter used to set the network's response standard to leakage-sensitive states. A higher value indicates stricter screening, and a lower value indicates looser screening. Combine all state vectors whose gate activation values ​​are higher than the state path selection threshold according to their order in the time series to obtain the state path set .

[0035] S5. The state path set is fed into the online decision-making module, which generates a trace data leakage warning result based on a self-organizing threshold verification mechanism. The trace data leakage warning results are classified into warning levels A, B, and C. These warning results are then pushed to the dispatch center and security operation and maintenance platform via an encrypted communication channel, completing the identification of trace data leakage in power meters. Specifically, the S5 includes the following steps: S51. Input the state path set into the online decision module, and for each state vector Execute the leakage risk score, which is calculated based on the similarity between the state vector and the leakage label training mapping, and output the state risk score value corresponding to each state ; The status risk score is calculated as follows: After the differentially privacy-labeled electricity consumption dataset is streamed into the optimized Mamba selective state space network, the system extracts the corresponding gated activation values ​​for all state vectors identified by the gated state selection mechanism, matches the gated activation values ​​with historical leakage label data, and counts the activation frequency and leakage judgment confidence of the state in historical leakage samples. The state risk score is obtained by proportionally weighted summation of the gated activation value, leakage judgment confidence and multi-scale feature weights.

[0036] S52. Establish a self-organizing threshold verification mechanism based on historical reasoning statistical results and construct a leakage risk adaptive threshold , the adaptive threshold of leakage risk is based on the dynamic mean of the state risk distribution and standard deviation The union is defined as follows: ; in, Represents the mean of historical risk score values, Represents the standard deviation of historical status risk score values, It is an adjustable fluctuation coefficient, which is used to adaptively adjust the threshold level to adapt to different background noise levels and model stability; S53. Combine the state risk score value sequence with the leakage risk threshold In comparison, when there are multiple state risk score values ​​higher than the leakage risk adaptive threshold in a continuous time period, the trace data leakage warning event generation mechanism is triggered. The trace data leakage warning event is composed of a set of state path segments that meet the conditions; S54. Classify the micro-data leakage warning events into levels, and classify the micro-data leakage warning results into warning levels A, B, and C based on the persistence, magnitude, and trigger frequency of the status risk score value; S55. Organize the generated trace data leakage warning results into a structured format as an alarm message, and push them through two channels through an encrypted communication channel. The first channel is sent to the power dispatching center, and the second channel is sent to the power grid security operation and maintenance platform.

[0037] In this embodiment, the specific classification rules of the warning level A, warning level B, and warning level C are as follows: Warning level A: There are at least 5 consecutive time steps within the monitoring window and the average risk score is The state path of Warning level B: There are at least 3 time steps in the monitoring window that meet Discontinuous state path; Warning level C: There is any time step that satisfies The critical activation state path is reached, but the trigger conditions of levels A and B are not met.

[0038] The present invention also claims protection for a power data leakage identification system based on deep learning, comprising a power consumption dataset generation module, a multi-scale key feature tensor generation module, an Osprey optimization optimal hyperparameter module, a state path set generation module, and a trace data leakage early warning identification module; The electricity consumption dataset generation module collects raw electricity consumption data from electric meters and generates a differentially private labeled electricity consumption dataset; The multi-scale key feature tensor generation module performs feature mapping on the differentially private labeled electricity dataset based on wavelet packet decomposition and mutual information screening to obtain a multi-scale key feature tensor; The Osprey Optimization Optimal Hyperparameter Module places the multi-scale key feature tensor into the Osprey Optimization Algorithm Engine, performs a circling search to obtain a set of candidate hyperparameters, and submits the candidate hyperparameters and the multi-scale key feature tensor together to the Osprey Optimization Algorithm Dive Phase to complete the local fine optimization and output the Osprey Optimization Optimization Optimal Hyperparameter Set; The state path set generation module dynamically injects the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network, constructs an optimized Mamba selective state space network structure, streams the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network, and uses the gated state selection mechanism to filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. The filtered state vectors are sequentially combined according to their generation order in the time series to obtain the state path set. The trace data leakage warning identification module sends the state path set to the online decision-making module, generates the trace data leakage warning results based on the self-organizing threshold verification mechanism, and pushes them to the dispatching center and security operation and maintenance platform through the encrypted communication channel to complete the trace data leakage identification of the power meter.

[0039] Example 1 is an embodiment of a method for identifying power data leakage based on deep learning of the present invention: In the continuously running smart meter monitoring system, the system receives the electricity consumption data of a terminal meter numbered "DE-140812". The power curve in the real-time data uploaded by the meter appears to be stable fluctuations, but after analyzing the disturbance, the system When the high-frequency sampling frame is detected, a slight change of periodic amplitude of only 0.15% is detected, which does not trigger any traditional threshold rules.

[0040] The system inputs the data corresponding to the meter into the pre-deployed Mamba selective state space network, which is automatically injected with the optimal hyperparameter set by the Osprey optimization algorithm in the early stage. To support operation, the system first captures the state activation value of 11 consecutive frames in the state gating mechanism Above the state path selection threshold , the activation state is mainly concentrated in the time step t=10685 to t=10695.

[0041] This state path segment is included in the high-risk state path set , and is immediately sent to the online decision module. The online module dynamically generates the leakage risk threshold based on the historical risk distribution in the past 12 hours. , and the average risk score of this state segment is , which is higher than the threshold , so it is marked as warning level A by the system.

[0042] At the same time, the system identifies the data features corresponding to the state path, the frequency domain coefficient and Has a significant leaky mutual information score 、 , while the feature score in non-leakage samples is often less than 0.09.

[0043] The system automatically generates a leak incident report based on the preset process, and the record content includes: Meter number: DE-140812; Suspicious state start and end: t=10685 to t=10695; Active state path length: 11 frames; Mean state risk score: 0.84; Fluctuation amplitude (power value after disturbance): ±0.12W; Activated frequency band features: w_{4,7},w_{3,11}; Warning level: A.

[0044] The report was sent in real time to the security operations and maintenance platform and the power dispatch terminal via the MQTT-TLS secure channel. The response system executed the linkage policy within 93ms, including limiting the meter's data frequency, enabling audit link mirroring, and historical behavior backtracking. During the audit, the system discovered that meters "DE-140813" and "DE-140815" on the same network segment also exhibited similar low-amplitude periodic disturbances during the same time period, quickly triggering a group alarm linkage.

[0045] To verify the detection accuracy, after the incident, technicians used the same batch of leaked samples to compare the traditional detection algorithm (sliding window statistics + threshold rule) and the method of this invention. The results are as follows: Table 1 Results of the comparison between the method of the present invention and the traditional detection algorithm

[0046] In addition, during a five-day continuous operation test, the method of the present invention detected a total of 26 real leakage incidents, 23 of which were confirmed to be effective leakage attacks after manual review, with an accuracy rate of 88.5%; while the traditional detection scheme only successfully discovered 9 of them, with an accuracy rate of 34.6%, and its number of false alarms was significantly higher than that of this method (16 vs. 2 per day).

[0047] From the perspective of system inference efficiency, the average single-frame inference time of the present invention is 41ms, and the maximum does not exceed 47ms. All operations are stable within the real-time inference threshold (<50ms) allowed by the edge gateway controller, and are feasible for engineering deployment.

[0048] Example 1 demonstrates the entire process of the method of the present invention in identifying trace data leakage in electric power meters, including a complete closed-loop operation from high-frequency disturbance signal capture, gated status screening, online risk judgment, warning classification push to platform response execution. It verifies that in scenarios with strong noise, weak signals, and highly concealed attack behaviors, the method of the present invention has significant advantages over traditional methods in detection sensitivity, false alarm control, and response timeliness.

[0049] The present invention introduces a dynamic search step size based on a signal-to-noise ratio adaptive control mechanism into the Osprey optimization algorithm. By constructing an exponential adjustment function driven by the signal-to-noise ratio, the step size is coupled with the observability of the leakage signal. The lower the signal-to-noise ratio, the larger the step size, thereby expanding the search range and avoiding the local optimal trap. The higher the signal-to-noise ratio, the smaller the step size to enhance the convergence accuracy. At the same time, in the dive phase, the difference normalized gradient adjustment mechanism is combined to dynamically update the weight ratio according to the relative gradient of the individual risk loss, and finally output the optimal network structure hyperparameter combination, making the optimization strategy more sensitive to weak leakage signal areas, and significantly improving the efficiency and accuracy of the hyperparameter search.

[0050] Based on the Mamba selective state space network, the present invention constructs a state update model that couples a gated state selection mechanism with a perturbation residual fusion mechanism. The gated temperature coefficient, residual scaling coefficient, and state dimension generated by the Osprey optimization algorithm are introduced. During state update, the state activation distribution is controlled by a temperature-controlled gate function. At the same time, a residual path is introduced to achieve compensation and retention of the input signal, thereby significantly enhancing the observability and propagation continuity of low-intensity leakage signals in the state path. It can effectively compress redundant state calculation paths and only activate state paths that are significantly related to the leakage pattern. On the basis of controlling the average inference delay at 47ms, the accurate activation rate of the state path is improved, and the model's sensitive response ability to leakage signals is essentially enhanced.

[0051] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A method for identifying power data leakage based on deep learning, characterized in that: The steps include: S1. Collect raw electricity consumption data from electric meters and generate a differentially private labeled electricity consumption dataset; S2. Feature mapping of the differentially private labeled electricity consumption dataset is performed based on wavelet packet decomposition and mutual information screening to obtain multi-scale key feature tensors; S3. Place the multi-scale key feature tensor into the Osprey optimization algorithm engine, perform a circling search to obtain a set of candidate hyperparameters, submit the candidate hyperparameters set and the multi-scale key feature tensor together to the Osprey optimization algorithm dive phase, complete the local fine optimization and output the Osprey optimization optimal hyperparameter set; S4. Dynamically inject the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network to construct an optimized Mamba selective state space network structure. Stream the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network. Using the gated state selection mechanism, filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. Combine the filtered state vectors in the order they were generated in the time series to obtain a state path set. S5. Send the state path set to the online decision-making module, generate a trace data leakage warning result based on the self-organizing threshold verification mechanism, and push it to the dispatching center and security operation and maintenance platform through an encrypted communication channel to complete the identification of trace data leakage of power meters.

2. The method for identifying power data leakage based on deep learning according to claim 1, characterized in that: The raw electricity usage data of the electric power meter includes a timestamp, a power value, a voltage value, a current value and a unique device identifier.

3. The method for identifying power data leakage based on deep learning according to claim 2, characterized in that: The differential privacy labeled electricity consumption dataset is generated in the following way: The Laplace mechanism is used to perturb the power values ​​in the original electricity consumption data of the electric meter to generate a differentially private perturbation result set. Based on the differentially private perturbation result set, the unique device identifier and timestamp attached to the original collection are integrated, and the data is labeled according to the trace data leakage labeling strategy to generate a leakage label. The leakage label sequence and the differentially private perturbation result set together constitute the differentially private labeled electricity consumption dataset.

4. The method for identifying power data leakage based on deep learning according to claim 3, characterized in that: The multi-scale key feature tensor obtained as described in S2 specifically includes: Construct feature extraction tensors, where each feature extraction tensor represents the feature dimension consisting of the corresponding perturbed power value, voltage value, current value, and timestamp in the time series; Applying a wavelet packet transform operation to the perturbed power value sequence in the feature extraction tensor to construct a set of wavelet packet feature coefficients; The mutual information between each dimension feature and the leakage label sequence in the wavelet packet feature coefficient set is calculated, and the feature coefficients are sorted according to the mutual information value. The first h features with the largest mutual information values ​​are selected to form a key feature index set. The corresponding feature coefficients in the key feature index set are extracted from the original wavelet packet feature coefficient set, and the original voltage value sequence and current value sequence are fused to construct a multi-scale key feature tensor.

5. The method for identifying power data leakage based on deep learning according to claim 1, characterized in that: The output of the optimal hyperparameter set for Osprey optimization described in S3 is as follows: A dual-objective hyperparameter optimization framework is constructed for the power meter trace data leakage identification scenario, and the corresponding objective loss function is obtained; Initialize the global search space and construct the osprey individual population; In the circling search phase of the osprey optimization algorithm, an adaptive dynamic search step size mechanism based on the signal-to-noise ratio of individual ospreys is introduced. The dynamic search step size is used to control the update of the hyperparameter configuration of each individual osprey. In the diving fine search phase, the dynamic search step size of each candidate osprey individual is retained, and a fine tuning update based on the difference normalized gradient is designed. When the set number of iterations or population convergence threshold is reached, the final Osprey optimization optimal hyperparameter set is output.

6. The method for identifying power data leakage based on deep learning according to claim 5, characterized in that: The adaptive dynamic search step size of the Osprey individual signal-to-noise ratio is specifically: Define the dynamic search step length of the mth osprey individual in the tth round for: in, is the basic step size factor, is the mth osprey individual The signal-to-noise ratio corresponding to the round is defined as the ratio of the variance of the power signal after disturbance to the variance of the background noise. is the reference signal-to-noise ratio threshold.

7. The method for identifying power data leakage based on deep learning according to claim 6, characterized in that: In the dive fine search phase of the Osprey optimization algorithm, a fine tuning update based on the difference normalized gradient is designed. The specific calculation formula is: in, Indicates the In the round of iteration The current hyperparameter configuration of each osprey individual, Indicates the In the round of iteration The updated hyperparameter configuration of each osprey individual, is a fixed adjustment factor under the leakage identification task, Indicates the The target loss function of all candidate osprey individuals in the round The smallest optimal hyperparameter configuration, Indicates the Round The performance difference between the osprey individuals and the current best individual in the leakage recognition loss function, It represents the difference between the current osprey individual and the global optimal loss, and K is the final classification level number of the leakage identification result.

8. The method for identifying power data leakage based on deep learning according to claim 1, characterized in that: In S4, in the process of Mamba selective state space network state transfer, a linear time-invariant kernel structure based on gated state selection mechanism is introduced to The state vector The calculation is performed according to the following state update rules: ; in, For each time step The state vector of Indicates the The feature vector of differential privacy labeled electricity consumption data, Indicates a temperature coefficient The gate activation function controls the degree of opening of the state gate; Indicates the dimension The linear time-invariant state transfer kernel acts on the state of the previous time step ; is the optimal state space dimension of the Mamba selective state space network, is the optimal gate temperature coefficient, is the optimal residual scaling factor, is the weight of the network, is the bias of the network.

9. The method for identifying power data leakage based on deep learning according to claim 1, characterized in that: S5 specifically includes: Perform leakage risk scoring on each state vector in the state path set and output the state risk score value corresponding to each state; Establish a self-organizing threshold verification mechanism based on historical reasoning statistical results and construct an adaptive threshold for leakage risk; Compare the state risk score value sequence with the leakage risk threshold. When the warning conditions are met, the trace data leakage warning event generation mechanism is triggered. The trace data leakage warning event is composed of a set of state path segments that meet the conditions. The generated trace data leakage warning results are organized into warning messages in a structured format and pushed through two channels through encrypted communication channels. The first channel is sent to the power dispatching center, and the second channel is sent to the power grid security operation and maintenance platform.

10. A deep learning-based power data leakage identification system using the identification method according to any one of claims 1 to 9, comprising a power consumption dataset generation module, a multi-scale key feature tensor generation module, an Osprey optimization optimal hyperparameter module, a state path set generation module, and a trace data leakage early warning identification module; characterized in that: The electricity consumption dataset generation module collects raw electricity consumption data from electric meters and generates a differentially private labeled electricity consumption dataset; The multi-scale key feature tensor generation module performs feature mapping on the differentially private labeled electricity dataset based on wavelet packet decomposition and mutual information screening to obtain a multi-scale key feature tensor; The Osprey Optimization Optimal Hyperparameter Module places the multi-scale key feature tensor into the Osprey Optimization Algorithm Engine, performs a circling search to obtain a set of candidate hyperparameters, and submits the candidate hyperparameters and the multi-scale key feature tensor together to the Osprey Optimization Algorithm Dive Phase to complete the local fine optimization and output the Osprey Optimization Optimization Optimal Hyperparameter Set; The state path set generation module dynamically injects the optimal hyperparameter set optimized by Osprey into the Mamba selective state space network, constructs an optimized Mamba selective state space network structure, streams the differentially private labeled electricity consumption dataset into the optimized Mamba selective state space network, and uses the gated state selection mechanism to filter out state vectors whose gated activation values ​​are higher than the state path selection threshold. The filtered state vectors are sequentially combined according to their generation order in the time series to obtain the state path set. The trace data leakage warning identification module sends the state path set to the online decision-making module, generates the trace data leakage warning results based on the self-organizing threshold verification mechanism, and pushes them to the dispatching center and security operation and maintenance platform through the encrypted communication channel to complete the trace data leakage identification of the power meter.

Citation Information

Patent Citations

  • Method and device for predicting, regulating and controlling intramuscular fat of broiler chicken based on deep learning

    CN119202718A

  • Precise electric power theft detection method based on multi-modal Mama

    CN119475245A

  • Secure video transmission method based on block chain and multi-path dynamic routing

    CN119996733A

Cited By

  • Network operation and maintenance automatic management method based on deep learning

    CN121333940A

  • Method for constructing sensitive information reverse reasoning threat model based on electricity price data

    CN121502826A

  • Malicious domain name detection system fusing multi-modal embedding and dynamic weight Mama

    CN122226480A