Electricity meter data recording method using homomorphic encryption protection strategy

Through the homomorphic encryption protection strategy, the power consumption data is processed as a subgraph form of the main node and the sub-node. The full homomorphic encryption technology is used to solve the problem of power companies protecting user privacy in the analysis of power consumption data, and efficient data analysis and privacy protection are achieved.

CN118802105BActive Publication Date: 2025-03-28BAODING ZHAOWEI SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When processing and analyzing electricity consumption data, power companies need to access users' detailed electricity consumption records. If effective security protection measures are lacking, it will lead to user privacy leakage. The existing technologies such as data encryption, access control, and data desensitization have limitations, making it difficult to not only protect user data privacy but also meet data analysis needs.

Method used

The homomorphic encryption protection strategy is adopted, and the total power consumption and average power are encrypted by processing the power consumption data in the target time period into a sub-graph form of a target master node corresponding to several target sub-nodes, using full homomorphic encryption to encrypt the total power consumption and average power to ensure that the data does not leak user information during the analysis process.

Benefits of technology

It can meet the demand for power companies for power consumption data analysis without exposing user electricity consumption data, reduce the amount of data storage and analysis and calculation, and ensure the protection of user data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802105B_ABST
    Figure CN118802105B_ABST
Patent Text Reader

Abstract

The present application relates to the field of smart meters, and in particular to a method for recording electric energy meter data using a homomorphic encryption protection strategy. The method includes: obtaining the electricity consumption data D of the target meter in the target time period; obtaining the target main node corresponding to the target meter according to D and the first homomorphic encryption method; obtaining several target sub-nodes corresponding to the target meter according to D and the second homomorphic encryption method; generating a target sub-graph corresponding to the target user node according to the target main node and the several target sub-nodes; uploading the target sub-graph and the corresponding target user ID to the first database; the present application can be used by the electricity consumption data analysis party for data analysis without exposing the user's electricity consumption data, and also divides the target time period into multiple target time segments, reducing the amount of data storage, and also reducing the amount of data analysis calculation for the data processing party.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the power industry, with the rapid development of smart grid and big data technology, power companies need to collect, store and analyze massive amounts of electricity consumption data in real time to optimize power resource allocation, improve power supply efficiency, reduce operating costs, and provide users with more personalized services. However, when processing and analyzing electricity consumption data, power companies usually need to access users' detailed electricity consumption records, including sensitive information such as electricity consumption, electricity consumption time, and electricity consumption equipment. If there is a lack of effective security protection measures, these data can easily be illegally obtained or abused, resulting in user privacy leakage. In order to solve the above problems, power companies usually use technical means such as data encryption, access control, and data desensitization to protect user data. However, these technologies still have some limitations in practical applications, such as the complexity of encryption algorithms, the flexibility of access control, and the accuracy of data desensitization. Therefore, there is an urgent need for a data recording method that can protect user data privacy and meet the data analysis needs of power companies. Summary of the invention

[0003] The technical problem to be solved by this application is: how to protect user data privacy while meeting the data analysis needs of power companies.

[0004] In view of the above technical problems, according to the first aspect of the present application, a method for recording electric energy meter data using a homomorphic encryption protection strategy is provided, and the method includes:

[0005] S100, obtaining the power consumption data D of the target electric meter in the target time period = (D 1 , D 2 , ..., D i , ..., D n ), i = 1, 2, ..., n, wherein n is the number of electricity consumption data recorded by the target meter within the target time period; D i D is the electricity consumption data corresponding to the i-th recording time point of the target meter within the target time period; i =(DL i , D.G. i );DL i DG is the power consumption of the target meter at the i-th recording time point within the target time period; i is the power corresponding to the i-th recording time point of the target meter within the target time period; the start time of the target time period is the time when the power consumption data of the target meter was last obtained, and the end time is the current time; the target meter has a unique corresponding target user node;

[0006] S200, according to D and the first homomorphic encryption method, obtain a target master node corresponding to the target electric meter; wherein the target master node records the total power consumption of the target electric meter after homomorphic encryption within the target time period;

