Clustering and encrypted transmission method and system for electricity utilization modes of resident electric appliances

By clustering and encrypting transmission of electrical appliance electricity usage modes on the metering automation terminal, the problem of inability to accurately support staggered electricity usage by residents is solved, the data transmission pressure is reduced, and user data safety is protected, and electrical appliance electricity optimization is achieved.

CN120030373APending Publication Date: 2025-05-23YUNNAN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411842888.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The existing technology cannot accurately support staggered electricity use by residents, and the upload pressure of electrical appliance electricity data is relatively high, which affects the normal operation of the metering system.

Method used

The electrical power data for electrical appliances is obtained through the metering automation terminal, and the electrical power mode clustering is carried out based on the K-Medoids algorithm, and the clustering results are encrypted using the SM4 encryption algorithm to reduce the amount of data and protect the security of user data.

Benefits of technology

It realizes accurate clustering and encrypted transmission of electrical appliance electricity usage modes, reduces data transmission pressure, protects user data security, and supports electrical appliance-level electricity usage optimization for residents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030373A_ABST
    Figure CN120030373A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for clustering and encrypted transmission of power consumption modes of resident electric appliances, and relates to the technical field of power consumption analysis, and the method comprises the following steps: a metering automation terminal obtains power consumption data of electric appliances operating an electric energy meter; the metering automation terminal calculates an electrical appliance power utilization mode clustering standard based on the initial power utilization time, the power utilization duration and the power utilization power of the electrical appliance; carrying out electric appliance peak period power consumption mode screening and electric appliance classification based on an electric appliance power consumption mode clustering result; and encrypting the operating electric energy meter peak period electric appliance list, the peak period power consumption mode, the power consumption probability and the recommended power consumption time through an SM4 encryption algorithm, and transmitting the encrypted information to a metering automation system master station. According to the invention, clustering analysis of the electric appliance power utilization mode is carried out based on the edge computing capability of the metering automation terminal, and the clustering result is transmitted to the metering automation system master station through an encryption algorithm, so that the uploaded data volume is reduced, the data transmission pressure is reduced, the user data security is protected, and the electric appliance level power utilization optimization of residential users is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electricity consumption analysis, and in particular to a method and system for clustering and encrypting the electricity consumption patterns of residential electrical appliances. Background Art

[0002] At present, in order to guide residential users to use electricity at off-peak times, residential time-of-use electricity prices have been implemented in various provinces across the country. At present, regional power grid companies in southern provinces have realized the release of users' electricity calendars, supporting users to understand the growth trend of electricity consumption and the proportion of electricity consumption at the appliance level, but have not realized the analysis of the daily electricity consumption time of appliances, and cannot accurately support users' off-peak electricity consumption.

[0003] Some areas in China have already implemented the identification of residential electrical appliances and the collection of electricity consumption time data in the energy meter according to the load identification function module, providing a data basis for analyzing the daily electricity consumption patterns of electrical appliances. Due to the huge amount of electrical appliance electricity consumption data, uploading all data to the metering automation system master station for analysis will increase the communication pressure of the metering system and affect the normal development of other businesses.

[0004] Based on this, the present invention proposes a method for clustering and encrypting the power consumption patterns of residential electrical appliances based on electrical load identification of electric energy meters, conducts clustering analysis of electrical appliance power consumption patterns based on the edge computing capability of metering automation terminals, and transmits the clustering results to the main station of the metering automation system through an encryption algorithm, thereby reducing the amount of uploaded data, alleviating data transmission pressure, protecting user data security, and supporting power consumption optimization at the appliance level for residential users. Summary of the invention

[0005] In view of the problems existing in the existing residential electrical appliance power consumption pattern clustering and encrypted transmission and system, the present invention is proposed.

[0006] Therefore, the problem to be solved by the present invention is that it is impossible to accurately support users' off-peak electricity consumption.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In a first aspect, an embodiment of the present invention provides a method for clustering and encrypting the electricity consumption patterns of residential electrical appliances, which comprises the following steps:

