Energy data encryption method, noise generation method, device and storage medium

By determining the differential privacy coefficient and generating noise in non-invasive load monitoring, encrypting the energy data of energy-using equipment, the problem that the switching status accuracy of the power-using equipment in the prior art is difficult to meet user needs, and the privacy protection effect is improved .

CN113449313BActive Publication Date: 2025-01-14BEIJING ACAD OF ARTIFICIAL INTELLLIGENCE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010217331.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-25
Publication Date
2025-01-14
Estimated Expiration
2040-03-25

AI Technical Summary

Technical Problem

When the existing non-invasive load monitoring technology adds noise to protect the accuracy of the switch status of users' power equipment, it is difficult to meet the user's accuracy requirements, and there is a risk of privacy leakage.

Method used

By obtaining the total accuracy of the input, the differential privacy coefficient is determined based on the preset constraint relationship, the energy data of the energy consumption device group is generated, so as to ensure that the data cracking accuracy after adding noise reaches the level desired by the user.

Benefits of technology

It realizes the encryption degree dynamically adjusted to meet user needs, improves the accuracy of cracking switch status of electrical equipment, and enhances the protection effect of user privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449313B_ABST
    Figure CN113449313B_ABST
Patent Text Reader

Abstract

The present application provides an energy data encryption method, a noise generation method, a device and a storage medium, wherein the encryption method comprises: obtaining an input total accuracy rate, wherein the total accuracy rate represents the accuracy of parsing the switch states of the multiple energy-consuming devices in the time period through the encrypted data of the energy data; determining a differential privacy coefficient according to the total accuracy rate through a preset constraint relationship; generating noise according to the determined differential privacy coefficient, which is used to encrypt the energy data of the energy-consuming device group to obtain the encrypted data. The present application can determine the noise added to the energy data in each time interval in a time period according to the total accuracy rate that the user hopes to achieve, so that the switch state set of multiple energy-consuming devices parsed by the energy data after adding noise can meet the total accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing systems and methods, and in particular to an energy data encryption method, a noise generation method, a device and a storage medium. Background Art

[0002] Non-Intrusive Load Monitoring (NILM) can obtain power information such as the operation status of each user's power equipment by analyzing the total power consumption data of multiple power equipment (for example, total voltage, total current, etc.). Non-Intrusive Load Monitoring can provide users with power consumption strategies, as well as fault monitoring and fault analysis of power equipment, and can also provide reference information for power companies' grid planning.

[0003] However, if non-intrusive load monitoring is used by malicious attackers, it will pose a potential risk to the privacy of users' electricity usage information. At present, noise is usually added to the electricity usage data before the smart meter releases it to protect the privacy of users and reduce the accuracy of the operation of their electrical equipment.

[0004] However, how to add noise so that the accuracy of the on / off status of multiple electrical devices of a user obtained through non-intrusive load monitoring technology is the accuracy desired by the user has become a technical problem that needs to be solved urgently in the industry. Summary of the invention

[0005] In view of the shortcomings of the related technologies mentioned above, the purpose of the present application is to provide an energy data encryption method, noise generation method, device and storage medium, which are used to solve the problem in the prior art of how to add noise to the energy data so that the accuracy of deciphering the on-off status of the user's electrical equipment through the noisy energy data is the accuracy desired by the user.

[0006] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides an encryption method for energy usage data, which is applied to energy usage metering equipment; the energy usage data includes the energy usage of a group of energy-using devices in each time interval in a time period, and the energy-using device group includes multiple energy-using devices. The encryption method includes: obtaining a total accuracy of the input, wherein the total accuracy represents the accuracy of parsing the switching states of the multiple energy-using devices in the time period through the encrypted data of the energy usage data; determining a differential privacy coefficient according to the total accuracy through a preset constraint relationship; wherein the preset constraint relationship refers to: the total accuracy is a constraint on the comprehensive result of the accuracy of each set of energy-using devices in the energy-using device group, and the expected upper and lower limits of the accuracy of each set of energy-using devices are constraints related to the differential privacy coefficient; generating noise according to the determined differential privacy coefficient, which is used to encrypt the energy usage data of the energy-using device group to obtain the encrypted data.

[0007] In certain implementations of the first aspect of the present application, the energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

[0008] In certain embodiments of the first aspect of the present application, the grouping of the energy-consuming device group according to the average power of each of the energy-consuming devices includes: assigning the energy-consuming devices corresponding to the minimum value and the second minimum value of the average power in the energy-consuming device group to the current energy-consuming device set; judging whether the average power of each of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set; if so, the energy-consuming devices that meet the grouping condition are grouped into the current energy-consuming device set; if not, the current energy-consuming device set is constructed, and the energy-consuming devices that have completed the grouping are removed from the energy-consuming device group to update the energy-consuming device group; repeating the above steps until the generated multiple energy-consuming device sets include all the energy-consuming devices.

[0009] In certain embodiments of the first aspect of the present application, the differential privacy coefficient is determined according to the total accuracy rate by presetting a constraint relationship, including: within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, constraints related to the differential privacy coefficient, and preset parameters, obtaining the expected accuracy rate corresponding to each energy-consuming device set under each differential privacy coefficient; according to the accuracy rate corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, obtaining the total accuracy rate corresponding to each differential privacy coefficient, so as to determine the preset numerical correspondence relationship between the total accuracy rate and the differential privacy coefficient; and determining the differential privacy coefficient according to the total accuracy rate via the preset numerical correspondence relationship.

[0010] In certain embodiments of the first aspect of the present application, the preset parameters include: a grouping parameter, the number of the plurality of energy-consuming devices, the average power of the plurality of energy-consuming devices, and the sensitivity of the energy consumption data.

[0011] In certain implementations of the first aspect of the present application, the grouping parameters include: the number of energy-consuming devices in the concentrated energy-consuming devices of each energy-consuming device, and the average power of the energy-consuming devices in the concentrated energy-consuming devices of each energy-consuming device.

[0012] In certain embodiments of the first aspect of the present application, determining the differential privacy coefficient based on the total accuracy rate via the preset numerical correspondence includes: determining a plurality of preliminary differential privacy coefficients that satisfy the total accuracy rate based on the total accuracy rate via the preset numerical correspondence; and taking the minimum value among the preliminary differential privacy coefficients as the differential privacy coefficient.

[0013] In certain embodiments of the first aspect of the present application, noise is generated according to the determined differential privacy coefficient to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data, including: determining a distribution coefficient according to the determined differential privacy coefficient and the sensitivity of the energy usage data; wherein the distribution parameter is used to determine the probability density distribution of the noise; and generating noise according to the probability density distribution of the noise to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data.

[0014] In certain embodiments of the first aspect of the present application, the external input method of the total accuracy includes: input from an input device of the energy metering device; or input from other electronic devices communicatively connected to the energy metering device; or selection of a pre-stored value.

[0015] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides a noise generation method for energy usage data, wherein the energy usage data includes the energy usage of a group of energy-consuming devices in each time interval in a time period, and the energy-consuming device group includes multiple energy-consuming devices. The noise generation method includes: obtaining a total accuracy of the input, wherein the total accuracy represents the accuracy of parsing the switching states of the multiple energy-consuming devices in the time period through the encrypted data of the energy usage data; determining a differential privacy coefficient according to the total accuracy through a preset constraint relationship; wherein the preset constraint relationship refers to: the total accuracy is a constraint on the comprehensive result of the accuracy of each set of energy-consuming devices in the energy-consuming device group, and the expected upper and lower limits of the accuracy of each set of energy-consuming devices are constraints related to the differential privacy coefficient; generating noise according to the determined differential privacy coefficient, and sending the noise to the energy usage metering device so that it can encrypt the energy usage data according to the noise.

[0016] In certain implementations of the second aspect of the present application, the energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

[0017] In certain embodiments of the second aspect of the present application, the grouping of the energy-consuming device group according to the average power of each of the energy-consuming devices includes: assigning the energy-consuming devices corresponding to the minimum value and the second minimum value of the average power in the energy-consuming device group to the current energy-consuming device set; judging whether the average power of each of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set; if so, the energy-consuming devices that meet the grouping condition are grouped into the current energy-consuming device set; if not, the current energy-consuming device set is constructed, and the energy-consuming devices that have completed the grouping are removed from the energy-consuming device group to update the energy-consuming device group; repeating the above steps until the generated multiple energy-consuming device sets include all the energy-consuming devices.

[0018] In certain embodiments of the second aspect of the present application, the differential privacy coefficient is determined according to the total accuracy rate by presetting a constraint relationship, including: within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, the constraints related to the differential privacy coefficient, and preset parameters, obtaining the expected accuracy rate corresponding to each energy-consuming device set under each differential privacy coefficient; according to the accuracy rate corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, obtaining the total accuracy rate corresponding to each differential privacy coefficient, so as to determine the preset numerical correspondence relationship between the total accuracy rate and the differential privacy coefficient; and determining the differential privacy coefficient according to the total accuracy rate via the preset numerical correspondence relationship.

[0019] In certain embodiments of the second aspect of the present application, the preset parameters include: a grouping parameter, the number of the plurality of energy-consuming devices, the average power of the plurality of energy-consuming devices, and the sensitivity of the energy consumption data.

[0020] In certain implementations of the second aspect of the present application, the grouping parameters include: the number of energy-consuming devices in the concentrated energy-consuming devices of each energy-consuming device, and the average power of the energy-consuming devices in the concentrated energy-consuming devices of each energy-consuming device.

[0021] In certain embodiments of the second aspect of the present application, determining the differential privacy coefficient based on the total accuracy rate via the preset numerical correspondence includes: determining a plurality of preliminary differential privacy coefficients that satisfy the total accuracy rate based on the total accuracy rate via the preset numerical correspondence; and taking the minimum value among the preliminary differential privacy coefficients as the differential privacy coefficient.

[0022] In certain embodiments of the second aspect of the present application, generating noise based on the determined differential privacy coefficient includes: determining a distribution coefficient based on the determined differential privacy coefficient and the sensitivity of the energy data; wherein the distribution parameter is used to determine a probability density distribution of the noise; and generating noise based on the probability density distribution of the noise.

[0023] In certain embodiments of the second aspect of the present application, the external input method of the total accuracy includes: input from an input device of the electronic device; or input from an energy metering device that is communicatively connected to the electronic device; or selection of a pre-stored value.

[0024] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides an electronic device, comprising: an input device for external input; an interface device for communicating with an energy metering device; a storage device for storing at least one program; and a processing device connected to the storage device, the input device, and the interface device, for calling the at least one program to execute the noise generation method for energy data as described in any one of the second aspects of the present application.

