Power consumption anomaly identification method and device, computer device and computer program product
Patent Information
- Application Number
- CN202611130542.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-23
AI Technical Summary
传统识别方式依赖人工巡查与抽检,存在覆盖不足、时效滞后、成本高昂且依赖经验等局限,目前针对“临代正”等异常用电行为的识别,主要依赖两种方式:一是基于规则的阈值判断与人工周期性现场巡查;二是基于传统机器学习模型的用电数据分析
[0015]在本发明实施例中,采用用电异常识别方法的方式,通过获取用户用电数据;基于用户用电数据,构建多时间尺度行为序列;将连续负荷行为映射为离散行为状态,并按预设时间顺序串联离散行为状态,构建用户行为状态迁移序列;将多时间尺度行为序列及用户行为状态迁移序列输入至预设小模型中,提取行为特征,生成结构化行为特征向量;将结构化行为特征向量输入至预设大模型,输出异常研判结论及异常置信度;在异常置信度不低于预设阈值的情况下,根据异常研判结论,确定用电异常识别结果,达到了仅在异常置信度不低于预设阈值时根据异常研判结论确定用电异常识别结果,确保了识别结果的可靠性的目的,从而实现了提高用电异常识别准确率和识别结果可信度的技术效果,进而解决了目前用电异常的识别率低难以适应快速变化的用电行为且缺乏可解释性的技术问题。
Smart Images