[0009] The metering automation terminal obtains the electricity consumption data of the running electric energy meter and electrical appliances;

[0010] The metering automation terminal calculates the clustering standard of electrical appliance power consumption patterns based on the starting time, power consumption duration and power consumption of electrical appliances, and clusters the power consumption patterns of electrical appliances based on the K-Medoids algorithm;

[0011] Based on the clustering results of electrical appliance power consumption patterns, the power consumption patterns of electrical appliances during peak hours are screened and electrical appliances are classified;

[0012] The list of electrical appliances during the peak period of the operating electric energy meter and its peak period power consumption mode, power consumption probability, and recommended power consumption time are encrypted by the SM4 encryption algorithm and transmitted to the main station of the metering automation system.

[0013] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances of the present invention, the power consumption data of the electrical appliances include the type number of the electrical appliances, the usage time and the total active power consumption;

[0014] Calculate the average power consumption of electrical appliances by the total active power consumption of electrical appliances and the usage time of the appliances;

[0015] The starting and ending times of each electricity usage record of an appliance are obtained through the appliance usage time, and the duration of each electricity usage is calculated.

[0016] As a preferred solution of the method for clustering and encrypting the electricity consumption patterns of residential electrical appliances described in the present invention, the step of clustering the electricity consumption patterns of electrical appliances based on the K-Medoids algorithm includes:

[0017] Select K electricity consumption data samples as initial cluster centers;

[0018] The difference between the starting power consumption time of the appliance data sample and the cluster center is introduced, and the time span problem is introduced. The starting power consumption time error of the appliance power consumption data sample τ and the jth cluster center is defined as α( τ ,j) for:

[0019]

[0020] Δt c (τ,j)=min{t c (τ)-t cm_j | , | 1440+t c (τ)-t cm_j | , | 1440+t cm_j -t c (τ)};

[0021] Where: α( τ ,j) is the error between the appliance power consumption data sample τ and the starting power consumption time of the jth cluster center; Δtc( τ ,j) is the difference between the starting power consumption time of the appliance power consumption data sample τ and the jth cluster center; tc( τ ) is the starting time of the electrical appliance power consumption data sample τ; tcm_jis the starting time of the jth cluster center of the electrical appliance power consumption data sample; ΔT max is the maximum value of the starting power consumption time difference;

[0022] when t c (τ) and t cm_j When they are equal, the initial power consumption time error α(τ,j) is the smallest, and the output value is 0;

[0023] when t c (τ) and t cm_j When the difference is 720 minutes, the initial power consumption time error value α(τ,j) is the largest, and the output value is 1;

[0024] Among them, the value range of the starting power consumption time error value α(τ,j) is [0,1].

[0025] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances of the present invention, the difference in power consumption duration between the electrical appliance data sample and the cluster center is defined as the power consumption duration error β(τ,j) between the electrical appliance power consumption data sample τ and the jth cluster center:

[0026]

[0027] ΔT(τ,j)=ΔT(τ)-ΔT m_j ;

[0028] Where: ΔT(τ,j) is the difference between the power consumption time of the appliance power consumption data sample τ and the jth cluster center; ΔT(τ) is the power consumption time of the appliance power consumption data sample τ; ΔT m_j is the electricity consumption duration of the jth cluster center of the electrical appliance electricity consumption data sample;

[0029] when ΔT( τ) and ΔT m_j When they are equal, the power consumption time error value β(τ,j) is the smallest, and the output value is 0;

[0030] when ΔT( τ) is greater or less than ΔT m_j When , the error value of electricity consumption duration β(τ,j) is close to 1;

[0031] The value range of the electricity consumption time error β(τ,j) is [0,1).

[0032] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances described in the present invention, the difference in power consumption between the electrical appliance power consumption data sample and the cluster center is introduced, and the average power consumption error γ between the power consumption data sample τ and the jth cluster center is defined. ( τ ,j)for:

[0033]

[0034] ΔP(τ,j)= | P(τ)-P m_j |