[0025] To achieve the above-mentioned purpose and other related purposes, the fourth aspect of the present application provides an energy metering device, comprising: a measuring device for measuring energy consumption data, wherein the energy consumption data is the energy consumption data of a group of energy-consuming devices in each time interval in a time period; an interface device for communicating with the electronic device as described in the third aspect of the present application; a storage device for storing at least one program; a processing device connected to the storage device, the interface device, and the measuring device, and used to call the at least one program to coordinate the storage device, the interface device and the measuring device to perform the following energy data encryption method: receiving noise sent by the electronic device; encrypting the energy consumption data of the group of energy-consuming devices according to the noise to obtain the encrypted data.

[0026] To achieve the above-mentioned purpose and other related purposes, the fifth aspect of the present application provides an encryption processing system for energy data, including: the electronic device as described in the third aspect of the present application; the energy metering device as described in the fourth aspect of the present application.

[0027] To achieve the above-mentioned purpose and other related purposes, the sixth aspect of the present application provides an energy metering device, comprising: a measuring device for measuring energy consumption data, wherein the energy consumption data is the energy consumption data of a group of energy-consuming devices in each time interval in a time period; an input device for external input; a storage device for storing at least one program; a processing device connected to the storage device, the input device, and the measuring device, and used to call the at least one program to execute the energy consumption data encryption method as described in any one of the first aspects of the present application.

[0028] To achieve the above-mentioned purpose and other related purposes, the seventh aspect of the present application provides a computer-readable storage medium storing at least one program, which, when called, executes and implements the energy data encryption method as described in any one of the first aspects of the present application; or, executes and implements the noise generation method as described in any one of the second aspects of the present application.

[0029] In summary, the energy usage data encryption method, noise generation method, device and storage medium of the present application obtain the total accuracy of the input, wherein the total accuracy represents the accuracy of parsing the switch states of the multiple energy-consuming devices in the time period through the encrypted data of the energy usage data; the differential privacy coefficient is determined according to the total accuracy through a preset constraint relationship; noise is generated according to the determined differential privacy coefficient, which is used to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data. The scheme of the present application can determine the noise added to the energy usage data according to the total accuracy that the user hopes to achieve, so that the total accuracy of cracking the switch states of the user's energy-consuming devices through the energy usage data after adding noise is the accuracy that the user hopes to achieve. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The specific features of the invention involved in this application are shown in the attached claims. The features and advantages of the invention involved in this application can be better understood by referring to the exemplary embodiments and drawings described in detail below. A brief description of the drawings is as follows:

[0031] Figure 1 Shown is a schematic diagram of an application scenario in one embodiment of the present application.

[0032] Figure 2 Shown is a schematic diagram of the structure of an energy metering device of the present application in one embodiment.

[0033] Figure 3 Shown is a flowchart of an energy data encryption method in one embodiment of the present application.

[0034] Figure 4 Shown is a flowchart of a method for grouping the energy-consuming device group in one embodiment of the present application.

[0035] Figure 5 Shown is a schematic flow chart of an analysis method for a second switch state of an energy-consuming device according to the present application in one embodiment.

[0036] Figure 6 Shown is a schematic diagram of the structure of an encryption processing system of the present application in one embodiment.

[0037] Figure 7FIG. 1 is a flow chart of a noise generation method using energy data according to an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following is an explanation of the implementation of the present application by means of specific embodiments. People familiar with the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification.

[0039] In the following description, reference is made to the accompanying drawings, which describe several embodiments of the present application. It should be understood that other embodiments may also be used, and that changes in module or unit composition, electrical and operational aspects may be made without departing from the spirit and scope of the present disclosure. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present application is limited only by the claims of the published patents. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0040] Although, in some instances, the term first, second, etc. are used to describe various elements, information or parameters in this article, but these elements or parameters should not be limited by these terms. These terms are only used to distinguish an element or parameter from another element or parameter. For example, the first switch state can be referred to as the second switch state, and similarly, the second switch state can be referred to as the first switch state, without departing from the scope of the various described embodiments. The first switch state and the second switch state are both describing a switch state, but unless the context clearly indicates otherwise, they are not the same switch state. Depends on the context, such as the word "if" used herein can be interpreted as "at ... time" or "when ... time".

[0041] Furthermore, as used in this article, the singular forms "one", "an" and "the" are intended to include plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way.

[0042] The smart meter consists of a measuring unit, a data processing unit, a communication unit, etc. In addition to the basic electricity consumption metering function of the traditional electricity meter, it also has intelligent functions such as user-side control function and two-way data communication function with multiple data transmission modes.

[0043] Non-Intrusive Load Monitoring (NILM) can be used to analyze the operating status of all the user's electrical equipment based on the total power consumption measured by the smart meter without installing any sensor equipment on the circuit branch or each electrical equipment, and then provide energy strategies and electrical equipment fault monitoring and analysis to the user, and also provide reference information for the power company's grid planning. The electrical equipment includes but is not limited to: household appliances, industrial equipment, office equipment, etc.

[0044] However, if non-intrusive load monitoring is used by malicious attackers, the user's privacy information will be at potential risk. For example, malicious attackers can use non-intrusive load monitoring to understand the operating status of all industrial equipment in an enterprise, which will leak the enterprise's operation process, operation time and other private information. For another example, malicious attackers can use non-intrusive load monitoring to understand the operating status of all household appliances in the home, which will leak private information such as the life patterns of family members and whether there are people at home.

[0045] At present, before the smart meter displays the electricity consumption data of the electrical equipment, or before sending the electricity consumption data to a third party (for example, a power company, etc.), the electricity consumption data in each time interval is encrypted to protect the privacy of the user. In some scenarios, the degree of privacy protection of electricity consumption data is related to user needs. For example, compared with the degree of privacy protection for electricity consumption data in daily life, industrial production companies have a higher degree of privacy protection requirements for electricity consumption data. This makes the unified encryption method unfavorable for providing privacy protection for different levels of needs. The scope of use of the electrical equipment is not limited, and it can be an electrical equipment in a home, an electrical equipment in an enterprise, etc.

[0046] In order to solve the above technical problems, the present application provides an encryption method for energy usage data, which can determine the degree of encryption of energy usage data according to the user's demand for privacy protection. For example, if the user's electricity usage privacy reflected by the energy data is closely related to the user's interests, an encryption method with high parsing difficulty is provided to the user; conversely, an encryption method that is easier to parse can be provided in a timely manner. This also provides a more flexible processing method for adopting a non-invasive load monitoring system. The energy usage data of the present application can be executed by an energy metering device or other devices that can execute the encryption method.

[0047] See also Figure 1 , Figure 1 A schematic diagram showing an application scenario in an embodiment of the present application is shown as follows: Figure 1 As shown, a plurality of energy-consuming devices are shown, and the energy-consuming metering device 100 is coupled to each of the energy-consuming devices in the energy-consuming device group to measure the energy-consuming data of the energy-consuming device group.

[0048] The energy-consuming equipment 400 refers to equipment that requires energy in any place such as enterprises and homes, such as industrial equipment, such as manufacturing / processing equipment, assembly line equipment, etc.; and household electrical appliances such as televisions, refrigerators, air conditioners, etc., and lamps in lighting systems.

[0049] The energy-consuming device group includes multiple energy-consuming devices, which may be a general term for multiple energy-consuming devices connected to the same energy-consuming metering device or a general term for multiple energy-consuming devices connected to multiple energy-consuming metering devices. In one embodiment, the energy-consuming metering device is exemplified as a smart meter. For example, there are multiple buildings in a school, and each building has a smart meter. Then, all energy-consuming devices in one of the buildings may be an energy-consuming device group or all energy-consuming devices in the school may be an energy-consuming device group.

[0050] The energy consumption data of the energy-consuming device group can be determined according to the energy type required for the device to operate. The energy type includes but is not limited to electrical energy, thermal energy, etc. When the energy type is electrical energy, the energy-consuming device is an electrical device, and the energy consumption data of the energy-consuming device group is the sum of the power consumption of all energy-consuming devices in the energy-consuming device group in each time interval in a period of time.

[0051] In order to realize the encryption of the energy consumption data of the multiple energy-consuming devices measured by the energy consumption metering device 100 according to the privacy protection requirements of the user. The present application provides an energy consumption data encryption method, which can be Figure 2 The energy metering equipment shown is implemented.

[0052] See also Figure 2 , Figure 2 The schematic diagram of the structure of the energy metering device in one embodiment of the present application is shown as follows: Figure 2 As shown, the energy metering device 200 includes: a measuring device 201, an input device 202, a storage device 203, and a processing device 204. The energy metering device 200 can be used to implement, for example Figure 1 The energy metering device 100 is used in the embodiment of the present invention.

[0053] The energy metering device 200 is exemplified as a smart meter, which is composed of a measurement unit, a data processing unit, a communication unit, etc. In addition to the basic electricity metering function of a traditional energy meter, it also has intelligent functions such as user-side control function and two-way data communication function in multiple data transmission modes.

[0054] The measuring device 201 is used to measure energy consumption data, wherein the energy consumption data is the energy consumption data of the energy consumption equipment group in each time interval in a period. The measuring device 201 is a measuring mechanism in the energy consumption metering device 200. The measuring device 201 samples the voltage and current, which can be converted into actual energy consumption data through the metering chip.

[0055] The input device 202 is used for external input. The input device 202 allows the user to input the total accuracy or set preset parameters in real time according to actual needs. The total accuracy represents the accuracy of parsing the switch states of the multiple energy-consuming devices in a period of time through the encrypted data of the energy-consuming data. Specifically, the total accuracy represents the ratio between the number of elements in the switch states of the multiple energy-consuming devices in a period of time obtained by analyzing the encrypted data and the product of the total number of energy-consuming devices and the total number of time intervals in a period of time. Among them, the encrypted data of the energy-consuming data is the energy-consuming data after adding noise. Among them, the preset parameters include: grouping parameters, the number of the multiple energy-consuming devices, the average power of the multiple energy-consuming devices, and the sensitivity of the energy data. The preset parameters can also be changed through the input device 202 according to the changes in the actual energy-consuming devices.

