Intelligent electric meter data storage method and system

By performing segmentation and difference factor analysis on smart meter data, combined with the location and regularity of clusters, and using an improved clustering algorithm for classification, the problem of inaccurate classification of users' electricity usage habits in the existing technology is solved, and electricity consumption is improved. Behavior analysis and prediction effects.

CN118568100AInactive Publication Date: 2024-08-30BEIJING REAL ESTATE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410961706.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing smart meter data classification methods are difficult to classify users with similar electricity consumption habits into the same category based only on their power consumption, resulting in reduced credibility of subsequent analysis and predictions.

Method used

By segmenting the smart meter data, the similarity and difference factors between period segments are obtained, and combined with the distribution position of clusters and the regularity of electricity consumption, an improved k-means iterative clustering algorithm is used for classification and storage, giving Data with higher regularity are given greater weight.

Benefits of technology

It effectively classifies and stores users with similar electricity consumption habits, improves the credibility of analysis and prediction of electricity consumption behavior, and enhances the regularity and clustering accuracy of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568100A
    Figure CN118568100A
Patent Text Reader

Abstract

The invention relates to the technical field of data classified storage, in particular to an intelligent electric meter data storage method and system, and the method comprises the steps: obtaining each piece of to-be-stored data and the position of each piece of to-be-stored data; segmenting each piece of to-be-stored data to obtain a plurality of period segments, and clustering according to the position of the to-be-stored data to obtain a plurality of clusters; obtaining the overall power utilization regularity of the to-be-stored data in the clusters according to the similarity between the period segments and the positions of the clusters; further screening out a target period segment, and combining the amplitude of each power consumption in the target period segment to obtain the power consumption regularity of the to-be-stored data; and classifying and storing the to-be-stored data in combination with the power utilization regularity of the to-be-stored data according to the overall power utilization regularity of the to-be-stored data in the cluster. According to the invention, by analyzing the stability degree of the power utilization habit of each user, the data of the intelligent electric meter can be better classified, and finally the storage result is more suitable for the subsequent analysis of the power utilization behavior of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data classification storage, and in particular to a smart meter data storage method and system. Background Art

[0002] The amount of data generated by all smart meters within a city is huge. Before storing the meter data, it is usually necessary to distinguish the user's electricity usage behavior based on clustering, and classify similar electricity usage behaviors into one category for storage, which is more conducive to subsequent analysis or prediction of user electricity usage behavior.

[0003] The traditional classification method is to treat each user as a sample data, and use the user's power consumption within a period of time as the distance measurement feature for clustering; but due to the different electricity consumption habits of different users, if the population is divided only based on the total electricity consumption over a period of time, it will cause users to have unreliable deviations from the cluster center, resulting in abnormal clustering standards when the group of electricity users is subsequently updated, which in turn leads to unreliable electricity consumption behavior of the user group. It is difficult to classify users with similar electricity consumption habits into the same category based solely on their electricity consumption, which is not conducive to subsequent analysis or prediction of users' electricity consumption behavior. Summary of the invention

[0004] The present invention provides a smart meter data storage method and system to solve the existing problem that it is difficult to classify users with similar electricity consumption habits into the same category based only on the users' electricity consumption, which is not conducive to subsequent analysis or prediction of the users' electricity consumption behavior.

[0005] A smart meter data storage method and system of the present invention adopts the following technical solutions: Obtain each data to be stored and the location of each data to be stored, wherein each data to be stored is all power consumption collected by each smart meter; Each data to be stored is segmented to obtain several periodic segments; the regularity of the data to be stored is obtained according to the similarity between the periodic segments of the same data to be stored; all the data to be stored are clustered according to the position of each data to be stored to obtain several clusters; according to the distribution position of the clusters and the regularity of all the data to be stored in the clusters, the overall power consumption regularity of the data to be stored in the clusters is obtained; According to the similarity between each cycle segment of the same data to be stored, the target cycle segment is screened out; according to the difference and fluctuation difference in power consumption between the target cycle segment of the same data to be stored and other target cycle segments, the difference factor of all power consumption in each target cycle segment is obtained, and the difference factor is weighted according to the amplitude of each power consumption in each target cycle segment to obtain the consistency between the target cycle segment and other target cycle segments; according to the consistency between all target cycle segments of the data to be stored and other target cycle segments, the power consumption regularity of the data to be stored is obtained; According to the overall power consumption regularity of the data to be stored in the cluster, combined with the power consumption regularity of the data to be stored, the regularity coefficient of the data to be stored is obtained, and combined with the power consumption of the data to be stored, the data to be stored is classified and stored.