[0035] Where: ΔP(τ,j) is the difference between the average power consumption of the appliance power consumption data sample τ and the jth cluster center; P( τ) is the average power consumption of the electrical appliance power consumption data sample τ; P m_j is the average power consumption of the jth cluster center of the electrical appliance power consumption data sample;

[0036] when P( τ) and P m_j When they are equal, γ(τ,j) is the smallest and its value is 0; when P( τ) is much larger or smaller than P m_j When , the value of γ(τ,j) is close to 1. The range of γ(τ,j) is [0,1).

[0037] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances described in the present invention, the difference between the starting power consumption time, power consumption duration and power consumption of the electrical appliance data sample and the cluster center is introduced to define the power consumption pattern clustering standard of the data sample τ and the jth cluster center. for,

[0038]

[0039] In the formula, is the indicator weight, and

[0040] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances of the present invention, the larger the clustering standard value of the power consumption pattern of the electrical appliances, the greater the difference between the power consumption pattern of the power consumption data sample and the jth cluster center; the power consumption pattern clustering standard of each data sample of the electrical appliances and the cluster center is calculated, and if the power consumption pattern clustering standard of a certain sample and a certain cluster center is the smallest, the sample is classified into the cluster cluster;

[0041] The elbow method is used to determine the optimal clustering number K, and K power consumption modes of electrical appliances and the corresponding power consumption times and power consumption probabilities under each power consumption mode are obtained. The power consumption probability is the ratio of the power consumption times of a certain power consumption mode to the total power consumption times.

[0042] As a preferred solution of the method for clustering and encrypting the power consumption patterns of residential electrical appliances described in the present invention, the metering automation terminal screens out the power consumption patterns of electrical appliances in the peak period greater than T or with a power consumption time ratio greater than r% based on the time-of-use electricity price of residents and the peak, flat and valley periods and the power consumption patterns of electrical appliances, and defines them as the peak period power consumption patterns, and calculates the power consumption probability sum p1 of the peak period power consumption patterns, sets the power consumption probability threshold p2, and if p1>p2, defines the electrical appliance as a peak period electrical appliance;

[0043] The power grid company conducts screening of electrical appliances' peak-period power consumption patterns and classification of electrical appliances, and uses the non-peak period closest to the peak-period power consumption pattern of the peak-period appliances as the recommended power consumption time for that peak-period power consumption pattern.

[0044] In a second aspect, an embodiment of the present invention provides a system for clustering and encrypting the electricity consumption patterns of residential electrical appliances, which includes a data acquisition module, an encryption transmission module, a calculation module, and an identification module;

[0045] The data acquisition module is used for the metering automation terminal to obtain the power consumption data of the running electric energy meter and electrical appliances;

[0046] The encryption transmission module encrypts the list of electrical appliances during the peak period of the running electric energy meter and its power consumption mode, power consumption probability, and recommended power consumption time during the peak period through the SM4 encryption algorithm and transmits it to the metering automation system master station;

[0047] The calculation module calculates the starting time and ending time of each electricity consumption, as well as the duration of electricity consumption;

[0048] The identification module selects the peak-time electrical appliance power consumption pattern based on the time-of-use electricity price for residents, the peak, flat and valley time periods and the electrical appliance power consumption pattern.

[0049] In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, it implements any step of the above-mentioned method for clustering and encrypting transmission of residential electrical appliance power consumption patterns.

[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the above-mentioned method for clustering and encrypting transmission of residential electrical appliance power consumption patterns is implemented.

[0051] The beneficial effects of the present invention are: clustering analysis of electrical appliance power consumption patterns is carried out based on the edge computing capabilities of the metering automation terminal, and the clustering results are transmitted to the metering automation system main station through an encryption algorithm, thereby reducing the amount of uploaded data, alleviating data transmission pressure, protecting user data security, and supporting electricity consumption optimization at the appliance level for residential users. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. 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 creative work. Among them:

[0053] Figure 1 Flowchart of the method for clustering and encrypting the electricity consumption patterns of residential appliances. DETAILED DESCRIPTION

[0054] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0056] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0057] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0058] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0059] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0060] Example 1

