A user electricity abnormality detection method, system, device and medium based on a smart meter terminal

By collecting multi-dimensional data through smart meter terminals and combining it with encryption strategies and multi-dimensional comparison analysis of the central processing unit and cloud server, the problem of insufficient security and accuracy in existing power consumption anomaly detection is solved, and efficient and reliable power consumption anomaly detection is achieved.

CN121077083BActive Publication Date: 2026-02-13NANJING NENGRUI AUTOMATION EQUIP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511619312.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-13
Estimated Expiration
2045-11-06

AI Technical Summary

Technical Problem

Existing power anomaly detection technologies suffer from imbalances in data transmission and processing security and efficiency, limited data analysis dimensions, and inadequate anomaly judgment mechanisms, resulting in detection accuracy and efficiency that fail to meet practical needs.

Method used

By collecting user electricity consumption, environmental and scenario data through smart meter terminals, and combining the data with a central processing unit and cloud server for differentiated encryption strategy processing and multi-dimensional data analysis, a user electricity consumption profile is generated, and abnormal electricity consumption is identified by comparing with multiple reference objects.

Benefits of technology

It achieves a balance between data transmission security and efficiency, improves the accuracy and reliability of power anomaly detection, reduces false alarms and missed alarms, and provides reliable early warning basis for anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121077083B_ABST
    Figure CN121077083B_ABST
Patent Text Reader

Abstract

The application provides a user electricity abnormality detection method, system, device and medium based on a smart meter terminal, which is applied to a user electricity abnormality detection system. The system comprises a plurality of smart meter terminals, a central processor and a plurality of cloud servers. The method comprises the following steps: the smart meter terminal collects user electricity, environment and scene data, and integrates the data into an electricity data set and sends the data set to the central processor. The central processor determines an encryption strategy and a target server according to data attributes, and transmits the data to the target server after encryption. The target server decrypts and screens the data to form a target data set, extracts features to generate a user electricity portrait, and then screens and compares the electricity portrait, so as to determine whether the target user has an electricity abnormality. The above scheme can improve the accuracy, safety and efficiency of electricity abnormality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart meters, and more specifically, to a method, system, device, and medium for detecting abnormal electricity consumption by users based on a smart meter terminal. Background Technology

[0002] With the continuous improvement of the intelligence level of smart grids, the collection and analysis of electricity consumption data has become a core part of power grid operation and maintenance management. Electricity consumption anomaly detection, as a key technology for ensuring the safe and stable operation of the power grid, preventing electricity consumption risks, and improving the quality of power supply services, is becoming increasingly important. Currently, power grid operators urgently need high-precision and high-efficiency electricity consumption anomaly detection solutions to address the challenges brought about by the diversification of user electricity consumption behaviors and the massive increase in electricity consumption data, and to meet the actual needs for electricity theft identification, equipment fault early warning, and electricity load regulation.

[0003] Currently, electricity anomaly detection mainly involves collecting user electricity consumption data and analyzing it using preset rules or simple algorithms. Existing technologies generally collect user electricity-related data through terminal devices, transmit the data to a backend processing system, extract data features using methods such as threshold judgment and trend analysis, and then compare it with historical or standard data to achieve the identification and early warning of electricity anomalies.

[0004] Existing technologies have significant shortcomings: First, there is an imbalance between the security and efficiency of data transmission and processing. Differentiated processing strategies are not developed for the different attributes of different types of data, resulting in inadequate data security or redundant processing procedures, which affects the overall detection efficiency. Second, the analysis of user electricity consumption behavior is limited to a single dimension, relying solely on the electricity consumption data itself and ignoring the impact of environmental factors and scene changes on electricity consumption behavior, making it difficult to comprehensively depict users' real electricity consumption habits. Third, the anomaly judgment mechanism is not perfect, lacking comprehensive comparative analysis of multiple dimensions and reference objects. Anomaly detection is achieved solely through simple data comparison, which is prone to misjudgment and missed judgment, and the detection accuracy is insufficient to meet the needs of practical applications. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method, system, device and medium for detecting abnormal electricity consumption by users based on a smart meter terminal, which can improve the accuracy, safety and efficiency of electricity consumption anomaly detection.

[0006] In a first aspect, embodiments of this application provide a method for detecting abnormal electricity consumption by users based on smart meter terminals, applied to a user electricity consumption anomaly detection system. The system includes several smart meter terminals, a central processing unit, and several cloud servers. The method includes:

[0007] Each smart meter terminal collects power consumption data, environmental data and scene data of a corresponding user, integrates to form a power consumption data set of the user, and sends the power consumption data set to the central processor;

[0008] The central processor determines a corresponding data encryption strategy and a target server according to the attributes of each type of data in the power consumption data set, encrypts the power consumption data set using the data encryption strategy to obtain an encrypted data set, and transmits the encrypted data set to the target server;

[0009] The target server decrypts the received encrypted data set, filters part of the data from the decrypted data set according to the server parameters to form a target data set, extracts data features from the target data set, and generates a user power consumption portrait of a corresponding target user based on the data features;

[0010] The target server filters reference power consumption portraits of a plurality of reference users from the user power consumption portraits of all target users according to the user power consumption portrait of the target user, compares each reference power consumption portrait with the user power consumption portrait of the target user, and determines whether the target user has abnormal power consumption according to the comparison result.

[0011] In a second aspect, the embodiments of the present application provide a user power consumption anomaly detection system of a meter terminal, which includes a plurality of smart meter terminals, a central processor and a plurality of cloud servers;

[0012] Each smart meter terminal is configured to collect power consumption data, environmental data and scene data of a corresponding user, integrate to form a power consumption data set of the user, and send the power consumption data set to the central processor;

[0013] The central processor is configured to determine a corresponding data encryption strategy and a target server according to the attributes of each type of data in the power consumption data set, encrypt the power consumption data set using the data encryption strategy to obtain an encrypted data set, and transmit the encrypted data set to the target server;

[0014] The target server is configured to decrypt the received encrypted data set, filter part of the data from the decrypted data set according to the server parameters to form a target data set, extract data features from the target data set, and generate a user power consumption portrait of a corresponding target user based on the data features;

[0015] The target server is configured to filter reference power consumption portraits of a plurality of reference users from the user power consumption portraits of all target users according to the user power consumption portrait of the target user, compare each reference power consumption portrait with the user power consumption portrait of the target user, and determine whether the target user has abnormal power consumption according to the comparison result.

[0016] In a third aspect, the embodiments of the present application provide a computer device, comprising a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the computer device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the smart meter terminal-based user electricity abnormality detection method in any of the optional implementation manners of the first aspect.

[0017] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the smart meter terminal-based user electricity abnormality detection method in any of the optional implementation manners of the first aspect.

[0018] The technical solutions provided by the present application include but are not limited to the following beneficial effects:

[0019] Each smart meter terminal collects user electricity data, environment data and scene data and integrates to form an electricity data set sent to a central processor, which can comprehensively obtain multi-dimensional data related to user electricity, avoid information loss caused by single data type, and lay a data foundation for subsequent accurate analysis. At the same time, through data integration to form a structured data set, the complexity of subsequent data processing is reduced, the coherence of data transmission and processing is improved, and the integrity and effectiveness of data from collection to transmission are guaranteed.

[0020] The central processor determines the corresponding data encryption strategy and target server according to the attributes of each type of data in the electricity data set, realizes differentiated adaptation of data encryption, ensures the transmission security of sensitive data, avoids resource waste caused by excessive encryption of non-sensitive data, and balances data transmission security and processing efficiency. By dynamically selecting the target server, the server resources can be fully utilized, the single server overload can be avoided, the data processing delay can be reduced, and the running efficiency and stability of the entire system can be improved.

[0021] The target server decrypts the encrypted data set to form a target data set, extracts data features and generates a user electricity portrait, removes redundant information through data screening, focuses on core analysis data, and improves data processing efficiency. The user electricity portrait generated based on multi-dimensional data features can comprehensively and truly reflect the user electricity habit, overcome the limitation of constructing a portrait by a single data dimension, and provide accurate portrait support for subsequent abnormality judgment.

[0022] The target server screens the reference power consumption image and compares with the target user image to determine power consumption anomaly, through comprehensive comparison of multiple reference images, avoids judgment deviation caused by single reference object, and improves the accuracy of anomaly detection.

[0023] The steps of the present application synergistically work, through multi-dimensional data collection and integration to ensure the integrity of the data foundation, differentiated encryption and dynamic server scheduling to balance safety and efficiency, precise image construction and multiple reference comparison to improve anomaly detection accuracy, which can improve the accuracy, safety and efficiency of power consumption anomaly detection, effectively meet the core needs of smart grid for power consumption anomaly detection.

[0024] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, it should be understood that the following drawings only show some embodiments of the present application, therefore should not be regarded as a limitation on the scope, for those skilled in the art, without creative labor, other related drawings can also be obtained from these drawings.

[0026] Figure 1 A flow chart of a user power consumption anomaly detection method based on a smart meter terminal provided by the embodiment one of the present application is shown;

[0027] Figure 2 A flow chart of a power consumption data set generation method provided by the embodiment one of the present application is shown;

[0028] Figure 3 A flow chart of a data encryption strategy and target server determination method provided by the embodiment one of the present application is shown;

[0029] Figure 4 A flow chart of a target data set determination method provided by the embodiment one of the present application is shown;

[0030] Figure 5 A flow chart of a user power consumption image determination method provided by the embodiment one of the present application is shown;

[0031] Figure 6 A flow chart of a reference power consumption image method provided by the embodiment one of the present application is shown;

[0032] Figure 7A flow chart of a user electricity abnormality determination method provided by the embodiment one of the present application is shown;

[0033] Figure 8 A structure schematic diagram of a user electricity abnormality detection system of a meter terminal provided by the embodiment two of the present application is shown;

[0034] Figure 9 A structure schematic diagram of a computer device provided by the embodiment three of the present application is shown. DETAILED DESCRIPTION

[0035] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0036] Embodiment one

[0037] In order to facilitate the understanding of the present application, the following will be combined with the drawings to describe the embodiments of the present application. Figure 1 The content described by a flow chart of a user electricity abnormality detection method based on a smart meter terminal provided by the embodiment one of the present application is used to specifically explain the embodiment one of the present application.

[0038] Referring to Figure 1 shown, Figure 1 A flow chart of a user electricity abnormality detection method based on a smart meter terminal provided by the embodiment one of the present application is shown, which is applied to a user electricity abnormality detection system, the system includes a plurality of smart meter terminals, a central processor and a plurality of cloud servers, and the method includes steps S101-S104:

[0039] S101: Each smart meter terminal collects electricity data, environment data and scene data of a corresponding user, integrates to form an electricity data set of the user, and sends the electricity data set to the central processor.

[0040] Specifically, each smart meter terminal synchronously collects the power consumption data (including real-time current, voltage, active power, reactive power, and other core power consumption parameters) of a single user, environmental data (including real-time temperature, humidity, and light intensity of the installation area of the meter, and other surrounding environmental parameters), and scene data (including the date type of the day, user activity state label, and other scene information) according to the system preset collection frequency (such as 15 minutes / second).

[0041] The three types of data are integrated into a structured power consumption dataset through data cleaning and format standardization algorithms. The dataset adopts a preset field naming rule and data storage format, and then the complete power consumption dataset is transmitted in real time to the central processor of the system through an encrypted communication link (such as TCP / IP protocol combined with an encrypted transmission channel), ensuring the security and integrity of data transmission.

[0042] S102: The central processor determines the corresponding data encryption strategy and target server according to the attributes of each type of data in the power consumption dataset, encrypts the power consumption dataset using the data encryption strategy to obtain an encrypted dataset, and transmits the encrypted dataset to the target server.

[0043] Specifically, the central processor first analyzes the attributes of the power consumption data, environmental data, and scene data in the power consumption dataset, determines the sensitivity level of each type of data (such as power consumption data containing user identity association information is high sensitivity level, and ordinary environmental data is low sensitivity level), and matches the appropriate encryption strategy according to the sensitivity level (high sensitivity data uses RSA asymmetric encryption algorithm, and low sensitivity data uses AES symmetric encryption algorithm).

[0044] At the same time, through the server scheduling algorithm built-in the system, the running state parameters (including load rate, remaining storage capacity, and communication delay) of each cloud server are obtained in real time, and the optimal processing server is calculated as the target server; then the selected encryption strategy is used to perform complete encryption operation on the power consumption dataset, generating an encrypted dataset with encryption identifier and check code, and finally the encrypted dataset is accurately sent to the target server through the directional transmission protocol, and the data integrity is checked in real time during the transmission process to ensure no loss or tampering.

[0045] S103: The target server decrypts the received encrypted dataset, filters part of the data from the decrypted dataset according to the server parameters to form a target dataset, extracts data features from the target dataset, and generates a user power consumption portrait of the corresponding target user based on the data features.

[0046] Specifically, after receiving the encrypted data set, the target server first restores the original power consumption data set by using a preset decryption key and a decryption algorithm (corresponding to the encryption strategy), and then verifies the data integrity by using a data check code. If there is data loss, a retransmission mechanism is triggered. Then, the target server extracts core data (such as power load fluctuation data, time period power consumption deviation data, and environment-related data) directly related to power consumption anomaly detection from the original data set by using a data screening algorithm, and eliminates redundant information (such as meter firmware version and communication protocol identifier) unrelated to detection, to form a simplified target data set.

