Intelligent electric meter data distributed storage method and system
By combining differential privacy processing, homomorphic encryption, and fragmented coding with a distributed storage allocation model and a non-cooperative stochastic differential game model, the security and efficiency issues in smart meter data storage are solved, achieving efficient, reliable, and secure data management in complex network environments.
Patent Information
- Application Number
- CN202511843934.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-12-09
AI Technical Summary
Existing smart meter data storage technologies suffer from low security in centralized storage, limited privacy protection methods, low efficiency in distributed storage allocation, and a lack of dynamic security defense mechanisms. This makes user data vulnerable to attacks, poses single points of failure and privacy risks, and results in poor fault tolerance and low utilization of storage resources, making it difficult to achieve secure, reliable, and efficient data management in complex network environments.
The data of smart meters is perturbed and encrypted by differential privacy processing and homomorphic encryption, and fragmented and encoded to generate recoverable data fragments. The storage allocation of data fragments is optimized by a distributed storage allocation model, and security defense is carried out by a non-cooperative random differential game model. Independent access probability and fixed connection capacity access models are constructed to improve the fault tolerance and resource utilization of the system.
It achieves data privacy protection, reliable storage, and proactive defense in complex network environments, significantly improving the security, reliability, and stability of data storage, enhancing storage resource utilization and access efficiency, and strengthening the system's fault tolerance and security defense capabilities.
Smart Images