[0061] Reference Figure 1 , which is the first embodiment of the present invention, and provides a method for clustering and encrypting the electricity consumption patterns of residential electrical appliances, comprising the following steps:

[0062] S1. The metering automation terminal obtains the electrical power consumption data of the running electric energy meter.

[0063] The electrical appliance power consumption data includes the electrical appliance type number, usage time and total active power consumption;

[0064] Calculate the average power consumption of electrical appliances by the total active power consumption of electrical appliances and the usage time of the appliances;

[0065] The starting and ending times of each electricity usage record of an appliance are obtained through the appliance usage time, and the duration of each electricity usage is calculated.

[0066] S2. The metering automation terminal calculates the clustering standard of electrical appliance power consumption patterns based on the starting time, duration and power consumption of the electrical appliances, and performs power consumption pattern clustering based on the K-Medoids algorithm.

[0067] The steps of clustering electrical appliance power consumption patterns based on the K-Medoids algorithm include:

[0068] Select K electricity consumption data samples as initial cluster centers;

[0069] The difference between the starting power consumption time of the appliance data sample and the cluster center is introduced, and the time span problem is introduced. The starting power consumption time error of the appliance power consumption data sample τ and the jth cluster center is defined as α( τ ,j) for:

[0070]

[0071] Δt c (τ,j)=min{t c (τ)-t cm_j | ,1440+t c (τ)-t cm_j ,1440+tcm_j -t c (τ)};

[0072] Where: α( τ ,j) is the error between the appliance power consumption data sample τ and the starting power consumption time of the jth cluster center; Δtc( τ ,j) is the difference between the starting power consumption time of the appliance power consumption data sample τ and the jth cluster center; tc( τ ) is the starting time of the electrical appliance power consumption data sample τ; tcm_j is the starting time of the jth cluster center of the electrical appliance power consumption data sample; ΔT max is the maximum value of the starting power consumption time difference;

[0073] because t c (τ) and t cm_j The maximum time difference is 12 hours, or 720 minutes, so ΔT m Set to 720min.

[0074] The steps of clustering electrical appliance power consumption patterns based on the K-Medoids algorithm also include:

[0075] when t c (τ) and t cm_j When they are equal, the initial power consumption time error α(τ,j) is the smallest, and the output value is 0;

[0076] when t c (τ) and t cm_j When the difference is 720 minutes, the initial power consumption time error value α(τ,j) is the largest, and the output value is 1;

[0077] Among them, the value range of the starting power consumption time error value α(τ,j) is [0,1].

[0078] The difference between the appliance data sample and the cluster center in terms of power consumption time is defined as the power consumption time error β(τ,j) between the appliance power consumption data sample τ and the jth cluster center:

[0079]

[0080] ΔT(τ,j)=ΔT(τ)-ΔT m_j ;

[0081] Where: ΔT(τ,j) is the difference between the power consumption time of the appliance power consumption data sample τ and the jth cluster center; ΔT(τ) is the power consumption time of the appliance power consumption data sample τ; ΔT m_jis the electricity consumption duration of the jth cluster center of the electrical appliance electricity consumption data sample;

[0082] when ΔT( τ) and ΔT m_j When they are equal, the power consumption time error value β(τ,j) is the smallest, and the output value is 0;

[0083] when ΔT( τ) is greater or less than ΔT m_j When , the error value of electricity consumption duration β(τ,j) is close to 1;

[0084] The value range of the electricity consumption time error β(τ,j) is [0,1).

[0085] The difference in power consumption between the electrical appliance power consumption data sample and the cluster center is introduced, and the average power consumption error γ between the power consumption data sample τ and the jth cluster center is defined ( τ ,j) for:

[0086]

[0087] ΔP(τ,j)= | P(τ)-P m_j |

[0088] Where: ΔP(τ,j) is the difference between the average power consumption of the appliance power consumption data sample τ and the jth cluster center; P( τ) is the average power consumption of the electrical appliance power consumption data sample τ; P m_j is the average power consumption of the jth cluster center of the electrical appliance power consumption data sample;