[0047] Subsequently, the target server extracts key data features such as daily average power consumption load and peak period power consumption ratio from the target data set by using a feature extraction algorithm (such as a statistical-based feature extraction method or a machine learning feature engineering technique), quantizes and standardizes each feature, constructs a multi-dimensional feature vector, and generates a user power consumption portrait that can comprehensively reflect the user's power consumption habits and rules based on the feature vector. The portrait contains core information such as user unique identifier, feature vector matrix, and generation timestamp.

[0048] S104: The target server filters reference power consumption portraits of a number of reference users from all user power consumption portraits of the target users according to the user power consumption portrait of the target user, compares each reference power consumption portrait with the user power consumption portrait of the target user, and determines whether the target user has power consumption anomaly according to the comparison result.

[0049] Specifically, the target server takes the power consumption portrait of the current target user as a reference, calls all user power consumption portraits stored in the system portrait database, and filters a reference user group with high similarity to the target user portrait features by using a similarity matching algorithm (such as cosine similarity calculation or Euclidean distance analysis), and extracts the power consumption portraits of the group as reference power consumption portraits.

[0050] Subsequently, the target server compares the feature vectors of each reference power consumption portrait and the target user power consumption portrait by using a vector comparison algorithm, calculates the similarity values of each reference portrait and the target portrait, and obtains the average similarity value and distribution range through statistical analysis.

[0051] Finally, according to the system preset anomaly judgment rule (threshold range trained based on historical anomaly data), if the average similarity value is lower than a first preset threshold, it is determined that the target user has power consumption anomaly, and an alarm information containing the anomaly type, anomaly period, and anomaly features is generated; if the average similarity value is higher than a second preset threshold, it is determined that the power consumption is normal; and if the average similarity value is between the two thresholds, it is marked as a to-be-checked state, to ensure the accuracy and reliability of the judgment result.

[0052] In an alternative embodiment, referring to Figure 2 as shown, Figure 2 A flow chart of a power consumption data set generation method according to an embodiment of the present application is shown, wherein the integration forms the power consumption data set of the user, including steps S201-S203:

[0053] S201: Time series alignment of the power consumption data, the environmental data and the scenario data according to preset time interval timestamps.

[0054] Specifically, the system pre-sets a fixed time interval (such as 1 minute, 5 minutes, 15 minutes, etc. optional interval), and assigns a unique timestamp identifier to each collection time. The power consumption data, environmental data and scenario data collected by each smart meter terminal all carry the timestamp information.

[0055] The three types of data are precisely matched according to the timestamps by a time series alignment algorithm (such as a timestamp-based interpolation alignment method), ensuring that the power consumption parameters, environmental parameters and scenario information at the same time point are one-to-one corresponding, eliminating the data time series misalignment problem caused by collection delay or clock deviation, and providing time consistency guarantee for subsequent data integration and analysis.

[0056] S202: Interpolation method is used to complete the missing data, and the abnormal values exceeding the preset fluctuation range are marked and replaced by the statistical value of the adjacent valid values.

[0057] Specifically, for the missing data caused by communication interruption, equipment failure and other reasons in the data collection process, an appropriate interpolation method (such as linear interpolation method, polynomial interpolation method, mean interpolation method) is selected according to the data type to fill and complete, ensuring the integrity of the data set.

[0058] At the same time, the normal fluctuation range of each type of data (such as power consumption power fluctuation range, environmental temperature change range) is set based on historical data statistical analysis, and the abnormal data exceeding the fluctuation range is identified by an abnormal value detection algorithm (such as 3σ principle, box plot analysis). After marking the abnormal data, the statistical value (such as mean, median) of the adjacent multiple valid data is used for replacement, avoiding the interference of abnormal data on the subsequent analysis results.

[0059] S203: The processed data is uniformly converted into a preset structured format to generate the power consumption data set containing data type label, collection timestamp and numerical value.

[0060] Specifically, the three types of data after time alignment, missing data completion and exception handling are uniformly converted according to the system preset structured data format (such as JSON format, CSV format), an explicit data type label (such as "power consumption", "environmental temperature", "scene type") is added to each data record, a collection timestamp (accurate to the second level) and a specific value (with a preset number of decimal places) are added, and a data check code and a collection device identifier are added, so as to finally generate a standardized, complete and directly usable power consumption data set for subsequent processing, and ensure the readability and compatibility of the data.

[0061] In an optional embodiment, referring to Figure 3 , Figure 3 A flowchart of a data encryption strategy and target server determination method provided by an embodiment of the application is shown, wherein the determination of the corresponding data encryption strategy and target server according to the attributes of each type of data in the power consumption data set comprises steps S301-S303:

[0062] S301: If the data attribute is sensitive data, an asymmetric encryption algorithm is used as the data encryption strategy; if it is non-sensitive data, a symmetric encryption algorithm is used as the data encryption strategy.

[0063] Specifically, the sensitive attributes of each type of data in the power consumption data set are first determined by a data attribute analysis module, the sensitive data includes power consumption data associated with user identity information, real-time power consumption curve data and other information related to user privacy, and the non-sensitive data includes environmental data in public areas, identity-unrelated statistical data and the like.

[0064] For sensitive data, a higher security asymmetric encryption algorithm (such as RSA algorithm, with a key length of 2048 bits) is used to ensure data security through public key encryption and private key decryption; for non-sensitive data, a higher efficiency symmetric encryption algorithm (such as AES algorithm, with a key length of 128 bits) is used to encrypt and decrypt through a unified key, to improve data processing efficiency on the premise of ensuring basic security, and to achieve a balance between security and efficiency.

[0065] S302: Calculate the real-time load rate, remaining storage capacity and communication delay of each cloud server with the central processor.

[0066] Specifically, the running state parameters of each cloud server are collected in real time by a system monitoring module, the real-time load rate is calculated by the ratio of the number of tasks currently being processed to the maximum task processing capacity of the server (load rate = current task number / maximum task number x 100%), and the remaining storage capacity is calculated by subtracting the used storage space from the total storage space of the server (remaining storage capacity = total storage space - used storage space).

[0067] The communication latency with the central processing unit is calculated by continuously sending a preset number of test data packets (e.g., 5 times) and calculating the average response time from when the data packets are sent from the central processing unit to the server and when the server returns confirmation information, ensuring that the obtained server parameters truly reflect the current operating status.

[0068] S303: Select the server with a load rate lower than the preset load threshold, remaining storage capacity that meets the storage requirements of the electricity consumption dataset, and the minimum communication latency as the target server; if there are multiple servers that meet the conditions, select the target server according to the preset priority rules.