[0007] S300, according to D and the second homomorphic encryption method, several target sub-nodes corresponding to the target electric meter are obtained; wherein each target sub-node has a corresponding target time segment; each target time segment belongs to the range of the target time segment; each target sub-node is individually homomorphically encrypted; each target sub-node records the average power obtained by calculating the power corresponding to all recorded time points of the target electric meter in the target time segment corresponding to the target sub-node and performing homomorphic encryption; the attribute value of the edge between each target sub-node and the target main node is the start time and end time of the target time segment corresponding to the target sub-node; the time of any two target time segments does not overlap; the first homomorphic encryption method and the second homomorphic encryption method both use fully homomorphic encryption;

[0008] S400, generating a target subgraph corresponding to a target user node according to a target main node and a plurality of target subnodes;

[0009] S500, uploading the above-mentioned target sub-graph and the corresponding target user ID to a first database; wherein the first database contains sub-graphs of multiple electricity meters; and the first database can be accessed by the electricity consumption analysis party.

[0010] This application has at least the following beneficial effects:

[0011] The electric energy meter data recording method using homomorphic encryption protection strategy provided by the present application processes the power consumption data in the target time period into a subgraph of a target main node corresponding to several target subnodes, and the target main node records the total power consumption in the target time period, and each target subnode records the average power in the corresponding target time segment. The main node in the target time period can represent the total amount of electric energy consumed in the target time period, and each target subnode represents the average energy consumption in the corresponding target time segment. And the total power consumption of the target main node is homomorphically encrypted, and each subnode is homomorphically encrypted separately. Since full homomorphic encryption can perform multiple different calculation operations at the same time, such as addition or multiplication, it is convenient for the power analysis party to analyze the encrypted power consumption data. For example, when obtaining the power consumption of any time period in the target time period, it is only necessary to determine multiple target subnodes that overlap with the time period in time, and obtain the power consumption of each target subnode that overlaps in time according to the duration of overlap with each target subnode and the average power corresponding to each target subnode, and then add them to obtain the total power consumption. That is, the power consumption information in any time period is obtained. And because the average power of the target subnode corresponding to each target time segment and the duration of overlap with each target subnode are all fully homomorphically encrypted data, they can be calculated without exposing the user's power consumption data. In addition, this application divides the target time period into multiple target time segments, which reduces the amount of data storage and also reduces the amount of data analysis calculations for the data processor. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] Figure 1 A flowchart of a method for recording electric energy meter data using a homomorphic encryption protection strategy provided in one embodiment of the present application. DETAILED DESCRIPTION

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

[0015] like Figure 1As shown, a method for recording electric energy meter data using a homomorphic encryption protection strategy is provided according to an embodiment of the present application, and the method includes:

[0016] S100, obtaining the power consumption data D of the target electric meter in the target time period = (D 1 , D 2 , ..., D i , ..., D n ), i = 1, 2, ..., n, wherein n is the number of electricity consumption data recorded by the target meter within the target time period; D i D is the electricity consumption data corresponding to the i-th recording time point of the target meter within the target time period; i =(DL i , D.G. i );DL i DG is the power consumption of the target meter at the i-th recording time point within the target time period; i It is the power corresponding to the i-th recording time point of the target meter within the target time period; the start time of the target time period is the time when the power consumption data of the target meter was last obtained, and the end time is the current time; the target meter has a unique corresponding target user node.

[0017] Specifically, in this embodiment, the data of the target meter is recorded once at each recording time point, and the power consumption data of the target meter is obtained once at each time interval corresponding to the target time period. The power consumption data of the target meter in this embodiment includes power consumption and power data. The end time of the target time period is the current time, and the start time is the time when the power consumption data of the target meter was last obtained. In addition, each target meter has a unique corresponding target user node, that is, it corresponds to one user.

[0018] S200, according to D and the first homomorphic encryption method, obtain the target master node corresponding to the target electricity meter; wherein the target master node records the total electricity consumption of the target electricity meter after homomorphic encryption within the target time period.