[0056] The input device 202 enables the user to interact with the energy metering device 200. The input device 202 includes a button, a keyboard, a mouse, a touchpad, etc. In other embodiments, the input device 202 may also include an audio unit, and the audio unit may include a speaker, a pickup, etc. The energy metering device 200 can interact with the user's voice through the audio unit. In this way, the energy metering device 200 can obtain the total accuracy of the user input through interaction with the user. For example, the user selects a pre-stored value of the total accuracy, and the value range of the pre-stored total accuracy is related to the processing capacity of the energy metering device 200. In practical applications, the total accuracy may also come from the input of an electronic device that is communicatively connected to the energy metering device 200. The electronic device may be any computer device that can be connected to the energy metering device 200 for network communication. Among them, the electronic device is communicatively connected to the energy metering device through its interface device.

[0057] The storage device 203 is used to store at least one program. In some embodiments, the storage device 203 includes one or more memories, which are used to execute the encryption method of energy data based on the technical idea of ​​the present application when executed. In an embodiment, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. In some embodiments, the memory may also include a memory away from one or more processors, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, local area networks, wide area networks, storage area networks, etc., or a suitable combination thereof. The memory controller may control the access of other components of the device such as the CPU and peripheral interfaces to the memory. In some embodiments, the storage device 203 also pre-stores information such as the average power of each of the energy-consuming devices of the user, or the sensitivity of the energy data corresponding to the user, so that the energy metering device can execute the encryption method of the energy data.

[0058] The processing device 204 is connected to the storage device 203. In some embodiments, the processing device 204 includes one or more processors, and the processing device 204 is used to call the at least one program to execute the encryption method of energy consumption data described in the present application. In an embodiment, the processor is operably coupled to a memory and / or a non-volatile storage device. More specifically, the processor can execute instructions stored in the memory and / or the non-volatile storage device to perform operations in the energy metering device, such as encrypting the energy consumption data of the energy consumption device group according to the generated noise to obtain the encrypted data. In this way, the processor may include one or more general-purpose microprocessors, one or more special-purpose processors, one or more field programmable logic arrays, or any combination thereof.

[0059] The processing device 204 can also be operably coupled to an interface unit of the energy metering device. Through the interface unit, the energy metering device 200 can interact with various other electronic devices, and enable users to interact with the energy metering device 200. The interface unit includes a network interface, a data line interface, etc. The network interface includes but is not limited to: an Ethernet network interface, a network interface based on a mobile network (3G, 4G, 5G, etc.), a network interface based on short-range communication (WiFi, Bluetooth, etc.), etc. The data line interface includes but is not limited to: a USB interface, RS232, etc.

[0060] See also Figure 3 , Figure 3 The following is a flow chart of an energy data encryption method according to an embodiment of the present application. Figure 3As shown, the encryption method includes: step S110, step S120, and step S130.

[0061] Step S110, obtaining a total accuracy rate of the input, wherein the total accuracy rate represents the accuracy of parsing the switching states of the plurality of energy-consuming devices in the time period through the encrypted data of the energy-consuming data.

[0062] The encrypted data is the energy consumption data after adding noise. The total accuracy rate represents the ratio between the number of elements in the switch state set of the multiple energy-consuming devices in a time period obtained by analyzing the encrypted data and the product of the total number of energy-consuming devices and the total number of time intervals in a time period, and the switch state set is composed of the switch states of the multiple energy-consuming devices in the time period.

[0063] The encrypted data may be processed using a non-intrusive load monitoring method to obtain a set of switch states of the plurality of energy-consuming devices within a period of time, and the total accuracy rate reflects the overall accuracy of the set of switch states.

[0064] The non-intrusive load monitoring method can determine the switch state set of the energy-consuming device group in each time interval in a period according to the average power of each of the energy-consuming devices and the energy consumption data of the energy-consuming device group.

[0065] The average power is the average value of the power consumed by each energy-consuming device within a preset time. The preset time may be a period or an integer multiple of the period, but is not limited thereto. In one embodiment, the average power P of each energy-consuming device is i The energy consumption data can be obtained by starting each energy-consuming device individually within the preset time. In another embodiment, the average power P of each energy-consuming device i The rated power of each energy-consuming device can be used for approximation. The energy consumption data Y of the energy-consuming device group is (y0, ..., y T ) includes: the energy consumption data Y′=(y1,....,y T ) and the initial energy consumption data y0 of the energy-consuming equipment group.

[0066] The time interval t includes but is not limited to: one or more seconds, one or more minutes, one or more hours, one or more days, one or more weeks, or one or more months, etc. A plurality of the time intervals t constitute a time period. T is the number of time intervals in a time period. For example, assuming that the time period is one day, the time interval t can be every minute, every hour, etc. of the day. Alternatively, a time period is divided into multiple time intervals according to the update cycle of the energy metering device when measuring energy data. For example, if the time period is 1 hour and the update cycle is 6 seconds, then every 6 seconds is a time interval, and the number of time intervals T in a time period is 600. i∈N, N represents the number of the multiple energy-consuming devices.

[0067] In some embodiments, the non-intrusive load monitoring method groups the energy consuming device group according to the average power of each energy consuming device to obtain one or more energy consuming device sets. The switch state set can be obtained according to the switch state of the energy consuming devices in each energy consuming device set.

[0068] In one embodiment, before the energy-consuming device group is grouped, the average power of the energy-consuming devices in the energy-consuming device group is sorted according to size to obtain an average power sequence P1, P2, ..., P arranged in ascending order. N , which can improve the efficiency of executing grouping operations, where P1 <P2...<P N .

[0069] See also Figure 4 , Figure 4 The following is a flow chart of a method for grouping the energy-consuming device group in one embodiment of the present application. When performing the grouping operation, based on the continuously updated energy-consuming device group, the following steps are repeatedly performed to generate multiple energy-consuming device sets {C1, C2...C K}. Where K is the number of energy-consuming equipment sets. Figure 4 The grouping method shown includes: step S211, step S212, step S213, step S214, and step S215.

[0070] In step S211, the energy consuming devices corresponding to the minimum value and the second minimum value of the average power in the energy consuming device group are assigned to the current energy consuming device set.

[0071] It should be noted that the energy-consuming device group will be updated according to each grouping result of step S214. For example. Initially, the energy-consuming device group includes 10 energy-consuming devices, and the energy-consuming devices corresponding to the minimum value and the second minimum value of the average power among the 10 energy-consuming devices are assigned to the current energy-consuming device set C1. If the first energy-consuming device set C1 divided in step S214 includes 3 energy-consuming devices, then when the second energy-consuming device set C2 is generated, the energy-consuming device group includes the remaining 7 energy-consuming devices, and the energy-consuming devices corresponding to the minimum value and the second minimum value of the average power among the remaining 7 energy-consuming devices are assigned to the current energy-consuming device set C2.

[0072] In step S212, it is determined whether the average power of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set. It should be noted that before executing step S212, the energy-consuming devices in the current energy-consuming device set need to be sorted in ascending order according to the average power. Among them, the preset grouping condition of the current energy-consuming device set can be expressed by formula (1):

[0073]

[0074] Among them, |C| is the total number of energy-consuming devices in the current energy-consuming device set. For example, when constructing the previous energy-consuming device set C1, initially, the current energy-consuming device set C1 includes 2 energy-consuming devices. When judging according to formula (1), if the judgment result of step S212 is yes, there are energy-consuming devices in the remaining devices that meet the preset grouping conditions, and then the total number of energy-consuming devices in the current energy-consuming device set C1 will increase according to the judgment result. It should be noted that when executing step S212 again to determine whether the average power of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping conditions of the current energy-consuming device set C1, it is necessary to sort each energy-consuming device in the current energy-consuming device set C1 to which the energy-consuming devices are added again according to the average power from small to large to execute step S212.

[0075] Among them, c j is the average power corresponding to each energy-consuming device in the current energy-consuming device set. j is the ranking number of the average power corresponding to each energy-consuming device. For example, the average powers corresponding to two energy-consuming devices in the current energy-consuming device set are c1 and c2, respectively, where c1<c2. δ is a preset error, which is determined based on the sensitivity Δf of the energy data. In one embodiment, the preset error δ is twice the sensitivity Δf of the energy data, but is not limited to this. The sensitivity Δf of the energy data will be described in detail later. Wherein, P i It is the average power corresponding to other energy-consuming devices that are not included in the energy-consuming device set.

[0076] If the judgment result of step S212 is yes, then step S213 is executed. In step S213, the energy-consuming devices that meet the grouping condition are grouped into the current energy-consuming device set. For example, the current energy-consuming device set C1 includes 2 energy-consuming devices. If the energy-consuming device with an average power of P3 in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set C1, the energy-consuming device corresponding to P3 is assigned to the current energy-consuming device set. And step S212 is re-executed according to the updated current energy-consuming device set C1.

[0077] If the result of the judgment in step S212 is no, then step S214 is executed. In step S214, the current energy-consuming device set is constructed, and the energy-consuming devices that have completed grouping are removed from the energy-consuming device group to update the energy-consuming device group. For example, if the current energy-consuming device set C2 that has completed grouping includes energy-consuming devices corresponding to average powers of P4, P5, and P6, then the energy-consuming devices corresponding to average powers of P4, P5, and P6 are removed from the energy-consuming device group to update the energy-consuming device group.

[0078] Afterwards, the above steps need to be repeated for the energy-consuming devices that have not been grouped, until all the energy-consuming devices are included in the generated multiple energy-consuming device sets. Specifically, steps S211 to S214 are repeated according to the updated energy-consuming device group until all the energy-consuming devices have their own energy-consuming device sets. For example, as shown in step S215 in the figure, it is determined whether there are still energy-consuming devices that have not been grouped in the energy-consuming device group; if so, steps S211 to S214 are repeated; if not, the process ends.

[0079] according to Figure 4 The grouping method shown in the figure can generate multiple energy-consuming device sets {C1, C2...C K}. But not limited to Figure 4 The grouping method shown may be any grouping method or grouping condition as long as it can make the average power of the energy-consuming devices in each energy-consuming device set generated not differ much.

[0080] In the non-intrusive load monitoring method of the present application, after completing the grouping of the above-mentioned energy-consuming device groups, it also includes the following steps: according to the analysis order of each of the energy-consuming device sets, the following steps are executed in turn for each current energy-consuming device set: according to the energy consumption data of the energy-consuming device group, the first switch state of each energy-consuming device in the current energy-consuming device set in each time interval in a time period is determined; according to the comparison result of the energy consumption estimation data corresponding to each first switch state and the energy consumption data of the energy-consuming device group, the first switch state is corrected to obtain the second switch state of the energy-consuming device in the current energy-consuming device set in each time interval in a time period, which is used to update the energy consumption data of the energy-consuming device group for obtaining the second switch state of the next energy-consuming device set.

[0081] The analysis sequence refers to the sequence of processing and acquiring the second switch states of each energy-consuming device set.