[0089] when P( τ) and P m_j When they are equal, γ(τ,j) is the smallest and its value is 0; when P( τ) is much larger or smaller than P m_j When , the value of γ(τ,j) is close to 1. The range of γ(τ,j) is [0,1);

[0090] Introduce the differences between the appliance data sample and the cluster center in terms of starting power consumption time, power consumption duration, and power consumption, and define the power consumption pattern clustering standard of the data sample τ and the jth cluster center for,

[0091]

[0092] In the formula, is the indicator weight, and

[0093] This paper considers the above three indicators equally and sets the weights equal, that is,

[0094] The larger the clustering standard value of the electrical appliance power consumption pattern, the greater the difference between the power consumption data sample and the power consumption pattern of the jth cluster center. Calculate the power consumption pattern clustering standard of each electrical appliance data sample and cluster center. If the power consumption pattern clustering standard of a sample and a cluster center is the smallest, then classify this sample into the cluster cluster.

[0095] The elbow method is used to determine the optimal clustering number K, and K power consumption modes of electrical appliances and the corresponding power consumption times and power consumption probabilities under each power consumption mode are obtained. The power consumption probability is the ratio of the power consumption times of a certain power consumption mode to the total power consumption times.

[0096] S3. Based on the clustering results of electrical appliance power consumption patterns, screen the power consumption patterns during peak hours and classify electrical appliances.

[0097] Based on the time-of-use electricity price for residents, peak, flat and valley periods and the electricity consumption pattern of electrical appliances, the metering automation terminal selects the electricity consumption pattern with a peak period electricity consumption time greater than T or a peak period electricity consumption time ratio greater than r%, and defines it as the peak period electricity consumption pattern. The sum of the electricity consumption probabilities p1 of the peak period electricity consumption pattern is calculated, and the electricity consumption probability threshold p2 is set. If p1>p2, the appliance is defined as a peak period appliance.

[0098] The power grid company screens and classifies the peak-time electricity consumption patterns of electrical appliances, and uses the off-peak hours closest to the peak-time electricity consumption patterns of the peak-time appliances as the recommended electricity consumption time for the peak-time electricity consumption patterns.

[0099] S4. Encrypt the list of electrical appliances during the peak period of the running electric energy meter and its power consumption mode, power consumption probability, and recommended power consumption time during the peak period through the SM4 encryption algorithm and transmit them to the main station of the metering automation system.

[0100] The metering automation terminal encrypts the list of electrical appliances during the peak period of the operating electric energy meter and its power consumption pattern, power consumption probability, and recommended power consumption time during the peak period through the SM4 encryption algorithm and transmits it to the main station of the metering automation system. After decryption, the main station of the metering automation system associates the power consumption data of the user's operating electric energy meter according to the relationship between the user and the metering point, and the relationship between the metering point and the operating electric energy meter, and obtains the list of electrical appliances during the user's peak period and its power consumption pattern, power consumption probability, and recommended power consumption time during the peak period.

[0101] In summary, based on the edge computing capabilities of the metering automation terminal, clustering analysis of electrical appliance power consumption patterns is carried out, and the clustering results are transmitted to the metering automation system main station through an encryption algorithm, thereby reducing the amount of uploaded data, alleviating data transmission pressure, protecting user data security, and supporting electricity consumption optimization at the appliance level for residential users.

[0102] Example 2

[0103] On the basis of the first embodiment, this embodiment further provides a residential electrical appliance power consumption pattern clustering and encrypted transmission system, including a data acquisition module, an encrypted transmission module, a calculation module, and an identification module;

[0104] The data acquisition module is used for the metering automation terminal to obtain the power consumption data of the running electric energy meter and electrical appliances;

[0105] The encryption transmission module encrypts the list of electrical appliances during the peak period of the running electric energy meter and its power consumption mode, power consumption probability, and recommended power consumption time during the peak period through the SM4 encryption algorithm and transmits it to the metering automation system master station;