[0019] Specifically, in this embodiment, the first homomorphic encryption method uses a fully homomorphic encryption method to perform homomorphic encryption on the total power consumption data of the target meter within the target time period. Homomorphic encryption refers to performing specific operations on the obtained ciphertext after the original data is homomorphically encrypted, such as addition and other operations. Then the plaintext obtained after the calculation result is homomorphically decrypted is equivalent to the data result obtained by directly performing the same calculation on the original plaintext data. Homomorphic encryption provides a function for processing encrypted data. That is to say, the encrypted data can be processed without leaking any original content in the process. After the data processing is completed, it is decrypted again, and the result obtained is the result of the same processing on the original data. In this embodiment, the total power consumption of the target meter within the target time period is homomorphically encrypted. Specifically, a fully homomorphic encryption method is used. Here, the fully homomorphic encryption method can perform any homomorphic operation on the ciphertext an unlimited number of times, that is, it can homomorphically calculate any function and can perform a variety of different calculation operations, including addition and multiplication.

[0020] S300, according to D and the second homomorphic encryption method, several target sub-nodes corresponding to the target electric meter are obtained; wherein each target sub-node has a corresponding target time segment; each target time segment belongs to the range of the target time period; each target sub-node is individually homomorphically encrypted; each target sub-node records the average power obtained by calculating the power corresponding to all recorded time points of the target electric meter within the target time segment corresponding to the target sub-node and performing homomorphic encryption; the attribute value of the edge between each target sub-node and the target main node is the start time and end time of the target time segment corresponding to the target sub-node; the time of any two target time segments does not overlap; the first homomorphic encryption method and the second homomorphic encryption method both use fully homomorphic encryption.

[0021] Specifically, in this embodiment, the target time period is segmented to obtain several target time segments; the time of any two target time segments does not overlap, and each target time segment belongs to the range of the target time period. Each target time segment corresponds to a target sub-node, and each target sub-node records the average power obtained by calculating the power corresponding to all recorded time points of the target meter in the target time segment corresponding to the target sub-node and performing homomorphic encryption. The power data can reflect the energy consumption of the corresponding target meter at a certain moment, and the average power of a target time segment can reflect the average energy consumption in the time period. The purpose of segmenting the target time period to obtain several target time segments and generating corresponding target sub-nodes is to reduce the amount of data storage and facilitate data storage.

[0022] S400, generating a target subgraph corresponding to a target user node according to a target main node and a plurality of target subnodes.

[0023] Specifically, the target subgraph is composed of a target main node, a number of target sub-nodes, and edges between the target main node and each target sub-node, wherein the edges between the target main node and each target sub-node are plain text.

[0024] S500, uploading the above-mentioned target sub-graph and the corresponding target user ID to a first database; wherein the first database contains sub-graphs of multiple electricity meters; and the first database can be accessed by the electricity consumption analysis party.

[0025] Specifically, the target subgraph and the corresponding target user ID are uploaded to the first database so that the power consumption analysis party can aggregate and analyze the power consumption data.

[0026] As an example: if the power consumption analysis party wants to obtain the power consumption data S of a certain cell in any sub-time period within the target time period, the edges of all sub-nodes corresponding to the cell in the first database are compared for overlap (comparison of whether the time periods overlap), and all overlapped ones are filtered out. The result after calculation is S = m1 + m2 + ... + m e +...+m k ;m e =t e *p e ; where k is the number of overlapping edges, p e is the average power recorded by the child nodes corresponding to the e-th overlapping edge, t e The length of the time period corresponding to the e-th overlapping edge and the overlapping sub-time period. e The corresponding user is in t e The amount of electricity consumed during the corresponding time period.

[0027] It should be noted that p e 、m e and S are both ciphertext data. f() is the preset fully homomorphic encryption algorithm / homomorphic public key, then p e =f(q e );q e The power consumption is in plain text. The power consumption analysis party needs to send S to the secure management end for decryption to obtain the data sent back by the management party. Only the management party has the homomorphic private key. This achieves the goal of being able to analyze data while protecting the security of user power consumption data.