[0069] Specifically, the system presets an upper limit threshold for server load rate (e.g., 60%), first filtering out servers with load rates below this threshold; then it determines whether the remaining storage capacity of the filtered servers is greater than a preset multiple (e.g., 1.5 times) of the electricity consumption dataset volume, ensuring sufficient space to store the dataset and intermediate data generated during processing.

[0070] Then, the server with the lowest communication latency with the central processing unit is selected from the servers that meet the first two conditions as the target server; if multiple servers meet all the conditions at the same time, the final target server is determined according to the preset priority rules (such as giving priority to servers with larger storage capacity or servers with higher historical stability) to ensure the rationality and reliability of server selection.

[0071] In an optional implementation, see Figure 4 As shown, Figure 4 The flowchart illustrates a method for determining a target dataset according to Embodiment 1 of the present invention, wherein the step of filtering a portion of data from the decrypted dataset to form a target dataset based on its server parameters includes steps S401 to S403:

[0072] S401: The server parameters include data processing capability threshold, storage resource limit, and preset detection dimension.

[0073] Specifically, server parameters are pre-configured by the system based on the server's hardware configuration (such as the number of CPU cores, memory size, and hard disk capacity) and software settings (such as anomaly detection requirements). The data processing capacity threshold refers to the maximum amount of data that the server can stably process at one time (such as 500,000 data records). Exceeding this threshold will lead to a significant decrease in processing efficiency.

[0074] The storage resource limit refers to the maximum storage space allocated to the current task (e.g., 10GB) to avoid a single task consuming too many resources and affecting the operation of other tasks; the preset detection dimensions refer to the core analysis direction of power anomaly detection (e.g., abnormal load fluctuations, time-period power consumption deviations, environmental correlation anomalies, equipment failure correlation anomalies, etc.), clarifying the core basis for data selection.

[0075] S402: Filter out the data related to the power consumption anomaly detection dimension from the decrypted data, including power consumption data for different time periods, corresponding environmental data, and scene identifiers.

[0076] Specifically, from the decrypted original dataset, data content directly related to the preset detection dimensions is extracted through data filtering algorithms. The time-period electricity consumption data includes power consumption, electricity consumption, voltage fluctuations, and other data for different time periods each day (such as peak hours, off-peak hours, and flat periods). The corresponding environmental data includes ambient temperature, humidity, light intensity, and other data synchronized with the time-period electricity consumption data.

[0077] Scene identifiers include date type (weekday / weekend / public holiday) and user activity status (at home / outside / sleeping) tags to ensure that the selected data can fully support subsequent anomaly detection and analysis.

[0078] S403: Remove duplicate records, redundant data unrelated to the detection dimension, and data exceeding the data processing capability threshold to form the target dataset.

[0079] Specifically, firstly, duplicate records in the original data are identified and deleted using a data deduplication algorithm (the latest record is retained for duplicate data with the same timestamp and data type); then, redundant data that is irrelevant to the electricity anomaly detection dimension is removed (such as meter model, communication protocol version, server log information, etc., which do not affect the detection results).

[0080] Finally, determine whether the remaining data volume exceeds the server's data processing capacity threshold. If it does, retain the core data from the most recent period (such as data from the last 3 months) in chronological order to ensure that the data volume of the target dataset is within the server's processing capacity, while retaining key information to provide high-quality data support for subsequent feature extraction and profile generation.

[0081] In an optional implementation, see Figure 5 As shown, Figure 5 The flowchart illustrates a method for determining a user's electricity consumption profile according to Embodiment 1 of the present invention, wherein the step of extracting data features from the target dataset and generating a user's electricity consumption profile corresponding to the target user based on the data features includes steps S501 to S503:

[0082] S501: Extract the following data features from the target dataset:

[0083] Average daily electricity load: If the total daily electricity consumption is E and the duration of the day is T, then the average daily electricity load = E / T.

[0084] Specifically, the average daily electricity load is calculated by dividing the total electricity consumption E (unit: kWh) from 00:00 to 24:00 on a given day by the duration of the day T (24 hours), with the unit being kW. This feature reflects the average hourly electricity intensity of a user throughout the day and can intuitively reflect the overall scale of a user's electricity consumption. For example, the average daily electricity load of a household user is usually lower than that of an industrial user, and can be used as a basic feature to distinguish the type of electricity consumption of a user.

[0085] Peak-hour electricity consumption percentage: Total peak-hour electricity consumption is E h If the total daily electricity consumption is E, then the peak hour electricity consumption percentage = E h / E.

[0086] Specifically, firstly, based on the peak electricity consumption periods set by the regional power grid (such as 8:00-11:00, 18:00-21:00), the total electricity consumption E during these periods is calculated. h (Unit: kWh), divided by the total daily electricity consumption E (unit: kWh), yields the peak-hour electricity consumption percentage (in percentage form). This feature reflects the degree of concentration of electricity consumption during peak hours. For example, the peak-hour electricity consumption percentage of working families is usually higher than that of elderly families, which can reflect the distribution pattern of users' electricity consumption during peak hours.

[0087] Electricity fluctuation coefficient: The maximum daily electricity consumption is P. max The minimum daily power consumption is P min The average daily power consumption is P ave Then the electricity fluctuation coefficient = (P) max -P min ) / P ave。

[0088] Specifically, the maximum value P is determined by extracting power consumption data from all time points within the day. max (Unit: kW) and minimum value P min (Unit: kW) Calculate the average daily power consumption Pave (Pave = total daily power consumption E / daily duration T, unit: kW), and then calculate the power consumption fluctuation coefficient (dimensionless) using the formula. This coefficient is used to reflect the fluctuation range of the user's daily power consumption. The larger the coefficient, the worse the power consumption stability. For example, users with high-power equipment that frequently starts and stops usually have a higher power consumption fluctuation coefficient.

[0089] Environmental correlation: Let the power consumption sequence be {P1, P2, ..., P}n The corresponding environmental parameter sequence is {Q1, Q2, ..., Q}. n}, then the environmental correlation degree = COV(P,Q) / (σ) P ×σ Q ), where COV is the covariance, σ P Let σ be the standard deviation of power consumption. Q Let n be the standard deviation of the environmental parameters and n be the number of data collections.

[0090] Specifically, the power consumption sequence {{P1,P2,...,P} n} represents all power consumption data (unit: kW) for the day, arranged in chronological order of collection time, corresponding to the environmental parameter sequence {Q1, Q2, ..., Q...}. n} represents the environmental parameters (such as temperature, unit: ℃) collected synchronously, and n represents the total number of data collections for the day.

[0091] The covariance COV(P,Q) of the two sequences (reflecting the degree of linear correlation between the two sequences) is calculated and divided by the standard deviation of power consumption σ. P (Reflecting the dispersion of power consumption data) and the standard deviation of environmental parameters σ Q The product of (reflecting the dispersion of environmental parameter data) yields the environmental correlation degree (within the range of [-1,1]). This feature is used to reflect the linear correlation between power consumption and environmental parameters. For example, the correlation between user power consumption and ambient temperature in summer is usually positive and relatively high.

