A method and system for storing electric energy meter data based on user behavior analysis

By performing cluster analysis and abnormal data identification of smart power meter data, the problem of smart power meter data storage pressure is solved, efficient storage and data life cycle management is realized, and the monitoring and management capabilities of the power system are improved.

CN119179986BActive Publication Date: 2025-03-11ZHEJIANG SONGXIA ELECTRIC METER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411642464.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

With the increase in the amount of smart power meter data, the storage pressure of power meter data is increasing, resulting in a decrease in the transmission speed of the database network, the impact of response speed and the increase in operation and maintenance costs.

Method used

By clustering the time series data of electricity consumption, only the electricity meter data of the representative class is stored, and abnormal data is identified by calculating the similarity between the derivative curve to be stored and the representative curve, the database is divided into conventional storage space and abnormal data storage space, and the automatic deletion period is set.

Benefits of technology

It effectively reduces storage space requirements, improves storage efficiency, and promptly detects abnormal changes in the power consumption mode. It is of great significance to the monitoring and management of power systems, realizes data life cycle management, and ensures the timeliness and relevance of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179986B_ABST
    Figure CN119179986B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electric meter data storage, and specifically discloses an electric energy meter data storage method and system based on user behavior analysis, comprising the following steps: step S1: setting a collection period, selecting and numbering a number of time nodes within the period; collecting users' electricity consumption time series data, and establishing an electricity consumption curve for each user; step S2: calculating the derivative value at each time node on the electricity consumption curve to obtain a derivative curve; performing cluster analysis on all derivative curves, selecting representative classes, and generating representative curves of the representative classes; step S3: for data to be stored, obtaining the derivative curve to be stored of the data to be stored; obtaining the similarity between the derivative curve to be stored and each representative curve, and judging whether the data to be stored is abnormal data; step S4: storing normal data in a regular storage space, and storing abnormal data in an abnormal data storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric meter data storage, and in particular to an electric energy meter data storage method and system based on user behavior analysis. Background Art

[0002] With the rapid development of the Internet of Things and smart homes, the popularity of smart electricity meters allows us to monitor energy consumption more finely and frequently. These devices can collect and transmit electricity usage information in real time, including parameters such as power consumption, current, voltage, and power. These data are usually recorded at high-frequency time intervals, such as every few minutes or even every few seconds, resulting in an exponential growth in the amount of data in users' electricity meters.

[0003] As the amount of user's electricity meter data increases, the storage pressure of electricity meter data is also increasing; however, the storage space of the database is limited. Excessive storage pressure will cause the database network transmission speed to be greatly reduced, and will also affect the database response speed and increase operation and maintenance costs. Summary of the invention

[0004] The purpose of the present invention is to provide an electric energy meter data storage method and system based on user behavior analysis to solve the above technical problems.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A method for storing electric energy meter data based on user behavior analysis comprises the following steps:

[0007] Step S1: setting a collection period, selecting and numbering a number of time nodes within the collection period, obtaining the power consumption of all users at each time node within the collection period, and obtaining power consumption time series data; and establishing power consumption curves for all users based on the time series data;

[0008] Step S2: Obtain the derivative value corresponding to each time node on the power consumption curve, and establish a derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold;

[0009] For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node;

[0010] Step S3: record the electricity consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities;

[0011] A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data;

[0012] Step S4: Divide the database into a regular storage space and an abnormal data storage space, set an automatic deletion period for all power consumption time series data in the regular storage space; store the normal data in the regular storage space, and store the abnormal data in the abnormal data storage space.

[0013] As a further solution of the present invention: the setting range of the collection period is [1 day, 7 days].

[0014] As a further solution of the present invention: the process of selecting the time node includes:

[0015] A collection time interval T is set, and the setting range of the collection time interval T is [0.5 minutes, 5 minutes]. Within the collection period, a node is selected at every collection time interval, recorded as a time node, and a plurality of time nodes are obtained. The selection of the time node includes the start point and the end point of the collection period.

[0016] As a further solution of the present invention: the process of clustering analysis of all derivative curves is based on the K-Mediods algorithm.

[0017] As a further solution of the present invention: the process of setting the number threshold includes:

[0018] The number of various types of internal derivative curves is {n 1 , n 2 , ..., n v}, where n 1 is the data of the first class of derivative curves, v is the total number of classes; then the average value n of the number of derivative curves in each class is obtained ave , and set the number threshold , where z is a preset multiple value and z is an integer.

[0019] As a further solution of the present invention: for the class where n<Nt, its representative curve is not obtained.

[0020] As a further solution of the present invention: the process of dividing the database into a normal storage space and an abnormal data storage space includes:

[0021] The storage size of the conventional storage space is denoted as G1, and the size of the abnormal data storage space is denoted as G2; the total number N of all the electric energy meter data and the total number Ny of abnormal data in the historical collection period are obtained to obtain the abnormal proportion c=Ny / N; according to the abnormal proportion of each historical collection period, the average abnormal proportion cave is obtained; then the storage size of the conventional storage space is set to G1=(1-cave) / G, where G is the size of the total storage space of the database; the size of the abnormal data storage space is set to G2=G-G1.

[0022] As a further solution of the present invention: an electric energy meter data storage system based on user behavior analysis, comprising:

[0023] Data collection module: set a collection period, select several time nodes in the collection period and number them, obtain the power consumption of all users at each time node in the collection period, and obtain the power consumption time series data; according to the time series data, establish the power consumption curve of all users;

[0024] Representative data selection module: obtain the derivative value corresponding to each time node on the power consumption curve, and establish the derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold;

[0025] For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node;

[0026] Data classification and determination module: record the electricity consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities;

[0027] A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data;

[0028] Data classification storage module: divides the database into regular storage space and abnormal data storage space, sets an automatic deletion period for all power consumption time series data in the regular storage space; stores the normal data in the regular storage space, and stores the abnormal data in the abnormal data storage space.

[0029] Beneficial effects of the present invention:

[0030] As the amount of user's electricity meter data increases, the storage pressure of electricity meter data is also increasing; however, the storage space of the database is limited. Excessive storage pressure will cause the database network transmission speed to be greatly reduced, and will also affect the database response speed and increase operation and maintenance costs.

[0031] Compared with the prior art, the present invention reduces the demand for storage space by clustering the electricity consumption time series data and storing only the electricity meter data of the representative class; this method can effectively compress the electricity meter data, so that the electricity consumption information of a large number of users can be stored in a more compact form, thereby improving storage efficiency; the similarity between the derivative curve to be stored and the representative curve is calculated, and the similarity threshold is set to identify abnormal data; this mechanism can detect abnormal changes in the electricity consumption pattern in a timely manner, which is of great significance for the monitoring and management of the power system; the database is divided into regular storage space and abnormal data storage space, and an automatic deletion period is set for the data in the regular storage space, which helps to achieve data life cycle management; this not only ensures the timeliness and relevance of the data, but also prevents the storage pressure caused by the indefinite accumulation of data; by distinguishing normal data from abnormal data, power companies can make resource allocation and operation and maintenance decisions more accurately; for example, for abnormal data, further investigation or immediate maintenance response may be required, while for normal data, it can be processed according to the normal process. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below in conjunction with the accompanying drawings.

[0033] Figure 1 The present invention is a flow chart of an electric energy meter data storage method and system based on user behavior analysis. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] See also Figure 1 As shown, the present invention is a method for storing electric energy meter data based on user behavior analysis, comprising the following steps:

[0036] Step S1: setting a collection period, selecting and numbering a number of time nodes within the collection period, obtaining the power consumption of all users at each time node within the collection period, and obtaining power consumption time series data; and establishing power consumption curves for all users based on the time series data;

[0037] It is understandable that the time node can be an hour, a day or other suitable time period, depending on the required data accuracy and analysis requirements; based on the electric energy meter data, the power consumption of all users at each time node is obtained, and after being arranged in chronological order, the power consumption time series data is formed; based on the electric energy meter data, a power consumption curve is established for the time series data of each user in each collection period, and a large number of power consumption curves are obtained as sample curves for subsequent analysis; the power consumption curve can intuitively show the power consumption pattern and trend of the user in the collection period;

[0038] As a preferred embodiment of the present invention, the setting range of the collection period is [1 day, 7 days];

[0039] It is understandable that in power demand side management, daily or weekly power consumption data can help analyze users' power consumption patterns and optimize grid dispatch and load forecasting; for example, collecting data once a day can capture daily power consumption peaks and troughs, while collecting data once a week is more suitable for observing power consumption trends within the week; a shorter collection cycle will generate more data points, which is convenient for analyzing users' power consumption behavior habits. Therefore, when selecting a collection cycle, it is necessary to consider available technology and resources, as well as actual conditions; in the present invention, the setting range of the set collection cycle is [1 day, 7 days];

[0040] As a preferred embodiment of the present invention, the process of selecting the time node includes:

[0041] A collection time interval T is set, and the setting range of the collection time interval T is [0.5 minutes, 5 minutes]; a node is selected every other collection time interval in the collection period, recorded as a time node, and a plurality of time nodes are obtained; the selection of the time node includes the start point and the end point of the collection period;