[0028] In summary, in this embodiment, the power consumption data within the target time period is processed into a subgraph in which a target main node corresponds to several target subnodes, and the target main node records the total power consumption within the target time period, and each target subnode records the average power within the corresponding target time segment. The main node within the target time period can represent the total amount of electric energy consumed within the target time period, and each target subnode represents the average energy consumption within the corresponding target time segment. And the total power consumption of the target main node is homomorphically encrypted, and each subnode is homomorphically encrypted separately. Since full homomorphic encryption can perform a variety of different calculation operations at the same time, such as addition or multiplication, it is convenient for the power analysis party to analyze the encrypted power consumption data. For example: when obtaining the power consumption of any time period within the target time period, it is only necessary to determine the multiple target subnodes that overlap with the time period in time, and according to the duration of overlap with each target subnode and the average power corresponding to each target subnode, the power consumption of each target subnode that overlaps in time is obtained, and then the total power consumption is obtained by adding them. That is, the power consumption information in any time period is obtained. And because the average power of the target sub-node corresponding to each target time segment and the duration of overlap with each target sub-node are all data after fully homomorphic encryption, not only can they be calculated, but also the user's power consumption data is not exposed. In this embodiment, the target time period is divided into multiple target time segments, which reduces the amount of data storage and also reduces the amount of data analysis calculations for the data processor.

[0029] In an exemplary embodiment of the present application, the attribute value of the edge between the target master node and the target user node is the start time and end time of the target time period.

[0030] In an exemplary embodiment of the present application, after step S100, the method further includes:

[0031] S600, encrypt the electricity consumption data in D as a whole using a preset encryption method, and then package and upload it to a second database; wherein the second database cannot be accessed by the electricity consumption analysis party.

[0032] Specifically, the second database is used to trace back when there is a problem with the data. The preset encryption method can be a non-homomorphic encryption method or a homomorphic encryption method.

[0033] In an exemplary embodiment of the present application, the first database also includes a cell node or an administrative district node, and the attribute of the edge between the user node and the cell node or the administrative district node is an affiliation relationship.

[0034] Specifically, each node in the first database, including the edge relationship between each node, together constitutes graph data of the corresponding target electricity meter, including a subgraph consisting of a target main node and a number of target sub-nodes.

[0035] In an exemplary embodiment of the present application, the edge between the target main node and the target user node and the edge between the target child node and the target main node are both plain text.

[0036] Specifically, edges define the functions or relationships between nodes, making the entire graph data easier to visualize.

[0037] In an exemplary embodiment of the present application, step S300 further includes:

[0038] S310, according to D and the preset clustering method, obtain a cluster list J arranged in chronological order = (J 1 , J 2 , ..., J j , ..., J m );j=1,2,...,m;wherein, m is the number of clusters arranged in chronological order obtained by clustering all the powers in D according to the preset clustering method; J j is the jth cluster in chronological order obtained by clustering all the powers in D according to the preset clustering method; J j =(J j1 , J j2 , ..., J jx , ..., J jf(x) ); x = 1, 2, ..., f(x); f(x) is the number of electricity consumption data in the jth cluster arranged in chronological order; J jx The power corresponding to the xth power consumption data in chronological order contained in the jth cluster; the difference between the maximum power and the minimum power in each cluster is less than the preset power difference threshold; each cluster has a corresponding target time segment; and the corresponding recording time points in each cluster are continuous; each cluster has a corresponding average power; the preset clustering method is a clustering method that does not specify the number of clusters.

[0039] Specifically, a density-based clustering algorithm (such as DBSCAN) that does not require the specification of the number of clusters is used to cluster the power consumption data in D, so that in a cluster after clustering, all the recording time points corresponding to the power are adjacent (the corresponding recording time points in each cluster are continuous), and the power values ​​are similar (the difference between the maximum power and the minimum power in each cluster is less than the preset power difference threshold). In this way, the average power recorded by each target sub-node is representative for the target sub-node. If there is an excessively large or small power in a cluster, which causes the overall average power to increase or decrease, the average power obtained in this way cannot represent the energy consumption of the target time segment. Therefore, the above-mentioned excessively large or small instantaneous power data exists as discrete points.