Figure CN122964550A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power monitoring technology, and more specifically, to a method, device, computer equipment, and computer program product for identifying abnormal electricity consumption. Background Technology
[0002] In recent years, with the rapid advancement of urban construction, the demand for high-voltage temporary power has surged. Some users have been illegally substituting temporary power sources for permanent power supply for extended periods, seriously threatening power grid safety and service quality. Traditional identification methods rely on manual inspections and spot checks, which have limitations such as insufficient coverage, time lag, high costs, and reliance on experience. Currently, the identification of abnormal power consumption behaviors such as "temporary power substituting for permanent power" mainly relies on two methods: one is rule-based threshold judgment and periodic manual on-site inspections; the other is power consumption data analysis based on traditional machine learning models. However, these methods all have significant drawbacks: limited coverage, poor timeliness, and high dependence on the subjective experience of inspectors, making it difficult to achieve proactive and accurate large-scale screening; machine learning models have limited feature extraction capabilities, low recognition rates for complex and concealed violation patterns, and difficulty adapting to rapidly changing power consumption behaviors, resulting in high rates of missed and false alarms.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a method, apparatus, computer device, and computer program product for identifying abnormal electricity consumption, in order to at least solve the current technical problems of low identification rate of abnormal electricity consumption, difficulty in adapting to rapidly changing electricity consumption behavior, and lack of interpretability.
[0005] According to one aspect of the present invention, a method for identifying abnormal electricity consumption is provided, comprising: acquiring user electricity consumption data; constructing a multi-timescale behavior sequence based on the user electricity consumption data; mapping continuous load behavior to discrete behavior states, and concatenating the discrete behavior states in a preset time order to construct a user behavior state transition sequence; inputting the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model to extract behavior features and generate a structured behavior feature vector; inputting the structured behavior feature vector into a preset large model to output an anomaly judgment conclusion and an anomaly confidence level; and determining the electricity consumption anomaly identification result based on the anomaly judgment conclusion if the anomaly confidence level is not lower than a preset threshold.
[0006] Optionally, based on user electricity consumption data, a multi-time-scale behavior sequence is constructed, including: dividing user electricity consumption data into multiple time scales according to a preset time window, wherein the multiple time scales include hourly, daily, weekly, and monthly levels; for the hourly time scale, extracting user short-term load fluctuation data to construct an hourly behavior sequence, wherein the hourly behavior sequence represents the user's short-term fluctuation characteristics; for the daily time scale, extracting user's daily load curve and daily electricity consumption data to construct a daily behavior sequence, wherein the daily behavior sequence represents the user's daily electricity consumption pattern; for the weekly time scale, extracting user's weekly load periodic change data to construct a weekly behavior sequence, wherein the weekly behavior sequence represents the user's periodic change characteristics; for the monthly time scale, extracting user's long-term load evolution trend data to construct a monthly behavior sequence, wherein the monthly behavior sequence represents the user's long-term evolution trend; and determining the multi-time-scale behavior sequence based on the hourly, daily, weekly, and monthly behavior sequences.
[0007] Optionally, the multi-timescale behavior sequences and user behavior state transition sequences are input into a preset small model to extract behavioral features and generate a structured behavioral feature vector. The preset small model is a temporal convolutional network small model, comprising: inputting the multi-timescale behavior sequences and user behavior state transition sequences into the preset small model; performing temporal encoding on the multi-timescale behavior sequences based on the multi-layer temporal encoding structure in the preset small model, and extracting local fluctuation features, periodic change features, and trend change features; performing state transition analysis on the user behavior state transition sequences based on the preset small model, and extracting state switching features; and jointly encoding the local fluctuation features, periodic change features, trend change features, and state switching features based on the preset small model to output a structured behavioral feature vector.
[0008] Optionally, the structured behavioral feature vector is input into a pre-defined large model, and the anomaly judgment conclusion and anomaly confidence level are output. This includes: constructing a large model inference context, wherein the inference context includes structured behavioral feature vector, user short-cycle raw detailed data, user behavior state transition sequence, and multi-source data; using the pre-defined large model to perform joint inference on the large model inference context, identifying the correlation, contradictions, and state change anomalies between features, and generating anomaly judgment conclusion and anomaly confidence level. The anomaly judgment conclusion includes anomaly type, anomaly cause, abnormal behavior stage, and anomaly confidence level.
[0009] Optionally, a pre-defined large model is used to perform joint inference on the large model's inference context to identify the correlation, contradictions, and abnormal state changes between features, generating anomaly judgment conclusions and anomaly confidence levels. This includes: using the pre-defined large model to perform joint context fusion on the large model's inference context to obtain joint context fusion results; based on the joint context fusion results, performing anomaly identification operations to generate anomaly judgment conclusions and anomaly confidence levels, wherein the anomaly identification operations are as follows: analyzing the consistency between structured behavioral feature vectors and users' short-period original detailed data, identifying numerical or logical contradictions between features and detailed data; based on user behavior state transition sequences, analyzing the evolutionary relationship of user behavior at different time scales, identifying state transition anomalies or disruption of periodic patterns; and based on multi-source data, performing cross-time scale consistency verification and anomaly causal attribution on abnormal behavior.
[0010] Optionally, if the anomaly confidence level is lower than a preset threshold, a feature enhancement instruction is generated based on a preset large model; features are re-extracted according to the feature enhancement instruction based on a preset small model to generate an updated structured behavior feature vector; the updated structured behavior feature vector is then input into the preset large model again for joint reasoning to obtain a new anomaly judgment conclusion and a new anomaly confidence level.
[0011] According to another aspect of the present invention, an electricity consumption anomaly identification device is also provided, comprising: an acquisition module for acquiring user electricity consumption data; a first construction module for constructing a multi-timescale behavior sequence based on the user electricity consumption data; a second construction module for mapping continuous load behavior to discrete behavior states and concatenating the discrete behavior states in a preset time order to construct a user behavior state transition sequence; a generation module for inputting the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model, extracting behavior features, and generating a structured behavior feature vector; an output module for inputting the structured behavior feature vector into a preset large model and outputting anomaly judgment conclusion and anomaly confidence level; and a determination module for determining the electricity consumption anomaly identification result based on the anomaly judgment conclusion when the anomaly confidence level is not lower than a preset threshold.
[0012] According to another aspect of the present invention, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored program, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute any of the above-described power consumption anomaly identification methods.
[0013] According to another aspect of the present invention, a computer device is also provided, the computer device including a processor, the processor being configured to run a program, wherein the program executes any of the above-described methods for identifying abnormal power consumption.
[0014] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements any of the above-described methods for identifying abnormal power consumption.
[0015] In this embodiment of the invention, an electricity anomaly identification method is adopted. This method involves acquiring user electricity consumption data; constructing a multi-timescale behavior sequence based on the data; mapping continuous load behavior to discrete behavior states; and concatenating these discrete behavior states in a preset time sequence to construct a user behavior state transition sequence; inputting the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model to extract behavioral features and generate a structured behavioral feature vector; inputting the structured behavioral feature vector into a preset large model to output anomaly judgment conclusions and anomaly confidence levels; and determining the electricity anomaly identification result based on the anomaly judgment conclusions when the anomaly confidence level is not lower than a preset threshold. This achieves the goal of determining the electricity anomaly identification result only when the anomaly confidence level is not lower than the preset threshold, ensuring the reliability of the identification result. This improves the accuracy and reliability of electricity anomaly identification, thereby solving the current technical problems of low identification rate, difficulty in adapting to rapidly changing electricity consumption behavior, and lack of interpretability. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a computer terminal for implementing an electricity anomaly identification method is shown.
[0018] Figure 2 This is a flowchart illustrating the electricity anomaly identification method provided according to an embodiment of the present invention;
[0019] Figure 3 This is a structural block diagram of an electricity anomaly identification device provided according to an embodiment of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] According to an embodiment of the present invention, a method embodiment for identifying abnormal electricity consumption is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0023] The method embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing an electricity anomaly identification method is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0024] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0025] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the power consumption anomaly identification method in this embodiment of the invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the power consumption anomaly identification method of the aforementioned application. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0026] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.
[0027] Figure 2 This is a flowchart illustrating the electricity anomaly identification method provided according to an embodiment of the present invention, as shown below. Figure 2 As shown, the method includes the following steps:
[0028] Step S202: Obtain user electricity consumption data.
[0029] User electricity consumption data refers to a sequence of electricity consumption behaviors determined according to a preset data collection strategy, centered on the user's corresponding user ID or electricity address. For example, it could be a sequence of daily electricity consumption data for the past 30 days, or a high-frequency load sampling data sequence extending 24 hours backward from the target user's current time window. This data can include load data, daily electricity consumption data, timestamp data, user profile information, and industry category information.
[0030] Step S204: Construct a multi-timescale behavior sequence based on user electricity consumption data.
[0031] Among them, multi-timescale behavior sequences refer to structured data sets that are organized in layers according to preset time windows based on the electricity consumption behavior of target users. For example, they can be hourly, daily, weekly, and monthly behavior sequences that respectively represent short-term fluctuations, daily patterns, periodic changes, and long-term evolution.
[0032] In this step, electricity consumption characteristics at different time granularities are extracted to construct multi-timescale behavioral sequences including hourly, daily, weekly, and monthly levels. The raw electricity consumption data can be hierarchically organized according to preset time windows to construct multi-timescale behavioral sequences including hourly, daily, weekly, and monthly levels, respectively representing the user's short-term fluctuation characteristics, daily electricity consumption patterns, periodic change characteristics, and long-term evolution trends. Through this step, the system achieves a multi-dimensional structured expression of the user's continuous electricity consumption behavior, facilitating the subsequent abstraction and mapping of continuously changing load behavior into discrete behavioral states and the construction of user behavior state transition sequences.
[0033] Step S206: Map continuous load behavior to discrete behavior states, and concatenate the discrete behavior states in a preset time order to construct a user behavior state transition sequence.
[0034] The user behavior state transition sequence refers to the state label sequence formed by abstracting and mapping continuously changing user load behavior into several discrete behavior states and then connecting them in chronological order. The discrete behavior states include at least one of the following: normal fluctuation state, low load stable state, periodic disturbance state, peak drift state, abnormal growth state, and holiday abnormal state.
[0035] In this step, based on the constructed multi-timescale behavior sequence and combined with a pre-defined unified behavior state space, the user's overall electricity consumption behavior pattern within a specific time interval is mapped to corresponding discrete behavior state labels. Then, the state labels corresponding to each time slice are concatenated according to chronological order to construct a user behavior state transition sequence. Through this step, the system achieves a structured representation of the dynamic evolution of user electricity consumption behavior, facilitating the characterization of the phased changes in abnormal behavior from its inception and accumulation to its manifestation, and providing a unified behavioral representation basis for subsequent deep feature extraction by smaller models.
[0036] Based on the changing patterns of user electricity consumption behavior at different time scales, a unified behavioral state space is defined. Continuously changing load behavior is abstracted and mapped into several discrete behavioral states, including normal fluctuation states, low-load stable states, periodic disturbance states, peak drift states, abnormal growth states, and holiday abnormal states. Each state describes the overall behavioral pattern of a user within a specific time interval. After completing the behavioral state labeling, the system concatenates the state labels corresponding to each time slice in chronological order to construct a user behavioral state transition sequence. This sequence depicts the dynamic evolution of user behavior from one state to another and reflects the stage-wise changes of abnormal behavior from its inception and accumulation to its manifestation. Through this multi-time-scale behavioral state modeling process, a structured expression of continuous user electricity consumption behavior is achieved, transforming raw numerical load data into a state sequence with temporal evolution semantics. This provides a unified behavioral representation basis for subsequent deep feature extraction in small models and contextual reasoning in large models.
[0037] Step S208: Input the multi-timescale behavior sequence and user behavior state transition sequence into the preset small model, extract the behavior features, and generate a structured behavior feature vector.
[0038] In this step, based on the constructed multi-timescale behavior sequences and user behavior state transition sequences, a small model is used to extract data features from different periods. A small model specializing in time series analysis can be used for in-depth feature extraction, including hourly load data, daily load curves, daily electricity consumption data, and long-term historical behavior data. Combined with the user behavior state transition process, the changing patterns of user behavior at different time stages are uniformly encoded in time series. The small model uses a multi-layer time series feature learning structure to jointly extract local fluctuation features, periodic change features, trend change features, and state switching features in user behavior, and connects a structured feature output layer at the end of the model. These features include, but are not limited to: the number of peaks in the daily load curve, peak occurrence time, curve smoothness, periodic correlation, load fluctuation intensity, state transition frequency, behavior duration, and long-short cycle correlation features. Simultaneously, combined with long-term historical data, further extraction of user behavior features includes: trend features, seasonal features, and periodic evolution features.
[0039] Step S210: Input the structured behavioral feature vector into the preset large model and output the anomaly judgment conclusion and anomaly confidence level.
[0040] In this step, a large model is used to analyze abnormal users. The system inputs the standardized, multi-dimensional feature vectors extracted from the small model, along with the user's short-term raw detailed data (such as the accurate load curve of the most recent week) and other multi-source data (such as user profiles, industry types, etc.) into the large model. All input information is deeply integrated and inferred. Based on the abstract features provided by the small model, the large model performs contextual analysis in combination with specific detailed data to determine the correlation and contradictions between features, and finally generates a comprehensive judgment conclusion on the user's electricity consumption behavior.
[0041] A large-scale model is used for anomaly user assessment. Standardized, multi-dimensional structured behavioral feature vectors extracted from the small model, along with short-term raw detailed user data (such as precise load curves for the most recent week), user behavior state transition sequences, and other multi-source data (such as user profiles, industry types, and historical behavior records), are input into the large model. This allows for joint contextual fusion and inference of the multi-source heterogeneous data. Based on the behavioral feature representations provided by the small model, and combined with the user behavior state evolution process and raw load detailed data, the large model analyzes the correlations of user behavior at different time scales and identifies abnormal correlations, behavioral conflicts, and abnormal state changes among behavioral features. Furthermore, the large model combines user industry attributes, historical behavioral patterns, and cyclical change characteristics to conduct cross-timescale consistency analysis and anomaly causal analysis of user behavior, thereby generating comprehensive anomaly assessment conclusions for user electricity consumption behavior, including anomaly type, cause of anomaly, stage of abnormal behavior, and anomaly confidence level.
[0042] Step S212: If the anomaly confidence level is not lower than the preset threshold, determine the electricity anomaly identification result based on the anomaly judgment conclusion.
[0043] In this step, when the anomaly confidence level is not lower than a preset threshold, the anomaly assessment conclusion is directly adopted as the final power consumption anomaly identification result. Through this step, the system directly outputs an interpretable assessment result containing the cause and stage of the anomaly while ensuring high confidence, improving the timeliness of anomaly identification and avoiding additional computational resource consumption due to insufficient confidence.
[0044] The above steps achieve the goal of determining the electricity anomaly identification result only when the anomaly confidence level is not lower than the preset threshold, thus ensuring the reliability of the identification result. This achieves the technical effect of improving the accuracy and credibility of electricity anomaly identification, thereby solving the current technical problems of low electricity anomaly identification rate, difficulty in adapting to rapidly changing electricity consumption behavior, and lack of interpretability.
[0045] As an optional implementation, a multi-timescale behavior sequence is constructed based on user electricity consumption data, including: dividing user electricity consumption data into multiple time scales according to a preset time window, wherein the multiple time scales include hourly, daily, weekly, and monthly levels; for the hourly time scale, extracting user short-term load fluctuation data to construct an hourly behavior sequence, wherein the hourly behavior sequence represents the user's short-term fluctuation characteristics; for the daily time scale, extracting user daily load curves and daily electricity consumption data to construct a daily behavior sequence, wherein the daily behavior sequence represents the user's daily electricity consumption patterns; for the weekly time scale, extracting user weekly load periodic change data to construct a weekly behavior sequence, wherein the weekly behavior sequence represents the user's periodic change characteristics; for the monthly time scale, extracting user long-term load evolution trend data to construct a monthly behavior sequence, wherein the monthly behavior sequence represents the user's long-term evolution trend; and determining the multi-timescale behavior sequence based on the hourly, daily, weekly, and monthly behavior sequences.
[0046] Optionally, layered processing is performed based on a preset time window strategy: First, for the hourly time scale, high-frequency load sampling data of the target user within a specified time period is extracted to construct an hourly behavior sequence, preserving the detailed characteristics of short-term load fluctuations. Second, for the daily time scale, the hourly data is aggregated into daily load curves and daily electricity consumption, constructing a daily behavior sequence to extract the regular characteristics of users' daily electricity consumption. Third, for the weekly time scale, the daily behavior sequence is further aggregated or periodic statistical features are extracted to construct a weekly behavior sequence, identifying the periodic fluctuation patterns of user behavior. Finally, for the monthly time scale, the weekly data is trend-fitted or statistically summarized to construct a monthly behavior sequence, capturing the evolutionary trend of users' long-term electricity consumption behavior. Finally, the behavior sequences at these four levels are integrated to form a multi-time-scale behavior sequence. Through this step, the system achieves a full-scale structured expression of users' continuous electricity consumption behavior, from micro-level instantaneous fluctuations to macro-level long-term trends, effectively preserving key behavioral characteristics at different time scales, and providing multi-dimensional data support for subsequently mapping continuous numerical data into discrete behavioral states.
[0047] As an optional embodiment, multi-timescale behavior sequences and user behavior state transition sequences are input into a preset small model to extract behavioral features and generate a structured behavioral feature vector. The preset small model is a temporal convolutional network small model, comprising: inputting multi-timescale behavior sequences and user behavior state transition sequences into the preset small model; performing temporal encoding on the multi-timescale behavior sequences based on the multi-layer temporal encoding structure in the preset small model, and extracting local fluctuation features, periodic change features, and trend change features; performing state transition analysis on the user behavior state transition sequences based on the preset small model, and extracting state switching features; and jointly encoding the local fluctuation features, periodic change features, trend change features, and state switching features based on the preset small model to output a structured behavioral feature vector.
[0048] Optionally, based on the multi-timescale behavior sequences and user behavior state transition sequences constructed above, the system's temporal convolutional network (TCN) mini-model uses a multi-layer temporal coding structure to uniformly model user behavior. The mini-model focuses on extracting data features such as local fluctuations, periodic changes, and trend changes. Subsequently, the system sets a structured feature output layer at the end of the model to convert the extracted results into abnormal behavior features, completing the automatic mapping between data features and abnormal behavior.
[0049] Multi-timescale behavior sequences and user behavior state transition sequences are input into a pre-defined temporal convolutional network (TCN) mini-model. First, based on the multi-layer temporal coding structure in the TCN mini-model, the multi-timescale behavior sequences are uniformly temporally encoded to extract local fluctuation features representing short-term load fluctuations, periodic change features representing periodic patterns, and trend change features representing long-term evolution. Second, the TCN mini-model is used to perform state transition analysis on the user behavior state transition sequences, extracting state switching features reflecting behavioral pattern jumps. Finally, the aforementioned local fluctuation features, periodic change features, trend change features, and state switching features are jointly encoded and fused at the end of the mini-model to output a high-dimensional structured behavior feature vector. This process achieves automated mapping from raw time-series data to abstract behavioral features. Leveraging the mini-model's expertise in time-series analysis, key dynamic features in user electricity consumption behavior are efficiently extracted, providing structured, low-noise feature input for subsequent contextual inference in the larger model.
[0050] As an optional embodiment, the structured behavioral feature vector is input into a preset large model, and the anomaly judgment conclusion and anomaly confidence level are output. This includes: constructing a large model inference context, wherein the inference context includes structured behavioral feature vector, user short-cycle raw detailed data, user behavior state transition sequence, and multi-source data; using the preset large model to perform joint inference on the large model inference context, identifying the correlation, contradictions, and state change anomalies between features, and generating anomaly judgment conclusion and anomaly confidence level. The anomaly judgment conclusion includes anomaly type, anomaly cause, anomaly behavior stage, and anomaly confidence level.
[0051] Optionally, the hierarchical input data is organized into a unified context input, and a large-scale model inference context is constructed through a preset prompt template. The prompt template includes: descriptions of user behavior characteristics, descriptions of behavioral state transition processes, original load changes, industry background information, and anomaly analysis task requirements. Simultaneously, the prompt template explicitly instructs the large-scale model to perform analyses such as behavioral characteristic consistency, abnormal behavior correlation, behavioral conflict detection, and cross-timescale behavioral inference. Finally, the large-scale model performs joint inference on the correlations of user behavior at different time scales, identifies behavioral anomalies, abnormal state changes, and behavioral conflict characteristics, and ultimately generates a comprehensive judgment result for abnormal users, including anomaly category, cause of anomaly, stage of abnormal behavior, anomaly confidence level, and anomaly time period.
[0052] Specifically, the system first constructs a large-scale model inference context. This involves organizing the structured behavioral feature vectors output by the small model, the precise load curves from the most recent week (and other short-term raw detailed user data), user behavior state transition sequences representing behavioral evolution, and multi-source data such as user profiles and industry types, into a unified context input according to a preset prompt template. Then, the system uses the preset large model to perform joint context fusion and inference on the large-scale model's inference context, focusing on analyzing the correlations between behavioral features, identifying contradictions between numerical and logical levels, and detecting abnormal trends in state changes. Finally, the large model combines user industry attributes and historical behavioral patterns to conduct cross-timescale consistency analysis and anomaly causal judgment, generating anomaly judgment conclusions and anomaly confidence levels. Through this step, the system leverages the powerful semantic understanding and logical reasoning capabilities of the large model to achieve in-depth interpretation and comprehensive judgment of complex electricity consumption behaviors. It not only outputs anomaly judgment results but also provides detailed explanations of the causes and behavioral stages of anomalies, significantly improving the interpretability and accuracy of the identification.
[0053] As an optional implementation, a pre-set large model is used to perform joint inference on the large model's inference context to identify the correlation, contradictions, and abnormal state changes between features, generating anomaly judgment conclusions and anomaly confidence levels. This includes: using the pre-set large model to perform joint context fusion on the large model's inference context to obtain joint context fusion results; based on the joint context fusion results, performing anomaly identification operations to generate anomaly judgment conclusions and anomaly confidence levels, wherein the anomaly identification operations are as follows: analyzing the consistency between structured behavioral feature vectors and user short-period original detailed data, identifying numerical or logical contradictions between features and detailed data; based on user behavior state transition sequences, analyzing the evolution relationship of user behavior at different time scales, identifying state transition anomalies or disruption of periodic patterns; and based on multi-source data, performing cross-time scale consistency verification and anomaly causal attribution on abnormal behavior.
[0054] Among them, the anomaly identification operation refers to the process by which the large model, based on the joint context fusion results, conducts in-depth analysis of electricity consumption behavior through multi-dimensional analysis methods such as consistency verification, evolutionary relationship analysis, and causal attribution; the anomaly judgment conclusion refers to the comprehensive judgment information that includes the anomaly type, the cause of the anomaly, the stage of the anomaly behavior, and the anomaly confidence level.
[0055] In this step, the system utilizes a pre-defined large model to perform joint context fusion on the large model's inference context, mapping heterogeneous information such as structured behavioral feature vectors, raw detailed data, and state sequences to a unified high-dimensional semantic space, obtaining the joint context fusion result. Subsequently, based on this fusion result, anomaly identification is performed: First, the consistency between structured behavioral feature vectors (such as extracted peak values and smoothness abstract features) and user short-cycle raw detailed data (such as precise load curves) is analyzed to identify contradictions in numerical mapping or logical relationships. Second, based on user behavior state transition sequences, the dynamic evolution path of user behavior from normal to abnormal states is tracked, analyzing evolutionary relationships at different time scales to identify unexpected state transitions or disruptions to existing periodic patterns. Finally, combining multi-source data (such as industry type and historical archives), the detected abnormal behavior undergoes cross-time scale consistency verification, and the root cause of the anomaly is traced. Ultimately, the large model generates anomaly judgment conclusions and anomaly confidence levels based on the above analysis results. Through this step, the system has transformed from single feature matching to multi-dimensional logical reasoning, enabling it to accurately locate the causal relationships and behavioral evolution stages behind complex anomalies, and significantly improving the robustness and interpretability of anomaly identification.
[0056] As an optional implementation, when the anomaly confidence level is lower than a preset threshold, a feature enhancement instruction is generated based on a preset large model; features are re-extracted according to the feature enhancement instruction based on a preset small model to generate an updated structured behavior feature vector; the updated structured behavior feature vector is then input into the preset large model again for joint reasoning to obtain a new anomaly judgment conclusion and a new anomaly confidence level.
[0057] Optionally, when the anomaly assessment confidence level output by the large model is lower than a preset threshold, or when a strong conflict is detected between behavioral features, the system triggers a dynamic feature backtracking and collaborative adjustment mechanism. Based on the current anomaly inference result, the large model automatically generates feature enhancement instructions and feeds them back to the small model, guiding it to re-model local behavior and extract features. Upon receiving the feature enhancement instructions, the small model re-models the original load data, multi-timescale behavior sequences, and behavior state transition sequences within the corresponding time interval, and re-extracts the corresponding behavioral features to generate an updated structured behavioral feature vector.
[0058] The system then inputs the updated behavioral features back into the large model for joint reasoning, enabling the large model to reanalyze abnormal relationships, state change trends, and behavioral conflict features in user behavior based on the enhanced local behavioral information, thereby improving the recognition accuracy and ability to explain abnormal behavior in complex abnormal scenarios.
[0059] Specifically, when the anomaly assessment confidence level output by the large model falls below a preset threshold, or when strong conflicts are detected between behavioral features, the system triggers a dynamic feature backtracking and collaborative adjustment mechanism. The system reads the abnormal behavior stage, anomaly confidence level, and abnormal time segment output by the large model, and, combined with the inference results, re-transmits them to the large model to generate structured feature extraction enhancement instructions to guide the small model in local fine-tuning. These enhancement instructions include structured parameters such as time window refinement, local resampling, high-frequency fluctuation enhancement, periodic structure reconstruction, and peak region enhancement. After the small model completes its fine-tuning, it regenerates the enhanced local behavioral features and re-inputs them into the large model for joint inference. This allows the large model to re-analyze abnormal relationships, state change trends, and behavioral conflict features based on the enhanced local behavioral information, thereby improving the recognition accuracy and interpretability of abnormal behaviors in complex anomaly scenarios.
[0060] Through the aforementioned dynamic feature backtracking and collaborative adjustment mechanism, the system forms a closed-loop collaborative analysis process of "large model anomaly reasoning - feature enhancement feedback - small model local remodeling - large model re-reasoning", realizing adaptive enhancement and progressive judgment of user abnormal behavior features, and improving the intelligent analysis capability and model robustness in complex abnormal power consumption scenarios.
[0061] This invention establishes a dynamic collaborative backtracking mechanism of "large model inference - feature enhancement feedback - small model local remodeling - re-inference". When the large model detects insufficient confidence in anomalies or conflicting behavioral features, it can automatically generate feature enhancement instructions to guide the small model to remodel and extract features from local time windows, periodic structures and abnormal fluctuation regions, thereby achieving adaptive enhancement of abnormal behavioral features. Through bidirectional collaboration and progressive inference between large and small models, the recognition accuracy, model robustness and dynamic adaptability in complex abnormal scenarios are improved.
[0062] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0063] Through the above description of the embodiments, those skilled in the art can clearly understand that the power consumption anomaly identification method according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0064] According to embodiments of the present invention, an electricity anomaly identification device for implementing the above-described electricity anomaly identification method is also provided. Figure 3 This is a structural block diagram of an electricity anomaly identification device provided according to an embodiment of the present invention, such as... Figure 3 As shown, the power consumption anomaly identification device includes: an acquisition module 302, a first construction module 304, a second construction module 306, a generation module 308, an output module 310, and a determination module 312. The power consumption anomaly identification device will be described below.
[0065] The acquisition module 302 is used to acquire user electricity consumption data.
[0066] The first construction module 304 is used to construct a multi-timescale behavior sequence based on user electricity consumption data.
[0067] The second construction module 306 is used to map continuous load behavior into discrete behavior states, and to connect the discrete behavior states in a preset time sequence to construct a user behavior state transition sequence.
[0068] The generation module 308 is used to input multi-timescale behavior sequences and user behavior state transition sequences into a preset small model, extract behavioral features, and generate structured behavioral feature vectors.
[0069] The output module 310 is used to input the structured behavioral feature vector into the preset large model and output the anomaly judgment conclusion and anomaly confidence.
[0070] The determination module 312 is used to determine the power consumption anomaly identification result based on the anomaly judgment conclusion, provided that the anomaly confidence level is not lower than a preset threshold.
[0071] It should be noted that the aforementioned acquisition module 302, first construction module 304, second construction module 306, generation module 308, output module 310, and determination module 312 correspond to steps S202 to S212 in the embodiments. Multiple modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should also be noted that the aforementioned modules, as part of the device, can run on the computer terminal 10 provided in the embodiments.
[0072] Embodiments of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one of a plurality of network devices in a computer network. The computer device includes a memory and a processor.
[0073] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the power consumption anomaly identification method and device in this embodiment of the invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned power consumption anomaly identification method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0074] The processor can access the information and application programs stored in the memory via the transmission device to execute any of the above-mentioned methods for identifying abnormal power consumption.
[0075] This invention provides a method for identifying abnormal electricity consumption. The method involves acquiring user electricity consumption data; constructing a multi-timescale behavior sequence based on this data; mapping continuous load behavior to discrete behavior states and concatenating these discrete behavior states in a preset time sequence to construct a user behavior state transition sequence; inputting the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model to extract behavior features and generate a structured behavior feature vector; inputting the structured behavior feature vector into a preset large model to output anomaly judgment conclusion and anomaly confidence level; and determining the electricity consumption anomaly identification result based on the anomaly judgment conclusion when the anomaly confidence level is not lower than a preset threshold. This achieves the goal of determining the electricity consumption anomaly identification result only when the anomaly confidence level is not lower than the preset threshold, ensuring the reliability of the identification result. This improves the accuracy and reliability of electricity consumption anomaly identification, thereby solving the current technical problems of low identification rate, difficulty in adapting to rapidly changing electricity consumption behavior, and lack of interpretability.
[0076] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a non-volatile storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0077] Embodiments of the present invention also provide a non-volatile storage medium. Optionally, in this embodiment, the aforementioned non-volatile storage medium can be used to store the program code executed by the power consumption anomaly identification method provided in the above embodiments.
[0078] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0079] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the steps of any of the above-described power consumption anomaly identification methods.
[0080] Embodiments of the present invention also provide a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can implement any of the above-mentioned methods for identifying abnormal electricity consumption.
[0081] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0082] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0084] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0085] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0087] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for identifying abnormal electricity usage, characterized in that, include: Obtain user electricity consumption data; Based on the user electricity consumption data, construct a multi-time-scale behavior sequence; Continuous load behavior is mapped to discrete behavior states, and the discrete behavior states are concatenated in a preset time order to construct a user behavior state transition sequence. The multi-timescale behavior sequence and the user behavior state transition sequence are input into a preset small model to extract behavior features and generate a structured behavior feature vector. The structured behavioral feature vector is input into a preset large model, and the anomaly judgment conclusion and anomaly confidence level are output. If the anomaly confidence level is not lower than a preset threshold, the anomaly identification result is determined based on the anomaly judgment conclusion.
2. The method according to claim 1, characterized in that, The construction of a multi-time-scale behavior sequence based on the user's electricity consumption data includes: According to the preset time window, the user electricity consumption data is divided into multiple time scales, including hourly, daily, weekly and monthly scales. For hourly time scales, short-term load fluctuation data of users are extracted to construct hourly behavior sequences, wherein the hourly behavior sequences characterize the short-term fluctuation features of users; For the daily time scale, the user's daily load curve and daily electricity consumption data are extracted to construct a daily behavior sequence, wherein the daily behavior sequence represents the user's daily electricity consumption pattern; For a weekly time scale, weekly load periodic change data of users are extracted to construct a weekly behavior sequence, wherein the weekly behavior sequence characterizes the periodic change characteristics of users. For a monthly time scale, long-term user load evolution trend data is extracted to construct a monthly behavior sequence, wherein the monthly behavior sequence represents the long-term user evolution trend; The multi-timescale behavior sequence is determined based on the hourly behavior sequence, the daily behavior sequence, the weekly behavior sequence, and the monthly behavior sequence.
3. The method according to claim 1, characterized in that, The process involves inputting the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model to extract behavioral features and generate a structured behavioral feature vector. The preset small model is a temporal convolutional network small model, comprising: The multi-timescale behavior sequence and the user behavior state transition sequence are input into the preset small model. Based on the multi-layer temporal coding structure in the preset small model, the multi-timescale behavior sequence is temporally coded, and local fluctuation features, periodic change features and trend change features are extracted. Based on the preset small model, state transition analysis is performed on the user behavior state transition sequence to extract state switching features; Based on the preset small model, the local fluctuation features, the periodic change features, the trend change features, and the state switching features are jointly encoded to output the structured behavior feature vector.
4. The method according to claim 1, characterized in that, The step of inputting the structured behavioral feature vector into a preset large model and outputting anomaly judgment conclusions and anomaly confidence levels includes: Construct a large model inference context, wherein the inference context includes the structured behavioral feature vector, user short-cycle raw detailed data, user behavior state transition sequence, and multi-source data; Using the preset large model, joint reasoning is performed on the reasoning context of the large model to identify the correlation, contradictions and abnormal state changes between features, and to generate the anomaly judgment conclusion and the anomaly confidence level. The anomaly judgment conclusion includes the anomaly type, the cause of the anomaly, the stage of the anomaly behavior and the anomaly confidence level.
5. The method according to claim 4, characterized in that, The step of using the preset large model to perform joint reasoning on the reasoning context of the large model, identifying the correlation, contradictions, and abnormal state changes between features, and generating the anomaly judgment conclusion and the anomaly confidence level includes: The inference context of the pre-defined large model is fused with joint context to obtain the joint context fusion result. Based on the joint context fusion result, an anomaly identification operation is performed to generate the anomaly judgment conclusion and the anomaly confidence level, wherein the anomaly identification operation is as follows: Analyze the consistency between the structured behavioral feature vector and the user's short-period raw detailed data, and identify numerical or logical contradictions between the features and the detailed data; Based on the user behavior state transition sequence, analyze the evolution relationship of user behavior at different time scales and identify abnormal state transitions or disruption of periodic patterns. Based on the multi-source data, consistency verification and causal attribution of abnormal behavior are performed across time scales.
6. The method according to claim 1, characterized in that, Also includes: If the anomaly confidence level is lower than a preset threshold, a feature enhancement instruction is generated based on the preset large model. Based on the preset small model, features are re-extracted according to the feature enhancement instructions to generate an updated structured behavior feature vector; The updated structured behavioral feature vector is then input into the preset large model for joint reasoning to obtain new anomaly judgment conclusions and new anomaly confidence levels.
7. A device for identifying abnormal electricity usage, characterized in that, include: The acquisition module is used to acquire user electricity consumption data; The first construction module is used to construct a multi-time-scale behavior sequence based on the user's electricity consumption data; The second construction module is used to map continuous load behavior into discrete behavior states, and to concatenate the discrete behavior states in a preset time order to construct a user behavior state transition sequence. The generation module is used to input the multi-timescale behavior sequence and the user behavior state transition sequence into a preset small model, extract behavior features, and generate a structured behavior feature vector. The output module is used to input the structured behavioral feature vector into a preset large model and output the anomaly judgment conclusion and anomaly confidence level. The determination module is used to determine the electricity anomaly identification result based on the anomaly judgment conclusion when the anomaly confidence level is not lower than a preset threshold.
8. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the non-volatile storage medium to perform the power consumption anomaly identification method according to any one of claims 1 to 6.
9. A computer device, characterized in that, include: Memory and processor The memory stores computer programs; The processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, the processor performs the power consumption anomaly identification method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the power consumption anomaly identification method according to any one of claims 1 to 6.