Power consumption behavior identification method and system based on user behavior and collection device state
Patent Information
- Application Number
- CN202610726858.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-09-29
AI Technical Summary
[0005]而数据采集设备可能因长期运行、恶劣环境或恶意攻击而出现故障、性能退化乃至被非法操控等异常,从而导致用户用电数据监控失灵,更可能造成用电数据的失真或丢失,进而导致对用户用电行为识别不准确
本发明提出的基于用户行为及采集设备状态的用电行为识别方法及系统,所述方法在进行用户用电行为识别时,获取了用户侧用电数据及采集用户侧用电数据所用的采集设备运行状态数据,对两种数据分别进行了特征提取,并对两种特征进行融合,获得用电行为特征,使得获取的用电行为特征中包含了用电数据特征及设备运行状态特征,当利用该用电行为特征对用户行为进行识别时,保证了用户用电行为识别的准确性,防止因采集设备运行异常,导致用户用电行为识别不准确问题的发生。
Smart Images

Figure CN122839181A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity consumption behavior recognition technology, and in particular to a method and system for electricity consumption behavior recognition based on user behavior and the status of the data acquisition equipment. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Electricity theft and leakage are common problems faced by the power industry. These abnormal behaviors can lead to economic losses and even pose safety hazards.
[0004] The current process for detecting abnormal user electricity consumption behavior is as follows: data acquisition equipment is used to obtain user electricity consumption behavior data, and then the user electricity consumption behavior data is analyzed to determine whether the user's electricity consumption behavior is abnormal.
[0005] Data acquisition equipment may malfunction, degrade in performance, or be illegally manipulated due to long-term operation, harsh environments, or malicious attacks. This can lead to the failure of monitoring user electricity consumption data, and may even cause distortion or loss of electricity consumption data, resulting in inaccurate identification of user electricity consumption behavior. Summary of the Invention
[0006] To address the aforementioned problems, this invention proposes a method and system for identifying electricity consumption behavior based on user behavior and the status of data acquisition equipment. By comprehensively analyzing user-side electricity consumption data and the operating status data of the data acquisition equipment used to collect user-side electricity consumption data, accurate identification of user electricity consumption behavior is achieved.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for identifying electricity consumption behavior based on user behavior and the status of the data collection device is proposed, including: Acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; Feature extraction is performed on user-side electricity consumption data to obtain electricity consumption data features; Feature extraction is performed on the collected equipment operating status data to obtain the equipment operating status features; By fusing electricity consumption data characteristics and equipment operating status characteristics, electricity consumption behavior characteristics can be obtained; Electricity consumption behavior is identified based on its characteristics, and the results of the electricity consumption behavior identification are obtained.
[0008] Furthermore, the data collected on the operating status of the equipment includes communication status, sampling integrity, data reporting latency, abnormal packet loss indicators, and equipment self-test status information; Alternatively, user-side power consumption data may include current, voltage, and power.
[0009] Furthermore, an electricity consumption behavior feature extraction network is employed to obtain electricity consumption behavior features. This network includes an electricity consumption data feature extraction branch, an equipment operation status feature extraction branch, and a feature fusion network. Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are constructed using convolutional neural networks. The electricity consumption data feature extraction branch takes user-side electricity consumption data as input and outputs electricity consumption data features, while the equipment operation status feature extraction branch takes collected equipment operation status data as input and outputs equipment operation status features. The feature fusion network takes electricity consumption data features and equipment operation status features as input and outputs electricity consumption behavior features, and is constructed using LSTM. or, Electricity consumption behavior is identified based on electricity consumption behavior characteristics and an electricity consumption behavior identification model to obtain electricity consumption behavior identification results. The electricity consumption behavior identification model is constructed using the electricity consumption behavior characteristics as input and the electricity consumption behavior identification results as output.
[0010] Furthermore, acquire raw data including user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The reliability of the original data is determined based on the operational status data of the acquired equipment in the original data. Highly reliable raw data is selected as user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data, and electricity consumption behavior features are extracted.
[0011] Secondly, a power consumption behavior recognition system based on user behavior and the status of the data collection equipment is proposed, including: The data acquisition unit is used to acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The feature extraction unit is used to extract features from user-side electricity consumption data to obtain electricity consumption data features; extract features from the operating status data of the collected equipment to obtain equipment operating status features; and fuse the electricity consumption data features and equipment operating status features to obtain electricity consumption behavior features. The electricity consumption behavior identification unit is used to identify electricity consumption behavior based on its characteristics and obtain the electricity consumption behavior identification result.
[0012] Furthermore, the data acquisition unit is also used to acquire raw data containing user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; to determine the reliability of the raw data based on the operating status data of the acquisition equipment in the raw data; and to select the raw data with high reliability as user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data for extracting electricity consumption behavior features.
[0013] Furthermore, the feature extraction unit is also used to obtain electricity consumption behavior features using an electricity consumption behavior feature extraction network. The electricity consumption behavior feature extraction network includes an electricity consumption data feature extraction branch, an equipment operation status feature extraction branch, and a feature fusion network. Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are constructed using convolutional neural networks. The electricity consumption data feature extraction branch takes user-side electricity consumption data as input and electricity consumption data features as output, while the equipment operation status feature extraction branch takes collected equipment operation status data as input and equipment operation status features as output. The feature fusion network takes electricity consumption data features and equipment operation status features as input and electricity consumption behavior features as output, and is constructed using LSTM. or, The electricity consumption behavior recognition unit is also used to recognize electricity consumption behavior based on electricity consumption behavior characteristics and electricity consumption behavior recognition model, and obtain electricity consumption behavior recognition results; wherein, the electricity consumption behavior recognition model takes electricity consumption behavior characteristics as input and electricity consumption behavior recognition results as output, and is constructed using the Mamba model.
[0014] Thirdly, a computer device is proposed, the device comprising: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the electricity consumption behavior identification method based on user behavior and acquisition device status proposed in the first aspect.
[0015] Fourthly, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed by the power consumption behavior identification method based on user behavior and acquisition device status proposed in the first aspect.
[0016] Fifthly, a computer program product is proposed, which includes a computer program. When the computer program is executed by a processor, it implements the electricity consumption behavior identification method based on user behavior and data acquisition device status proposed in the first aspect.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention proposes a method and system for identifying electricity consumption behavior based on user behavior and the status of data acquisition equipment. When identifying user electricity consumption behavior, the method acquires user-side electricity consumption data and the operating status data of the data acquisition equipment used to collect the user-side electricity consumption data. Features are extracted from both types of data, and the two features are fused to obtain electricity consumption behavior features. This ensures that the acquired electricity consumption behavior features include both electricity consumption data features and equipment operating status features. When these features are used to identify user behavior, the accuracy of user electricity consumption behavior identification is guaranteed, preventing inaccurate identification due to abnormal operation of the data acquisition equipment.
[0018] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.
[0020] Figure 1 This is a flowchart of the electricity consumption behavior identification method based on user behavior and data acquisition device status proposed in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the principle of the electricity consumption behavior feature extraction network proposed in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the principle of the electricity consumption behavior recognition model proposed in this embodiment of the invention. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0022] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0024] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0025] It should be noted that all data acquisition is conducted in accordance with laws and regulations and with user consent, and the data is used legally.
[0026] First, the application scenarios of the electricity consumption behavior identification method based on user behavior and data collection device status proposed in the embodiments of the present invention will be described.
[0027] The electricity consumption behavior recognition method based on user behavior and data acquisition device status proposed in this invention is applied to the application scenario of user electricity consumption behavior recognition.
[0028] With the deep integration of the energy revolution and digital technologies, the smart grid is gradually moving towards a new type of power system driven by data. In this transformation, advanced metering systems and their network-wide data acquisition devices (such as smart meters, sensors, and terminal units) constitute the nerve endings of the power grid's sensing layer, generating and uploading massive amounts of user electricity consumption data and equipment operating status data in real time. This data is a crucial foundation for achieving power grid status awareness, demand-side management, and non-technical loss analysis, especially for electricity theft detection.
[0029] Electricity theft and leakage are common problems faced by the power industry. These abnormal behaviors can lead to economic losses and even pose safety hazards.
[0030] The current process for detecting abnormal user electricity consumption behavior is as follows: data acquisition equipment is used to obtain user electricity consumption behavior data, and then the user electricity consumption behavior data is analyzed to determine whether the user's electricity consumption behavior is abnormal.
[0031] However, the massive scale of data collection and the complex operating environment also present severe reliability and security challenges to the data collection equipment itself. The equipment may malfunction, degrade in performance, or even be illegally manipulated due to long-term operation, harsh environments, or malicious attacks, potentially becoming a vulnerability in the power grid. Once the data collection equipment malfunctions, it can not only lead to the failure of operational status monitoring but also cause distortion or loss of electricity consumption data, resulting in a sharp decline in the performance of data-driven electricity theft detection models and even misjudgments, causing significant economic losses and security risks to power companies. Therefore, real-time online monitoring and anomaly handling of the data collection equipment itself, ensuring the accuracy and reliability of its reported data, is an indispensable prerequisite for effective electricity theft detection.
[0032] To improve the accuracy of user electricity consumption behavior identification, this invention proposes an electricity consumption behavior identification method based on user behavior and data acquisition device status. This method achieves accurate identification of user electricity consumption behavior by comprehensively analyzing user-side electricity consumption data and the operating status data of the data acquisition devices used to collect user-side electricity consumption data.
[0033] This invention aims to build a comprehensive solution for collaborative analysis of equipment health management and electricity safety. The primary research focus is on a method for predicting the operational status of data acquisition devices based on edge computing. By constructing a lightweight deep learning model adapted to edge nodes, real-time analysis of operational status data of acquisition devices (such as CPU load, communication power, voltage fluctuations, and port traffic) is performed. By identifying potential faults or abnormal signs of devices at the data source early on, the quality of electricity data uploaded to the cloud can be fundamentally guaranteed. This provides a clean and reliable data source for subsequent high-precision electricity theft analysis, thus building a solid first line of defense against electricity theft at the data entry point.
[0034] While ensuring data reliability, electricity theft detection is inherently a complex multimodal anomaly identification task. As research shows, electricity theft exhibits strong concealment and diversity, with patterns potentially hidden in various data formats, including user electricity consumption curves, equipment event logs, and even control command streams. This research aims to establish a control deviation detection model based on historical operating data, automating the analysis of behaviors such as equipment output power fluctuations, control command failures, and response delays. This can not only be used to diagnose equipment malfunctions but also be integrated with the electricity theft detection model: for example, if a terminal device continuously reports abnormally stable electricity consumption data (without any fluctuations), while its heartbeat signal shows a response delay, the system can comprehensively determine that the device may have been illegally hijacked or tampered with, reporting falsified electricity consumption data to conceal electricity theft. By integrating feature engineering and machine learning algorithm optimization, the identification accuracy and tracing capabilities for these complex, collaborative cheating electricity theft patterns can be improved.
[0035] like Figures 1-3 As shown in the embodiment of the present invention, the method for identifying electricity consumption behavior based on user behavior and the status of the data collection device includes: Acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; Feature extraction is performed on user-side electricity consumption data to obtain electricity consumption data features; Feature extraction is performed on the collected equipment operating status data to obtain the equipment operating status features; By fusing electricity consumption data characteristics and equipment operating status characteristics, electricity consumption behavior characteristics can be obtained; Electricity consumption behavior is identified based on its characteristics, and the results of the electricity consumption behavior identification are obtained.
[0036] The proposed method for identifying electricity consumption behavior based on user behavior and data acquisition device status acquires user-side electricity consumption data and the operating status data of the data acquisition device used to acquire user-side electricity consumption data. Features are extracted from both types of data and then fused to obtain electricity consumption behavior features. This ensures that the acquired electricity consumption behavior features include both electricity consumption data features and device operating status features. When these electricity consumption behavior features are used to identify user behavior, the accuracy of user electricity consumption behavior identification is guaranteed, preventing inaccurate identification due to abnormal operation of the data acquisition device.
[0037] In some embodiments, the data collected on the device's operating status includes communication status, sampling integrity, data reporting latency, abnormal packet loss identifiers, and device self-test status information.
[0038] The user-side electricity consumption data obtained includes data such as current, voltage, and power.
[0039] After acquiring user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data, the present invention first preprocesses the acquired data to obtain preprocessed data, and then performs subsequent feature extraction and electricity consumption behavior analysis based on the acquired preprocessed data.
[0040] Preprocessing includes data normalization and standardization.
[0041] In some embodiments, to ensure the accuracy of subsequent electricity consumption behavior identification and to prevent malfunctions in the data collection equipment from adversely affecting electricity consumption behavior identification, the embodiments of the present invention further define: Obtain raw data that includes user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The reliability of the original data is determined based on the operational status data of the acquired equipment in the original data. Highly reliable raw data is selected as user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data, and electricity consumption behavior features are extracted.
[0042] By judging the credibility of the raw data, we can characterize whether the data acquisition device is abnormal. Only raw data with high credibility is extracted and used in subsequent electricity consumption behavior identification to ensure the accuracy of electricity consumption behavior identification.
[0043] Specifically: When all indicators in the data collection equipment's operating status data are normal, the original data is considered to have high reliability. For example, when the communication status of the data collection equipment is stable, the sampling integrity reaches 100%, the data reporting delay is short and uniform, there are no abnormal packet loss records, and the equipment self-test has no fault alarms, these conditions together indicate that the data collection equipment is in a healthy operating state, and the user-side power consumption data (current, voltage, power, etc.) it reports can truly reflect the user's power consumption behavior and has high reliability.
[0044] When abnormal indicators appear in the operational status data of the data acquisition equipment, the reliability of the original data is deemed low. For example, based on communication status, frequent communication interruptions or weak signals, missing sampling data, abnormal fluctuations or significant increases in reporting latency, packet loss records, and errors or fault codes in the equipment self-test report indicate that the data acquisition equipment may be malfunctioning or experiencing performance degradation due to long-term aging, harsh environments, or malicious attacks. In such cases, the electricity consumption data reported by the equipment is highly likely to be distorted or tampered with. Directly using this low-reliability data for electricity consumption behavior analysis can easily misjudge "equipment abnormalities" as "user electricity consumption abnormalities," leading to inaccurate identification results.
[0045] In some embodiments, electricity consumption behavior features are obtained using an electricity consumption behavior feature extraction network; such as... Figure 2 As shown, the electricity consumption behavior feature extraction network (CNN-LSTM) includes an electricity consumption data feature extraction branch, an equipment operation status feature extraction branch, and a feature fusion network. Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are constructed using convolutional neural networks. The electricity consumption data feature extraction branch takes user-side electricity consumption data as input and electricity consumption data features as output. The equipment operation status feature extraction branch takes collected equipment operation status data as input and equipment operation status features as output. The feature fusion network takes electricity consumption data features and equipment operation status features as input and electricity consumption behavior features as output, and is constructed using LSTM.
[0046] Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch employ a one-dimensional convolutional neural network (CNN) to extract multi-scale features from user-side electricity consumption data or collected equipment operation status data. By setting non-equidistant convolutional kernels and adaptive pooling mechanisms, the model's ability to perceive irregular periodic data and intermittent abnormal fluctuations is enhanced, thereby fully mining the multi-level and multi-scale temporal features in the input CNN data. In the CNN part, its core efficiently extracts spatial or temporal patterns through local connectivity and weight sharing mechanisms in convolutional layers. Pooling layers perform downsampling to enhance feature invariance, and hierarchical features from low to high levels are gradually abstracted through multi-layer stacking. This structure significantly reduces the number of parameters and lowers the risk of overfitting.
[0047] The CNN consists of a four-layer one-dimensional convolutional network structure. This network uses a four-layer one-dimensional convolutional architecture for hierarchical feature extraction. Its core operations are implemented through convolution operations, as shown in the following mathematical expression:
[0048] in, This represents the linear output of the l-th layer. The convolution kernel weight matrix is... This represents a one-dimensional convolution operation. These are the output features of the previous layer. This is the bias vector.
[0049] The first layer uses 64 one-dimensional convolutional kernels with a width of 7 and a stride of 2, employing Same Padding to maintain the output length. This is followed by a max-pooling layer with a kernel size of 3 and a stride of 2 to extract daily cycle data features. The second layer uses 128 convolutional kernels with a width of 5 and a stride of 1 to further capture weekly cycle data features. The third and fourth layers each use 256 convolutional kernels with a width of 3, abstracting high-dimensional data features for monthly and even quarterly cycles through deep stacking. Their output feature dimensions are 256×256×3 and 256×256×3, respectively. Batch normalization and ReLU activation functions are introduced after each convolutional operation, significantly improving gradient stability and feature expressiveness. The entire CNN effectively controls model complexity while ensuring feature extraction capabilities.
[0050] The formula for batch normalization is:
[0051] in and The mean and variance of the current batch. and For learnable parameters, To prevent division-by-zero errors, a small constant is used. After batch normalization, a nonlinear transformation is introduced through the ReLU activation function, which significantly improves gradient stability and feature expressiveness.
[0052] The entire CNN section significantly reduces the number of parameters through local connectivity and weight sharing mechanisms, totaling approximately 1.2M parameters, and ultimately outputs a high-dimensional feature sequence of 1024 dimensions. This structure effectively reduces the risk of overfitting and enhances the model's ability to represent periodic and non-periodic electricity consumption behavior, providing high-quality feature input for subsequent time series modeling.
[0053] Among them, the equipment operation status features output by the equipment operation status feature extraction branch include the changing trends of equipment communication stability and data integrity, so as to characterize the evolution of equipment operation status over time.
[0054] Based on this, a Long Short-Term Memory (LSTM) network is introduced to jointly perform temporal modeling on the high-dimensional features output by the two feature extraction branches. Through a gating mechanism, dynamic weight adjustment of "abnormal electricity consumption behavior features" and "abnormal equipment status features" is realized, thereby forming an electricity consumption behavior feature representation that integrates equipment status constraints.
[0055] The LSTM part receives the feature sequences output by the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch. Utilizing its forget gate, input gate, and output gate gating mechanism, it performs refined modeling of temporal dependencies.
[0056] The feature sequences extracted from the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are input into a bidirectional stacked LSTM network for temporal dependency modeling. This network employs a carefully designed two-layer recurrent neural network structure, specifically designed to capture long-range temporal patterns and anomalous fluctuations in electricity consumption data.
[0057] Specifically, the feature fusion network comprises a two-layer stacked LSTM structure with a hidden state dimension of 128, effectively capturing abnormal fluctuations and abrupt changes in long-term electricity consumption trends. Furthermore, residual connections and a dropout mechanism are introduced between the LSTM layers, which not only alleviates the vanishing gradient problem but also enhances the model's generalization ability, preventing overfitting when training samples are limited.
[0058] The first layer is a bidirectional LSTM structure with a hidden state dimension of 128. Its gating mechanism achieves fine-grained control through the following formula: Forgotten Gate:
[0059] Input Gate:
[0060] Output gate:
[0061] Candidate cell status:
[0062] Cell status update:
[0063] Hidden output:
[0064] in, This represents the Sigmoid activation function. This represents element-wise multiplication, where W and b are the weight matrix and bias vector for each gate, respectively. This structure enables the model to intelligently control the degree of historical information retention, select important features to update cell states, and precisely adjust the hidden state output at the current time step.
[0065] The second LSTM layer receives 256-dimensional feature inputs and introduces a residual connection mechanism internally:
[0066] in, This represents the computation function of the second LSTM layer. For network parameters, The weighting coefficients are learnable (initially 0.5). A Dropout layer with a dropout rate of 0.3 is also set between the two layers to implement a random dropout mechanism during forward propagation.
[0067] This feature fusion network effectively captures abnormal fluctuations and abrupt changes in long-term electricity consumption trends through a two-layer stacked fine-grained gating mechanism. This not only alleviates the gradient vanishing problem but also enhances the model's generalization ability and avoids overfitting when training samples are limited.
[0068] Finally, the feature fusion network outputs a 256-dimensional context-enhanced feature vector, which integrates electricity consumption data features and equipment operating status features, providing high-quality input features for the state space modeling of the subsequent electricity consumption behavior recognition model. The entire LSTM part has approximately 2.1M parameters, ensuring excellent temporal modeling capabilities while maintaining model complexity.
[0069] By tightly coupling CNN and LSTM, this architecture achieves multi-level information fusion from local features to global semantics. Features extracted by two parallel CNNs and the context state modeled by LSTM are concatenated and reorganized in the time dimension, and finally, the feature fusion results at each time point are output through a fully connected layer and a sigmoid activation function. This joint structure significantly improves the detection sensitivity of covert and intermittent abnormal patterns in electricity theft, while enhancing the model's generalization ability in complex electricity consumption scenarios, providing a high-quality feature representation foundation for subsequent state-space modeling and multimodal decision fusion in the Mamba model.
[0070] In some embodiments, electricity consumption behavior is identified based on electricity consumption behavior characteristics and an electricity consumption behavior identification model to obtain electricity consumption behavior identification results; wherein, the electricity consumption behavior identification model is constructed using the electricity consumption behavior characteristics as input and the electricity consumption behavior identification results as output.
[0071] This invention introduces a Mamba structured state-space model with a state constraint mechanism for in-depth temporal state evolution analysis of electricity consumption behavior characteristics. Unlike existing technologies that directly input features into the Mamba model, this invention introduces a state constraint vector generated from the collected equipment operating status data during the Mamba state update process. This vector is used to adjust the state transition parameters and output mapping weights, thereby explicitly distinguishing between "real electricity consumption anomalies" and "pseudo-anomalies caused by equipment malfunctions" during state evolution. During the training phase, the Mamba model employs a parallel state update method based on global convolution to achieve efficient modeling of long-term series. During the inference phase, the model switches to a recursive state update mode, dynamically suppressing state abrupt changes caused by equipment malfunctions while maintaining the continuity of historical states. This state-constrained Mamba modeling approach is effective.
[0072] This invention introduces the Mamba model as the state-space modeling component in the core of the system. This model is a modern deep architecture based on Structured State Space Sequence Model (S4). Figure 3 As shown, the Mamba model combines the recursive inductive bias of a recurrent neural network (RNN) with the global perception capability of a Transformer. Its unique dual-mode computation mechanism makes it particularly suitable for modeling scenarios with long sequences and strong temporal dependencies, such as electricity consumption data.
[0073] Mamba receives electricity consumption behavior features extracted by an electricity consumption behavior feature extraction network, using four core learnable parameters. To achieve dynamic system modeling, these four parameters control the system's step size, state transitions, input injection, and output mapping, providing the model with flexible and powerful sequential modeling capabilities. Specifically, state matrix A controls the system's modal evolution, while input and output matrices B and C regulate external feature injection and state readout, respectively. The step size parameter... The model employs a learnable mechanism to adaptively adjust the rate of change of the sequence. Internally, it uses a state-space representation with 256 hidden units.
[0074] Its working mechanism includes two key stages: continuous state parameterization and discretization processing.
[0075] In the continuous state parameterization stage, the model describes the system dynamics through high-order state-space equations. This stage utilizes methods from state-space theory to represent the internal workings of the system, mapping the input sequence to a high-dimensional state space. This allows for a richer capture of the system dynamics. State matrix A controls the system modes, while input and output matrices B and C regulate external feature injection and state readout, respectively. The step size parameter... The adaptive adjustment of the rate of change of the sequence is achieved through a learnable mechanism, and the model describes the system dynamics through continuous-time state-space equations:
[0076] in, This represents the system state vector at time t. For the input feature vector, This is the system output. The state transition matrix is a time-varying matrix. For the input weight matrix, To output the weight matrix, This is the feedforward connection matrix. and Let these represent the covariance matrices of process noise and observation noise, respectively. and These are mutually independent Gaussian white noise processes.
[0077] Among them, the time-varying state transition matrix and input weight matrix The parameters are dynamically adjusted by the state constraint vector. This vector is generated from the feature extraction of the data acquisition equipment's operating status (such as communication status and sampling completeness). It is injected into the system as prior knowledge, so that when the model constructs the state space, it not only considers the user-side electricity consumption data features but also simultaneously incorporates the health information of the acquisition equipment. This means that when the equipment's operating status is abnormal (such as communication interruption or data packet loss), the state constraint vector will be adjusted accordingly, thereby changing the system state. The evolution path of the model keeps it vigilant against data distortion that may be caused by equipment failure. The design of introducing state constraint vectors essentially deeply couples the external prior knowledge of the operating state of the acquisition equipment into the core state evolution mechanism of the Mamba model.
[0078] During the discretization process, the Zero-Order Hold (ZOH) rule is employed to convert continuous parameters into discrete parameters, achieving a continuous-to-discrete system transformation. This effectively matches the discrete characteristics of power data sampling, enhancing numerical stability and generalization ability, and effectively solving the adaptation problem of continuous system models in digital computation. The discretization step size is set to 0.1, a value that is not arbitrarily chosen but rigorously designed to match the discrete characteristics of power data sampling every fifteen minutes, ensuring that the model can accurately align with the sampling frequency of actual data, thereby maximizing the utilization of temporal information in the data. This discretization strategy not only enhances the stability of numerical computation but also improves the model's generalization ability to actual power data.
[0079] The specific formula for converting continuous parameters into discrete parameters using the zero-order preserve (ZOH) rule is as follows:
[0080] in, To discretize the step size and accurately match the discrete characteristics of power data sampled every 15 minutes, It is the identity matrix. This represents the time index. This discretization scheme maintains the stability of the system and its robustness to numerical computation.
[0081] Mamba employs different computational modes during the training and inference phases. During training, it utilizes its global convolution mode, employing a 3D-to-1 one-dimensional convolution kernel with a stride of an integer value of one. Structured convolution kernels enable parallel computation across entire sequences, significantly improving training efficiency. This parallelization strategy greatly enhances training efficiency, allowing the model to handle large-scale electricity data. The batch size during training is set to 32, achieving an optimal balance between computational efficiency and memory usage. In this mode, the model can fully capture long-term cyclical correlations and abnormal fluctuations across weeks in electricity consumption behavior characteristics, which is crucial for detecting electricity theft deliberately hidden in multi-cycle patterns. During inference, it switches to a recursive mode, using iterative updates of hidden states to gradually output prediction results in an autoregressive manner, significantly reducing inference latency and meeting real-time monitoring requirements. While recursive computation cannot achieve the high parallelism of training, it can strictly control inference latency to within five milliseconds, a performance metric that fully meets the business requirements of real-time monitoring and immediate response in smart grids. This strategy of separating training and inference allows the Mamba model to maintain high efficiency during the training phase while ensuring low latency during the inference phase, demonstrating significant advantages in actual industrial deployments.
[0082] This module ultimately enhances the system's ability to model irregular electricity consumption behaviors (such as intermittent electricity theft and counter-surveillance electricity consumption patterns) and long-range dependencies by performing latent state smoothing and multi-scale regulation on electricity consumption behavior characteristics, and can effectively identify weak anomalies in low signal-to-noise ratio scenarios.
[0083] During training, a global convolutional model was employed, using multiple parallel one-dimensional convolutional branches (kernel sizes of 3×1, 5×1, and 7×1, respectively), with a uniform stride of 1. Structured convolutional kernels were used to achieve parallel computation of the entire sequence. The batch size was set to 32, and the AdamW optimizer (learning rate 1e-3, weight decay 0.01) was used for training, along with a cosine annealing learning rate scheduling strategy. This configuration enabled the model to fully capture long-term cyclical correlations and anomalous fluctuation patterns across weeks / months in the electricity consumption sequence.
[0084] The reasoning phase then switches to recursive mode, using hidden states for iterative updates. Its recursive relationship is expressed as:
[0085]
[0086] in, This represents element-wise multiplication. , , , It is a learnable gating parameter matrix used to regulate state updates and information flow.
[0087] The electricity consumption behavior feature extraction network and electricity consumption behavior recognition model proposed in this embodiment of the invention constitute an electricity theft detection model. This model is obtained by training a CNN-LSTM and Mamba model using training data of known electricity consumption behavior types.
[0088] The training data includes user-side electricity consumption data for training and operational status data of the data acquisition equipment used to collect the user-side electricity consumption data. This training data comes from the publicly available electricity consumption dataset of the State Grid Corporation of China (SGCC). This dataset consists of long-term daily electricity consumption records of over 40,000 users and operational status parameters of the data acquisition equipment used to collect the electricity consumption data, and includes confirmed electricity theft user tags. To conduct effective model training and evaluation, this invention divides the entire user dataset proportionally into a training set and a test set. The training set, comprising 60% of the total user dataset, contains historical electricity consumption data for 25,423 users (including 2,169 electricity theft users) and operational status parameters of the data acquisition equipment used to collect the electricity consumption data. This data is used for model learning and parameter optimization. The test set contains the remaining 16,949 users (including 1,446 electricity theft users), accounting for 40% of the total dataset.
[0089] During the training data construction phase, the reliability of the original training data was assessed based on the operating status of the acquisition equipment, and the original training data was divided into high-reliability and low-reliability data. Low-reliability data was marked as candidate samples for equipment anomalies, and a differentiated processing strategy was introduced in subsequent modeling. Specifically, a state constraint vector generated from the operating status data of the acquisition equipment was introduced. During training, when the model processes low-reliability data, this state constraint vector is significantly activated, dynamically adjusting the parameters in the Mamba model's state-space equations (such as the state transition matrix A and the input weight matrix B), guiding the model to focus more on the characteristics of the equipment's operating status. This mechanism essentially provides the model with prior knowledge: the current input data may be unreliable, and the model will prioritize considering whether the acquisition equipment itself is abnormal. This proactively suppresses responses to "pseudo-abnormal" power consumption patterns during state evolution, strengthening the ability to identify abnormal equipment patterns and avoiding false abnormal power consumption judgments caused by acquisition equipment failures. Subsequently, after completing the data credibility screening, the high-credibility data samples were divided according to the user dimension, with all user samples divided into a training subset and a test subset, where the training subset accounted for 60% of the total user samples and the test subset accounted for 40%. This step effectively solved the problem of "difficulty in distinguishing between equipment malfunction and power consumption malfunction" in the existing technology by introducing the prior constraint of the operating status of the data acquisition equipment, thus providing a highly reliable data foundation for subsequent model training.
[0090] The electricity consumption behavior identification method based on user behavior and data acquisition device status proposed in this invention first performs preliminary screening of the acquired raw data based on the data acquisition device operating status data, selecting data with high credibility as the final data to participate in the electricity consumption behavior identification and analysis. During the electricity consumption behavior identification process, features are extracted from both the highly credible user-side electricity consumption data and the data acquisition device operating status data used to acquire the user-side electricity consumption data, and the two types of features are fused to obtain electricity consumption behavior features. This ensures that the acquired electricity consumption behavior features include both electricity consumption data features and device operating status features. When using these electricity consumption behavior features to identify user behavior, the accuracy of user electricity consumption behavior identification is guaranteed, preventing inaccurate user electricity consumption behavior identification due to abnormal operation of the data acquisition device.
[0091] Through deep state-space modeling, a 256-dimensional state feature vector is ultimately output. This vector not only contains the original electricity consumption pattern information, but more importantly, it incorporates the operational status information of the acquisition equipment, significantly enhancing the system's ability to model irregular electricity consumption behavior and long-range dependencies. For sophisticated anti-detection electricity theft patterns, such as intermittent electricity theft and random pattern theft, the Mamba model can capture subtle anomaly signals through its refined state representation. Simultaneously, the model can effectively capture and represent the inherent long-range dependencies in electricity data, such as changes in electricity consumption patterns during holidays and seasonal load fluctuations, through its state-space modeling.
[0092] Furthermore, the output of the Mamba model provides a high-quality feature representation foundation for subsequent multimodal decision fusion. These features not only retain key information from the original data, but more importantly, they are deeply abstracted and enhanced through state-space modeling, enabling subsequent decision modules to make judgments based on richer and more structured features. This high-quality feature representation plays a crucial role in improving the accuracy and reliability of the final electricity theft detection, especially when dealing with difficult cases with ambiguous boundaries and unclear features, where the advantages of this deep feature representation are even more pronounced.
[0093] In practical applications, the Mamba model demonstrates a powerful adaptability to electricity data. Compared to traditional methods based on convolutional or recurrent neural networks, its state-space modeling approach better captures system-level dynamic changes, rather than merely extracting surface features. This deep modeling enables the system to understand the "system state" behind electricity consumption behavior, rather than just superficial numerical fluctuations, thus providing a technological foundation for more intelligent and accurate electricity theft detection. Simultaneously, the model's dual-mode design fully considers the practical constraints of industrial applications, ensuring both accuracy and real-time performance, paving the way from laboratory research to industrial deployment.
[0094] Ultimately, by introducing the Mamba state-space model, the entire system achieved unprecedented long-range dependency modeling and state representation capabilities while maintaining high accuracy and efficiency. This is not only a technological advancement but also provides a more reliable technical guarantee for the safe operation of the smart grid, injecting new technological vitality into the digital transformation of the power system.
[0095] This invention also proposes an electricity consumption behavior identification system based on user behavior and the status of the data collection device, including: The data acquisition unit is used to acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The feature extraction unit is used to extract features from user-side electricity consumption data to obtain electricity consumption data features; extract features from the operating status data of the collected equipment to obtain equipment operating status features; and fuse the electricity consumption data features and equipment operating status features to obtain electricity consumption behavior features. The electricity consumption behavior identification unit is used to identify electricity consumption behavior based on its characteristics and obtain the electricity consumption behavior identification result.
[0096] In some embodiments, the data acquisition unit is further configured to acquire raw data including user-side electricity consumption data and operating status data of the acquisition equipment used to collect user-side electricity consumption data; determine the reliability of the raw data based on the operating status data of the acquisition equipment in the raw data; and select the raw data with high reliability as user-side electricity consumption data and operating status data of the acquisition equipment used to collect user-side electricity consumption data for extracting electricity consumption behavior features.
[0097] In some embodiments, the feature extraction unit is further configured to obtain electricity consumption behavior features using an electricity consumption behavior feature extraction network; the electricity consumption behavior feature extraction network includes an electricity consumption data feature extraction branch, an equipment operating status feature extraction branch, and a feature fusion network; both the electricity consumption data feature extraction branch and the equipment operating status feature extraction branch are constructed using convolutional neural networks, the electricity consumption data feature extraction branch takes user-side electricity consumption data as input and electricity consumption data features as output, and the equipment operating status feature extraction branch takes collected equipment operating status data as input and equipment operating status features as output; the feature fusion network takes electricity consumption data features and equipment operating status features as input and electricity consumption behavior features as output, and is constructed using LSTM.
[0098] In some embodiments, the electricity consumption behavior identification unit is further configured to identify electricity consumption behavior based on electricity consumption behavior characteristics and an electricity consumption behavior identification model, and obtain an electricity consumption behavior identification result; wherein, the electricity consumption behavior identification model is constructed using the electricity consumption behavior characteristics as input and the electricity consumption behavior identification result as output, and is constructed using the Mamba model.
[0099] It should be noted that the electricity consumption behavior recognition system based on user behavior and device status provided in the above embodiments is only illustrated by the division of the above functional modules when performing user electricity consumption behavior recognition. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the electricity consumption behavior recognition system based on user behavior and device status provided in the above embodiments and the electricity consumption behavior recognition method embodiments based on user behavior and device status belong to the same concept. The specific implementation process is detailed in the method embodiments and will not be repeated here.
[0100] The present invention also discloses a computer device, the device comprising: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the electricity consumption behavior identification method based on user behavior and data acquisition device status disclosed in the embodiments of the present invention.
[0101] The computer device can be a portable mobile terminal, such as a smartphone, tablet, laptop, or desktop computer. Typically, a computer device includes a processor and memory.
[0102] A processor may include one or more processing cores, such as a core processor or a core processor. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0103] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory are used to store at least one computer program, which is executed by a processor to implement the intelligent vehicle control method provided in the method embodiments of this application.
[0104] In some embodiments, the computer device may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: radio frequency circuitry, a display screen, a camera assembly, audio circuitry, and a power supply.
[0105] Peripheral device interfaces can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory. In some embodiments, the processor, memory, and peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and peripheral device interface can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0106] Radio frequency (RF) circuits are used to receive and transmit RF signals, also known as electromagnetic signals. RF circuits communicate with communication networks and other communication devices via electromagnetic signals. RF circuits convert electrical signals into electromagnetic signals for transmission, or convert received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit can communicate with other terminals through at least one wireless communication protocol. These wireless communication protocols include, but are not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0107] The present invention also discloses a computer-readable storage medium storing a computer program adapted for loading and execution by a processor of the power consumption behavior identification method based on user behavior and acquisition device status disclosed in the embodiments of the present invention.
[0108] The present invention also discloses a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the electricity consumption behavior identification method based on user behavior and data acquisition device status disclosed in the embodiments of the present invention.
[0109] The method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0110] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0111] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for identifying electricity consumption behavior based on user behavior and data acquisition device status, characterized in that, include: Acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; Feature extraction is performed on user-side electricity consumption data to obtain electricity consumption data features; Feature extraction is performed on the collected equipment operating status data to obtain the equipment operating status features; By fusing electricity consumption data characteristics and equipment operating status characteristics, electricity consumption behavior characteristics can be obtained; Electricity consumption behavior is identified based on its characteristics, and the results of the electricity consumption behavior identification are obtained.
2. The electricity consumption behavior identification method based on user behavior and data acquisition device status as described in claim 1, characterized in that, The data collected on the equipment's operating status includes communication status, sampling integrity, data reporting latency, abnormal packet loss indicators, and equipment self-test status information; or, User-side electricity consumption data includes current, voltage, and power.
3. The electricity consumption behavior identification method based on user behavior and data acquisition device status as described in claim 1, characterized in that, Electricity consumption behavior features are obtained by using an electricity consumption behavior feature extraction network. The electricity consumption behavior feature extraction network includes an electricity consumption data feature extraction branch, an equipment operation status feature extraction branch, and a feature fusion network. Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are constructed using convolutional neural networks. The electricity consumption data feature extraction branch takes user-side electricity consumption data as input and electricity consumption data features as output. The equipment operation status feature extraction branch takes collected equipment operation status data as input and equipment operation status features as output. The feature fusion network takes electricity consumption data features and equipment operating status features as inputs and electricity consumption behavior features as outputs, and is constructed using LSTM. or, Electricity consumption behavior is identified based on electricity consumption behavior characteristics and an electricity consumption behavior identification model to obtain electricity consumption behavior identification results. The electricity consumption behavior identification model is constructed using the electricity consumption behavior characteristics as input and the electricity consumption behavior identification results as output.
4. The electricity consumption behavior identification method based on user behavior and data acquisition device status as described in claim 1, characterized in that, Obtain raw data that includes user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The reliability of the original data is determined based on the operational status data of the acquired equipment in the original data. Highly reliable raw data is selected as user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data, and electricity consumption behavior features are extracted.
5. The electricity consumption behavior recognition system based on user behavior and data acquisition device status as described in claim 1, characterized in that, include: The data acquisition unit is used to acquire user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; The feature extraction unit is used to extract features from user-side electricity consumption data to obtain electricity consumption data features; Feature extraction is performed on the collected equipment operation status data to obtain equipment operation status features; the electricity consumption data features and equipment operation status features are fused to obtain electricity consumption behavior features; The electricity consumption behavior identification unit is used to identify electricity consumption behavior based on its characteristics and obtain the electricity consumption behavior identification result.
6. The electricity consumption behavior recognition system based on user behavior and data acquisition device status as described in claim 5, characterized in that, The data acquisition unit is also used to acquire raw data containing user-side electricity consumption data and the operating status data of the acquisition equipment used to collect user-side electricity consumption data; and to determine the reliability of the raw data based on the operating status data of the acquisition equipment in the raw data. Highly reliable raw data were selected as user-side electricity consumption data for extracting electricity consumption behavior characteristics, as well as the operating status data of the acquisition equipment used to collect user-side electricity consumption data.
7. The electricity consumption behavior recognition system based on user behavior and data acquisition device status as described in claim 5, characterized in that, The feature extraction unit is also used to obtain electricity consumption behavior features using an electricity consumption behavior feature extraction network. The electricity consumption behavior feature extraction network includes an electricity consumption data feature extraction branch, an equipment operation status feature extraction branch, and a feature fusion network. Both the electricity consumption data feature extraction branch and the equipment operation status feature extraction branch are constructed using convolutional neural networks. The electricity consumption data feature extraction branch takes user-side electricity consumption data as input and electricity consumption data features as output. The equipment operation status feature extraction branch takes collected equipment operation status data as input and equipment operation status features as output. The feature fusion network takes electricity consumption data features and equipment operating status features as inputs and electricity consumption behavior features as outputs, and is constructed using LSTM. or, The electricity consumption behavior recognition unit is also used to recognize electricity consumption behavior based on electricity consumption behavior characteristics and electricity consumption behavior recognition model, and obtain electricity consumption behavior recognition results; wherein, the electricity consumption behavior recognition model takes electricity consumption behavior characteristics as input and electricity consumption behavior recognition results as output, and is constructed using the Mamba model.
8. An electronic device, characterized in that, The device includes: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the electricity consumption behavior identification method based on user behavior and data acquisition device status as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed by the power consumption behavior identification method based on user behavior and acquisition device status as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the electricity consumption behavior identification method based on user behavior and data acquisition device status as described in any one of claims 1-6.