[0040] S320, merging the clusters in J to obtain a fused cluster list R = (R 1 , R 2 , ..., R p , ..., R q ), p = 1, 2, ..., q, where R p is the pth fusion cluster; R p =(J a-1 , J a , J a+1 );J a is the clustering cluster ranked ath in chronological order obtained by clustering all the powers in D according to the preset clustering method; and J a The amount of electricity consumption data included in the data is less than the preset amount; a-1 The corresponding average power and J a+1 The difference between the corresponding average powers is smaller than a preset average power difference.

[0041] Specifically, after clustering, in order to further reduce the amount of data storage, the above-mentioned clusters are clustered. That is, traverse each cluster, if the number of values ​​in the cluster is small (less than the preset number, or it is a discrete point), then obtain its two adjacent clusters in time. If the average power of these two clusters is relatively close (the difference is less than the preset average power difference), it means that their corresponding energy conditions are similar, then the three of them are merged into one cluster. Otherwise, they are not merged. After the fusion of each cluster, if there are still discrete points, the start time and end time of the edge of the corresponding subnode of the discrete point are the same.

[0042] S330, according to R and the unfused discrete points, a number of target sub-nodes are obtained; each target sub-node corresponds to a fused cluster or an unfused discrete point; each target sub-node records the average power calculated from the power corresponding to all recorded time points of the target meter within the target time segment corresponding to the target sub-node.

[0043] Specifically, the average power corresponding to each fusion cluster in R and the power corresponding to each discrete point are homomorphically encrypted to obtain the corresponding target sub-node.

[0044] The segmentation method provided in this embodiment uses a density-based clustering algorithm (such as DBSCAN) that does not require the specification of the number of clusters to cluster the power consumption data in D, so that in a cluster after clustering, all the recording time points corresponding to the power are adjacent (the corresponding recording time points in each cluster are continuous), and the power values ​​are similar (the difference between the maximum power and the minimum power in each cluster is less than the preset power difference threshold). In this way, the average power recorded by each target sub-node is representative for the target sub-node. If there is an excessively large or small power in a cluster, which causes the overall average power to increase or decrease, the average power obtained in this way cannot represent the energy consumption of the target time segment. After clustering, in order to further reduce the amount of data storage, the above-mentioned several clusters are clustered. That is, traverse each cluster. If the number of values ​​in the cluster is small (less than the preset number, or it is a discrete point itself), then obtain two clusters that are adjacent to each other in time. If the average power of these two clusters is close (the difference is less than the preset average power difference), it means that their corresponding energy consumption is similar, and then merge the three of them into one cluster. Otherwise, do not merge. After each cluster is merged, if there are still discrete points, the start time and end time of the edge of the corresponding subnode of the discrete point are the same. Through the two steps of clustering and fusion, the data storage volume is fully reduced, and the power consumption data is reasonably segmented according to the instantaneous power consumption, which is convenient for data analysis.

[0045] In an exemplary embodiment of the present application, after step S500, the method further includes:

[0046] S700, obtaining a graph data list P of a target electric meter within a target time window = (P 1 , P 2 , ..., P r , ..., P s ); r = 1, 2, ..., s; s is the number of consecutive and equal-length target time periods contained in the target time window; each target time period has a corresponding target master node; P r is the subgraph of the target meter in the rth target time period within the target time window; r Includes a target master node PZ r and the corresponding target child node list PJ r =(PJ r1 , P.J. r2 , ..., P. J.rc , ..., P. J. rf(r) ); c = 1, 2, ..., f(r); f(r) is P r The number of target child nodes included; PJ rc P r The cth target subnode is included; each target subnode has a corresponding target time segment; any target time segment belongs to the target time segment; PZ r With PJ rc The attribute value of the edge between is PJ rc The start and end time of the corresponding target time segment; PZ r Record the total electricity consumption of the target meter after homomorphic encryption in the rth target time period; PJ rc Record the PJ after homomorphic encryption rc The average power calculated from the power corresponding to all recorded time points within the corresponding target time segment; no two target time segments overlap.

