An efficient and secure method for uploading data from smart meters

Through the smart meter data upload method and fully homomorphic encryption technology, the power consumption data of power companies is clustered, integrated and encrypted, solving the problems of user privacy leakage and large data storage, and achieving efficient and secure power consumption data analysis.

CN118802104BActive Publication Date: 2025-05-02BAODING ZHAOWEI SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410787694.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-05-02
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, which poses the risk of user privacy leakage. At the same time, the amount of data is large and the cost of storage and analysis is high. The existing technologies such as encryption, access control and data desensitization have limitations such as complexity, flexibility and accuracy.

Method used

Through an efficient and secure smart meter data upload method, the electricity consumption data of the target meter is obtained, the data is processed into the subgraph form of the target master node and the target child node by clustering and fusion technology, and the data is encrypted using fully homomorphic encryption technology to reduce the amount of data storage while ensuring data privacy and analysis capabilities.

Benefits of technology

It realizes privacy protection for user electricity data, reduces data storage, simplifies the data analysis process, and improves the data analysis efficiency of power companies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802104B_ABST
    Figure CN118802104B_ABST
Patent Text Reader

Abstract

The present application relates to the field of smart meters, and in particular to an efficient and secure method for uploading data from smart meters. The method includes: obtaining the power consumption data D of the target meter within the target time period; obtaining a clustering cluster list J arranged in chronological order according to D and a preset clustering method; fusing the clusters in J to obtain a fused cluster list R; obtaining a number of target sub-nodes according to R and unfused discrete points; obtaining a homomorphically encrypted target main node and a number of target sub-nodes according to a preset homomorphic encryption method; uploading the subgraph formed by the target main node and the several target sub-nodes and the corresponding target user ID to the first database. The present application fully reduces the amount of data storage through clustering and fusion, and reasonably segments the power consumption data according to the instantaneous power consumption, which is convenient for the data analyst to perform data analysis. It can also protect the privacy of the user's power consumption data.
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. Moreover, the electricity consumption data is huge, the storage volume is large, and it is time-consuming and laborious. 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, reduce data storage volume, 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, reduce data storage volume, and meet the data analysis needs of power companies.

[0004] In view of the above technical problems, according to the first aspect of the present application, an efficient and secure method for uploading data of a smart meter is provided, and the method comprises:

[0005] S100, obtaining the power consumption data D=(D1, D2, ..., 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 a preset clustering method, obtain a cluster list J=(J1, J2, . . . , 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 a 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 the jth cluster in chronological order; 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;

[0007] S300, merging the clusters in J to obtain a fused cluster list R = (R1, R2, ..., 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 less than a preset average power difference;

[0008] S400, obtaining a plurality of target subnodes according to R and unfused discrete points; each target subnode corresponds to a fused cluster or an unfused discrete point; each target subnode records the average power calculated by the power corresponding to all recorded time points of the target meter in the target time segment corresponding to the target subnode;

[0009] S500, according to a preset homomorphic encryption method, obtain a homomorphically encrypted target main node and several target sub-nodes; wherein the target main node records the total power consumption of the target meter after homomorphic encryption in the target time period; 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 above preset homomorphic encryption method is fully homomorphic encryption;

[0010] S600, uploading a subgraph formed by a target main node and a plurality of target subnodes and a corresponding target user ID to a first database; wherein the first database contains subgraphs of a plurality of electricity meters; and the first database can be accessed by an electricity consumption analysis party.

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

[0012] The method provided in this embodiment processes the power consumption data in the target time period into a subgraph in which a target main node corresponds 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 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. Furthermore, 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 too small power in a certain cluster, which makes the overall average power increase or decrease, the average power obtained by this 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 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 the two clusters that are adjacent to each other 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 consumption is similar, and then merge the three of them into one cluster. Otherwise, do not merge. After each cluster cluster after fusion, if there are still discrete points, the start time and end time of the edge of the corresponding sub-node of the discrete point are the same. Through the two steps of clustering and fusion, the amount of data storage is fully reduced, and the power consumption data is reasonably segmented according to the instantaneous power consumption, which is convenient for the data analysis party to perform data analysis. It can also protect the privacy of the user's power consumption data. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] 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.

[0014] Figure 1 A flowchart of an efficient and secure smart meter data uploading method provided for one embodiment of the present application. DETAILED DESCRIPTION

[0015] 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.

[0016] like Figure 1 As shown, an efficient and secure smart meter data uploading method is provided according to an embodiment of the present application, and the method includes:

[0017] S100, obtaining the power consumption data D=(D1, D2, ..., 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.

[0018] 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.

[0019] S200, according to D and a preset clustering method, obtain a cluster list J=(J1, J2, . . . , 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 a preset clustering method; J jis 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.

[0020] 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.

[0021] S300, merging the clusters in J to obtain a fused cluster list R = (R1, R2, ..., 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.

[0022] 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.

[0023] S400, according to R and 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.

[0024] 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. 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 target time period is segmented to obtain several target time segments and the corresponding target sub-nodes are generated to reduce the amount of data storage and facilitate data storage.

[0025] S500, according to the preset homomorphic encryption method, obtain the target main node and several target sub-nodes after homomorphic encryption, wherein the target main node records the total power consumption of the target meter after homomorphic encryption within the target time period; 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 above-mentioned preset homomorphic encryption method is fully homomorphic encryption.

[0026] Specifically, the preset homomorphic encryption method is: the total power consumption of the target meter recorded by the target master node in the target time period is fully homomorphically encrypted, and the average power calculated by the power corresponding to all recorded time points in the target time segment corresponding to the target subnode is recorded by the target meter at each target subnode. Homomorphic encryption refers to the process of 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. In other words, 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 is the result of the same processing on the original data. The fully homomorphic encryption method can perform any homomorphic operation on the ciphertext an unlimited number of times, that is, it can calculate any function homomorphically and can perform a variety of different calculation operations, including addition and multiplication.

[0027] S600, uploading a subgraph formed by a target main node and a plurality of target subnodes and a corresponding target user ID to a first database; wherein the first database contains subgraphs of a plurality of electricity meters; and the first database can be accessed by an electricity consumption analysis party.

[0028] Specifically, in this embodiment, the power consumption data in 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 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 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 in 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 electricity consumption data is not exposed. And through the two steps of clustering and fusion, the data storage volume is fully reduced, and the electricity consumption data is reasonably segmented according to the instantaneous power consumption, which is convenient for data analysis. It can also protect the privacy of users' electricity consumption data.

[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] S001, 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, after step S600, the method further includes:

[0038] S700, obtaining a graph data list P=(P1, P2, ..., 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.

[0039] 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.

[0040] S800, according to P, obtain the target feature vector X corresponding to the target meter = (G1, G2, ..., 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 rd is 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.

[0041] 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.

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

[0043] 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.

[0044] 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.

[0045] 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.

[0046] In this embodiment, an input vector can be 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.

[0047] 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.

[0048] 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.

[0049] 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.

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

[0051] 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.

[0052] 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.

[0053] 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).

[0054] 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.

[0055] 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).

[0056] 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 an implementation of a network environment.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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).

[0065] 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.

[0066] 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.

[0067] 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. An efficient and safe method for uploading data of a smart meter, characterized in that: The method comprises: S100, obtaining the power consumption data D=(D1, D2, ..., 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; S200, according to D and a preset clustering method, obtain a cluster list J=(J1, J2, . . . , 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 the jth cluster in chronological order; 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; S300, merging the clusters in J to obtain a fused cluster list R = (R1, R2, ..., 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 less than a preset average power difference; S400, obtaining a plurality of target subnodes according to R and unfused discrete points; each target subnode corresponds to a fused cluster or an unfused discrete point; each target subnode records the average power calculated by the power corresponding to all recorded time points of the target meter in the target time segment corresponding to the target subnode; S500, according to a preset homomorphic encryption method, obtain a homomorphically encrypted target main node and several target sub-nodes; wherein the target main node records the total power consumption of the target meter after homomorphic encryption in the target time period; 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 preset homomorphic encryption method is full homomorphic encryption; S600, uploading a subgraph formed by a target main node and a plurality of target subnodes and a corresponding target user ID to a first database; wherein the first database contains subgraphs of a plurality of electricity meters; and the first database can be accessed by an electricity consumption analysis party.

2. According to claim 1, an efficient and safe smart meter data uploading method is characterized in that: The start time and the end time in the attribute value of the edge between the target sub-node and the target main node corresponding to the unfused discrete point are the same.

3. According to claim 1, an efficient and safe method for uploading data of a smart meter is 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.

4. According to claim 1, an efficient and safe method for uploading data of a smart meter is characterized in that: After step S100, the method further includes: S700, 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.

5. The efficient and safe method for uploading data of a smart meter according to claim 4, characterized in that: The preset encryption method is a non-homomorphic encryption method.

6. The efficient and safe smart meter data uploading method according to claim 1 is characterized in that: The first database also includes cell nodes and administrative district nodes, and the attribute of the edge between the user node and the cell node or the administrative district node is an affiliation relationship.

7. The efficient and safe smart meter data uploading method according to claim 1 is 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

  • Electricity utilization metering prompting method based on energy distribution data of electric energy meter

    CN118780940A

  • Electric energy meter data recording method using homomorphic encryption protection strategy

    CN118802105A