[0006] Preferably, the obtaining of the regularity of the data to be stored includes the following specific methods: All periodic segments of the data to be stored are paired in pairs to obtain a number of periodic segment combinations of the data to be stored; the DTW distance between the periodic segments in each combination is calculated, the DTW distance is negatively normalized, the normalized result is used as the similarity between the periodic segments in the combination, and the matching degree of the combination is obtained by combining the time distance of the periodic segments in the combination; The matching degrees of all combinations of the data to be stored are integrated to obtain the regularity of the data to be stored.

[0007] Preferably, the method of obtaining the overall power usage regularity of the data to be stored in the cluster based on the distribution position of the cluster and the regularity of all the data to be stored in the cluster includes the following specific methods: Obtain the cluster centers of all clusters; for any cluster, take the average of the distances between the cluster center and the cluster centers of all clusters as the remoteness of the cluster; according to the remoteness of the cluster and the regularity of each data to be stored in the cluster, obtain the overall regularity of electricity consumption of users in the cluster; The remoteness of the cluster is positively correlated with the overall power consumption regularity of the users in the cluster; the regularity of each data to be stored in the cluster is negatively correlated with the overall power consumption regularity of the users in the cluster.

[0008] Preferably, the difference factors include: a first difference factor, a second difference factor and a third difference factor.

[0009] Preferably, the specific method for obtaining the first difference factor is: For any target periodic segment of any data to be stored, construct a distance matrix between the target periodic segment and each target periodic segment of the data to be stored; and obtain the best matching path in each distance matrix; For any element on the best matching path in any distance matrix, the two periodic segments for constructing the distance matrix are recorded as parent periodic segments, and the two power consumptions corresponding to the element on the parent periodic segments are recorded as corresponding power consumptions; For any power consumption in any target cycle segment of any data to be stored, the power consumption corresponding to the power consumption in each target cycle segment is obtained, the sum of the differences between the power consumption and all corresponding power consumptions is obtained, and normalized to obtain the first difference factor of the power consumption.

[0010] Preferably, the specific method for obtaining the second difference factor is: For any power consumption in any target cycle segment of any data to be stored, all target cycle segments of the data to be stored are integrated to obtain the average cycle segment of the data to be stored, and the power consumption corresponding to the power consumption in the average cycle segment of the data to be stored is obtained. The difference between the power consumption and the corresponding power consumption is normalized, and the normalized result is recorded as the second difference factor of the power consumption.

[0011] Preferably, the specific method for obtaining the third difference factor is: For any power consumption in any target period segment of any data to be stored, the index of the power consumption data in the target data segment is recorded as a feature index, and the power consumption located at the feature index in all target period segments of the data to be stored is recorded as the corresponding power consumption of the power consumption; the coefficient of variation of all corresponding power consumptions of the power consumption is used as the third difference factor of the power consumption.

[0012] Preferably, the specific method for obtaining the regularity coefficient of the data to be stored is: For any data to be stored in any cluster; normalize the power usage regularity of the data to be stored, and record the normalization result as the power usage regularity degree of the data to be stored; normalize the power usage regularity of the entire data to be stored in the cluster, and record the normalization result as the power usage regularity degree of the entire data to be stored in the cluster; The product of the power usage regularity of the data to be stored and the power usage regularity of the entire data to be stored in the cluster where the data to be stored is used as a regularity coefficient for classifying the data to be stored, and is recorded as the regularity coefficient of the data to be stored.