[0092] Scene-based electricity consumption patterns: Feature vectors generated based on electricity consumption curves for different scenarios;

[0093] Specifically, the user's electricity consumption scenarios are first divided (such as weekday scenarios, weekend scenarios, holiday scenarios, daytime scenarios, and nighttime scenarios). The power consumption time series of each scenario is extracted. The electricity consumption curve of each scenario is quantified by time series feature extraction algorithms (such as extracting features such as the mean, variance, peak value, valley value, and duration of the sequence). The features of each scenario are combined to form a multi-dimensional feature vector. This feature vector can distinguish the differences in the user's electricity consumption habits in different scenarios. For example, the user's electricity consumption curve is relatively stable at night on weekdays, while the electricity consumption curve fluctuates more during the day on weekends. This difference can be accurately characterized by the scenario-based electricity consumption pattern.

[0094] S502: Standardize the extracted data features to construct a multi-dimensional feature vector.

[0095] Specifically, data standardization algorithms (such as the Min-Max standardization algorithm) are used to uniformly map the extracted data features, such as average daily electricity load, peak-hour electricity consumption ratio, electricity fluctuation coefficient, environmental correlation, and scenario electricity consumption patterns, to the numerical range of [0,1], thereby eliminating the influence of differences in the dimensions and orders of magnitude of different features.

[0096] After standardization, all features are arranged in a preset order to construct a multi-dimensional feature vector (e.g., a 5-dimensional feature vector corresponding to 5 data features). This vector can comprehensively and quantitatively reflect the user's electricity consumption characteristics, providing core data support for the subsequent generation of user electricity consumption profiles.

[0097] S503: Generate the user's electricity consumption profile based on the feature vector, which includes the user's unique identifier, the feature vector, and the update timestamp, and store it in the profile database of the target server.

[0098] Specifically, the system uses standardized multi-dimensional feature vectors as the core, associates them with unique user identifiers (such as user ID and meter ID), records the update timestamps of the profile generation (accurate to the second level, reflecting the latest status of the profile), and can supplement the user's basic attribute information (such as user type and residential area) to build a complete user electricity consumption profile.

[0099] The generated user electricity consumption profiles are stored in a dedicated profile database on the target server according to a preset data structure. The database adopts a distributed storage architecture, which supports efficient query, comparison and update operations, and facilitates quick access to subsequent steps such as reference profile filtering and anomaly detection.

[0100] In an optional implementation, see Figure 6 As shown, Figure 6 The flowchart of a reference electricity consumption profile method provided in Embodiment 1 of the present invention is shown, wherein the step of selecting reference electricity consumption profiles of several reference users from the user electricity consumption profiles of all target users based on the user electricity consumption profile of the target user includes steps S601 to S604:

[0101] S601: Extract the user attributes, environmental data, and scene data of the target user.