[0082] In one embodiment, the analysis order is determined according to the sorting result between the maximum values ​​of the average power of the energy-consuming devices in each of the energy-consuming device sets. Specifically, according to the average power of each energy-consuming device in each energy-consuming device set, the maximum value of the average power of the energy-consuming devices in each energy-consuming device set is obtained, and the energy-consuming device sets are sorted according to the maximum value corresponding to each energy-consuming device set to generate an analysis order from large to small. According to the analysis order from large to small, the analysis method of the second switch state of the energy-consuming device is executed for each current energy-consuming device set in turn.

[0083] See also Figure 5 , Figure 5 The figure shows a flow chart of the analysis method of the second switch state of the energy-consuming device of the present application in one embodiment. Figure 5 As shown, the analysis method of the second switch state includes: step S221 and step S222.

[0084] Step S221: determining the first switch state of each energy-consuming device in the current energy-consuming device set at each time interval in a period of time according to the energy consumption data of the energy-consuming device group.

[0085] In one embodiment, when the amount of change in the energy consumption data of the energy-consuming device group in adjacent time intervals and the switch state change event corresponding to the adjacent time intervals satisfy a preset error constraint, a minimization result of the switch state change event is determined. Based on the minimization result, the first switch state of each energy-consuming device in the current energy-consuming device set in each time interval in a period is obtained.

[0086] When analyzing the first switch state of the first energy-consuming device set according to the analysis sequence, the energy consumption data of the energy-consuming device group is the energy consumption of the multiple energy-consuming devices in each time interval, and the energy consumption data can be expressed by the following formula:

[0087]

[0088] in, is the energy consumption of each energy-consuming device in the time interval t. It should be noted that the energy consumption data of the energy-consuming device group will be updated after executing step S222. For example, after analyzing the second switch state of the first energy-consuming device set, when sequentially analyzing the second switch state of the second energy-consuming device set, the energy consumption data y t The energy consumption corresponding to the second switch state of the first energy-consuming device set is removed from the energy consumption data y to update the energy consumption data y t .

[0089] According to the change K of the energy consumption data of the energy-consuming equipment group in adjacent time intervals t It can be obtained whether there is a switch state change event in the current energy-consuming equipment set, and the change amount K of the energy consumption data t for:

[0090] K t =|y t -y t-1 | (3)

[0091] Whether each energy-consuming device in the current energy-consuming device set has a set of switch state change events and available change vectors Δ t The switch state change event refers to a change in the switch state of the energy-consuming device within an adjacent time interval. For example, the switch state of an energy-consuming device changes from an on state to an off state within an adjacent time interval, or the switch state of an energy-consuming device changes from an off state to an on state within an adjacent time interval. In the embodiment of the present application, the change vector Δ t The element 1 in the equation indicates that the energy-consuming device corresponding to the element has a switch state change event in the adjacent time interval, and the change vector Δ t The element being 0 represents that the energy-consuming device corresponding to the element has no switch state change event in adjacent time intervals.

[0092] Among them, Δ t =|X t -X t-1 |. Among them, X t X is the switch status of each energy-consuming device in the current energy-consuming device set within the time interval t. t-1is the switch state of each energy-consuming device in the current energy-consuming device set within the time interval t-1. t The element 1 in the vector represents that the energy-consuming device corresponding to the element is in the on state during the time interval t. t An element in the vector being 0 represents that the energy-consuming device corresponding to the element is in a closed state during the time interval t-1.

[0093] In the implementation of the present application, the sparse nature of switch state change events is utilized to convert the process of non-intrusive load monitoring and analyzing whether a switch state change event occurs in an energy-consuming device into: solving a sparse optimization problem under a preset error constraint, wherein the sparse optimization problem is to minimize the number of switch state change events of the current energy-consuming device set. The sparse optimization problem can be expressed by the following formula:

[0094] min||Δ t ||0 (4)

[0095] Wherein, formula (4) indicates that in adjacent time intervals, the number of switch state change events of the current energy-consuming device set is the least, that is, the change vector Δ t The number of non-zero elements in is the least. Among them, Δ t ∈{0, 1} N ,||Δ t ||0≤U, U is the upper threshold of the switch state change event.

[0096] The preset error constraint includes: under the influence of the switch state change event of the energy-consuming device in the current energy-consuming device set, the difference between the average power of each energy-consuming device in the current energy-consuming device set and the change amount of the energy consumption data of the energy-consuming device group in adjacent time intervals must meet the preset error. In the embodiment of the present application, the preset error constraint can be expressed by the following formula:

[0097] ||Δ t PK t ||2<δ (5)

[0098] Wherein, P represents the average power vector of the energy-consuming devices in the current energy-consuming device set. Wherein, the preset error δ in the error constraint is determined according to the sensitivity Δf of the energy-consuming data. In an embodiment of the present application, the preset error δ is equal to twice the sensitivity Δf of the energy-consuming data.

[0099] The sensitivity Δf of the energy usage data is the upper limit of the energy usage data in each time interval in a period of time. and the lower limit of energy data y tThe sensitivity Δf of the energy data can be expressed by the following formula:

[0100]

[0101] in, Due to the influence of external energy supply factors, energy metering equipment factors, active devices in energy-consuming equipment and other factors, the energy consumption data y at each time interval t There is fluctuation, that is, the energy consumption data y in each time interval t Upper limit of energy in use data and the lower limit of energy data y t The sensitivity Δf of the energy data can be determined by analyzing the energy data in multiple time periods. Specifically, the upper limit of the energy data corresponding to each time interval is determined by analyzing the energy data in multiple time periods. and the lower limit y of the energy data t , and then the sensitivity Δf of the energy data can be determined.

[0102] When solving the sparse optimization problem of minimizing the number of switch state change events under the limitation of the preset error constraint, it is necessary to convert the above sparse optimization problem into an approximate optimization problem in the interval from 0 to 1:

[0103] Δ t ∈[0, 1] N (7)

[0104] Formula (7) represents the solution of the change vector Δ t The values ​​of the elements in are in the range of 0 to 1. The conversion of the above sparse optimization problem into an approximate optimization problem in the range of 0 to 1 is obtained based on the grouping condition described in formula (1). The condition restricted by formula (1) is that the average power difference of multiple energy-consuming devices involved in the decoding process cannot be too large, so that the sparse optimization problem can be converted into an approximate optimization problem in the range of 0 to 1.

[0105] However, the above approximate optimization problem is a 0-norm approximate optimization problem, which is an NP-hard problem. Therefore, it is necessary to convert the above 0-norm approximate optimization problem into a 1-norm approximate optimization problem of convex optimization for solution:

[0106] min||Δ t ||1 (8)

[0107] It should be noted that the approximate optimization problem of the 0 norm and the approximate optimization problem of the 1 norm are equivalent under certain conditions. When the change amount of the energy consumption data of the energy-consuming equipment group in adjacent time intervals and the switch state change event corresponding to the adjacent time intervals satisfy the preset error constraint shown in formula (5), the approximate optimization problem of the 1 norm shown in formula (8) is solved in the interval from 0 to 1. Among them, solving the approximate optimization problem of the 1 norm can obtain the change vector Δ t The optimized solution of , can determine the minimization result of the switch state change event. The minimization result of the switch state change event is a value in the range of 0 to 1.

[0108] According to the minimization result, the first switch state of each energy-consuming device in the current energy-consuming device set in each time interval in a time period is obtained.

[0109] In one embodiment, based on the minimization result and the initial switching state of each energy-consuming device in the current energy-consuming device set, an intermediate result of the first switching state of each energy-consuming device in the current energy-consuming device set in each time interval is determined; and the intermediate result of the first switching state in each time interval is used as the switching probability to generate the first switching state.

[0110] In a specific embodiment, according to the energy consumption data Y=(y0, ..., y T ), for each adjacent time interval, the change in energy data K is solved t , the change K of each adjacent time interval t Substituting into formula (8), we can obtain the minimization results of the switch state change events in each adjacent time interval Δ1, Δ2, ..., Δ T The minimization result Δ1 is obtained based on the change in the energy data y1 of the first time interval and the energy data y0 of the initial time interval, Δ T It is based on the energy consumption data y of the last time interval in a period T and the energy consumption data y of the previous time interval T-1 The energy consumption data y0 of the initial time interval is used to accurately analyze the switch status of the energy-consuming device after obtaining the usage data of this value. In one embodiment, the energy consumption data y0 of the initial time interval is 0, and then it can be determined that the initial switch status of each energy-consuming device in the energy-consuming device group within the initial time interval is closed. In other embodiments, the energy consumption data y0 of the initial time interval can also be other values ​​that can directly infer the initial switch status of each energy-consuming device in the energy-consuming device group.

[0111] According to the minimization results Δ1, Δ2, . . . , Δ Tand the initial switch state of each energy-consuming device in the current energy-consuming device set, an intermediate result of the first switch state of each energy-consuming device in the current energy-consuming device set in each time interval can be determined.

[0112] X t =X t-1 ⊙(1-Δ t-1 )+(1-X t-1 )⊙Δ t-1 (9)

[0113] The ⊙ symbol represents the Hadamard product of two matrices with the same number of rows and columns, and the 1 in formula (9) represents the intermediate result X of the first switch state. t-1 A matrix with the same number of columns and rows, where all elements are 1.

[0114] Specifically, the minimization result Δ1 and the first switch state X0 of each energy-consuming device in the current energy-consuming device set are substituted into formula (9), and the intermediate result X1 of the first switch state of each energy-consuming device in the current energy-consuming device set within the first time interval can be determined. t Substituting into formula (9), the intermediate results X1, X2, ..., X3 of the first switch state of each energy-consuming device in the current energy-consuming device set in each time interval in a period can be determined. T .

[0115] The intermediate results X1, X2, ..., X T The value of is between 0 and 1. A first switch state with a value of 0 or 1 can be obtained by performing a rounding operation on the intermediate result.

[0116] In a specific embodiment, the rounding operation is to use the intermediate result of the first switch state in each time interval as the switch probability to generate the first switch state. Specifically, the element in the intermediate result of the first switch state is used as the probability to generate 1, and the difference between 1 and the element in the intermediate result of the first switch state is used as the probability to generate 0. For example, the intermediate result X1 of the first switch state of the current energy-consuming device set in a time interval is (0.1, 0.2, 0.8, 0.9), and the intermediate result X1 of the first switch state is input into the switch state generator. Taking 0.9 as an example, the switch state generator outputs 1 with a probability of 0.9 and outputs 0 with a probability of 0.1, and the output of the switch state generator is used as the first switch state of the current energy-consuming device set in the time interval.