[0106] The calculation module calculates the starting time and ending time of each electricity consumption, as well as the duration of electricity consumption;

[0107] The identification module selects the peak-time electrical appliance power consumption pattern based on the time-of-use electricity price for residents, the peak, flat and valley time periods and the electrical appliance power consumption pattern.

[0108] This embodiment also provides a computer device, which is suitable for the case of the method for clustering and encrypting the power consumption patterns of residential electrical appliances, and includes a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the method for clustering and encrypting the power consumption patterns of residential electrical appliances as proposed in the above embodiment.

[0109] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0110] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for clustering and encrypting the power consumption patterns of residential electrical appliances as proposed in the above embodiment is implemented.

[0111] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0112] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for clustering and encrypting the electricity consumption patterns of residential electrical appliances, characterized in that: The following steps are included: The metering automation terminal obtains the electricity consumption data of the running electric energy meter and electrical appliances; The metering automation terminal calculates the clustering standard of electrical appliance power consumption patterns based on the starting time, power consumption duration and power consumption of electrical appliances, and clusters the power consumption patterns of electrical appliances based on the K-Medoids algorithm; Based on the clustering results of electrical appliance power consumption patterns, the power consumption patterns of electrical appliances during peak hours are screened and electrical appliances are classified; The list of electrical appliances during the peak period of the operating electric energy meter and its peak period power consumption mode, power consumption probability, and recommended power consumption time are encrypted by the SM4 encryption algorithm and transmitted to the main station of the metering automation system.

2. The method for clustering and encrypting the electricity consumption patterns of residential electrical appliances as claimed in claim 1, characterized in that: The electrical appliance power consumption data includes the electrical appliance type number, usage time and total active power consumption; Calculate the average power consumption of electrical appliances by the total active power consumption of electrical appliances and the usage time of the appliances; The starting and ending times of each electricity usage record of an appliance are obtained through the appliance usage time, and the duration of each electricity usage is calculated.

3. The method for clustering and encrypting the power consumption patterns of residential electrical appliances as claimed in claim 2, characterized in that: The steps of clustering electrical appliance power consumption patterns based on the K-Medoids algorithm include: Select K electricity consumption data samples as initial cluster centers; The difference between the starting power consumption time of the appliance data sample and the cluster center is introduced, and the time span problem is introduced. The error α(τ,j) between the starting power consumption time of the appliance power consumption data sample τ and the jth cluster center is defined as: Where: α(τ,j) is the error between the starting power consumption time of the appliance power consumption data sample τ and the jth cluster center; Δt c (τ,j) is the difference between the starting power consumption time of the appliance power consumption data sample τ and the jth cluster center; t c (τ) is the starting time of the electrical appliance power consumption data sample τ; t cm_j is the starting time of electricity consumption of the jth cluster center of the electrical appliance electricity consumption data sample; ΔT max is the maximum value of the starting power consumption time difference; When t c (τ) and t cm_j When they are equal, the initial power consumption time error α(τ,j) is the smallest, and the output value is 0; When t c (τ) and t cm_j When the difference is 720 minutes, the initial power consumption time error value α(τ,j) is the largest, and the output value is 1; Among them, the value range of the starting power consumption time error value α(τ,j) is [0,1].

4. The method for clustering and encrypting the electricity consumption patterns of residential electrical appliances as claimed in claim 3, characterized in that: The difference in power consumption time between the appliance data sample and the cluster center is introduced, and the power consumption time error β(τ,j) between the appliance power consumption data sample τ and the jth cluster center is defined as: ΔT(τ,j)=ΔT(τ)-ΔT m_j ; Where: ΔT(τ,j) is the difference between the power consumption time of the appliance power consumption data sample τ and the jth cluster center; ΔT(τ) is the power consumption time of the appliance power consumption data sample τ; ΔT m_j is the electricity consumption duration of the jth cluster center of the electrical appliance electricity consumption data sample; When ΔT(τ) and ΔT m_j When they are equal, the power consumption time error value β(τ,j) is the smallest, and the output value is 0; When ΔT(τ) is greater than or less than ΔT m_j When , the error value of electricity consumption duration β(τ,j) is close to 1; The value range of the electricity consumption time error β(τ,j) is [0,1).