[0013] Preferably, the specific method of classifying and storing the data to be stored includes: According to the power consumption of the data to be stored, the improved k-means iterative clustering algorithm is used to obtain several clusters, and the data to be stored in the same cluster is stored in the same location; the updating process of the cluster center in the improved k-means iterative clustering algorithm is as follows: For any cluster, obtain the vector from the initial cluster center to the cluster center and record it as the offset vector; record the product of the regularity coefficient of each data to be stored in the cluster and the offset vector as the offset component vector of each data to be stored in the cluster; record the sum of the offset component vectors of each data to be stored in the cluster as the final offset vector; take the initial cluster center in the cluster as the starting point of the final offset vector, and take the end point of the final offset vector as the new cluster center.

[0014] Another embodiment of the present invention provides a smart meter data storage system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned smart meter data storage methods when executing the computer program.

[0015] The beneficial effects of the technical solution of the present invention are as follows: the present invention first obtains each data to be stored and the location of each data to be stored; segments each data to be stored to obtain a number of periodic segments, and clusters the data to be stored according to the location of the data to be stored to obtain a number of clusters; obtains the overall power consumption regularity of the data to be stored in the cluster according to the similarity between the periodic segments and the location of the clusters; since users with the same power consumption habits in a large range have the characteristics of concentrated distribution, it is necessary to cluster the data to be stored according to the location of the data to be stored, and further analyze the data to be stored in the clusters; Further filter out the target cycle segment, and combine the amplitude of each power consumption in the target cycle segment to obtain the power consumption regularity of the data to be stored. Because the power consumption habits of users on holidays are usually different from those on weekdays, and in daily life, the duration of weekdays is much longer than that of holidays, in order to better analyze the power consumption habits of users, all cycle segments need to be filtered, and the target cycle segment is the smart meter data corresponding to the weekday; further, according to the difference and fluctuation difference in power consumption between the target cycle segment of the same data to be stored and other target cycle segments; Finally, according to the overall power consumption regularity of the data to be stored in the cluster and combined with the power consumption regularity of the data to be stored, the regularity coefficient for classifying the data to be stored is obtained. The larger the regularity coefficient of the data to be stored, the more regular the data to be stored. By giving a large weight to the regular data to be stored when clustering the data to be stored, users with similar power consumption habits can be more easily classified into the same category. Combined with the power consumption of the data to be stored, the data to be stored is classified, and the same type of smart meter data is stored in the same location, which is more conducive to the subsequent analysis or prediction of the user's power consumption behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flowchart of the steps of a smart meter data storage method of the present invention; Figure 2 Schematic diagram of the distance matrix between two sequences. DETAILED DESCRIPTION

[0018] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a smart meter data storage method and system proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0019] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0020] The following describes in detail a smart meter data storage method and system provided by the present invention with reference to the accompanying drawings.

[0021] See also Figure 1 , which shows a flowchart of a smart meter data storage method provided by an embodiment of the present invention, the method comprising the following steps: Step S001: Acquire each data to be stored and the location of each data to be stored.

[0022] It should be noted that, as a smart meter data storage method, the specific application scenario of this embodiment is to store the smart meter data of all users in a large area, for example, to store the smart meter data of all users in an urban area; the process is to analyze the electricity usage habits of each user through the smart meter data of each user, cluster them, and store the smart meter data of each type of user to facilitate subsequent analysis or prediction of the user's electricity usage behavior. Therefore, it is necessary to obtain each smart meter data as each data to be stored.

[0023] It should be further explained that within a large area, users with different electricity usage habits usually gather in the same location. For example, users in office buildings have the same electricity usage habits, users in school district houses have the same electricity usage habits, and users in residential houses have the same electricity usage habits. Therefore, in order to be able to better classify users according to their electricity usage habits, it is also necessary to obtain the users' specific geographic locations.

[0024] In one embodiment of the present invention, all data collected historically by each smart meter are recorded as each data to be stored; the location of the corresponding user of the smart meter is obtained through the city GIS system and recorded as the location of each data to be stored.