[0117] After the first switch state of the current energy-consuming device set is obtained, step S222 is performed for the first switch state of the current energy-consuming device set.

[0118] Step S222: Correct the first switch state based on the comparison result of the energy consumption estimation data corresponding to each of the first switch states and the energy consumption data of the energy-consuming device group, so as to obtain the second switch state of the energy-consuming devices in the current energy-consuming device set in each time interval in a time period, which is used to update the energy consumption data of the energy-consuming device group for obtaining the second switch state of the next energy-consuming device set.

[0119] The energy consumption estimation data of the current energy-consuming device set is the vector product of the first switch state of the current energy-consuming device set and the average power of each energy-consuming device in the current energy-consuming device set. For example, the first switch state X2 of the current energy-consuming device set C2 in the second time interval is (0, 1, 1, 1), and the average power of each energy-consuming device in the current energy-consuming device set C2 is (70, 80, 90, 100), then the energy consumption estimation data of the current energy-consuming device set C2 in the second time interval is 270. The energy consumption estimation data will be updated according to each corrected first switch state in the subsequent correction process to obtain the updated energy consumption estimation data.

[0120] The following embodiment is a correction process for the first switch state of each time interval in an energy-consuming device set, by performing the following correction operation on the first switch state in each time interval of each energy-consuming device set to obtain the second switch state in each time interval of each energy-consuming device set.

[0121] In one embodiment, by determining the size of the energy consumption estimation data and the energy consumption data of the energy-consuming device group, the first switch state is corrected based on the average power of each energy-consuming device in the current energy-consuming device set to obtain the second switch state of the energy-consuming devices in the current energy-consuming device set in each time interval in a time period.

[0122] For example, in each time interval of a period, if the energy consumption estimation data is greater than the energy consumption data of the energy-consuming device group, the average power of the energy-consuming devices in the first switch state of each energy-consuming device in the current energy-consuming device set that are in the on state is obtained, and the first switch state of the energy-consuming device corresponding to the maximum average power is corrected to the off state. If the updated energy consumption estimation data is still greater than the energy consumption data of the energy-consuming device group, the above correction process will continue to be performed on the corrected first switch state until the energy consumption estimation data is equal to or less than the energy consumption data of the energy-consuming device group, or all energy-consuming devices in the current energy-consuming device set are corrected.

[0123] Based on the above corrected first switch state, the judgment is made:

[0124] If the energy consumption estimation data is equal to the energy consumption data of the energy consumption device group, or all energy consumption devices in the current energy consumption device set are corrected, then the corrected first switch state is the second switch state of the energy consumption devices in the current energy consumption device set.

[0125] Alternatively, if the energy consumption estimation data is smaller than the energy consumption data of the energy consumption device group, the average power of the energy consumption devices in the closed state among the first switch states of each energy consumption device in the current energy consumption device set is obtained, and the first switch state of the energy consumption device corresponding to the minimum average power value is corrected to the open state; if the updated energy consumption estimation data is still smaller than the energy consumption data of the energy consumption device group, the above correction process will continue to be performed on the corrected first switch state until the energy consumption estimation data is equal to or greater than the energy consumption data of the energy consumption device group, or all energy consumption devices in the current energy consumption device set are corrected, and at this time, the corrected first switch state is the second switch state of the energy consumption devices in the current energy consumption device set.

[0126] For another example, within each time interval in a time period, if the energy consumption estimation data is less than the energy consumption data of the energy-consuming device group, the average power of the energy-consuming devices in the first switch state of each energy-consuming device in the current energy-consuming device set that are in the closed state is obtained, and the first switch state of the energy-consuming device corresponding to the minimum average power value is corrected to the open state; if the updated energy consumption estimation data is still less than the energy consumption data of the energy-consuming device group, the above-mentioned correction process will continue to be performed on the corrected first switch state until the energy consumption estimation data is equal to or greater than the energy consumption data of the energy-consuming device group, or all energy-consuming devices in the current energy-consuming device set are corrected, at which point the corrected first switch state is the second switch state of the energy-consuming devices in the current energy-consuming device set.

[0127] For the first switch state of each time interval of a current energy-consuming device set, the first switch state of the current energy-consuming device set in each time interval is modified in chronological order, so as to obtain the second switch state of the energy-consuming devices in the current energy-consuming device set in each time interval in a period.

[0128] Continuing from the above, after obtaining the second switch state of the concentrated energy-consuming devices of the current energy-consuming device in each time interval in a time period, the energy consumption data corresponding to the second switch state of the concentrated energy-consuming devices of the current energy-consuming device is removed from the energy consumption data of the energy-consuming device group to update the energy consumption data of the energy-consuming device group.

[0129] For example, the second switch states of the current energy-consuming device set C1 in each time interval in a period of time are obtained as X1=(0, 1, 1, 0), X2=(0, 1, 1, 1), and X3=(1, 1, 1, 0), respectively, and the average power of the energy-consuming devices in the current energy-consuming device set C1 is (90, 100, 110, 120). Then, the energy consumption data corresponding to the second switch state of the energy-consuming devices in the current energy-consuming device set C1 in each time interval is (210, 330, 300), and the energy consumption data corresponding to the second switch state of the energy-consuming devices in the current energy-consuming device set C1 is removed from the energy consumption data Y=(y0, y1, y2, y3)=(0, 400, 500, 600) of the energy-consuming device group, so as to obtain the updated energy consumption data Y=(y0, y1, y2, y3)=(0, 190, 170, 300) of the energy-consuming device group.

[0130] In one embodiment, the switch state set of multiple energy-consuming devices in a time period described in the above embodiment may be formed based on the second switch state of each energy-consuming device in each energy-consuming device set in each time interval as a constituent element.