[0102] Specifically, from the user electricity consumption image of the target user and the user information library pre-stored by the system, user attribute information (including user type, residence type, family population, whether to install new energy equipment, etc.), environment data (including the geographical location of the region where the user is located, climate zoning, average environment temperature and humidity, etc.), and scene data (including the user's daily electricity consumption scene label, workday / weekend electricity consumption rule, peak period electricity consumption habit, etc.) are extracted. These data will be used as the core basis for subsequent matching reference users, ensuring that the selected reference users have similar electricity consumption basic conditions to the target user.

[0103] S602: Calculate the attribute matching degree of other users and the target user: let the user attribute matching degree be M1, the environment data matching degree be M2, the scene data matching degree be M3, and the comprehensive matching degree M = a x M1 + b x M2 + g x M3, where a, b, and g are preset weight coefficients, and a + b + g = 1.

[0104] Specifically, the hierarchical matching algorithm is used to calculate the matching degree of other users and the target user in three dimensions: the user attribute matching degree M1 is calculated by comparing the user attribute information of the two, using the classification variable matching scoring method (such as 1 point for the same attribute and 0 point for different attributes, and the weighted sum is normalized to obtain M1, with a value range of [0, 1]); the environment data matching degree M2 is calculated by calculating the similarity of the environment data of the two (such as using Euclidean distance normalization, with a value range of [0, 1]).

[0105] The scene data matching degree M3 is calculated by comparing the scene labels and electricity consumption rules of the two, using the sequence similarity algorithm (such as dynamic time warping algorithm), with a value range of [0, 1]; according to the influence degree of each dimension on the electricity consumption characteristics, the weight coefficients a, b, and g are pre-set (such as a = 0.4, b = 0.3, and g = 0.3), satisfying a + b + g = 1, and the comprehensive matching degree M is calculated by the weighted sum formula (with a value range of [0, 1]), the larger the M value, the higher the similarity of the two.

[0106] S603: Select the user whose comprehensive matching degree is higher than the preset matching threshold as the reference user.

[0107] Specifically, the system pre-sets the minimum threshold of the comprehensive matching degree (such as 0.8) based on historical abnormal detection data and user image similarity analysis, which is verified by multiple experiments to ensure that the selected users have high electricity consumption characteristic similarity to the target user.

[0108] By traversing the comprehensive matching degree M of all other users in the system image database, the users whose M is higher than the preset threshold are selected to form a reference user candidate set, and these users have high matching in user attributes, environment data, and scene data with the target user, and their electricity consumption images can be used as effective reference for the target user.

[0109] S604: Select a preset number of user electricity consumption profiles from the reference users as the reference electricity consumption profiles.

[0110] Specifically, the system presets the number of reference power consumption profiles (e.g., 10) based on the accuracy requirements of anomaly detection. This number ensures the reliability of the comparison results (too few profiles may lead to excessive randomness) while controlling the computational load (too many profiles will increase the server's processing pressure).

[0111] From the reference user candidate set, sort them in descending order of comprehensive matching degree M, select the first preset number of users, and extract their user electricity consumption profiles as reference electricity consumption profiles; if the number of candidates is less than the preset number, select the electricity consumption profiles of all candidate users as references to ensure that the number of reference profiles meets the requirements of subsequent comparison.

[0112] In an optional implementation, see Figure 7 As shown, Figure 7 The flowchart of a method for determining abnormal electricity consumption provided in Embodiment 1 of the present invention is shown. The step of comparing each reference electricity consumption profile with the target user's electricity consumption profile, and determining whether the target user has abnormal electricity consumption based on the comparison result, includes steps S701-S705:

[0113] S701: Calculate the feature vector similarity between each of the reference electricity consumption profiles and the target user's electricity consumption profile, using the cosine similarity algorithm: Let the feature vector corresponding to the target user's electricity consumption profile be A=(a1,a2,...,a...). n The feature vector of the reference user is B=(b1,b2,...,b...). n If the similarity is S = (A•B) / (||A||×||B||), then A•B is the vector dot product, and ||A|| and ||B|| are the vector magnitudes.

[0114] Specifically, firstly, extract the multi-dimensional feature vector A=(a1,a2,...,a3) of the target user's electricity consumption profile. n ) and the feature vector B=(b1,b2,...,b) of the reference user electricity consumption profile n ), where n is the dimension of the feature vector (consistent with the number of data features); the similarity between the two is calculated using the cosine similarity algorithm, and the vector dot product A•B = a1×b1 + a2×b2 + ... + a n ×b n The magnitude of vector A is ||A|| = √(a1) 2 +a2 2 +...+a n 2), the length of vector B is ||B|| = V(b1 2 +b2 2 +...+b n 2 ), the value range of similarity S is [0, 1], S = 1 indicates that two vectors are completely consistent (the same electricity characteristics), S = 0 indicates that two vectors are completely irrelevant (the electricity characteristics are extremely different), and the similarity of the reference image and the target image can be accurately quantified by the algorithm.

[0115] S702: Obtain the average value of the similarity of all reference electricity images.

[0116] Specifically, the similarity values S1, S2,..., S m of all reference electricity images and the target user image are collected (m is the number of reference electricity images), and the average value S avg of the similarity is calculated by the arithmetic average method m =(S1+S2+...+S avg ) / m, and a preset decimal place (such as 4 digits) is reserved; the average value can reflect the overall similarity level of the target user and the reference user group, and avoid the influence of the abnormal value of a single reference image on the judgment result, for example, if the similarity of a reference image is low, but the others are high, the average value can still reflect the overall similarity.

[0117] S703: If the average value of the similarity is lower than a first preset threshold, it is determined that the electricity is abnormal, and an abnormal alarm information is generated.

[0118] Specifically, the system presets a first preset threshold (such as 0.6) by analyzing the similarity distribution of a large number of historical electricity abnormal cases and normal cases, and the threshold is the judgment critical point of the electricity abnormality; if the average value S avg of the similarity is lower than the threshold, it indicates that the electricity characteristics of the target user are significantly different from the reference user group (normal electricity characteristics), which is beyond the normal fluctuation range, and it is determined that the electricity is abnormal.

[0119] Then, an abnormal alarm information is automatically generated, the information contains the unique identification of the target user, the abnormal determination time, the average value of the similarity, the abnormal characteristics (such as which type of electricity characteristics is most different from the reference group), and other core contents, and is pushed to the system management platform to remind the management personnel to check in time.

[0120] S704: If it is higher than a second preset threshold, it is determined that the electricity is normal, and a normal state label of the user electricity image of the target user is updated.

[0121] Specifically, the system presets a second preset threshold (such as 0.85), which is higher than the first preset threshold, and is the judgment critical point of the normal electricity; if the average value S avgIf the value is higher than this threshold, it indicates that the target user's electricity consumption characteristics are highly consistent with the normal electricity consumption characteristics of the reference user group, with no abnormal deviation, and the user is judged to have normal electricity consumption.

[0122] Subsequently, the status label in the target user's electricity consumption profile is updated to "normal". At the same time, the time of this judgment and the average similarity are recorded as the basis for subsequent profile updates and historical data analysis, ensuring dynamic tracking of the user's electricity consumption status.

[0123] S705: If the value is between the first preset threshold and the second preset threshold, mark it as pending verification, trigger secondary data collection and re-comparison.

[0124] Specifically, if the average similarity S avg If the target user's electricity consumption characteristics fall between the first preset threshold (0.6) and the second preset threshold (0.85), it indicates that there is a certain difference between the target user's electricity consumption characteristics and the reference group, but it has not reached the level of a clear abnormality, and the status cannot be directly determined. The user is marked as "pending verification". At the same time, the system's secondary data collection mechanism is triggered to shorten the data collection interval (e.g., from 15 minutes / time to 5 minutes / time) and increase the collection duration (e.g., continuous collection for 24 hours). Based on the newly collected data, the target user's electricity consumption profile is regenerated and compared with the reference electricity consumption profile again.

[0125] If the result of the second comparison is higher than the second preset threshold, it is judged as normal; if it is lower than the first preset threshold, it is judged as abnormal; if it is still between the two thresholds, the collection time can be further extended or manual intervention can be used to verify the result to ensure the accuracy of the judgment.

[0126] Example 2

[0127] Based on the same technical concept, Embodiment 2 of the present invention also provides a user electricity consumption anomaly detection system for an electricity meter terminal, see [link to documentation]. Figure 8 As shown, Figure 8 The diagram shows a user electricity consumption anomaly detection system for an electricity meter terminal provided in Embodiment 2 of the present invention. The system includes several smart meter terminals 801, a central processing unit 802, and several cloud servers 803.

[0128] Each smart meter terminal is used to collect the electricity consumption data, environmental data and scene data of the corresponding user, integrate them to form the user's electricity consumption dataset, and send the electricity consumption dataset to the central processing unit;

[0129] The central processing unit is used to determine the corresponding data encryption strategy and target server according to the attributes of each type of data in the electricity consumption dataset, encrypt the electricity consumption dataset using the data encryption strategy to obtain an encrypted dataset, and transmit the encrypted dataset to the target server.

[0130] The target server is configured to decrypt the received encrypted data set, filter part of the data from the decrypted data set to form a target data set according to the server parameters, extract data features from the target data set, and generate a user electricity portrait of the target user based on the data features.

[0131] The target server is configured to filter reference electricity portraits of a plurality of reference users from the user electricity portraits of all target users according to the user electricity portrait of the target user, compare each reference electricity portrait with the user electricity portrait of the target user, and determine whether the target user has abnormal electricity consumption according to a comparison result.

[0132] In an optional embodiment, the integration forms the electricity data set of the user, including:

[0133] The electricity data, the environment data, and the scene data are time-aligned according to timestamps at preset time intervals.

[0134] Missing data is completed by an interpolation method, and abnormal values exceeding a preset fluctuation range are marked and replaced by statistical values of adjacent valid values.

[0135] The processed data is uniformly converted into a preset structured format to generate the electricity data set containing data type labels, collection timestamps, and numerical values.

[0136] In an optional embodiment, the determination of the corresponding data encryption strategy and the target server according to the attributes of each type of data in the electricity data set includes:

[0137] If the data attribute is sensitive data, an asymmetric encryption algorithm is used as the data encryption strategy; if the data attribute is non-sensitive data, a symmetric encryption algorithm is used as the data encryption strategy.

[0138] The real-time load rate, the remaining storage capacity, and the communication delay of each cloud server are calculated.

[0139] A server with a load rate lower than a preset load threshold, a remaining storage capacity meeting the storage demand of the electricity data set, and a minimum communication delay is selected as the target server; if there are multiple servers meeting the conditions, the target server is selected according to a preset priority rule.

[0140] In an optional embodiment, the filtering of part of the data from the decrypted data set to form a target data set according to the server parameters includes:

[0141] The server parameters include a data processing capability threshold, a storage resource upper limit, and a preset detection dimension.

[0142] Screening data related to power consumption anomaly detection dimensions in decrypted data, including time period power consumption data, corresponding environmental data, and scene identification;

[0143] Eliminating duplicate records, redundant data irrelevant to detection dimensions, and data exceeding the data processing capacity threshold to form the target data set.

[0144] In an optional embodiment, the extraction of data features from the target data set and the generation of a user power consumption portrait of the corresponding target user based on the data features include:

[0145] Extract the following data features from the target data set:

[0146] Daily average power consumption load: When the daily power consumption is E and the daily duration is T, the daily average power consumption load is E / T.

[0147] Peak period power consumption ratio: The total peak period power consumption is E h , and the daily power consumption is E, then the peak period power consumption ratio is E h / E.

[0148] Power fluctuation coefficient: The maximum daily power consumption is P max , the minimum daily power consumption is P min , and the average daily power consumption is P ave , then the power fluctuation coefficient is (P max -P min ) / P ave .

[0149] Environmental correlation: Let the power consumption sequence be {P1, P2,..., P n}, and the corresponding environmental parameter sequence be {Q1, Q2,..., Q n}, then the environmental correlation is COV(P, Q) / (σ P ×σ Q ), where COV is the covariance, σ P is the power consumption standard deviation, σ Q is the environmental parameter standard deviation, and n is the number of data collection times.

[0150] Scene power consumption mode: Feature vector generated based on power consumption curves of different scenes.

[0151] Standardize each of the extracted data features to construct a multi-dimensional feature vector.

[0152] Generate the user power consumption portrait containing the user's unique identification, the feature vector, and the update timestamp based on the feature vector, and store it in the portrait database of the target server.

[0153] In an optional embodiment, the reference user power consumption profile is selected from all target user power consumption profiles according to the target user's user power consumption profile, comprising:

[0154] extracting the target user's user attributes, environmental data and scenario data;

[0155] calculating the attribute matching degree of other users with the target user: let the user attribute matching degree be M1, the environmental data matching degree be M2, the scenario data matching degree be M3, and the comprehensive matching degree M = a x M1 + b x M2 + g x M3, wherein a, b and g are preset weight coefficients, and a + b + g = 1;

[0156] selecting the user whose comprehensive matching degree is higher than a preset matching threshold as the reference user;

[0157] selecting a preset number of user power consumption profiles from the reference users as the reference power consumption profiles.

[0158] In an optional embodiment, the comparison of each reference power consumption profile with the target user's user power consumption profile determines whether the target user's power consumption is abnormal according to the comparison result, comprising:

[0159] calculating the feature vector similarity of each reference power consumption profile and the target user's user power consumption profile, using the cosine similarity algorithm:

[0160] let the feature vector corresponding to the target user's user power consumption profile be A = (a1, a2,..., an), the feature vector of the reference user be B = (b1, b2,..., bn), and the similarity S = (A · B) / (||A|| x ||B||), wherein A · B is the inner product of vectors, ||A|| and ||B|| are the vector lengths; n n

[0161] calculating the average value of the similarity of all reference power consumption profiles;

[0162] if the average value of the similarity is lower than a first preset threshold, determining that the power consumption is abnormal, and generating an abnormal alarm information;

[0163] if the average value of the similarity is higher than a second preset threshold, determining that the power consumption is normal, and updating the normal state label of the target user's user power consumption profile;

[0164] if the average value of the similarity is between the first preset threshold and the second preset threshold, marking as a to-be-checked state, triggering secondary data collection and re-comparison.

[0165] Embodiment three

[0166] ​​Based on the same application concept, see Figure 9 As shown in the figure, Figure 9 A structure schematic diagram of a computer device provided by the embodiment three of the application is shown, wherein, as shown in the figure, Figure 9 The computer device 900 provided by the embodiment three of the application includes:

[0167] The processor 901, the memory 902 and the bus 903, the memory 902 stores machine readable instructions executable by the processor 901, when the computer device 900 runs, the processor 901 and the memory 902 communicate through the bus 903, the machine readable instructions are executed by the processor 901 to perform the steps of the user electricity abnormality detection method based on the smart meter terminal shown in the above embodiment one.

[0168] Embodiment four

[0169] Based on the same application concept, the application further provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is executed by the processor to perform the steps of the user electricity abnormality detection method based on the smart meter terminal in any of the above embodiments.

[0170] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific process of the above described system can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

[0171] The computer program product for performing the user electricity abnormality detection based on the smart meter terminal provided by the embodiment of the application includes a computer readable storage medium storing program codes, the instructions included in the program codes can be used to execute the method described in the foregoing method embodiment, and the specific implementation can be referred to the method embodiment, which will not be repeated here.

[0172] The user electricity abnormality detection system based on the smart meter terminal provided by the embodiment of the application can be specific hardware on the device or software or firmware installed on the device, etc. The system provided by the embodiment of the application has the same implementation principle and generated technical effects as the foregoing method embodiment, and for brief description, the part not mentioned in the system embodiment can refer to the corresponding content in the foregoing method embodiment. Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the foregoing described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

[0173] In the embodiments of the present application, it should be understood that the disclosed system and method can be implemented in other manners. The embodiments described above are merely exemplary, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation; for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electric, mechanical or in other forms.

[0174] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0175] In addition, each functional unit in the embodiments provided by the present application can be integrated into one processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated into one unit.

[0176] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various media that can store program codes.

[0177] It should be noted that: similar reference numerals and letters in the following drawings represent similar items, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third" and the like are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0178] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the present application, and the protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features therein, within the technical scope disclosed by the present application, and these modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application. All should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A user electricity abnormality detection method based on a smart meter terminal, characterized in that, The application is applied to a user electricity abnormality detection system, the system comprises a plurality of smart meter terminals, a central processor and a plurality of cloud servers, and the method comprises: Each smart meter terminal collects electricity data, environmental data and scene data of a corresponding user, integrates to form an electricity data set of the user, and sends the electricity data set to the central processor; The central processor determines a corresponding data encryption strategy and a target server according to the attributes of each type of data in the electricity data set, encrypts the electricity data set by using the data encryption strategy to obtain an encrypted data set, and transmits the encrypted data set to the target server; The target server decrypts the received encrypted data set, filters part of the data from the decrypted data set according to the server parameters to form a target data set, extracts data features from the target data set, and generates a user electricity portrait of a corresponding target user based on the data features; The target server filters a plurality of reference electricity portraits of reference users from all the user electricity portraits of target users according to the user electricity portrait of the target user, compares each reference electricity portrait with the user electricity portrait of the target user, and determines whether the target user is abnormal in electricity consumption according to the comparison result; The method of filtering a plurality of reference electricity portraits of reference users from all the user electricity portraits of target users according to the user electricity portrait of the target user comprises: Extracting user attributes, environmental data and scene data of the target user; Calculating the attribute matching degree of other users and the target user: setting the user attribute matching degree as M1, the environmental data matching degree as M2, the scene data matching degree as M3, and the comprehensive matching degree M = α × M1 + β × M2 + γ × M3, wherein α, β and γ are preset weight coefficients, and α + β + γ = 1; Filtering out users with a comprehensive matching degree higher than a preset matching threshold as the reference users; Selecting a preset number of user electricity portraits from the reference users as the reference electricity portraits.

2. The method of claim 1, wherein, The method of integrating to form the electricity data set of the user comprises: Timing alignment of the electricity data, the environmental data and the scene data according to preset time intervals; Completing missing data by using an interpolation method, marking and replacing abnormal values exceeding a preset fluctuation range with statistical values of adjacent valid values; Converting the processed data into a preset structured format to generate the electricity data set containing data type labels, collection timestamps and numerical values.

3. The method of claim 1, wherein, The method of determining a corresponding data encryption strategy and a target server according to the attributes of each type of data in the electricity data set comprises: If the data attribute is sensitive data, using an asymmetric encryption algorithm as the data encryption strategy; if it is non-sensitive data, using a symmetric encryption algorithm as the data encryption strategy; Calculating the real-time load rate, the remaining storage capacity of each cloud server and the communication delay with the central processor; Select a server with a load rate lower than a preset load threshold, a remaining storage capacity meeting the storage requirement of the power consumption dataset, and a minimum communication delay as the target server; if there are multiple servers meeting the conditions, select the target server according to a preset priority rule.

4. The method of claim 1, wherein, The server parameters include a data processing capability threshold, a storage resource upper limit, and a preset detection dimension. The data related to the power consumption anomaly detection dimension in the decrypted data include period power consumption data, corresponding environmental data, and scene identification. The target data set is formed by removing duplicate records, redundant data irrelevant to the detection dimension, and data exceeding the data processing capability threshold. The data features are extracted from the target data set, and a user power consumption portrait of the corresponding target user is generated based on the data features.

5. The method of claim 1, wherein, The following data features are extracted from the target data set: Daily average power consumption load: the daily total power consumption is E, and the daily duration is T, then the daily average power consumption load is E / T; Scene power consumption mode: a feature vector generated based on the power consumption curve of different scenes; Peak period electricity consumption proportion: the total amount of peak period electricity consumption is E h When the total amount of electricity consumption of the day is E, the peak period electricity consumption proportion is E h / E; Electricity fluctuation coefficient: The maximum daily electricity consumption is P. max The minimum daily power consumption is P min The average daily power consumption is P ave Then the electricity fluctuation coefficient = (P) max -P min ) / P ave ; Environmental correlation: Let the power consumption sequence be {P1, P2, ..., P...} n The corresponding environmental parameter sequence is {Q1, Q2, ..., Q}. n }, then the environmental correlation degree = COV(P,Q) / (σ) P ×σ Q ), where COV is the covariance, σ P Let σ be the standard deviation of power consumption. Q Here, n represents the standard deviation of the environmental parameters, and n represents the number of data collections. The extracted data features are standardized to construct a multi-dimensional feature vector; The user power consumption portrait containing the user's unique identification, the feature vector, and the update timestamp is generated based on the feature vector and stored in the portrait database of the target server. The reference power consumption portraits are compared with the user power consumption portrait of the target user, and it is determined whether the target user has power consumption anomaly according to the comparison result, including:

6. The method of claim 1, wherein, The similarity of the feature vectors of each reference power consumption portrait and the user power consumption portrait of the target user is calculated, and the cosine similarity algorithm is used: The average value of the similarity of all reference power consumption portraits is calculated; A=(a1,a2,...,a n ), the feature vector of the reference user is B=(b1,b2,...,b n ), and the similarity S=(A·B) / (||A||×||B||), wherein A·B is the inner product of vectors, ||A|| and ||B|| are the vector lengths. If the average value of the similarity is lower than a first preset threshold, it is determined that the power consumption is abnormal, and an abnormal alarm information is generated; If it is higher than a second preset threshold, it is determined that the power consumption is normal, and the normal state label of the user power consumption portrait of the target user is updated; If it is between the first preset threshold and the second preset threshold, it is marked as a to-be-checked state, triggering secondary data collection and re-comparison. The system includes a plurality of smart meter terminals, a central processor, and a plurality of cloud servers.

7. A user electricity abnormality detection system based on a smart meter terminal, characterized by, Each smart meter terminal is used to collect power consumption data, environmental data, and scene data of the corresponding user, integrate the data to form a power consumption dataset of the user, and send the power consumption dataset to the central processor. The central processor is used to determine the corresponding data encryption strategy and target server according to the attributes of each type of data in the power consumption dataset, encrypt the power consumption dataset using the data encryption strategy to obtain an encrypted dataset, and transmit the encrypted dataset to the target server. The target server is used to decrypt the received encrypted dataset, filter part of the data from the decrypted dataset according to its server parameters to form a target data set, extract data features from the target data set, and generate a user power consumption portrait of the corresponding target user based on the data features. ​ The target server is configured to: screen reference power consumption profiles of a plurality of reference users from the power consumption profiles of all target users according to the power consumption profile of the target user, compare each reference power consumption profile with the power consumption profile of the target user, and determine whether the target user has abnormal power consumption according to a comparison result. The screening of the reference power consumption profiles of the plurality of reference users from the power consumption profiles of all target users according to the power consumption profile of the target user comprises: extracting user attributes, environmental data and scene data of the target user; calculating attribute matching degrees of other users with the target user, wherein the attribute matching degree is M1, the environmental data matching degree is M2, the scene data matching degree is M3, and the comprehensive matching degree M is α×M1+β×M2+γ×M3, wherein α, β and γ are preset weight coefficients, and α+β+γ=1; screening users with a comprehensive matching degree higher than a preset matching threshold as the reference users; selecting a preset number of power consumption profiles of users from the reference users as the reference power consumption profiles.

8. A computer device, comprising: comprise: a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the computer equipment is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the steps of the user power consumption anomaly detection method based on the smart meter terminal 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, and the computer program is executed by the processor to execute the steps of the user power consumption anomaly detection method based on the smart meter terminal in any one of claims 1-6.

Citation Information

Patent Citations

  • Electricity stealing detection method and system

    CN118962317A