[0025] At this point, all the data to be stored and the locations of all the data to be stored are obtained.

[0026] Step S002: segment each data to be stored to obtain several periodic segments; obtain the regularity of the data to be stored according to the similarity between the periodic segments of the same data to be stored; cluster all the data to be stored according to the position of each data to be stored to obtain several clusters; obtain the overall power consumption regularity of the data to be stored in the cluster according to the distribution position of the cluster and the regularity of all the data to be stored in the cluster.

[0027] It should be noted that, as a smart meter data storage method, the specific purpose of this embodiment is to classify users with similar electricity usage habits into one category; therefore, it is first necessary to obtain the regularity of the smart meter data through the data of the same smart meter in different periods, and obtain the regularity of each data to be stored, that is, to segment each data to be stored to obtain several period segments; and because users with the same electricity usage habits in the city have the characteristics of concentrated distribution, it is necessary to cluster the data to be stored according to the location of the data to be stored, and then analyze the regularity of each data to be stored in each cluster; because the more remote the area in the city, the stronger the regularity of the electricity usage habits of users, it is also necessary to analyze the location of each cluster in the city, combined with the regularity of each data to be stored in the cluster, and finally obtain the overall electricity usage regularity of the data to be stored in the cluster.

[0028] Preferably, in one embodiment of the present invention, for any data to be stored, the data to be stored is divided into a plurality of period segments with 24 hours as a period length, which are recorded as the period segments of the data to be stored; All periodic segments of the data to be stored are paired in pairs to obtain several periodic segment combinations of the data to be stored; the DTW distance between the periodic segments in each combination is calculated, the DTW distance is negatively normalized, the normalized result is used as the similarity between the periodic segments in the combination, and the matching degree of the combination is obtained in combination with the time distance of the periodic segments in the combination; since the process of calculating the DTW distance is a well-known prior art, it will not be repeated in this embodiment.

[0029] The temporal distance between the periodic segments in the combination is negatively correlated with the matching degree of the combination; the similarity between the periodic segments in the combination is positively correlated with the matching degree of the combination; Optionally, in one example, the calculation formula is:

[0030] In the formula, Indicates the matching degree of the combination; Indicates the similarity between period segments in the combination; Indicates the distance in time between periodic segments in the combination; represents an exponential function with a natural constant as the base. In this embodiment, Model to show inverse proportional and normalized relationship, As the input of the model, the implementer can set the inverse proportion and normalization function according to the actual situation; The preset hyperparameter is greater than 0 and less than 1. The specific value of can be set according to the actual situation. This embodiment does not make a rigid requirement. The purpose of the description is to weaken the decay rate of the inverse proportional normalization function.

[0031] Furthermore, the matching degrees of all combinations of the data to be stored are integrated to obtain the regularity of the data to be stored; In one example, the average of the matching degrees of all combinations of the data to be stored is taken as the regularity of the data to be stored.

[0032] It should be noted that the specific purpose of this embodiment is to classify users with similar electricity usage habits into one category, and then store the smart meter data of each category of users. Therefore, it is necessary to calculate the regularity of all data to be stored in each cluster. The more similar the data of the same smart meter on different dates are, the more regular the smart meter data is, and the smaller the time interval between different dates is, the greater the reference value of the similarity is, and the more regular the obtained smart meter data is, the higher the credibility is.

[0033] It needs to be further explained that users with strong regular electricity usage habits in cities, such as factories and workers' dormitories, are distributed on the edge of the city. That is, the more remote the area of ​​the city, the more regular their electricity usage habits. Therefore, through the specific location of each cluster in the city and the regularity of each data to be stored in the cluster, the overall electricity usage regularity of the data to be stored in the cluster can be obtained.