[0047] Specifically, as an example: the target time window can be 24 hours, and the target time period can be 4 hours. The target time periods are of equal length and continuous. Each target time period corresponds to a target master node, that is, each target master node corresponds to the same time length.

[0048] S800, according to P, obtain the target feature vector X corresponding to the target meter = (G 1 , G 2 , ..., G r , ..., G s );G r is the sub-vector corresponding to the rth target time period of the target meter within the target time window; G r =(G r1 , G r2 , ..., G rd , ..., G rf(r)-1 , G rf(r) ); d=1, 2,..., f(r)-1; G rd is the feature value list corresponding to the target subnode ranked in the dth position in chronological order corresponding to the rth target time period; G rd =(G rd1 , G rd2 , ..., G rdg , ..., G rdf(d) ), g = 1, 2, ..., f(d), f(d) is the number of eigenvalues ​​corresponding to the target child node ranked at the dth position in chronological order; T rdis the duration corresponding to the target sub-node ranked at the dth position; ZT is the duration corresponding to the target main node; W is the total number of eigenvalues ​​corresponding to the sub-vector; is the preset upper integer formula; G rd Each characteristic value in SG is the same, which is the average power corresponding to the target subnode ranked in the dth position in chronological order corresponding to the rth target time period of the target meter in the target time window; rf(r) =WW r0 SG rf(r) G rf(r) The number of eigenvalues ​​in W r0 is the sum of the number of characteristic values ​​of other target subnodes corresponding to the rth target time period of the target meter within the target time window, except for the target subnode ranked last in chronological order; G rf(r) Each eigenvalue in is the same, which is the average power corresponding to the last target subnode in chronological order corresponding to the rth target time period of the target meter within the target time window.

[0049] Specifically, each target main node corresponds to a sub-vector, and multiple sub-vectors are concatenated to obtain the target feature vector. The length of each sub-vector is pre-set, and the target sub-nodes corresponding to the target main node are arranged in chronological order, and the duration corresponding to each target sub-node is obtained. According to the ratio of the duration corresponding to each target sub-node to the duration of the sub-vector, the corresponding number of eigenvalues ​​is determined, that is, the number of eigenvalues ​​corresponding to each target sub-node in the sub-vector is set to the average power value corresponding to the target sub-node, and because the previous data are rounded up, or the data is too large, the number of eigenvalues ​​corresponding to the last target sub-node is obtained by subtracting the length of the total sub-vector and the number of eigenvalues ​​corresponding to other target sub-nodes, so as to ensure that the length of the corresponding sub-vector is fixed.

[0050] S900: Input X into the trained duration prediction model to predict the remaining usage duration corresponding to the target electricity meter.

[0051] Specifically, the input vector is input into a trained duration prediction model (such as an LSTM model) to predict the remaining usage time corresponding to the target electricity meter.

[0052] The trained duration prediction model may be trained based on a training set consisting of a plurality of preset sub-vectors corresponding to different users in different target time windows and the corresponding actual remaining usage durations.

[0053] The duration prediction model mentioned above can be any model in the art that can realize the duration prediction function mentioned above, which will not be described in detail here.

[0054] In this embodiment, an input vector is quickly constructed based on the data in the first database, and the input vector data is simpler than the actual data, so that training can be performed without relying on a large number of samples. And because the existing electricity bill payment reminders are simply based on a threshold of the remaining charges. However, everyone's electricity usage habits are different, and the remaining time that can be used for the same electricity bill is different, which results in many payment reminders being unable to effectively prompt users to pay on time. This embodiment predicts the remaining usage time corresponding to the target meter based on electricity usage data that can characterize the user's electricity usage habits and regularities, which can more effectively remind the user of the remaining usable time of the electricity bill and urge the user to pay on time.

[0055] An embodiment of the present application further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification.

[0056] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0057] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0058] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0059] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0060] The electronic device according to this embodiment of the present application is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0061] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).

[0062] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present application.

[0063] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).