[0042] It can be understood that the time node selection method helps to ensure that the electric energy meter data can be evenly obtained within the collection period, so as to better reflect the changes in electricity consumption within the entire collection period; at the same time, by setting a suitable collection time interval T, the precision of the data can be flexibly adjusted according to actual needs to meet different analysis and application requirements;

[0043] Step S2: Obtain the derivative value corresponding to each time node on the power consumption curve, and establish a derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold;

[0044] For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node;

[0045] It is understandable that different users have different electricity consumption habits, different peak times, and different amounts of electricity consumption. By taking the derivative of the electricity consumption curve and drawing the derivative curve, we can more clearly see the changes in electricity consumption at different time nodes, thereby identifying different electricity consumption patterns of users. For example, the peak hours of electricity consumption on weekdays and weekends may be different, and this difference can be intuitively seen through the derivative curve.

[0046] As a preferred embodiment of the present invention, the process of clustering analysis of all derivative curves is based on K-Mediods algorithm;

[0047] It should be noted that the process of the K-Mediods algorithm includes:

[0048] An initial value Q is set, and the setting range of the initial value is Q≤1 / 2NUM, where NUM is the total number of derivative curves; the initial value is used to determine the number of classes into which the derivative curves are aggregated; all derivative curves are converted into data points, Q data points are randomly selected from all data points as centroids, and the distances between the remaining data points and the centroids are calculated. For each data point, the data point closest to it is recorded as a class; the distance between every two data points in the class is calculated once, and then the point with the smallest distance to other data points is selected as the new centroid until the centroid is no longer offset;

[0049] The calculation process of the distance D between the remaining data points and the centroid is , where Zh u is the center of mass, P uFor any other data point, D is the sum of the distances between each other data point and the centroid;

[0050] As a preferred embodiment of the present invention, for a class where n<Nt, its representative curve is not obtained;

[0051] It can be understood that the class with the number of internal derivative curves less than the number threshold cannot represent the power usage of most users and cannot be used as a reference for determining whether it is normal data;

[0052] As a preferred embodiment of the present invention, the process of setting the number threshold includes:

[0053] The number of various types of internal derivative curves is {n 1 , n 2 , ..., n v}, where n 1 is the data of the first class of derivative curves, v is the total number of classes; then the average value n of the number of derivative curves in each class is obtained ave , and set the number threshold , where z is a preset multiple value and z is an integer;

[0054] It can be understood that the set number threshold Nt is a value that comprehensively considers the number average and standard deviation of various types of internal derivative curves, which can reflect the central tendency and dispersion degree of the data and provide a reference for subsequent cluster analysis or data processing; the data is screened or classified according to the set number threshold; for example, in cluster analysis, the classes whose number is greater than or equal to the threshold can be regarded as important classes, and they can be focused on and analyzed;

[0055] Step S3: record the electricity consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities;

[0056] A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data;

[0057] It is understandable that for different users, the amount of electricity consumption at each time node may be different, but the analysis of whether the electricity consumption is abnormal is mainly through analyzing the user's electricity consumption change trend, that is, paying attention to the increase and decrease of the user's electricity consumption between different time nodes; and the derivative curve reflects the instantaneous change rate of electricity consumption, so when judging whether the derivative curve to be stored is abnormal, it is sufficient to directly judge the ordinate value at each time node on the derivative curve;

[0058] Step S4: Divide the database into a regular storage space and an abnormal data storage space, set an automatic deletion period for all power consumption time series data in the regular storage space; store the normal data in the regular storage space, and store the abnormal data in the abnormal data storage space;

[0059] As a preferred embodiment of the present invention, the process of dividing the database into a regular storage space and an abnormal data storage space includes:

[0060] The storage size of the conventional storage space is G1, and the size of the abnormal data storage space is G2; obtain the total number N of all electric energy meter data and the total number Ny of abnormal data in the historical collection period, and obtain the abnormal proportion c=Ny / N; obtain the abnormal proportion average cave according to the abnormal proportion of each historical collection period; then set the storage size of the conventional storage space G1=(1-cave) / G, where G is the size of the total storage space of the database; set the size of the abnormal data storage space G2=G-G1;

[0061] It can be understood that according to the average cave of the anomaly ratio, the size of the regular storage space and the abnormal data storage space can be dynamically adjusted by analyzing the anomaly ratio in the historical data; this helps to utilize database storage resources more efficiently while ensuring that the abnormal data is properly stored and managed.

[0062] An electric energy meter data storage system based on user behavior analysis, comprising:

[0063] Data collection module: set a collection period, select several time nodes in the collection period and number them, obtain the power consumption of all users at each time node in the collection period, and obtain the power consumption time series data; according to the time series data, establish the power consumption curve of all users;