[0034] Preferably, in this embodiment, the DBSCAN density clustering algorithm is used to cluster the locations of all data to be stored, and the number of clusters is obtained by the silhouette coefficient method to obtain a plurality of clusters; since both the DBSCAN density clustering algorithm and the silhouette coefficient method are known prior arts, they will not be described in detail in this embodiment; Obtain the cluster centers of all clusters; for any cluster, take the average of the distances between the cluster center and the cluster centers of all clusters as the remoteness of the cluster; according to the remoteness of the cluster and the regularity of each data to be stored in the cluster, obtain the overall power consumption regularity of the data to be stored in the cluster; The remoteness of the cluster is positively correlated with the overall power consumption regularity of the data to be stored in the cluster; the regularity of each data to be stored in the cluster is negatively correlated with the overall power consumption regularity of the data to be stored in the cluster.

[0035] Optionally, in an example, the specific calculation formula is:

[0036] In the formula, Indicates The overall power consumption regularity of the data to be stored in each cluster; Indicates The remoteness of each cluster; Indicates The number of data to be stored in each cluster; No. In the cluster The regularity of the data to be stored; Represents the normalization function.

[0037] It should be noted that for any cluster, the farther the distance between the cluster center and the cluster centers of all clusters is, the more remote the location of the cluster is in the city. The larger the value, the The stronger the overall power consumption regularity of the data to be stored in the cluster, the stronger the regularity of each data to be stored in the cluster, so The larger the value of The more regular the overall power consumption of the data to be stored in the cluster, the stronger the regularity.

[0038] At this point, the overall power usage regularity of the data to be stored in each cluster is obtained.

[0039] Step S003: Filter out the target cycle segment based on the similarity between each cycle segment of the same data to be stored; obtain the difference factor of all power consumption in each target cycle segment based on the difference and fluctuation difference in power consumption between the target cycle segment of the same data to be stored and other target cycle segments, and weight the difference factor according to the amplitude of each power consumption in each target cycle segment to obtain the consistency between the target cycle segment and other target cycle segments; obtain the power consumption regularity of the data to be stored based on the consistency between all target cycle segments of the data to be stored and other target cycle segments.

[0040] It should be noted that in order to be able to classify users more accurately, it is also necessary to obtain the electricity consumption regularity of each data to be stored. However, since users' electricity consumption habits on holidays are usually different from those on weekdays, there are obvious similarities between the cycle segments corresponding to weekdays. In daily life, the duration of weekdays is much longer than that of holidays. Therefore, in order to better analyze users' electricity consumption habits, it is necessary to exclude the smart meter data corresponding to holidays, and it is necessary to screen the cycle segments of all data to be stored to obtain the target cycle segment, and the target cycle segment is the smart meter data corresponding to weekdays; further, based on the difference and fluctuation difference in power consumption between the target cycle segment of the same data to be stored and other target cycle segments, the electricity consumption regularity of the data to be stored is obtained.

[0041] Preferably, in one embodiment of the present invention, for any periodic segment of any data to be stored, the mean DTW distance between the periodic segment and all periodic segments of the data to be stored is calculated and negative correlation normalization is performed, and the normalization result is used as the sociability of the periodic segment; a sociability threshold is preset , The specific value of can be set according to the actual situation, and this embodiment does not limit it. Describe, if the sociability of the period is greater than , then the cycle segment is recorded as the target cycle segment.

[0042] Further, for any target periodic segment of any data to be stored, a distance matrix between the target periodic segment and each target periodic segment of the data to be stored is constructed; and the best matching path in each distance matrix is ​​obtained; For any element on the best matching path in any distance matrix, the two periodic segments that construct the distance matrix are recorded as parent periodic segments, and the two power consumptions corresponding to the element on the parent periodic segments are recorded as corresponding power consumptions. Figure 2 For example, Figure 2 Schematic diagram of the distance matrix of two sequences; For any power consumption in any target cycle segment of any data to be stored, the power consumption corresponding to the power consumption in each target cycle segment is obtained, the sum of the differences between the power consumption and all corresponding power consumptions is obtained, and normalized to obtain the first difference factor of the power consumption.

[0043] It should be noted that, in the process of calculating the DTW distance between two sequences, it is necessary to construct a distance matrix of the two sequences, and obtain the best matching path according to the distance matrix, which is one of the processes of calculating the DTW distance between the two sequences. The process of calculating the DTW distance is a well-known prior art, so it will not be repeated in this embodiment.