[0064] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0065] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0066] The electronic device can also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable users to interact with the electronic device, and / or communicate with any device (such as routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. This communication can be carried out through an input / output (I / O) interface. In addition, the electronic device can also communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs) and / or public networks, such as the Internet) through a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0067] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0068] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present application described in the above "Exemplary Method" section of the present specification.

[0069] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0070] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0071] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0072] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0073] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0074] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0075] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for recording electric energy meter data using a homomorphic encryption protection strategy, characterized in that: The method comprises: S100, obtaining the power consumption data D=(D1, D2, ..., D i , ..., D n ), i=1, 2, ..., n, where n is the number of electricity consumption data recorded by the target meter during the target time period; D i D is the electricity consumption data corresponding to the i-th recording time point of the target meter within the target time period; i =(DL i , D.G. i );DL i DG is the power consumption of the target meter at the i-th recording time point within the target time period; i is the power corresponding to the i-th recording time point of the target meter within the target time period; the start time of the target time period is the time when the power consumption data of the target meter was last obtained, and the end time is the current time; the target meter has a unique corresponding target user node; S200, according to D and the first homomorphic encryption method, obtain a target master node corresponding to the target electric meter; wherein the target master node records the total power consumption of the target electric meter after homomorphic encryption within the target time period; S300, according to D and the second homomorphic encryption method, several target sub-nodes corresponding to the target electric meter are obtained; wherein each target sub-node has a corresponding target time segment; each target time segment belongs to the range of the target time segment; each target sub-node is individually homomorphically encrypted; each target sub-node records the average power obtained by calculating the power corresponding to all recorded time points of the target electric meter in the target time segment corresponding to the target sub-node and performing homomorphic encryption; the attribute value of the edge between each target sub-node and the target main node is the start time and end time of the target time segment corresponding to the target sub-node; the time of any two target time segments does not overlap; the first homomorphic encryption method and the second homomorphic encryption method both use fully homomorphic encryption; S400, generating a target subgraph corresponding to a target user node according to a target main node and a plurality of target subnodes; S500, uploading the target sub-graph and the corresponding target user ID to a first database; wherein the first database contains sub-graphs of multiple electricity meters; and the first database can be accessed by the electricity consumption analysis party; If the power consumption analysis party wants to obtain the power consumption data S of a certain cell in any sub-time period within the target time period, the edges of all sub-nodes corresponding to the cell in the first database are compared for overlap, and all overlapped edges are filtered out; the result after calculation is S=m1+m2+...+m e +...+m k ;m e =t e ×p e ; where k is the number of overlapping edges, p e is the average power recorded by the child nodes corresponding to the e-th overlapping edge, t e is the length of the time period corresponding to the e-th overlapping edge and the overlapping sub-time period; m e The corresponding user is in t e The amount of electricity consumed during the corresponding time period.

2. The method for recording electric energy meter data using homomorphic encryption protection strategy according to claim 1, characterized in that: The attribute value of the edge between the target master node and the target user node is the start time and the end time of the target time period.

3. The method for recording electric energy meter data using homomorphic encryption protection strategy according to claim 1, characterized in that: After step S100, the method further includes: S600, encrypt the electricity consumption data in D as a whole using a preset encryption method, and then package and upload it to a second database; wherein the second database cannot be accessed by the electricity consumption analysis party.

4. The method for recording electric energy meter data using homomorphic encryption protection strategy according to claim 3 is characterized in that: The preset encryption method is a non-homomorphic encryption method.

5. The method for recording electric energy meter data using homomorphic encryption protection strategy according to claim 1, characterized in that: The first database also includes a cell node or an administrative district node, and the attribute of the edge between the user node and the cell node or the administrative district node is an affiliation relationship.

6. The method for recording electric energy meter data using homomorphic encryption protection strategy according to claim 2, characterized in that: The edges between the target master node and the target user node, as well as the edges between the target child node and the target master node are all in plain text.

Citation Information

Patent Citations

  • Privacy-protected low-voltage transformer area edge side power consumption data aggregation method

    CN110581757A

  • Load aggregator electric quantity prediction method and device and computer equipment

    CN114596116A