[0064] Representative data selection module: obtain the derivative value corresponding to each time node on the power consumption curve, and establish the derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold;

[0065] For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node;

[0066] Data classification and determination module: record the electricity consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities;

[0067] A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data;

[0068] Data classification storage module: divides the database into regular storage space and abnormal data storage space, sets an automatic deletion period for all power consumption time series data in the regular storage space; stores the normal data in the regular storage space, and stores the abnormal data in the abnormal data storage space.

[0069] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A method for storing electric energy meter data based on user behavior analysis, characterized in that: The following steps are involved: Step S1: setting a collection period, selecting and numbering a number of time nodes within the collection period, obtaining the power consumption of all users at each time node within the collection period, and obtaining power consumption time series data; and establishing power consumption curves for all users based on the time series data; Step S2: Obtain the derivative value corresponding to each time node on the power consumption curve, and establish a derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold; For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node; Step S3: record the power consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities; A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data; Step S4: Divide the database into a regular storage space and an abnormal data storage space, set an automatic deletion period for all power consumption time series data in the regular storage space; store the normal data in the regular storage space, and store the abnormal data in the abnormal data storage space.

2. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S1, the setting range of the collection period is [1 day, 7 days].

3. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S1, the time node selection process includes: A collection time interval T is set, and the setting range of the collection time interval T is [0.5 minutes, 5 minutes]. Within the collection period, a node is selected at every collection time interval, recorded as a time node, and a plurality of time nodes are obtained. The selection of the time node includes the start point and the end point of the collection period.

4. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S2, the process of performing cluster analysis on all derivative curves is based on the K-Mediods algorithm.

5. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S2, the process of setting the number threshold includes: The number of various types of internal derivative curves is {n1, n2, ..., n v }, where n1 is the data of the first class of derivative curves, and v is the total number of classes; then the average value of the number of derivative curves in each class is obtained. ave , and set the number threshold , where z is a preset multiple value and z is an integer.

6. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S2, for the class where n<Nt, its representative curve is not obtained.

7. The method for storing electric energy meter data based on user behavior analysis according to claim 1, characterized in that: In step S4, the process of dividing the database into a normal storage space and an abnormal data storage space includes: The storage size of the conventional storage space is denoted as G1, and the size of the abnormal data storage space is denoted as G2; the total number N of all the electric energy meter data and the total number Ny of abnormal data in the historical collection period are obtained to obtain the abnormal proportion c=Ny / N; according to the abnormal proportion of each historical collection period, the average abnormal proportion cave is obtained; then the storage size of the conventional storage space is set to G1=(1-cave) / G, where G is the size of the total storage space of the database; the size of the abnormal data storage space is set to G2=G-G1.

8. An electric energy meter data storage system based on user behavior analysis, characterized in that: include: Data collection module: set a collection period, select several time nodes in the collection period and number them, obtain the power consumption of all users at each time node in the collection period, and obtain the power consumption time series data; according to the time series data, establish the power consumption curve of all users; Representative data selection module: obtain the derivative value corresponding to each time node on the power consumption curve, and establish the derivative curve according to the number of each time node and its corresponding derivative value; perform cluster analysis on all derivative curves to obtain several classes; obtain the total number of derivative curves in each class, select the class with n≥Nt, and record it as the representative class, where Nt is a preset number threshold; For each derivative curve belonging to the same representative class, obtain the derivative mean of each derivative curve at the time node, and establish a representative curve f(x) according to the number of each time node and its corresponding derivative mean, where x is the number of the time node; Data classification and determination module: record the electricity consumption time series data to be stored as the data to be stored, obtain the derivative curve g(x) to be stored according to the data to be stored; obtain the similarity between the derivative curve to be stored and the representative curve , where m is the total number of time nodes in the collection period, x i is the i-th time node in the acquisition period; obtaining a similarity set J={I1, I2, ..., Ik} between the derivative curve to be stored and each representative curve, where k is the total number of similarities; A similarity threshold It is set. If the similarity I of the derivative curve to be stored exists in the set J such that Ig>It, where Ig∈J is the g-th element in the set J, then the data to be stored is recorded as normal data; otherwise, the data to be stored is recorded as abnormal data; Data classification storage module: divides the database into regular storage space and abnormal data storage space, sets an automatic deletion period for all power consumption time series data in the regular storage space; stores the normal data in the regular storage space, and stores the abnormal data in the abnormal data storage space.

Citation Information

Patent Citations

  • Intelligent power consumption data analysis method and system based on Internet of Things

    CN116956198A

  • Electricity consumption abnormality detection method, apparatus and device, and readable storage medium

    WO2020019403A1