Figure CN121283778B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric meter data processing, and particularly relates to a smart electric meter data distributed storage method and system. BACKGROUND
[0002] The smart electric meter data distributed storage method is a safe and efficient data management method for dispersively storing large-scale electric data generated by smart electric meters in a plurality of network nodes after privacy protection and encryption processing by using sharding coding, node distribution and redundancy checking technology.
[0003] With the wide deployment of smart grids and Internet of Things, the amount of electric meter data is growing explosively, and the electric meter data has high sensitivity and continuity. If the storage system lacks privacy protection or fault tolerance capability, it is easy to cause user information leakage, data loss or system paralysis.
[0004] However, the traditional smart electric meter data storage technology has the problems of low security of centralized storage, single privacy protection means, low distribution efficiency of distributed storage, and lack of dynamic security defense mechanism, etc., which leads to the risk of user data becoming an attack target, single point failure and privacy leakage, poor fault tolerance of the storage system, low utilization rate of storage resources, and difficulty in realizing safe, reliable and efficient data management in complex network environment. SUMMARY
[0005] In view of the above problems of the prior art, the purpose of the embodiments of the present application is to provide a smart electric meter data distributed storage method, which can solve the problems of low security of centralized storage, single privacy protection means, low distribution efficiency of distributed storage, and lack of dynamic security defense mechanism, etc. in the prior art, which leads to the risk of user data becoming an attack target, single point failure and privacy leakage, poor fault tolerance of the storage system, low utilization rate of storage resources, and difficulty in realizing safe, reliable and efficient data management in complex network environment.
[0006] In a first aspect, the embodiments of the present application provide a smart electric meter data distributed storage method, comprising:
[0007] S1: obtaining original data packets generated by a smart electric meter;
[0008] S2: performing differential privacy processing on the original data packets to obtain privacy data;
[0009] S3: performing homomorphic encryption on the privacy data to obtain encrypted data blocks;
[0010] S4: sharding and coding the encrypted data blocks to generate a plurality of recoverable data segments;
[0011] S5: determining an optimal storage allocation result of each data segment through a distributed storage allocation model, wherein the distributed storage allocation model comprises an independent access probability model and a fixed connection capacity access model;
[0012] S6: storing each data segment according to the optimal storage allocation result to determine stored data;
[0013] S7: performing security defense on the stored data through a non-cooperative stochastic differential game model.
[0014] The second aspect of the embodiment of the present application provides an intelligent electric meter data distributed storage system, comprising a processor and a memory.
[0015] The memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the intelligent electric meter data distributed storage method according to the first aspect.
[0016] The third aspect of the embodiment of the present application provides a readable storage medium, and the readable storage medium stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the intelligent electric meter data distributed storage method according to the first aspect.
[0017] The technical scheme provided by the embodiment of the present application has at least the following beneficial effects:
[0018] In the embodiment of the present application, differential privacy and homomorphic encryption mechanism are introduced in the data acquisition stage to disturb and encrypt the original data of the intelligent electric meter, effectively preventing user privacy leakage, and through the sharding encoding, the redundant storage of data among distributed nodes can be realized, the fault tolerance and data recoverability of the system are improved, the independent access probability model and the fixed connection capacity access model are constructed, the storage allocation strategy of the data segment is adaptively optimized, the storage resource utilization rate and the access efficiency can be significantly improved, the non-cooperative stochastic differential game model is introduced to realize the dynamic adjustment of the defense strategy and the attack and defense balance, thereby improving the security defense capability of the system in the complex network environment, and the present application realizes the full-link optimization of the intelligent electric meter data from privacy protection, reliable storage to active defense, and significantly improves the security, reliability and stability of data storage. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not considered to be limiting of the present application, and throughout the drawings, the same reference symbols indicate the same components. Obviously, the accompanying drawings described below are only some embodiments described in the embodiments of the present application, and other drawings can be obtained according to these drawings without creative labor for those skilled in the art.
[0020] Figure 1 is a flowchart of a smart meter data distributed storage method provided by an embodiment of the present application.
[0021] Figure 2 is a structural diagram of a smart meter data distributed storage system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. It should be understood that these descriptions are only exemplary and are not used to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0023] The smart meter data distributed storage method provided by the embodiments of the present application will be described in detail below in conjunction with the drawings, specific embodiments and application scenarios.
[0024] Reference is made to the accompanying drawings, which show a flowchart of a smart meter data distributed storage method provided by an embodiment of the present application. Figure 1
[0025] The embodiments of the present application provide a smart meter data distributed storage method, which can include the following steps:
[0026] S1: Obtain an original data packet generated by a smart meter.
[0027] The original data packet refers to a basic data set directly collected and generated by the smart meter in the running process without any processing. The data packet usually includes power metering information (such as voltage, current, power, power factor, power consumption, etc.), time stamp, device number, communication identifier and state information, etc. It is the first data unit transmitted by the smart meter to the upper layer system (such as a data concentrator, a master station or a cloud platform).
[0028] S2: Perform differential privacy processing on the original data packet to obtain privacy data.
[0029] It should be noted that by performing differential privacy processing on the original data packet, individual user information can be effectively prevented from being deduced or identified while keeping the overall statistical characteristics unchanged, thereby achieving high-strength privacy protection without affecting the accuracy of data analysis.
[0030] In one possible implementation, S2 specifically includes:
[0031] S201: Define privacy protection parameters, wherein the privacy protection parameters include a privacy budget and a relaxation parameter.
[0032] wherein the privacy protection parameters refer to a set of key parameters used to control the data perturbation intensity and the privacy protection degree in the differential privacy mechanism, wherein the privacy budget is used to quantify the allowed information leakage degree, and the smaller the value, the stronger the privacy protection, and the relaxation parameter is used to define the allowable probability deviation range in the random algorithm to balance privacy and data availability.
[0033] S202: According to the privacy protection parameters, define the differential privacy mechanism:
[0034]
[0035] wherein M( ) represents a randomization algorithm, D1 and D2 represent adjacent data sets in the original data packet, e represents an exponential function, represents the privacy budget, represents the relaxation parameter, S represents a set of events output by the randomization algorithm M, and Pr( ) represents the probability that the output of the randomization algorithm M falls within the event set S.
[0036] wherein the differential privacy mechanism refers to a privacy protection method that injects random noise into the original data or query results during data publishing or analysis, so that the attacker cannot accurately determine whether a certain individual data participates in the calculation, the mechanism uses the privacy budget and the relaxation parameter to control the noise intensity, thereby ensuring the statistical effectiveness while preventing individual information leakage.
[0037] S203: Calculate the function sensitivity of the original data packet.
[0038] wherein the function sensitivity refers to a quantitative indicator in the differential privacy mechanism that measures the maximum change amplitude of the query function output result when any record in the original data set is added or deleted, reflecting the influence degree of a single individual in the data set on the overall statistical result, which is commonly used to determine the required perturbation intensity when adding noise, the greater the function sensitivity, the more significant the influence of a single data on the result, and stronger noise needs to be injected to ensure privacy protection, otherwise, smaller noise amplitude can be used to maintain data accuracy.
[0039] S204: According to the privacy budget and the function sensitivity, establish a Laplace distribution model:
[0040]
[0041]
[0042]
[0043]
[0044] wherein Lap() represents a probability density function of a Laplace distribution, x represents a variable, i.e., a generated random noise value, b represents a noise scale parameter, and exp represents an exponential function, denotes a function sensitivity, and max represents maximization, denotes an uplink function sensitivity, denotes a downlink function sensitivity, denotes a first quantile, denotes a robust parameter, f() represents a query function, : represents a set generation symbol, and [ ] + denotes a forward truncation, denotes a neighboring relationship symbol.
[0045] wherein the Laplace distribution model refers to a probability model established based on a Laplace distribution, a probability density function of which is sharp at a mean value and decays quickly on both sides, and is commonly used to generate random noise in differential privacy, the noise scale parameter b being determined by a privacy budget ε and a function sensitivity Δf, so as to control the data perturbation intensity.
[0046] S205: generating Laplace distribution noise through the Laplace distribution model.
[0047] wherein the Laplace distribution noise refers to a random perturbation value sequence generated according to the Laplace distribution model, having a zero mean and a symmetric probability density characteristic, the noise being injected into data through a random offset, so that the true value of each individual data point is partially concealed, thereby preventing external inference attacks.
[0048] S206: adding the Laplace distribution noise to the original data packet under the constraint of the differential privacy mechanism to obtain private data.
[0049] Specifically, by adding the Laplace distribution noise to the original data under the constraint of the differential privacy mechanism, an attacker can be effectively prevented from obtaining individual information through differential analysis or correlation reasoning, the balance between data usability and privacy is achieved, and the security and reliability of the smart meter user data in the sharing and analysis process are ensured.
[0050] In the embodiment of the present application, first, sampling is performed according to the Laplace distribution model to generate a random noise sequence with zero mean and fixed variance, that is, Laplace noise, and then the generated Laplace noise is added to the corresponding numerical attribute (such as power consumption, voltage, current or power data) of the original data packet under the constraint of the differential privacy mechanism, so that each data item is disturbed to form a new value. Through this process, the privacy data obtained maintains consistent statistical characteristics in the overall distribution, but the data of a single user has been randomized, ensuring that individual records are difficult to accurately reconstruct, thereby achieving privacy protection of the electric meter data without affecting the accuracy of overall data analysis.
[0051] S3: homomorphic encryption is performed on the privacy data to obtain an encrypted data block.
[0052] In the embodiment of the present application, first, a public-private key pair required for homomorphic encryption is generated for each smart meter. Then, the privacy data is converted into a standardized data vector form as an encryption input. Homomorphic encryption operation is performed on each data element using the public key, and the uniqueness and indistinguishability of the ciphertext are ensured through random factor confusion, thereby generating the corresponding encryption result. All encrypted data units are recombined in data order to form an encrypted data block, and key index, timestamp and data identification information are attached. Finally, the output encrypted data block can participate in subsequent data slicing, aggregation or calculation operations in an encrypted state, and can also restore the original privacy data after decryption, achieving the protection goal of balancing data security and computability.
[0053] It should be noted that by performing homomorphic encryption on the privacy data, direct calculation and verification of the encrypted data can be achieved without exposing the original numerical content, thereby supporting subsequent distributed processing and analysis while ensuring data confidentiality, effectively improving the security and computational availability of the system.
[0054] S4: slicing and encoding are performed on the encrypted data block to generate a plurality of recoverable data segments.
[0055] It should be noted that by slicing and encoding the encrypted data block, the fault tolerance and reliability of storage can be effectively improved, so that even if part of the nodes fail or are lost in a distributed storage environment, the original data can be reconstructed through the remaining segments, thereby ensuring the high availability and security redundancy of the data.
[0056] In one possible implementation, S4 specifically includes:
[0057] S401: The encrypted data block is divided into a plurality of data units.
[0058] S402: An encoding generation matrix is constructed.
[0059] S403: Linearly encode each data unit by using the encoding generation matrix to generate a plurality of intermediate encoding segments.
[0060] S404: Assign a storage ratio coefficient to each encoding segment to generate an assignment vector.
[0061] S405: According to the assignment vector, weight each intermediate encoding segment to generate a plurality of actual encoding segments.
[0062] Specifically, by weighting the intermediate encoding segments according to the assignment vector, differentiated allocation of data segments among different storage nodes can be achieved, improving storage resource utilization efficiency and system load balancing, thereby optimizing overall storage performance and reliability while ensuring data recoverability.
[0063] S406: Verify the recoverability of the actual encoding segments. When the recoverability verification is confirmed to pass, the actual encoding segments are determined as data segments. When the recoverability verification is confirmed to fail, the assignment vector is adjusted, and step S405 is returned.
[0064] In the embodiments of the present application, the encrypted data block obtained through homomorphic encryption is first segmented into a plurality of basic data units, then an encoding matrix satisfying the maximum distance separable (MDS) property is constructed in a finite field, and linear encoding operation is performed on the data units by using the matrix, so that each output data segment is generated by linear combination of the original data units, thereby forming a plurality of encoding segments which are independent of each other and have a redundant relationship. Then, according to the total storage budget of the storage system, a weight coefficient is applied to each encoding segment to obtain an actual encoding segment, and finally the actual encoding segment meeting the recovery condition is taken as a recoverable data segment. The recovery condition for recoverability verification is that the rank of the encoding sub-matrix corresponding to the set of actual encoding segments that can be successfully accessed in the finite field is equal to the encoding dimension, i.e. these segments are linearly independent in the encoding space and can completely recover the original encrypted data block through decoding operation, realizing redundant recoverable storage of data in a distributed environment.
[0065] S5: Determine the optimal storage allocation result of each data segment by a distributed storage allocation model, wherein the distributed storage allocation model comprises an independent access probability model and a fixed connection capacity access model.
[0066] The distributed storage allocation model refers to a mathematical optimization model used to determine the allocation of data segments among different nodes in a multi-node storage environment. The model is composed of an independent access probability model and a fixed connection capacity access model. The former is based on the probability distribution of nodes that can be independently accessed to obtain the optimal storage scheme, and the latter optimizes the segment allocation strategy based on the limited access connection number.
[0067] It should be noted that by adopting the distributed storage allocation model, the optimal storage scheme can be adaptively determined according to network characteristics, node reliability and access mode, the balance and recoverability of data distribution are realized, and the resource utilization, access efficiency and storage reliability of the whole system are improved.
[0068] In a possible implementation, S5 specifically includes:
[0069] S501: Calculate the access mode discriminant coefficient of the storage system:
[0070]
[0071] ,
[0072] ,
[0073] wherein, represents the access mode discriminant coefficient, represents the access independence weight coefficient, represents the access independence coefficient, represents the connection volatility weight coefficient, min represents minimization, and CV represents the concurrent connection volatility coefficient, represents the connection volatility normalization constant, represents the connection capacity difference weight coefficient, represents the connection capacity proportion, that is, the ratio between the storage node and the access node, represents the reference connection capacity proportion, and max represents maximization, represents the average value of the correlation coefficient between all pairs of storage nodes, and n represents the total number of storage nodes, represents the Pearson correlation coefficient between the i-th storage node and the j-th storage node, represents the standard deviation of the number of concurrent connections, represents the average number of concurrent connections, that is, the average number of access nodes that can be connected per access, K represents the number of accesses, and r k represents the number of access nodes at the k-th access.
[0074] S502: When the access mode discriminant coefficient is greater than or equal to a preset discriminant coefficient, the optimal storage allocation result is determined by the independent access probability model.
[0075] When the access mode discriminant coefficient is greater than or equal to a preset discriminant coefficient, the node access relationship presents higher independence and dynamics, and the storage node of the data segment is randomly accessed with a fixed connection capacity. The independent access probability model refers to that in the distributed storage system, it is assumed that there are a total of a distributed storage node, whether each node can be accessed is a random event independent of each other. The probability of each node being successfully accessed is , and the probability of failure (unable to access) is . The storage system selects the storage share of each node under the given total storage budget , so that when the node is randomly accessible, the probability of successfully recovering the original data is maximized. The independent access probability model is mainly applicable to the environment where the node online rate or link state is approximately independent, and the number of nodes that can be concurrently reached is not fixed, such as independent failure and jitter of large-scale cloud / object storage, node online and offline in P2P or blockchain network, terminal link random fluctuation in mobile or wireless network, etc.
[0076] It should be noted that through the independent access probability model, the allocation strategy of the data segment can be adaptively optimized for the node independent online rate or random failure environment, effectively improving the data recovery success rate and overall fault tolerance performance of the system under uncertain network conditions, and enhancing the reliability and stability of distributed storage.
[0077] In a possible implementation, S502 specifically includes:
[0078] S5021: defining an independent access probability.
[0079] S5022: when the independent access probability is greater than a first preset probability, taking a maximum diffusion recovery probability of the data segment as a target recovery probability.
[0080] The maximum diffusion recovery probability refers to the probability that the system can successfully recover the original data when the total storage budget is evenly distributed among all nodes, at which time the data segment is distributed the most widely and has the highest redundancy, and can still be completely recovered even in the case of the most node failures, representing the optimal recovery performance of the system. By calculating the maximum diffusion recovery probability as the target recovery probability when the independent access probability is high, the data segment can be evenly distributed in more nodes, thereby maximizing the redundancy and recoverability of the system and improving the data reliability and access success rate in a high-access network environment.
[0081] S5023: when the independent access probability is less than or equal to a first preset probability and greater than a second preset probability, taking a symmetric diffusion recovery probability of the data segment as the target recovery probability.
[0082] The symmetric diffusion recovery probability refers to a probability that the distributed storage system can successfully recover complete data when only part of the nodes participate in data storage and each node stores the same data share, reflects the balanced recovery capability of the storage system under the limited diffusion condition, and is an intermediate state between the maximum diffusion and the minimum diffusion. By using the symmetric diffusion recovery probability as the target recovery probability when the independent access probability is at a medium level, a balance between storage redundancy and resource consumption can be achieved, which avoids resource waste caused by excessive diffusion and ensures a high data recovery success rate in a node access fluctuation environment.
[0083] S5024: When the independent access probability is less than or equal to the second preset probability, the minimum diffusion recovery probability of the data segment is taken as the target recovery probability.
[0084] The minimum diffusion recovery probability refers to a probability that, in the distributed storage system, when a small number of nodes are allocated in the storage budget set and each node stores a complete data copy, the original data can be recovered as long as any one of the nodes is successfully accessed, and is suitable for a scenario in which the number of nodes is limited or the access probability is low. By using the minimum diffusion recovery probability as the target recovery probability when the independent access probability is low, the system can still have basic data recovery capability under the condition of high failure rate or unstable network, reduce the risk of data unavailability caused by node disconnection, and thus enhance the fault tolerance and reliability of the system.
[0085] S5025: The optimal storage allocation result is determined by maximizing the target recovery probability.
[0086] The maximum diffusion recovery probability is:
[0087]
[0088] wherein, represents the recovery probability under the maximum diffusion condition, that is, the target recovery probability, p represents the probability that a single node is successfully accessed, T represents the total storage budget, m represents the actual number of storage nodes, and n represents the total number of storage nodes, represents the number of nodes that are independently accessed with a probability of in the m nodes, represents the number of nodes that are independently accessed with a probability of represents a ceiling symbol, and P() represents a probability.
[0089] The maximum diffusion recovery probability is a probability that, when the storage system adopts the maximum diffusion strategy (that is, the total storage budget T is evenly distributed to all n nodes, and each node stores T / n), the complete data can be recovered. the probability of successfully recovering the data. Since at least one full unit of information is needed to recover the complete data, the number of nodes that need to be accessed is no less than And the probability of each node being successfully accessed is The access result follows a binomial distribution Therefore, in the formula, represents the probability of "the number of successfully accessed nodes being no less than the threshold required for recovery", that is, the overall recovery success probability of the system under the most uniform diffusion condition.
[0090] Symmetric diffusion recovery probability:
[0091]
[0092] wherein, represents the recovery probability under symmetric diffusion, that is, the target recovery probability, represents the actual number of nodes participating in storage, represents the number of nodes that are successfully accessed with a probability of in nodes, k represents the node threshold required for recovering data, represents the floor function.
[0093] The symmetric diffusion recovery probability is the recovery performance when the storage system only selects part of the nodes to participate in storage (each node stores of the data). The budget determines that at most about nodes can participate in storage, and the integer part is . To recover the complete data, at least successfully accessed nodes are needed (because each node only contributes unit of data). Therefore, the probability of successful recovery is equal to the probability of successfully accessing at least nodes in independent accessible nodes.
[0094] Minimum diffusion recovery probability:
[0095]
[0096] wherein, represents the recovery probability under minimum diffusion, that is, the target recovery probability, represents the number of successfully accessed nodes when there are only storage nodes.
[0097] The minimum diffusion recovery probability is that the storage system allocates the budget to a small number of nodes, and each node stores a complete data copy. At this time, the number of nodes that can store complete data is The data can be recovered as long as any one of the nodes can be successfully accessed. The probability of each node being independently available is Thus, the probability of at least one node being accessible is This formula reveals that the recovery probability of the centralized storage scheme monotonically increases with the node reliability and the number of replicas but the overall reliability is lower than that of the decentralized storage.
[0098] Specifically, by adaptively selecting different recovery probability models according to the independent access probability interval, the redundancy and access efficiency can be dynamically balanced under different network reliability and resource constraints, so as to achieve the optimal data distribution strategy and significantly improve the recovery success rate and storage utilization of the system.
[0099] S503: When the access mode discriminant coefficient is less than the preset discriminant coefficient, the optimal storage allocation result is determined by the fixed connection capacity access model.
[0100] When the access mode discriminant coefficient is less than the preset discriminant coefficient, the access capacity is stable and the number of concurrent connections is limited, and the storage nodes of the data segments are randomly accessed with fixed connection capacity. The fixed connection capacity access model refers to that in a distributed storage system, it is assumed that the system can only establish a connection with a fixed number of storage nodes each time it is accessed, that is, the size of the access set is always The node set for access is selected with equal probability in The target is to obtain a storage allocation scheme such that the probability of successfully recovering data after accessing any The fixed connection capacity access model is mainly applicable to systems in which the number of concurrent connections is limited or the protocol specifies that a fixed number of shards are read at a time, such as downloaders with a fixed number of parallel connections open, CDN / edge nodes with a limit connection strategy for each request, search / database with a fixed number of shards touched for each query, and RAID / erasure code systems with a fixed bandwidth for reading.
[0101] It should be noted that by using the fixed connection capacity access model to determine the optimal storage allocation result under the condition of fixed connection capacity, the distribution mode of the data segments can be adaptively optimized for the actual network environment in which the number of accessed nodes is limited, so as to maximize the data recovery probability under limited connection resources and improve the access efficiency and reliability of the system.
[0102] In one possible implementation, S503 specifically includes:
[0103] S5031: Determine the total storage budget of the data segments.
[0104] S5032: Determine whether the total storage budget is less than the ratio of the storage nodes and the access nodes. If yes, go to step S5033. Otherwise, go to step S5035.
[0105] Specifically, by determining the relationship between the total storage budget and the ratio of the storage nodes and the access nodes, the subsequent storage strategy can be adaptively selected according to the degree of sufficiency of system resources, so as to preferentially guarantee the recovery performance when the budget is limited, and to realize balanced allocation when the budget is sufficient, thereby effectively improving the system resource utilization and storage flexibility.
[0106] S5033: Set the expected recovery probability.
[0107] Specifically, the expected recovery probability is generally set according to the average access success rate of the storage nodes, the network reliability, and the requirement of the service on data availability. Specifically, when the application scenario has a high requirement on data integrity, the expected recovery probability is generally set to be above 0.99. When the application has a high requirement on real-time performance and can tolerate a small amount of data loss, the expected recovery probability can be set to be between 0.9 and 0.95. In addition, the value can also be dynamically adjusted in combination with the total storage budget and the number of nodes, so as to balance the recovery reliability and the storage cost under the condition of limited resources.
[0108] S5034: Determine whether the expected recovery probability meets the probability threshold condition. If yes, go to step S5035. Otherwise, go to step S5036.
[0109] Specifically, by determining whether the expected recovery probability meets the probability threshold condition, the appropriate storage allocation strategy can be dynamically screened under different access reliability and budget constraints, so as to ensure that the system meets the minimum recovery demand while avoiding resource waste, and to realize the optimal balance between storage reliability and resource utilization.
[0110] In one possible implementation, the probability threshold condition specifically includes:
[0111] When the storage nodes and the access nodes meet the integer division condition, the expected recovery probability is greater than a first preset recovery probability.
[0112] In the embodiment of the present application, the integer division condition is that the total number of storage nodes can be divided by the number of access nodes, and the first preset recovery probability can be specifically 1 minus the ratio of the number of access nodes to the total number of storage nodes, which represents the minimum recovery probability threshold that the system needs to achieve to ensure successful data recovery in the uniform distribution condition when randomly accessing multiple nodes each time. When the set expected recovery probability is greater than the first preset recovery probability, the storage system is in a high recovery probability interval under the current distribution strategy, and uniform distribution (i.e., equal storage shares of each node) can achieve complete recovery with the minimum budget, so the optimal distribution scheme is directly determined as uniform distribution. If the set expected recovery probability is less than or equal to the first preset recovery probability, the storage system has not reached the high reliability interval, and uniform distribution is no longer optimal, and needs to enter the symmetric optimization stage.
[0113] When the storage nodes and the access nodes meet the non-integer division condition, the expected recovery probability is greater than the second preset recovery probability.
[0114] In the embodiment of the present application, the non-integer division condition is that the total number of storage nodes cannot be divided by the number of access nodes. Under the non-integer division condition, the number of nodes of the storage system cannot be evenly divided by the number of access nodes, and part of the nodes in each accessed node combination is repeatedly accessed or not completely covered. At this time, the distribution density of data among different nodes is not balanced, resulting in a nonlinear change of the recovery probability. To ensure that the system can still achieve optimal data recovery under this condition, a second preset recovery probability based on the system structure needs to be set.
[0115] The calculation formula of the second preset recovery probability is specifically:
[0116]
[0117] Among them, represents the second preset recovery probability, represents the greatest common divisor, r represents the number of access nodes, represents the number of remaining nodes, represents the integer multiple coefficient.
[0118] The second preset recovery probability reflects the balance point between the recovery probability and the resource utilization efficiency when the number of storage nodes is not an integer multiple of the number of access nodes, and measures the minimum reliability requirement for the system to maintain uniform storage optimality under the condition that part of the node groups cannot be completely and evenly distributed. Only when the overall recovery probability of the system exceeds the second preset recovery probability, the uniform distribution scheme is optimal, otherwise, the symmetric optimization stage needs to be entered.
[0119] When the storage nodes and the access nodes meet the complementary condition, the expected recovery probability is greater than the third preset recovery probability.
[0120] In the embodiment of the present application, the complementary condition is that the total number of storage nodes With the number of access nodes Between yes The third preset recovery probability is an integer multiple of the number of visited nodes. Each visited node set and the unvisited node set can form an integer multiple of the overall node space. Total number of storage nodes The ratio of the expected recovery probability to the third preset recovery probability indicates that the storage system has sufficient coverage and recovery capability under the current uniform distribution conditions. The data share distribution among the nodes is balanced, and complete recovery can be achieved with the minimum budget. Therefore, the optimal distribution result is determined to be uniform distribution. When the expected recovery probability is less than or equal to the third preset recovery probability, the overall recovery probability of the storage system is insufficient. Uniform distribution cannot guarantee complete data recovery, and it is necessary to enter the symmetric optimization stage and make appropriate adjustments to the node storage density.
[0121] S5035: Determine the optimal storage allocation result as uniform allocation.
[0122] Uniform allocation refers to the distribution of the total available storage budget T to all storage nodes in a distributed storage system in the same proportion, so that each node stores an equal share of data.
[0123] S5036: Construct a search candidate set.
[0124] S5037: Calculate the candidate recovery probability for all search candidates in the search candidate set:
[0125]
[0126] in, Let represent the candidate recovery probability, and j represent the randomly accessed storage node. This indicates selecting r nodes from n storage nodes for access. This indicates that j nodes are selected from m storage nodes for access. This represents the number of combinations of selecting (r-j) accessed nodes from non-storage nodes.
[0127] Specifically, by calculating the candidate recovery probability corresponding to each candidate scheme in the candidate set, the recovery performance of different storage allocation strategies under access-restricted conditions can be comprehensively evaluated.
[0128] S5038: Maximize the candidate recovery probability to obtain the optimal number of non-empty nodes.
[0129] Specifically, by maximizing the candidate recovery probability to determine the optimal non-empty node number, adaptive optimization of node participation can be achieved under different access capacities and budget constraints, thereby reducing the redundant overhead while ensuring the recovery success rate, and improving the storage efficiency and reliability of the system.
[0130] S5039: Generate an optimal storage allocation result according to the optimal non-empty node number.
[0131] In the embodiments of the present application, first, according to the optimal non-empty node number, nodes with the optimal number are selected from all available storage nodes as target nodes actually participating in storage, then, according to the characteristic parameters such as the storage capacity, bandwidth and access probability of each node, corresponding data segment weight or proportion is allocated to form a mapping relationship table of nodes and data segments, and finally, the encrypted and encoded data segments are written into the corresponding nodes according to the mapping result to generate an optimal storage allocation result.
[0132] In the embodiments of the present application, when the budget is sufficient, , all nodes store unit data, thereby realizing an optimal result with a recovery probability of 1, if the budget is insufficient , an expected recovery probability needs to be set, which is determined according to the reliability requirement of the storage system or the requirement of the application scenario, and represents the target probability of successfully recovering data when accessing random nodes, then it is judged whether the expected recovery probability meets the probability threshold condition calculated according to the relationship between and , if not, the recovery probability of each candidate scheme is calculated by constructing a candidate allocation set of different non-empty node numbers, and the allocation result with the largest recovery probability is selected as the optimal scheme. Thus, under the condition of fixed connection capacity random access, the optimal storage allocation strategy of uniform or non-uniform can be adaptively determined according to the budget size and the target recovery probability, and the optimal balance between resource utilization and data reliability is realized.
[0133] S6: Store each data segment according to the optimal storage allocation result to determine the stored data.
[0134] It should be noted that by storing the data segments according to the optimal storage allocation result, the most reasonable data distribution can be realized under the capacity, access probability and network state of each node, thereby improving the load balancing and access efficiency of the system, and significantly enhancing the reliability and overall recovery success rate of data storage.
[0135] S7: Defend the stored data by a non-cooperative random differential game model.
[0136] In the non-cooperative stochastic differential game model, a non-cooperative relationship between an attacker and a defender is established, and a stochastic differential equation is used to describe the evolution process of the system, so as to solve the optimal defense and attack strategy mathematical model. The model can depict the dynamic security characteristics of the multi-node storage system under the interaction of random attack and defense.
[0137] It should be noted that by introducing the non-cooperative stochastic differential game model for security defense of stored data, dynamic optimization and adaptive adjustment of the defense strategy can be realized, so that the system can allocate defense resources in real time according to the attack intensity and state changes, thereby effectively improving the steady-state security and anti-destroying capability of the distributed storage system in a complex attack environment.
[0138] In one possible implementation, the non-cooperative stochastic differential game model is specifically as follows:
[0139]
[0140]
[0141]
[0142] wherein, denotes the time derivative of the storage system state variable, a denotes the natural evolution coefficient of the storage system, denotes the state variable of the storage system, d i denotes the defense efficiency coefficient of the i th storage node, denotes the defense control variable of the i th storage node, c denotes the attack efficiency coefficient, denotes the attack control variable, denotes the initial state of the storage system, denotes the initial state constant, denotes the defense objective function of the i th storage node, denotes the defense cost quadratic coefficient of the i th storage node, denotes the defense cost constant term of the i th storage node, denotes the attack-defense interaction weight, denotes the situation risk weight of the i th storage node, e denotes an exponential function, r ( ) denotes a discount rate, t denotes a time variable, t0 denotes an initial time, and T denotes a termination time, ( ) denotes the terminal penalty function of the i th storage node, denotes the final state of the storage system, denotes the objective function of the attacker, denotes the attack cost weight, denotes the attack-defense coupling coefficient, Indicates the attack posture weight.
[0143] In one possible implementation, S7 specifically includes:
[0144] S701: Initialize the non-cooperative stochastic differential game model to obtain the initial state of the storage system.
[0145] S702: Based on the initial state, solve the non-cooperative stochastic differential game model to obtain the optimal defense strength sequence and the optimal opponent attack sequence:
[0146]
[0147]
[0148] in, This represents the optimal defense strength sequence. This represents the optimal opponent attack sequence.
[0149] S703: Update the initial state based on the optimal defense strength sequence and the optimal opponent attack sequence.
[0150] S704: Repeat steps S702 to S703 until the maximum number of iterations is reached.
[0151] S705: Transforms the optimal defense strength sequence into actual defense actions.
[0152] S706: Perform actual defensive actions to complete the security defense of stored data.
[0153] In this embodiment of the invention, a non-cooperative stochastic differential game model proactively protects data by constructing an adversarial relationship between the attacker and defender in a stochastic and dynamic environment. The model uses the storage system state as the core variable, describes the change in data security state over time through stochastic differential equations, and establishes an attack and defense payoff function with attack strength and defense strength as control variables. During operation, the system solves for the optimal strategy in real time, enabling the defender to dynamically adjust protection resources and strength based on attack behavior. This maintains data security and stability under random disturbances and continuous attacks, achieving adaptive and optimized security defense for the distributed storage system.
[0154] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0155] In the embodiment of the present application, by introducing differential privacy and homomorphic encryption mechanism in the data acquisition stage, the original data of the smart meter is disturbed and encrypted, which effectively prevents the leakage of user privacy, through the fragmentation coding, the redundant storage of data among distributed nodes can be realized, the fault tolerance and data recoverability of the system are improved, the independent access probability model and fixed connection capacity access model are constructed, the storage allocation strategy of the data segment is adaptively optimized, which can significantly improve the storage resource utilization and access efficiency, by introducing the non-cooperative random differential game model, the dynamic adjustment of the defense strategy and the attack and defense balance can be realized, so as to improve the security defense capability of the system in the complex network environment, the present application realizes the whole-link optimization of the smart meter data from privacy protection, reliable storage to active defense, and significantly improves the security, reliability and stability of data storage.
[0156] Reference is made to the accompanying drawings Figure 2 , which shows a structure schematic diagram of a smart meter data distributed storage system provided by the embodiment of the present application.
[0157] The embodiment of the present application provides a smart meter data distributed storage system 20, which comprises a processor 201 and a memory 202.
[0158] The memory 202 stores programs or instructions which can run on the processor 201, and when the programs or instructions are executed by the processor 201, the steps of the smart meter data distributed storage method described above are realized, and the same technical effects can be achieved, to avoid repetition, the present application will not be described again.
[0159] It should be understood that the processor 201 in the embodiment of the present application can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), ready programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0160] It is also to be understood that the memory 202 in embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. Nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically EPROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as external cache. By way of example, and not limitation, many forms of random access memory can be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double-data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DR RAM).
[0161] The above-described embodiments can be implemented in whole or in part by software, hardware (e.g., circuitry), firmware, or any combination of the three. When implemented in software, the above-described embodiments can be implemented in the form of one or more computer programs that are stored in a computer-readable storage medium. The computer-readable storage medium can be loaded into a computer, and the computer can execute the computer program to wholly or partially produce the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer program can be stored in a computer-readable storage medium, or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (e.g., infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available medium collections. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0162] It should be understood that the size of the sequence number of each process described above in various embodiments of the present application does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0163] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0164] Those of ordinary skill in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the devices, apparatuses and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0165] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0166] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0167] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit.
[0168] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0169] The embodiment of the present application provides a readable storage medium, which includes: a program or instructions stored on the readable storage medium, the program or instructions are executed by a processor to realize the steps of the smart meter data distributed storage method described above, and the same technical effects can be achieved. To avoid repetition, the present application will not be described again.
[0170] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, but not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application.
Claims
1. A method for distributed storage of smart meter data, characterized in that, include: S1: Obtain the raw data packets generated by the smart meter; S2: Perform differential privacy processing on the original data packet to obtain privacy data; S3: Homomorphically encrypt the privacy data to obtain an encrypted data block; S4: The encrypted data block is fragmented and encoded to generate multiple recoverable data segments; S5: Determine the optimal storage allocation result for each data segment through a distributed storage allocation model, wherein the distributed storage allocation model includes: an independent access probability model and a fixed connection capacity access model; Specifically, S5 includes: S501: Calculate the access mode discrimination coefficient of the storage system; S502: When the access mode discrimination coefficient is greater than or equal to the preset discrimination coefficient, the optimal storage allocation result is determined by the independent access probability model; Specifically, S502 includes: S5021: Define the probability of independent access; S5022: When the independent access probability is greater than the first preset probability, the maximum diffusion recovery probability of the data segment is taken as the target recovery probability; S5023: When the independent access probability is less than or equal to the first preset probability and greater than the second preset probability, the symmetric diffusion recovery probability of the data segment is taken as the target recovery probability. S5024: When the independent access probability is less than or equal to the second preset probability, the minimum diffusion recovery probability of the data segment is taken as the target recovery probability; S5025: Determine the optimal storage allocation result with the objective of maximizing the target recovery probability; S503: When the access mode discrimination coefficient is less than the preset discrimination coefficient, the optimal storage allocation result is determined through the fixed connection capacity access model; S6: Store each of the data segments according to the optimal storage allocation result to determine the stored data; S7: Security defenses are provided for the stored data through a non-cooperative stochastic differential game model.
2. The distributed data storage method for smart meters according to claim 1, characterized in that, S2 specifically includes: S201: Define privacy protection parameters, wherein the privacy protection parameters include a privacy budget and a relaxation parameter; S202: Define a differential privacy mechanism based on the privacy protection parameters; S203: Calculate the function sensitivity of the original data packet; S204: Based on the privacy budget and the function sensitivity, establish a Laplace distribution model; S205: Generate Laplace distribution noise using the Laplace distribution model; S206: Under the constraints of the differential privacy mechanism, the Laplace distribution noise is added to the original data packet to obtain the privacy data.
3. The distributed data storage method for smart meters according to claim 1, characterized in that, S4 specifically includes: S401: Divide the encrypted data block into multiple data units; S402: Construct the encoding generator matrix; S403: Linearly encode each data unit using the encoding generation matrix to generate multiple intermediate encoded segments; S404: Assign storage ratio coefficients to each of the coded segments and generate an allocation vector; S405: Based on the allocation vector, weight each of the intermediate coding segments to generate multiple actual coding segments; S406: Perform recoverability verification on the actual encoded segment; when the recoverability verification is confirmed to be passed, the actual encoded segment is identified as the data segment; when the recoverability verification is confirmed to be failed, adjust the allocation vector and return to step S405.
4. The distributed data storage method for smart meters according to claim 1, characterized in that, S503 specifically includes: S5031: Determine the total storage budget for the data segment; S5032: Determine whether the total storage budget is less than the ratio of storage nodes to access nodes; if yes, proceed to step S5033; otherwise, proceed to step S5035. S5033: Set the expected recovery probability; S5034: Determine whether the expected recovery probability meets the probability threshold condition; if yes, proceed to step S5035; otherwise, proceed to step S5036. S5035: Determine the optimal storage allocation result as a uniform allocation; S5036: Construct a search candidate set; S5037: Calculate the candidate recovery probability corresponding to all search candidates in the search candidate set; S5038: Maximize the candidate recovery probability to obtain the optimal number of non-empty nodes; S5039: Generate the optimal storage allocation result based on the optimal number of non-empty nodes.
5. The distributed data storage method for smart meters according to claim 4, characterized in that, The probability threshold conditions specifically include: When the storage node and the access node meet the integer division condition, the expected recovery probability is greater than the first preset recovery probability; When the storage node and the access node meet the non-integer divisibility condition, the expected recovery probability is greater than the second preset recovery probability; When the storage node and the access node meet the complementary conditions, the expected recovery probability is greater than the third preset recovery probability.
6. The distributed data storage method for smart meters according to claim 1, characterized in that, Specifically, S7 includes: S701: Initialize the non-cooperative stochastic differential game model to obtain the initial state of the storage system; S702: Based on the initial state, solve the non-cooperative stochastic differential game model to obtain the optimal defense strength sequence and the optimal opponent attack sequence; S703: Update the initial state according to the optimal defense strength sequence and the optimal opponent attack sequence; S704: Repeat steps S702 to S703 until the maximum number of iterations is reached; S705: Convert the optimal defense strength sequence into actual defense actions; S706: Execute the actual defense action to complete the security defense of the stored data.
7. A distributed storage system for smart meter data, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the distributed storage method for smart meter data as described in any one of claims 1 to 6.
8. A readable storage medium, characterized in that, The program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, they implement the steps of the distributed storage method for smart meter data as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Identity privacy data distributed storage method and system based on secret sharing
CN115001687A
Distributed storage method and system for clinical test data
CN119323046A