[0131] The switch state set includes the second switch states of multiple energy-consuming devices in the energy-consuming device group in each time interval in a time period. For example, the second switch states of the energy-consuming device set C1 in three time intervals in a time period are X1=(0, 1, 1, 0), X2=(0, 1, 1, 1), and X3=(1, 1, 1, 0), and the second switch states of the energy-consuming device set C2 in three time intervals in a time period are X1=(1, 1, 1, 0), X2=(0, 1, 1, 1), and X3=(0, 1, 1, 1), then the switch state set of the multiple energy-consuming devices in a time period can be expressed as (X'1, X'2, X'3). Among them, X'1=(0, 1, 1, 0, 1, 1, 1, 0), X'2=(0, 1, 1, 1, 0, 1, 1, 1), and X'3=(1, 1, 1, 0, 0, 1, 1, 1).

[0132] It should be noted that the non-intrusive load monitoring method implemented in the above embodiment is only an example and can be implemented in other ways, and is not limited to this.

[0133] In one embodiment, the total accuracy rate α comes from the input of the input device 202 of the energy metering device 200. The input device 202 may include a button, a keyboard, a mouse, a touchpad, an audio unit, etc. The user inputs the total accuracy rate α to the energy metering device 200 through the input device 202. In another embodiment, the total accuracy rate α comes from the input of other electronic devices that are communicatively connected to the energy metering device 200. The electronic device may be any computer device that can be connected to the energy metering device 200 through network communication. The electronic device is connected to the interface unit (not shown) of the energy metering device 200 through its interface device. The interface unit includes a network interface, a data line interface, etc. The network interface includes but is not limited to: an Ethernet network interface, a network interface based on a mobile network (3G, 4G, 5G, etc.), a network interface based on short-range communication (WiFi, Bluetooth, etc.), etc. The data line interface includes but is not limited to: a USB interface, RS232, etc. In another embodiment, the total accuracy rate α comes from the selection of a pre-stored value. For example, when the energy metering device 200 detects that no one is at home, it will automatically select a low total accuracy rate from the pre-stored values ​​to prevent the user's privacy information from being leaked.

[0134] In a specific embodiment, different modes can be set for user selection according to the size of the total accuracy rate. Examples of the modes are: unmanned mode, open mode, etc. Among them, the total accuracy rate corresponding to the unmanned mode is lower, and the total accuracy rate corresponding to the open mode is higher. Users can set deadlines for various modes according to actual needs. For example, from March 1, 2020 to March 7, 2020, a user's home is uninhabited. The user can set the energy metering device to unmanned mode and set the deadline of the unmanned mode to the above-mentioned time period. This allows the number of elements that are consistent with the actual situation to be smaller when parsing the switch states of the multiple energy-consuming devices through encrypted data corresponding to the lower total accuracy rate α.

[0135] According to the total accuracy α obtained in step S110, step S120 may be executed.

[0136] Step S120: Determine the differential privacy coefficient according to the total accuracy through a preset constraint relationship; wherein the preset constraint relationship refers to: the total accuracy is a constraint on the comprehensive result of the accuracy of each energy-consuming device set in the energy-consuming device group, and the expected upper and lower limits of the accuracy of each energy-consuming device set are constraints related to the differential privacy coefficient.

[0137] In this application, the accuracy rate α of each energy-consuming device set in a period of time is i It can be expressed by the following formula:

[0138]

[0139] in, The second switch state of each energy-consuming device in a time period obtained by encrypting the data is a plurality of energy-consuming devices. The actual switching status of multiple energy-consuming devices is collected for each energy-consuming device in a time period.

[0140] The expected accuracy of each energy-consuming device set in the time period is constrained as shown in the following formula (11):

[0141]

[0142] Wherein, T is the total number of time intervals in a period, N is the total number of energy-consuming devices in the energy-consuming device group, ε is the differential privacy coefficient, δ is the preset error, and i represents the i-th energy-consuming device set. Wherein, each energy-consuming device set is sorted from large to small according to the maximum value of the average power of its energy-consuming devices, and the maximum value of the average power in the first energy-consuming device set (i=1) is greater than the maximum value of the average power in other energy-consuming device sets. b(δ, ε) and B(δ, ε) can be expressed by formula (12), formula (13), and formula (15), respectively.

[0143]

[0144] in, is the sum of the average power of U energy-consuming devices. Specifically, the maximum value of the concentrated average power of the i-th energy-consuming device can be obtained by Indicates that The corresponding U average powers are the average power ratios of the energy-consuming equipment group. The average power corresponding to the smallest U energy-consuming devices. U is the upper threshold of the switch state change event. For example, the average power in the energy-consuming device group is (800, 700, 600, 500, 400, 300, 200, 100), the upper threshold U is 3, and the maximum value of the average power of each energy-consuming device in the second energy-consuming device set is 600. Then the three average powers are 500, 400, and 300 respectively. m k is the expected lower bound of the accuracy of each energy-consuming device set, P k The average power of each energy-consuming device is the average power of each energy-consuming device, ||P k ||2 is P k The 2-norm of N k The number of energy-consuming devices is concentrated for each energy-consuming device.

[0145]

[0146] in, A1=4b 2 C(P)+8δbC(P)-8bN, B1=6δbC(P)+8δ 2 C(P)-8δN, C1=3δ 2 C(P), where N is the total number of energy-consuming devices in the energy-consuming device group, ε is the differential privacy coefficient, δ is the preset error, C(P) is a constant related to the average power of the multiple energy-consuming devices, and P is a power vector formed by the average power of each of the energy-consuming devices in the energy-consuming device group. It should be noted that the polynomial coefficient values ​​corresponding to b, A1, B1, and C1 are not limited to the examples, and the coefficient values ​​of each polynomial can be selected within a range. For example, the range is coefficient value +3 to coefficient value -3, then the value range of the first coefficient value in A1 is 1 to 7, the value range of the second coefficient value in A1 is 5 to 11, and the value range of the third coefficient value in A1 is -11 to -5. In one embodiment, the constant C(P) can be expressed by formula (14), but is not limited thereto. In other embodiments, the constant C(P) can be set to the ratio of any constant to the 2-norm of the power vector P.

[0147]

[0148]

[0149] Where A2 = 4m 2 -8δm-4mN||P||2, B2=6δm-8δ 2 -4δN||P||2, C2=3δ 2 , m = N||P||2+2δ, where N is the total number of energy-consuming devices in the energy-consuming device group, ε is the differential privacy coefficient, and P is the power vector composed of the average power of each energy-consuming device in the energy-consuming device group. δ 3U , δ 4U Both represent sparse constants, which are constants used to describe the difference between the maximum element value and the minimum element value in the power vector P. Specifically, for any vector C with a sparsity less than or equal to 3U, the vector C satisfies in, N is the number of elements in the power vector P. Since the identification matrix corresponds to the power vector P, the identification matrix is ​​a one-dimensional matrix, so δ 3U It represents the constant that describes the difference between the maximum element value and the minimum element value in the power vector P. Wherein, U is the upper threshold of the switch state change event. δ 4UThe corresponding constant is a constant that describes the difference between the maximum element value and the minimum element value in the power vector P in the case of any vector C with a sparsity less than or equal to 4U. In other embodiments, any vector C that satisfies other sparsities can also be used to determine the sparse constant, and then determine the constant C(P). It should be noted that the polynomial coefficient values ​​corresponding to A2, B2, C2, and m are not limited to the examples, and the coefficient values ​​of each polynomial can be selected within a range. For example, the range is from coefficient value +3 to coefficient value -3, then the value range of the first coefficient value in A2 is 1 to 7, the value range of the second coefficient value in A2 is -11 to -5, and the value range of the third coefficient value in A2 is -7 to -1.

[0150] The expected accuracy of each energy-consuming device set is E[α i ], α represents the total accuracy, then the expectation of the total accuracy E[α] can be expressed by the following formula:

[0151]

[0152] Among them, N i and N in formula (12) k Both are expressed as the number of concentrated energy-consuming devices for each energy-consuming device.

[0153] Based on the above understanding, formula (16) represents the relationship between the total accuracy α and the differential privacy coefficient ε.

[0154] It should be noted that the relationship between the total accuracy rate α and the differential privacy coefficient ε is not limited to the above implementation. The relationship is related to the implementation method of non-intrusive load monitoring. For example, the relationship between the total accuracy rate α and the differential privacy coefficient ε will change if the preset error constraints for solving the approximate optimization problem are different.

[0155] The energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

[0156] The energy-consuming device group can be grouped in the same manner as Figure 4 The grouping method shown is the same as that shown, and other grouping methods that can make the average power of the energy-consuming devices in the energy-consuming device set not differ much can also be used. For example, it is determined by constraining the floating range of the average power of the energy-consuming devices in each energy-consuming device set. After grouping, the grouping parameters of each energy-consuming device set can be obtained, and the grouping parameters include: the number N of energy-consuming devices in each energy-consuming device set i , the average power of each energy-consuming device and the concentrated energy-consuming devices.

[0157] In one embodiment, within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, constraints related to the differential privacy coefficient, and preset parameters, the expected accuracy corresponding to each energy-consuming device set under each differential privacy coefficient is obtained. According to the accuracy corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, the total accuracy corresponding to each differential privacy coefficient is obtained to determine the preset numerical correspondence between the total accuracy and the differential privacy coefficient; according to the total accuracy via the preset numerical correspondence, the differential privacy coefficient is determined.

[0158] Among them, the preset parameters include: grouping parameters, the number N of the multiple energy-consuming devices, the average power of the multiple energy-consuming devices, and the sensitivity Δf of the energy consumption data. The sensitivity Δf of the energy consumption data is the same or similar to that described above and will not be described in detail here. The preset differential privacy coefficient range corresponds to different noise ranges, and the amount of calculation required to encrypt energy data based on different noises is also different. Therefore, the preset differential privacy coefficient range can be determined according to the computing power of the energy consumption metering device.

[0159] For example, the expected upper and lower limits of the accuracy of each energy-consuming device set and the constraints related to the differential privacy coefficient are the constraint relationship shown in formula (11). The total accuracy is the constraint of the comprehensive result of the accuracy of each energy-consuming device set in the energy-consuming device group, which is the constraint relationship shown in formula (16). The preset differential privacy coefficient range is [a, b]. Each differential privacy coefficient between a and b and the preset parameters corresponding to each energy-consuming device set are used as inputs of formula (11), and the expected accuracy E[α i Based on formula (16), according to the expected accuracy E[α i ] and the number of energy-consuming devices in each energy-consuming device set, and obtain the expected total accuracy E[α] corresponding to each differential privacy coefficient. The expected total accuracy E[α] is approximated as the total accuracy α, and then a corresponding relationship between the total accuracy and preset values ​​of multiple differential privacy coefficients can be determined.

[0160] It should be noted that the preset numerical value correspondence relationship can be pre-stored in the energy metering device for determining the differential privacy coefficient according to the obtained total accuracy, or the preset numerical value correspondence relationship is determined each time the encryption method is executed.

[0161] The differential privacy coefficient is determined according to the correspondence between the total accuracy rate and the preset numerical value.

[0162] In one embodiment, according to the total accuracy rate, a plurality of preliminary differential privacy coefficients satisfying the total accuracy rate are determined through the preset numerical value correspondence relationship, and the minimum value among the preliminary differential privacy coefficients is used as the differential privacy coefficient.

[0163] For example, the total accuracy is 40%. According to the correspondence between the total accuracy and the preset value, multiple preliminary differential privacy coefficients of 0.1, 0.2, and 0.3 are obtained. Since the smaller the differential privacy coefficient, the stricter the privacy protection standard of differential privacy. Therefore, in the embodiment of the present application, the minimum value of 0.1 in the preliminary differential privacy coefficient is selected as the differential privacy coefficient corresponding to the total accuracy.

[0164] Step S130: Generate noise according to the determined differential privacy coefficient to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data.

[0165] A distribution coefficient is determined according to the determined differential privacy coefficient and the sensitivity of the energy usage data. The distribution parameter of the probability density distribution is related to the differential privacy coefficient ε and the sensitivity Δf of the energy usage data. The determined distribution parameter is used to determine the probability density distribution of noise; noise is generated according to the determined probability density distribution of noise to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data.

[0166] In one embodiment, the probability density distribution of the noise is a Laplace distribution. The distribution parameter λ of the Laplace distribution can be determined according to the ratio of the determined differential privacy coefficient ε and the sensitivity Δf of the energy data. The distribution parameter λ is Under the condition that the distribution parameter λ of the Laplace distribution is known, the noise that satisfies the differential privacy coefficient ε can be obtained.

[0167] Adding the noise to the energy usage data in each time interval can achieve differential privacy of the energy usage data. It should be noted that adding noise that conforms to the Laplace distribution to the energy usage data in each time interval does not change the total amount of energy usage data in the period.

[0168] Based on the non-intrusive load monitoring method in the present application, the energy data encryption method of the present application determines the noise in each time interval based on the total accuracy of the user input, so that the total accuracy of cracking the switch state of the user's energy-consuming equipment through the energy consumption data in each time interval after adding noise meets the user's expectations; wherein, the lower the total accuracy, the higher the difficulty of cracking, and the more conducive to protecting user privacy; and in some scenarios, the higher the difficulty of cracking may mean the complexity of the encryption algorithm, which will increase the cost; therefore, it can be seen from the above embodiments that the present application provides a solution that can realize dynamic adjustment of the encryption degree with the total accuracy, which helps to balance the degree of protection of user privacy and the encryption cost.

[0169] The present application also provides a method for generating noise for energy data, the method for generating noise for energy data is used to generate corresponding noise based on the total accuracy of an external input, and send the noise to the energy metering device so that the energy metering device can encrypt the energy data according to the noise. Figure 6 The electronic device 610 is shown to perform. Figure 6 The energy usage metering device 620 shown in FIG. 6 is used to encrypt the energy usage data in each time interval in a period based on the noise sent by the electronic device 610 .

[0170] See also Figure 6 , Figure 6 The structure diagram of the encryption processing system in one embodiment of the present application is shown as follows: Figure 6 As shown, the encryption processing system includes: an electronic device 610 and an energy metering device 620.

[0171] The electronic device 610 includes: an interface device 611 , a storage device 613 , a processing device 614 , and an input device 612 .

[0172] The interface device 611 is used to communicate with the energy metering device 620. For example, the interface device 611 can send the noise generated by the electronic device 610 to the energy metering device 620. The interface device 611 includes a network interface, a data line interface, etc. The network interface includes but is not limited to: an Ethernet network interface device, a network interface device based on a mobile network (3G, 4G, 5G, etc.), a network interface device based on short-range communication (WiFi, Bluetooth, etc.), etc. The data line interface includes but is not limited to: a USB interface, RS232, etc. The interface device 611 is connected to the storage device 613, the processing device 614, the input device 612, the Internet, the input unit, etc.

[0173] The storage device 613 is used to store at least one program, and the at least one program is used to execute the steps of the noise generation method using energy data exemplified based on the technical idea of ​​the present application when executed. In an embodiment, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. In some embodiments, the memory may also include a memory away from one or more processors, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network, a wide area network, a storage area network, etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device such as a CPU and a peripheral interface.

[0174] The input device 612 is used for external input, and the input device 612 can be used by the user to input the total accuracy in real time or set preset parameters according to actual needs. The input device 612 includes a button, a keyboard, a mouse, a touch pad, etc. In other embodiments, the input device 612 may also include an audio unit, and the audio unit may include a speaker, a pickup, etc. The electronic device 610 can interact with the user's voice through the audio unit. For example, the total accuracy of the user input can be obtained by interacting with the user's voice.

[0175] The processing device 614 is connected to the input device 612, the storage device 613, and the interface device 611 for calling the at least one program to execute the noise generation method of energy data described in the present application, and send the noise to the energy metering device 620 through the interface device 611. In an embodiment, the processor is operably coupled to a memory and / or a non-volatile storage device. More specifically, the processor can execute instructions stored in the memory and / or the non-volatile storage device to perform operations in the electronic device 610, such as generating noise in each time interval in a period of time. In this way, the processor may include one or more general-purpose microprocessors, one or more special-purpose processors, one or more field programmable logic arrays, or any combination thereof.

[0176] See also Figure 7 , Figure 7 The figure shows a flow chart of a noise generation method using energy data in one embodiment of the present application. The noise generation method includes: step S310, step S320, and step S330.

[0177] Step S310: Obtaining a total accuracy rate of the input, wherein the total accuracy rate represents the accuracy of parsing the switching states of the plurality of energy-consuming devices in the time period through the encrypted data of the energy-consuming data.

[0178] The encrypted data is the energy consumption data after adding noise. The total accuracy rate represents the ratio between the number of elements in the switch state set of the multiple energy-consuming devices in a time period obtained by analyzing the encrypted data and the product of the total number of energy-consuming devices and the total number of time intervals in a time period, and the switch state set is composed of the switch states of the multiple energy-consuming devices in the time period.

[0179] The encrypted data may be processed using a non-intrusive load monitoring method to obtain a set of switch states of the plurality of energy-consuming devices within a period of time, and the total accuracy rate reflects the overall accuracy of the set of switch states.

[0180] The non-intrusive load monitoring method is exemplified by the method described above in the energy data encryption method.

[0181] In one embodiment, the total accuracy rate α comes from an input device (not shown) of an energy metering device that is communicatively connected to the electronic device 610. The input device may include a button, a keyboard, a mouse, a touch pad, an audio unit, etc. The user inputs the total accuracy rate α to the energy metering device through the input device. In another embodiment, the total accuracy rate α comes from Figure 6 In another embodiment, the total accuracy rate α is selected from a pre-stored value. For example, when the energy metering device detects that no one is at home, a low total accuracy rate is automatically selected from the pre-stored values ​​to prevent the user's privacy information from being leaked, and the total accuracy rate α can be sent to the electronic device 610 for it to generate corresponding noise according to the total accuracy rate α.

[0182] In a specific embodiment, different modes can be set for user selection according to the size of the total accuracy rate. Examples of the modes are: unmanned mode, open mode, etc. Among them, the total accuracy rate corresponding to the unmanned mode is lower, and the total accuracy rate corresponding to the open mode is higher. Users can set deadlines for various modes according to actual needs. For example, from March 1, 2020 to March 7, 2020, a user's home is uninhabited. The user can set the mode to unmanned mode through the electronic device 610 or through the energy metering device, and set the deadline of the unmanned mode to the above-mentioned time period. This allows the number of elements that are consistent with the actual situation to be concentrated in the switch states of the multiple energy-consuming devices parsed through the encrypted data corresponding to the lower total accuracy rate α.

[0183] According to the total accuracy α obtained in step S310, step S320 may be executed.

[0184] Step S320: Determine the differential privacy coefficient according to the total accuracy through a preset constraint relationship; wherein the preset constraint relationship refers to: the total accuracy is a constraint on the comprehensive result of the accuracy of each energy-consuming device set in the energy-consuming device group, and the expected upper and lower limits of the accuracy of each energy-consuming device set are constraints related to the differential privacy coefficient.

[0185] The energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

[0186] The energy-consuming device group can be grouped in the same manner as Figure 4 The grouping method shown is the same as that shown, and other grouping methods that can make the average power of the energy-consuming devices in the energy-consuming device set not differ much can also be used. For example, it is determined by constraining the floating range of the average power of the energy-consuming devices in each energy-consuming device set. After grouping, the grouping parameters of each energy-consuming device set can be obtained, and the grouping parameters include: the number N of energy-consuming devices in each energy-consuming device set i , the average power of each energy-consuming device and the concentrated energy-consuming devices.

[0187] In one embodiment, within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, constraints related to the differential privacy coefficient, and preset parameters, the expected accuracy corresponding to each energy-consuming device set under each differential privacy coefficient is obtained. According to the accuracy corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, the total accuracy corresponding to each differential privacy coefficient is obtained to determine the preset numerical correspondence between the total accuracy and the differential privacy coefficient; according to the total accuracy via the preset numerical correspondence, the differential privacy coefficient is determined.

[0188] Among them, the preset parameters include: grouping parameters, the number N of the multiple energy-consuming devices, the average power of the multiple energy-consuming devices, and the sensitivity Δf of the energy consumption data. The sensitivity Δf of the energy consumption data is the same or similar to that described above and will not be described in detail here. The preset differential privacy coefficient range corresponds to different noise ranges, and the amount of calculation required to encrypt energy data based on different noises is also different. Therefore, the preset differential privacy coefficient range can be determined according to the computing power of the energy consumption metering device.

[0189] For example, the expected upper and lower limits of the accuracy of each energy-consuming device set and the constraints related to the differential privacy coefficient are the constraint relationship shown in formula (11). The total accuracy is the constraint of the comprehensive result of the accuracy of each energy-consuming device set in the energy-consuming device group, which is the constraint relationship shown in formula (16). The preset differential privacy coefficient range is [a, b]. Each differential privacy coefficient between a and b and the preset parameters corresponding to each energy-consuming device set are used as inputs of formula (11), and the expected accuracy E[α i Based on formula (16), according to the expected accuracy E[α i ] and the number of energy-consuming devices in each energy-consuming device concentration, obtain the expected total accuracy E[α] corresponding to each differential privacy coefficient, approximate the expected total accuracy E[α] to the total accuracy α, and then determine a preset numerical correspondence between the total accuracy and multiple differential privacy coefficients. It should be noted that the preset numerical correspondence can be pre-stored in the electronic device for determining the differential privacy coefficient according to the obtained total accuracy, or the preset numerical correspondence can be determined each time the noise generation method is executed.

[0190] The differential privacy coefficient is determined according to the correspondence between the total accuracy rate and the preset numerical value.

[0191] In one embodiment, according to the total accuracy rate α, a plurality of preliminary differential privacy coefficients satisfying the total accuracy rate are determined through the preset numerical correspondence relationship, and the minimum value among the preliminary differential privacy coefficients is used as the differential privacy coefficient.

[0192] For example, the total accuracy is 40%. According to the correspondence between the total accuracy and the preset value, multiple preliminary differential privacy coefficients of 0.1, 0.2, and 0.3 are obtained. Since the smaller the differential privacy coefficient, the stricter the privacy protection standard of differential privacy. Therefore, in the embodiment of the present application, the minimum value of 0.1 in the preliminary differential privacy coefficient is selected as the differential privacy coefficient corresponding to the total accuracy.

[0193] Step S330: Generate noise according to the determined differential privacy coefficient; and send the noise to the energy metering device so that the energy metering device encrypts the energy usage data according to the noise.

[0194] Specifically, a distribution coefficient is determined according to the determined differential privacy coefficient and the sensitivity of the energy usage data; wherein the distribution parameter is used to determine the probability density distribution of noise; and noise is generated according to the determined probability density distribution of noise.

[0195] In one embodiment, the probability density distribution of the noise is a Laplace distribution. The distribution parameter λ of the Laplace distribution can be determined according to the ratio of the determined differential privacy coefficient ε and the sensitivity Δf of the energy data. The distribution parameter λ is Under the condition that the distribution parameter λ of the Laplace distribution is known, the noise that satisfies the differential privacy coefficient ε can be obtained.

[0196] The noise in each time interval satisfying the differential privacy coefficient ε obtained according to the above embodiment is sent to Figure 6 The energy usage metering device 620 is configured to encrypt the energy usage data according to the noise.

[0197] The energy metering device 620 includes: a measuring device 622, an interface device 621, a storage device 623, and a processing device 624. The measuring device 622 and the storage device 623 are Figure 2 The measuring device 201 and the storage device 203 shown in FIG. 2 are the same or similar and will not be described in detail herein.

[0198] The interface device 621 is connected to the electronic device 610 for receiving the noise sent by the electronic device 610. The interface device 621 includes a network interface, a data line interface, etc. The network interface includes but is not limited to: an Ethernet network interface device, a network interface device based on a mobile network (3G, 4G, 5G, etc.), a network interface device based on short-range communication (WiFi, Bluetooth, etc.), etc. The data line interface includes but is not limited to: a USB interface, RS232, etc.

[0199] The processing device 624 is connected to the storage device 623, the interface device 621, and the measuring device 622, and is used to call the at least one program to coordinate the storage device 623, the interface device 621 and the measuring device 622 to perform encryption operations to encrypt the energy consumption data of the energy-consuming device group. In an embodiment, the processor is operably coupled to a memory and / or a non-volatile storage device. More specifically, the processor can execute instructions stored in the memory and / or the non-volatile storage device to perform operations in the energy metering device, such as encrypting the energy consumption data of the energy-consuming device group according to the acquired noise to obtain the encrypted data. In this way, the processor may include one or more general-purpose microprocessors, one or more special-purpose processors, one or more field programmable logic arrays, or any combination thereof. The processing device 624 encrypts the energy consumption data of the energy-consuming device group according to the noise to obtain the encrypted data.

[0200] In one embodiment, adding the noise to the energy usage data in each time interval of a period can achieve differential privacy of the energy usage data. It should be noted that adding noise conforming to the Laplace distribution to the energy usage data in each time interval does not change the total amount of energy usage data in the period.

[0201] In addition, the present application also discloses a computer-readable storage medium storing at least one computer program, which, when executed, implements at least one embodiment of the above-mentioned method for encrypting energy data or the method for generating noise for energy data. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0202] In the embodiments provided in the present application, the computer readable and writable storage medium may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store a desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0203] In one or more exemplary aspects, the functions described by the computer program of the method described in the present application can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored or transmitted as one or more instructions or codes on a computer-readable medium. The steps of the method or algorithm disclosed in the present application can be embodied in a processor-executable software module, wherein the processor-executable software module can be located on a tangible, non-temporary computer-readable and writable storage medium. A tangible, non-temporary computer-readable and writable storage medium can be any available medium that a computer can access.

[0204] The block diagram in the accompanying drawings above of the present application illustrates the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. Based on this, each box in the block diagram can represent a part of a step, module, program segment or code, and the part of the step, module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs a specified function or operation, or can be realized by a combination of dedicated hardware and computer instructions.

[0205] In summary, the energy data encryption method, noise generation method, device and storage medium of the present application, in the scheme of the present application, obtain the total accuracy of the input, wherein the total accuracy represents the accuracy of parsing the switch states of the multiple energy-consuming devices in the period through the encrypted data of the energy data; the differential privacy coefficient is determined according to the total accuracy by presetting the constraint relationship; wherein the preset constraint relationship refers to: the total accuracy is the constraint of the comprehensive result of the accuracy of each energy-consuming device set in the energy-consuming device group, and the expected upper and lower limits of the accuracy of each energy-consuming device set are related to the differential privacy coefficient; noise is generated according to the determined differential privacy coefficient, which is used to encrypt the energy data of the energy-consuming device group to obtain the encrypted data. The scheme of the present application can determine the noise added to the energy data according to the total accuracy that the user hopes to achieve, so that the total accuracy of cracking the switch state of the user's electrical equipment through the energy data after adding noise is the total accuracy that the user hopes.

[0206] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A method for encrypting energy data, characterized in that: Applied to energy metering equipment; the energy consumption data includes the energy consumption of an energy consumption equipment group in each time interval in a period of time, the energy consumption equipment group includes multiple energy consumption equipment, and the encryption method includes: Obtaining a total accuracy rate of the input, wherein the total accuracy rate represents the accuracy of parsing the switch states of the plurality of energy-consuming devices in the time period through the encrypted data of the energy-consuming data; The differential privacy coefficient is determined according to the total accuracy rate by presetting a constraint relationship; wherein the preset constraint relationship refers to: the total accuracy rate is a constraint of the comprehensive result of the accuracy rates of each energy-consuming device set in the energy-consuming device group, and the expected upper and lower limits of the accuracy rate of each energy-consuming device set are constraints related to the differential privacy coefficient; Determine a distribution coefficient according to the determined differential privacy coefficient and the sensitivity of the energy usage data; wherein the distribution coefficient is used to determine the probability density distribution of the noise; Noise is generated according to the probability density distribution of the noise to encrypt the energy usage data of the energy-consuming device group to obtain the encrypted data.

2. The method for encrypting energy data according to claim 1, characterized in that: The energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

3. The method for encrypting energy data according to claim 2, characterized in that: The grouping of the energy-consuming device group according to the average power of each of the energy-consuming devices comprises: Assigning energy consuming devices corresponding to the minimum value and the second minimum value of average power in the energy consuming device group to the current energy consuming device set; Determining whether the average power of each of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set; If yes, the energy-consuming devices satisfying the grouping condition are grouped into the current energy-consuming device set; If not, the current energy-consuming device set is constructed, and the energy-consuming devices that have completed grouping are removed from the energy-consuming device group to update the energy-consuming device group; The above steps are repeated until the generated multiple energy-consuming device sets include all energy-consuming devices.

4. The method for encrypting energy data according to claim 1, characterized in that: The determining the differential privacy coefficient according to the total accuracy by presetting the constraint relationship includes: Within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, the constraints related to the differential privacy coefficient, and the preset parameters, the expected accuracy of each energy-consuming device set corresponding to each differential privacy coefficient is obtained; According to the accuracy rate corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, the total accuracy rate corresponding to each differential privacy coefficient is obtained to determine the corresponding relationship between the total accuracy rate and the preset numerical value of the differential privacy coefficient; The differential privacy coefficient is determined according to the corresponding relationship between the total accuracy and the preset value.

5. The method for encrypting energy data according to claim 4, characterized in that: The preset parameters include: a grouping parameter, the number of the plurality of energy-consuming devices, the average power of the plurality of energy-consuming devices, and the sensitivity of the energy consumption data.

6. The method for encrypting energy data according to claim 5, characterized in that: The grouping parameters include: the number of energy-consuming devices in the energy-consuming group of each energy-consuming device, and the average power of the energy-consuming devices in the energy-consuming group of each energy-consuming device.

7. The method for encrypting energy data according to claim 4, characterized in that: The determining the differential privacy coefficient according to the correspondence between the total accuracy rate and the preset value includes: According to the total accuracy rate and the corresponding relationship with the preset value, determining a plurality of preliminary differential privacy coefficients that meet the total accuracy rate; The minimum value of the preliminary differential privacy coefficients is used as the differential privacy coefficient.

8. The method for encrypting energy data according to claim 1, characterized in that: The external input mode of the total accuracy rate includes: input from the input device of the energy metering device; or input from other electronic devices that are communicatively connected to the energy metering device; or selection of pre-stored values.

9. A noise generation method using energy data, characterized in that: The energy consumption data includes energy consumption of an energy-consuming device group in each time interval in a period of time, the energy-consuming device group includes a plurality of energy-consuming devices, and the noise generation method includes: Obtaining a total accuracy rate of the input, wherein the total accuracy rate represents the accuracy of parsing the switch states of the plurality of energy-consuming devices in the time period through the encrypted data of the energy-consuming data; The differential privacy coefficient is determined according to the total accuracy rate by presetting a constraint relationship; wherein the preset constraint relationship refers to: the total accuracy rate is a constraint of the comprehensive result of the accuracy rates of each energy-consuming device set in the energy-consuming device group, and the expected upper and lower limits of the accuracy rate of each energy-consuming device set are constraints related to the differential privacy coefficient; Determine a distribution coefficient according to the determined differential privacy coefficient and the sensitivity of the energy usage data; wherein the distribution coefficient is used to determine the probability density distribution of the noise; Noise is generated according to the probability density distribution of the noise, and the noise is sent to the energy usage metering device so that the energy usage data is encrypting according to the noise.

10. The noise generation method using energy data according to claim 9, characterized in that: The energy-consuming device set is obtained by grouping the energy-consuming device group according to the average power of each of the energy-consuming devices.

11. The noise generation method using energy data according to claim 10, characterized in that: The grouping of the energy-consuming device group according to the average power of each of the energy-consuming devices comprises: Assigning energy consuming devices corresponding to the minimum value and the second minimum value of average power in the energy consuming device group to the current energy consuming device set; Determining whether the average power of each of the remaining energy-consuming devices in the energy-consuming device group meets the preset grouping condition of the current energy-consuming device set; If yes, the energy-consuming devices satisfying the grouping condition are grouped into the current energy-consuming device set; If not, the current energy-consuming device set is constructed, and the energy-consuming devices that have completed grouping are removed from the energy-consuming device group to update the energy-consuming device group; The above steps are repeated until the generated multiple energy-consuming device sets include all energy-consuming devices.

12. The noise generation method using energy data according to claim 9, characterized in that: The determining the differential privacy coefficient according to the total accuracy by presetting the constraint relationship includes: Within the preset differential privacy coefficient range, according to the expected upper and lower limits of the accuracy of each energy-consuming device set, the constraints related to the differential privacy coefficient, and the preset parameters, the expected accuracy of each energy-consuming device set corresponding to each differential privacy coefficient is obtained; According to the accuracy rate corresponding to each energy-consuming device set and the number of energy-consuming devices in each energy-consuming device set, the total accuracy rate corresponding to each differential privacy coefficient is obtained to determine the corresponding relationship between the total accuracy rate and the preset numerical value of the differential privacy coefficient; The differential privacy coefficient is determined according to the corresponding relationship between the total accuracy and the preset value.

13. The noise generation method using energy data according to claim 12, characterized in that: The preset parameters include: a grouping parameter, the number of the plurality of energy-consuming devices, the average power of the plurality of energy-consuming devices, and the sensitivity of the energy consumption data.

14. The noise generation method using energy data according to claim 13, characterized in that: The grouping parameters include: the number of energy-consuming devices in the energy-consuming group of each energy-consuming device, and the average power of the energy-consuming devices in the energy-consuming group of each energy-consuming device.

15. The noise generation method using energy data according to claim 12, characterized in that: The determining the differential privacy coefficient according to the correspondence between the total accuracy rate and the preset value includes: According to the total accuracy rate and the corresponding relationship with the preset value, determining a plurality of preliminary differential privacy coefficients that meet the total accuracy rate; The minimum value of the preliminary differential privacy coefficients is used as the differential privacy coefficient.

16. The noise generation method using energy data according to claim 9, characterized in that: The external input mode of the total accuracy rate includes: input from an input device of the electronic device; or input from an energy metering device that is communicatively connected to the electronic device; or selection of a pre-stored value.

17. An electronic device, characterized in that: include: An input device for providing external input; An interface device, used for communicating with the energy metering equipment; A storage device, used to store at least one program; A processing device is connected to the storage device, the input device, and the interface device, and is used to call the at least one program to execute the noise generation method using energy data as described in any one of claims 9 to 16.

18. An energy metering device, characterized in that: include: A measuring device, used to measure energy consumption data, wherein the energy consumption data is energy consumption data of a group of energy-consuming devices in each time interval in a period of time; An interface device for communicating with the electronic device according to claim 17; A storage device for storing at least one program; A processing device is connected to the storage device, the interface device, and the measuring device, and is used to call the at least one program to coordinate the storage device, the interface device, and the measuring device to perform the following energy data encryption method: receiving noise sent by the electronic device; The energy usage data of the energy-consuming device group is encrypted according to the noise to obtain the encrypted data.

19. A system for encrypting and processing energy data, characterized in that: include: The electronic device as claimed in claim 17; The energy metering device as claimed in claim 18.

20. An energy metering device, characterized in that: include: A measuring device, used to measure energy consumption data, wherein the energy consumption data is energy consumption data of a group of energy-consuming devices in each time interval in a period of time; An input device for providing external input; A storage device for storing at least one program; A processing device is connected to the storage device, the input device, and the measuring device, and is used to call the at least one program to execute the energy data encryption method according to any one of claims 1 to 8.

21. A computer-readable storage medium, characterized in that: At least one program is stored, and when the at least one program is called, it executes and implements the energy data encryption method according to any one of claims 1 to 8; or, it executes and implements the noise generation method according to any one of claims 9 to 16.

Citation Information

Patent Citations

  • Differential privacy protection based data releasing method

    CN106991335A

  • A privacy-compatible data collection and payment method in a smart power grid

    CN109558747A