[0044] Further, for any power consumption of any target periodic segment of any data to be stored, all target periodic segments of the data to be stored are merged to obtain the average periodic segment of the data to be stored, the power consumption corresponding to the power consumption in the average periodic segment of the data to be stored is obtained, the difference between the power consumption and the corresponding power consumption is normalized, and the normalized result is recorded as the second difference factor of the power consumption; It should be noted that since the process of obtaining the power consumption corresponding to the power consumption in the average period of the data to be stored is the same as the process of obtaining the power consumption corresponding to the power consumption in each target period, it will not be repeated in this embodiment.

[0045] Recording the index of the power consumption data in the target data segment as a characteristic index, recording the power consumption at the characteristic index in all target period segments of the data to be stored as the corresponding power consumption of the power consumption; and taking the coefficient of variation of all corresponding power consumptions of the power consumption as the third difference factor of the power consumption; Normalizing the power consumption according to the magnitude of the power consumption, and using the normalization result as the difference factor weight of the power consumption; For any target cycle segment, the first difference factor, the second difference factor, the third difference factor of all power consumption within the target cycle segment, and the difference factor weights of all power consumption within the target cycle segment are all negatively correlated with the degree of consistency between the target cycle segment and other target cycle segments.

[0046] Optionally, in an example, the specific calculation formula is:

[0047] In the formula, Indicates In the cluster The first data to be stored The degree of consistency between a target period and other target periods; Indicates In the cluster The first data to be stored The amount of all power consumption within a target period; Indicates In the cluster The first data to be stored Within the target period The first difference factor of power consumption; Indicates In the cluster The first data to be stored Within the target period A second factor of difference in power consumption; Indicates In the cluster The first data to be stored Within the target period The third difference factor of power consumption; Indicates In the cluster The first data to be stored Within the target period The weight of the difference factor of power consumption.

[0048] It should be noted that the first difference factor of all power consumption in the target cycle segment represents the difference in power consumption between all power consumption in the target cycle segment and each other target cycle segment; the second difference factor of all power consumption in the target cycle segment represents the overall difference between all power consumption in the target cycle segment and all target cycle segments; the third difference factor of all power consumption in the target cycle segment represents the difference between all power consumption in the target cycle segment and all target cycle segments under the same position index; since this embodiment classifies users by analyzing smart meter data, it should focus on calculations when power consumption is large, so The larger the value of In the cluster The first data to be stored The more consistent the target cycle segments are with other target cycle segments; and when all target cycle segments of any data to be stored are consistent with other target cycle segments, the power usage regularity of the data to be stored is obtained, so the power usage regularity of the data to be stored can be obtained.

[0049] Preferably, in this embodiment, for any data to be stored, the consistency between all target cycle segments of the data to be stored and other target cycle segments is integrated and normalized, and the normalization result is used as the power consumption regularity of the data to be stored.

[0050] At this point, the power usage regularity of all data to be stored is obtained.

[0051] Step S004: according to the overall power usage regularity of the data to be stored in the cluster, combined with the power usage regularity of the data to be stored, the regularity coefficient of the data to be stored is obtained, and combined with the power consumption of the data to be stored, the data to be stored is classified and stored.

[0052] It should be noted that after obtaining the overall power consumption regularity of the data to be stored in the cluster and the power consumption regularity of the data to be stored respectively through step S002 and step S003, the regularity coefficient of the stored data can be obtained according to the overall power consumption regularity of the data to be stored in the cluster and the power consumption regularity of the data to be stored, and the data to be stored can be further classified and stored in combination with the power consumption of the data to be stored, that is, the smart meter data of users with similar power consumption habits are classified into one category for storage, which is more conducive to the subsequent analysis or prediction of the user's power consumption behavior.