5. The method for clustering and encrypting the power consumption patterns of residential electrical appliances as claimed in claim 4, characterized in that: The difference in power consumption between the electrical appliance power consumption data sample and the cluster center is introduced, and the average power consumption error γ(τ,j) between the power consumption data sample τ and the jth cluster center is defined as: ΔP(τ,j)=|P(τ)-P m_j | Where: ΔP(τ,j) is the difference between the average power consumption of the appliance power consumption data sample τ and the jth cluster center; P(τ) is the average power consumption of the appliance power consumption data sample τ; P m_j is the average power consumption of the jth cluster center of the electrical appliance power consumption data sample; When P(τ) and P m_j When they are equal, γ(τ,j) is the smallest and the value is 0; when P(τ) is much larger or much smaller than P m_j When , the value of γ(τ,j) is close to 1, and the range of γ(τ,j) is [0,1).

6. The method for clustering and encrypting the electricity consumption patterns of residential electrical appliances according to claim 5, characterized in that: Introduce the differences between the appliance data sample and the cluster center in terms of starting power consumption time, power consumption duration, and power consumption, and define the power consumption pattern clustering standard of the data sample τ and the jth cluster center for, In the formula, is the indicator weight, and 7. The method for clustering and encrypting the power consumption patterns of residential electrical appliances according to claim 6, characterized in that: The larger the clustering standard value of the electrical appliance power consumption pattern, the greater the difference between the power consumption data sample and the power consumption pattern of the jth cluster center. The power consumption pattern clustering standard of each electrical appliance data sample and the cluster center is calculated. If the power consumption pattern clustering standard of a sample and a cluster center is the smallest, the sample is classified into the power consumption pattern cluster cluster. The elbow method is used to determine the optimal clustering number K, and K power consumption modes of electrical appliances and the corresponding power consumption times and power consumption probabilities under each power consumption mode are obtained. The power consumption probability is the ratio of the power consumption times of a certain power consumption mode to the total power consumption times.

8. The method for clustering and encrypting the power consumption patterns of residential electrical appliances according to claim 7, characterized in that: Based on the time-of-use electricity price for residents, peak, flat and valley periods and the electricity consumption pattern of electrical appliances, the metering automation terminal selects the electricity consumption pattern with a peak period electricity consumption time greater than T or a peak period electricity consumption time ratio greater than r%, and defines it as the peak period electricity consumption pattern. The sum of the electricity consumption probabilities p1 of the peak period electricity consumption pattern is calculated, and the electricity consumption probability threshold p2 is set. If p1>p2, the appliance is defined as a peak period appliance. The power grid company carries out screening of electrical appliances' peak-period power consumption patterns and classification of electrical appliances, and takes the non-peak period closest to the peak-period power consumption pattern of the peak-period appliances as the recommended power consumption time for the peak-period power consumption pattern.

9. A residential electrical appliance power consumption pattern clustering and encrypted transmission system, based on the residential electrical appliance power consumption pattern clustering and encrypted transmission method according to any one of claims 1 to 8, characterized in that: It includes a data acquisition module, an encryption transmission module, a calculation module, and an identification module.

10. The residential electrical appliance power consumption pattern clustering and encrypted transmission system as claimed in claim 9, characterized in that: The data acquisition module is used for the metering automation terminal to obtain the power consumption data of the running electric energy meter and electrical appliances; The encryption transmission module encrypts the list of electrical appliances during the peak period of the running electric energy meter and its power consumption mode, power consumption probability, and recommended power consumption time during the peak period through the SM4 encryption algorithm and transmits it to the metering automation system master station; The calculation module calculates the starting time and ending time of each electricity consumption, as well as the duration of electricity consumption; The identification module selects the peak-time electrical appliance power consumption pattern based on the time-of-use electricity price for residents, the peak, flat and valley time periods and the electrical appliance power consumption pattern.