[0053] Specifically, for any data to be stored in any cluster, the power usage regularity of the data to be stored is normalized, and the normalization result is recorded as the power usage regularity degree of the data to be stored; the power usage regularity of the entire data to be stored in the cluster is normalized, and the normalization result is recorded as the power usage regularity degree of the entire data to be stored in the cluster; The product of the power usage regularity of the data to be stored and the power usage regularity of the entire data to be stored in the cluster where the data to be stored is used as a regularity coefficient for classifying the data to be stored, and is recorded as the regularity coefficient of the data to be stored.

[0054] It should be noted that the larger the regularity coefficient of the data to be stored is, the more regular the data to be stored is; by giving a large weight to the regular data to be stored when clustering the data to be stored, users with similar electricity usage habits can be more easily classified into the same category.

[0055] Preferably, in one embodiment of the present invention, a plurality of clusters are obtained by using an improved k-means iterative clustering algorithm according to the power consumption of the data to be stored, and the data to be stored in the same cluster are stored in the same location; the updating process of the cluster center in the improved k-means iterative clustering algorithm is as follows: For any cluster, obtain the vector from the initial cluster center to the cluster center and record it as the offset vector; record the product of the regularity coefficient of each data to be stored in the cluster and the offset vector as the offset component vector of each data to be stored in the cluster; record the sum of the offset component vectors of each data to be stored in the cluster as the final offset vector; take the initial cluster center in the cluster as the starting point of the final offset vector, and take the end point of the final offset vector as the new cluster center.

[0056] It should be noted that this embodiment obtains the regularity of the smart meter data by analyzing the smart meter data. When clustering, the influence of the smart meter data with weak regularity on the clustering is weakened, so that users with similar electricity usage habits are more easily classified into the same category. Finally, the smart meter data of the same category are stored in the same location, which is more conducive to the subsequent analysis or prediction of the user's electricity usage behavior.

[0057] In one embodiment of the present invention, the number of clusters obtained by the silhouette coefficient method is recorded as K; K initial cluster centers are randomly set, and the improved k-means iterative clustering algorithm is performed until the updated cluster centers are completely consistent with the cluster centers before the update, and the iteration is stopped. The specific silhouette coefficient method and the k-means iterative clustering algorithm are well known to those skilled in the art and will not be described in detail here.

[0058] Another embodiment of the present invention provides a smart meter data storage system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a smart meter data storage method in steps S001 to S004 when executing the computer program.

[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A smart meter data storage method, characterized in that: The method comprises the following steps: Obtain each data to be stored and the location of each data to be stored, wherein each data to be stored is all power consumption collected by each smart meter; Each data to be stored is segmented to obtain several periodic segments; the regularity of the data to be stored is obtained according to the similarity between the periodic segments of the same data to be stored; all the data to be stored are clustered according to the position of each data to be stored to obtain several clusters; according to the distribution position of the clusters and the regularity of all the data to be stored in the clusters, the overall power consumption regularity of the data to be stored in the clusters is obtained; According to the similarity between each cycle segment of the same data to be stored, the target cycle segment is screened out; according to the difference and fluctuation difference in power consumption between the target cycle segment of the same data to be stored and other target cycle segments, the difference factor of all power consumption in each target cycle segment is obtained, and the difference factor is weighted according to the amplitude of each power consumption in each target cycle segment to obtain the consistency between the target cycle segment and other target cycle segments; according to the consistency between all target cycle segments of the data to be stored and other target cycle segments, the power consumption regularity of the data to be stored is obtained; According to the overall power consumption regularity of the data to be stored in the cluster, combined with the power consumption regularity of the data to be stored, the regularity coefficient of the data to be stored is obtained, and combined with the power consumption of the data to be stored, the data to be stored is classified and stored.

2. A smart meter data storage method according to claim 1, characterized in that: The specific method of obtaining the regularity of the data to be stored includes: All periodic segments of the data to be stored are paired in pairs to obtain a number of periodic segment combinations of the data to be stored; the DTW distance between the periodic segments in each combination is calculated, the DTW distance is negatively normalized, the normalized result is used as the similarity between the periodic segments in the combination, and the matching degree of the combination is obtained by combining the time distance of the periodic segments in the combination; The matching degrees of all combinations of the data to be stored are integrated to obtain the regularity of the data to be stored.

3. A smart meter data storage method according to claim 1, characterized in that: The method of obtaining the overall power consumption regularity of the data to be stored in the cluster according to the distribution position of the cluster and the regularity of all the data to be stored in the cluster includes the following specific methods: Obtain the cluster centers of all clusters; for any cluster, take the average of the distances between the cluster center and the cluster centers of all clusters as the remoteness of the cluster; according to the remoteness of the cluster and the regularity of each data to be stored in the cluster, obtain the overall regularity of electricity consumption of users in the cluster; The remoteness of the cluster is positively correlated with the overall power consumption regularity of the users in the cluster; the regularity of each data to be stored in the cluster is negatively correlated with the overall power consumption regularity of the users in the cluster.

4. A smart meter data storage method according to claim 1, characterized in that: The difference factors include: a first difference factor, a second difference factor and a third difference factor.

5. A smart meter data storage method according to claim 4, characterized in that: The specific method for obtaining the first difference factor is: For any target periodic segment of any data to be stored, construct a distance matrix between the target periodic segment and each target periodic segment of the data to be stored; and obtain the best matching path in each distance matrix; For any element on the best matching path in any distance matrix, the two periodic segments for constructing the distance matrix are recorded as parent periodic segments, and the two power consumptions corresponding to the element on the parent periodic segments are recorded as corresponding power consumptions; For any power consumption in any target cycle segment of any data to be stored, the power consumption corresponding to the power consumption in each target cycle segment is obtained, the sum of the differences between the power consumption and all corresponding power consumptions is obtained, and normalized to obtain the first difference factor of the power consumption.

6. A smart meter data storage method according to claim 4, characterized in that: The specific method for obtaining the second difference factor is: For any power consumption in any target cycle segment of any data to be stored, all target cycle segments of the data to be stored are integrated to obtain the average cycle segment of the data to be stored, and the power consumption corresponding to the power consumption in the average cycle segment of the data to be stored is obtained. The difference between the power consumption and the corresponding power consumption is normalized, and the normalized result is recorded as the second difference factor of the power consumption.

7. A smart meter data storage method according to claim 4, characterized in that: The specific method for obtaining the third difference factor is: For any power consumption in any target period segment of any data to be stored, the index of the power consumption data in the target data segment is recorded as a feature index, and the power consumption located at the feature index in all target period segments of the data to be stored is recorded as the corresponding power consumption of the power consumption; the coefficient of variation of all corresponding power consumptions of the power consumption is used as the third difference factor of the power consumption.

8. A smart meter data storage method according to claim 1, characterized in that: The specific method for obtaining the regularity coefficient of the data to be stored is: For any data to be stored in any cluster, normalize the power usage regularity of the data to be stored, and record the normalization result as the power usage regularity degree of the data to be stored; Normalizing the power usage regularity of the entire data to be stored in the cluster, and recording the normalization result as the degree of power usage regularity of the entire data to be stored in the cluster; The product of the power usage regularity of the data to be stored and the power usage regularity of the entire data to be stored in the cluster where the data to be stored is used as a regularity coefficient for classifying the data to be stored, and is recorded as the regularity coefficient of the data to be stored.

9. A smart meter data storage method according to claim 1, characterized in that: The specific method of classifying and storing the data to be stored includes: According to the power consumption of the data to be stored, the improved k-means iterative clustering algorithm is used to obtain several clusters, and the data to be stored in the same cluster is stored in the same location; the updating process of the cluster center in the improved k-means iterative clustering algorithm is as follows: For any cluster, obtain the vector from the initial cluster center to the cluster center in the cluster and record it as the offset vector; record the product of the regularity coefficient of each data to be stored in the cluster and the offset vector as the offset component vector of each data to be stored in the cluster; record the sum of the offset component vectors of each data to be stored in the cluster as the final offset vector; The initial cluster center in the cluster is used as the starting point of the final offset vector, and the end point of the final offset vector is used as the new cluster center.

10. A smart meter data storage system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of a smart meter data storage method according to any one of claims 1 to 9 are implemented.