Power system data integrity verification system based on dynamic data block division mechanism and block chain

By optimizing blockchain storage through dynamic data block partitioning and chained hash structure, the problems of wasted storage resources and low hash calculation efficiency in data verification in power systems are solved. This enables efficient and secure data integrity verification, allowing for rapid identification of the source of data tampering and meeting the real-time requirements of power systems.

CN121543130APending Publication Date: 2026-02-17ELECTRIC POWER SCI & RES INST OF STATE GRID TIANJIN ELECTRIC POWER CO +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511490864.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing blockchain-based power system data integrity verification schemes suffer from rigid data block partitioning mechanisms, leading to wasted storage resources and low hash calculation efficiency. These schemes fail to meet the power system's requirements for timely data verification. Furthermore, traditional hash calculation models lack correlation, making it difficult to accurately trace the source of data tampering, resulting in system performance bottlenecks.

Method used

It adopts a dynamic data block partitioning mechanism and a chained hash structure, combined with Merkle tree optimization for blockchain storage, generates tightly linked hash chains through iterative hash algorithms, and introduces timestamps and random numbers to enhance the uniqueness of hash values. It supports incremental verification mode and optimizes data block size and hash calculation process.

Benefits of technology

It improves storage space utilization, enhances the sensitivity and security of data verification, and can quickly and accurately locate the location of data tampering, meeting the power system's requirements for real-time performance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543130A_ABST
    Figure CN121543130A_ABST
Patent Text Reader

Abstract

The invention discloses a power system data integrity verification system based on a dynamic data block division mechanism and a block chain. The system comprises a data preprocessing module, a hash generation module, a block chain storage module and a verification processing module. The data preprocessing module divides original data into data blocks with dynamically adjustable sizes; the Hash generation module adopts an iterative Hash algorithm to generate a chain Hash structure and an integrity Hash abstract; the block chain storage module uploads the hash data to a block chain network through a smart contract; and the verification processing module outputs a verification result by recalculating and comparing the hash values. The system realizes efficient and reliable data integrity verification, and has the advantages of high storage efficiency, good verification precision and low system load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, and more specifically, to a power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain. Background Technology

[0002] Against the backdrop of the rapid development of the energy internet and new power systems, the operation, monitoring, and management of power systems increasingly rely on massive, multi-dimensional, and heterogeneous data support. From generator status data to real-time SCADA / PMU measurements in the transmission and distribution network, and high-frequency data collection from smart meters on the consumer side, power data exhibits typical characteristics such as massive volume, rapid generation speed, diverse formats, and uneven value density. Ensuring the integrity of this data during transmission and storage is the cornerstone for preventing misjudgments and misoperations in the power grid due to data tampering or damage, thereby ensuring the safe and stable operation of the power system. Traditional data verification methods based on centralized institutions suffer from single points of failure and trust bottlenecks, while blockchain technology, with its inherent advantages of being distributed and tamper-proof, provides a new paradigm for building a decentralized power data integrity verification system.

[0003] However, existing blockchain-based data integrity verification schemes still face challenges when adapted to power industry applications, mainly in the following aspects: First, the rigid fixed data block partitioning mechanism cannot be dynamically adjusted according to the time-varying nature of power data (such as the periodicity of load data) and business importance (such as fault recording data and ordinary status data). This not only wastes storage resources but also seriously affects the efficiency of hash calculation and blockchain uploading. Second, the traditional independent hash calculation mode results in a lack of correlation between data blocks, making it impossible to effectively characterize the inherent temporal and logical relationships of power data. This leads to insufficient sensitivity in detecting continuous data tampering and makes it difficult to accurately trace the source of data corruption in complex power grid events. Third, the full data verification mechanism has huge computational overhead and cannot meet the stringent requirements for data verification timeliness in scenarios such as power dispatching and real-time risk warning. Fourth, storing the hash value of each data block directly on the blockchain will cause blockchain network congestion and a sharp increase in storage costs when faced with the massive amounts of data generated by power IoT terminals, restricting the application of the technology at the power edge. Summary of the Invention

[0004] To address the following problems in existing blockchain-based data integrity verification systems: inefficient storage due to rigid data block partitioning methods, lack of correlation in hash calculation affecting verification accuracy, waste of computational resources due to complete data verification, and system performance bottlenecks caused by insufficient blockchain storage efficiency, the present invention aims to provide a power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain.

[0005] To achieve the objectives of this invention, the technical solution provided by this invention is as follows:

[0006] A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain, the system comprising a data preprocessing module, a hash generation module, a blockchain storage module, and a verification processing module;

[0007] The data preprocessing module is used to receive the raw data to be verified and divide the raw data into multiple data blocks. The size of each data block is dynamically adjusted according to the data type and storage requirements, with the adjustment range between 1KB and 10MB.

[0008] The hash generation module is connected to the data preprocessing module and is used to calculate the hash value for each data block and generate an integrity hash digest corresponding to the entire original data. The hash generation module adopts an iterative hash algorithm to calculate the hash value for each data block in sequence and incorporates the hash value of the previous data block as part of the input into the hash calculation process of the next data block to form a chain hash structure.

[0009] The blockchain storage module is connected to the hash generation module and is used to upload the integrity hash digest and the hash value of each data block as transaction data to the blockchain network and store the corresponding blockchain transaction records on the blockchain. The blockchain storage module automatically executes data upload and storage operations through a smart contract, and the smart contract defines the data upload format and verification conditions.

[0010] The verification processing module is connected to the blockchain storage module and the data preprocessing module. It is used to obtain the blockchain transaction records from the blockchain network during the data verification phase, and output the data integrity verification result by recalculating the hash value of the data to be verified and comparing it with the hash value stored in the blockchain based on the integrity hash digest and the hash value of each data block.

[0011] Furthermore, when dividing data into blocks, the data preprocessing module dynamically adjusts the size of the data blocks based on their type and application scenario. This dynamic adjustment is based on the content characteristics of the data blocks, including their length, data type, and access frequency, and is automatically configured using a predefined rule set. This rule set includes constraints on minimum and maximum data block sizes, with the minimum size set to 1KB and the maximum size to 10MB. The target size of the data blocks is calculated using the following formula:

[0012]

[0013] Among them, S block S represents the target size of the data block.min S represents the minimum data block size. max L represents the maximum data block size. total N represents the total length of the original data. base The number of baseline partitions is represented by α, which represents a weighting factor that is dynamically adjusted based on data type and access frequency.

[0014] Furthermore, the hash generation module employs a variant of the SHA-256 algorithm when calculating the hash value. This variant includes introducing a timestamp and a random number as additional inputs during the hash calculation process to enhance the uniqueness and collision resistance of the hash value. The timestamp and random number are uploaded to the blockchain network via the blockchain storage module. For the i-th data block, its hash value H... i Calculated using the following formula:

[0015] H i =Hash(H i-1 ||D i ||T i ||R i )

[0016] Where Hash() represents a hash function, H i-1 H represents the hash value of the previous data block, when i=1. i-1 Let D be a predefined initial vector, || denotes the data concatenation operation, and D i T represents the content of the i-th data block. i R represents the timestamp associated with the i-th data block. i This represents the random number generated for the i-th data block.

[0017] Furthermore, when uploading hash values, the blockchain storage module also implements a batch upload function through the smart contract. The batch upload function aggregates the hash values ​​of multiple data blocks into a transaction data unit and organizes the transaction data unit through a Merkle tree structure to optimize blockchain storage space and transaction processing efficiency.

[0018] Furthermore, the Merkle tree structure is constructed in the form of a binary tree when organizing transaction data units, where each leaf node corresponds to the hash value of a data block, and non-leaf nodes are generated by calculating the hash values ​​of their child nodes. The root hash of the Merkle tree is stored on the blockchain as part of the integrity hash digest. The root hash RootHash of the Merkle tree is generated using the following formula:

[0019] RootHash=MerkTree(H1,H2,H3...,H n )

[0020] MerkleTree() represents the algorithm for constructing a Merkle tree and calculating the root hash, where H1, H2, ..., H n This represents the set of hash values ​​for all n data blocks.

[0021] Furthermore, when outputting data integrity verification results, the verification processing module also supports incremental verification mode. In incremental verification mode, the hash value is recalculated only for the data blocks that have changed in the data, and the verification result is locally updated by comparing it with the corresponding hash value stored in the blockchain, without having to reprocess the entire original data.

[0022] Furthermore, the system also includes a log recording module connected to the verification processing module and the blockchain storage module, used to record operation events and verification results during the data integrity verification process, and to store the operation events on the blockchain in an immutable form, wherein the log recording module automatically triggers the log storage operation through the smart contract.

[0023] Furthermore, the data preprocessing module also supports data compression when dividing data blocks. The data compression function applies a lossless compression algorithm to the original data before division to reduce the actual size of the data blocks, and the compressed data blocks are used as input to the hash generation module.

[0024] Furthermore, the verification processing module introduces a fault tolerance mechanism when comparing hash values. This fault tolerance mechanism allows for hash value mismatches to be accepted within a preset error range, which is set to 1% to 5% of the hash value length. The final verification result is determined through multiple repeated calculations and a voting strategy.

[0025] Furthermore, the system integrates with external data sources through an application programming interface (API), which provides standardized data input and output interfaces for receiving raw data and returning verification results, and seamlessly connects with the data preprocessing module and the verification processing module.

[0026] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0027] (1) This invention utilizes a dynamic data block partitioning mechanism to automatically adjust the data block size based on characteristics such as data type, length, and access frequency, allowing for flexible configuration within the range of 1KB to 10MB. This mechanism achieves intelligent partitioning through a built-in rule set in the data preprocessing module, ensuring both rapid processing of small data blocks and efficient management of large files. It improves storage space utilization, reduces unnecessary block generation, and maintains the system's adaptability to different data structures, laying an optimized foundation for subsequent hash calculations and blockchain storage.

[0028] (2) This invention employs a chained hash structure to generate integrity hash digests. Through an iterative hash algorithm, the hash value of the previous data block is integrated into the calculation process of the next data block, forming a tightly linked hash chain. The hash generation module also introduces timestamps and random numbers as additional inputs during the calculation process, enhancing the uniqueness of the hash values. This ensures that any modification to a single data block will lead to changes in all subsequent hash values, greatly improving the system's sensitivity and security, while also providing a technical basis for accurately locating data tampering. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the system execution flow provided in an embodiment of the present invention;

[0030] Figure 2 This is a schematic diagram of the execution flow of the data preprocessing module in an embodiment of the present invention.

[0031] Figure 3 This is a schematic diagram of the incremental verification process executed by the verification processing module in an embodiment of the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0033] The following sections illustrate the power system data integrity verification system based on dynamic data block partitioning and blockchain, using examples of high-frequency data integrity verification for smart meters based on dynamic data block partitioning and data integrity protection for power grid fault recordings based on chained hashing and Merkle trees. The specific details are as follows:

[0034] Example 1

[0035] like Figures 1 to 3 As shown in the figure, this embodiment demonstrates in detail the specific implementation of the present invention in high-frequency data integrity verification of smart meters on the power user side.

[0036] In Advanced Metering Systems (AMIs), massive numbers of smart meters generate electricity consumption data at minute or even second-level frequencies. This data is the core basis for power companies to conduct accurate load forecasting, dynamic rate adjustments, line loss analysis, and anti-electricity theft measures. The massive, real-time, and micro-batch characteristics of these data place extremely high demands on the data integrity verification system. Traditional centralized verification methods suffer from performance bottlenecks and single-point-of-failure risks, while directly using blockchain to store raw data or fixed-block hash values ​​faces problems of high cost and low efficiency.

[0037] This system constructs an efficient, reliable, and traceable integrity protection system for smart meter data by introducing dynamic data block partitioning, chained hash calculation, batch on-chain based Merkle tree, and incremental verification mechanisms.

[0038] First, system initialization and data preprocessing are performed. The system is deployed on the power company's measurement data platform and is responsible for receiving meter data from different data acquisition devices. During the initialization phase, the data preprocessing module pre-configures rule set parameters based on the business characteristics of the smart meter data. Considering the continuity of the data stream and the characteristics of the business time period, a minimum data block size S is set. min =64KB, maximum data block size S max =2MB, number of baseline partitions N base =1000. The dynamic adjustment strategy of the weighting factor α is linked to the characteristics of the power load: for the two critical load periods of morning peak (08:00-12:00) and evening peak (18:00-22:00), α is set to 1.3 to cope with the instantaneous surge in data volume and ensure the timeliness of data processing; for ordinary periods, α is set to 1.0; for off-peak periods (00:00-06:00), α is set to 0.7 to optimize the utilization of storage resources.

[0039] Taking the data from a specific transformer substation during the morning peak electricity consumption window of 10:00-10:05 as an example, the total size L of the aggregated data received by the data preprocessing module is... total =15MB (15,728,640 bytes), current time period weighting factor α = 1.3. The module first calculates the target size of the dynamic data block according to the following formula:

[0040]

[0041] Among them, S block S represents the target size of the data block. min S represents the minimum data block size. max L represents the maximum data block size. total N represents the total length of the original data. base The number of baseline partitions is represented by α, which represents a weighting factor that is dynamically adjusted based on data type and access frequency.

[0042] The specific calculation process is as follows:

[0043] L total / N base =15728.64, multiplied by α=1.3, we get 20447.232, this value is between S min (65536 bytes) and S max Between (2097152 bytes), S was finally determined.block =20447 bytes (approximately 20KB), the system then intelligently divides the 15MB raw data stream into approximately 770 data blocks, ensuring the integrity of each individual meter record during the process and never splitting across blocks.

[0044] After the data blocks are partitioned, the hash generation module initiates a chained hash calculation process. The system first generates an initial vector H0, which is derived from the unique identifier of the transformer area, the data acquisition batch number, and the system startup salt value through a single hash operation, ensuring the uniqueness of the initial state. For the first data block D1, the hash generation module collects its content, the start timestamp T1 of the data acquisition window, and a random number R1 generated by a cryptographically secure pseudo-random number generator. Subsequently, the hash value H1 of the first data block is calculated using the following formula:

[0045] H1 = Hash(H0||D1||T1||R1)

[0046] Where Hash represents the cryptographic hash function used (such as a variant of SHA-256), and the symbol || represents the data concatenation operation. For the i-th data block (i>1), its hash value H i The calculation will use the hash value H of the previous data block. i-1 As one of the inputs, the calculation formula is:

[0047] H i =Hash(H i-1 ||D i ||T i ||R i )

[0048] This iterative process continues until all 770 data blocks have been processed. Finally, the last data block D is processed. n Hash value H n This naturally became an integrity hash digest representing all smart meter data within this 15MB, 5-minute time window.

[0049] This chain structure allows any data block D to... i Even the slightest alteration will result in a change to its hash value H. i The change, and the "chain reaction" triggered by the iterative dependency, caused all subsequent H... i+1 To H n All of these fail, thus greatly enhancing the system's sensitivity and security.

[0050] Finally, the blockchain performs batch storage and smart contracts. The blockchain storage module receives 770 hash values ​​output by the hash generation module. To optimize blockchain storage efficiency, the module does not upload each hash value individually but instead uses them as leaf nodes to construct a Merkle tree. This binary tree recursively concatenates and hashes adjacent nodes to generate a unique root hash. The calculation of the root hash can be formally represented as:

[0051] RootHash=MerkleTree({H1,H2,...,H n})

[0052] MerkleTree() represents the algorithm for constructing a Merkle tree and calculating the root hash, {H1,H2,...,H...} n} represents the set of hash values ​​for all n data blocks.

[0053] This lightweight RootHash (only 32 bytes) is submitted to the blockchain network along with key metadata (such as time window, data volume, and station identifier). A smart contract is automatically triggered during this process, defining the data upload format and verification conditions, such as verifying the uploader's signature and confirming the timestamp's validity, ensuring that only legitimate data is recorded on the immutable distributed ledger.

[0054] When power operators need to verify whether the data of a specific meter at a specific time has been tampered with, the verification processing module initiates an efficient incremental verification mode. For example, if a small amount of meter data at 10:03 is found to need re-verification due to communication interference, the system does not need to process the entire 5-minute data. It first retrieves the corresponding Merkle root hash (RootHash) from the blockchain. 链上 .

[0055] Then, only the affected portion of the original data (i.e., the data around 10:03) is re-blocked according to the same dynamic partitioning rules, and the hash values ​​of these local data blocks are recalculated using a chained formula. Next, leveraging the properties of Merkle trees, the system can reconstruct the new root hash (RootHash) locally by providing only the hash values ​​of these updated data blocks and a small number of "sibling node" hash values ​​(called "Merkle proof paths") along the path from them to the root hash. 新 By comparing the RootHash 新 With RootHash 链上 By verifying consistency, integrity checks can be completed quickly and accurately. This method reduces the verification overhead from being proportional to the total amount of data to being proportional to the amount of data change, greatly satisfying the real-time requirements of the power industry.

[0056] Example 2

[0057] This embodiment details the specific implementation of the present invention in the protection of the integrity of power grid fault recording data. The fault recorder records the complete waveform sequence of voltage and current within hundreds of milliseconds before and after a transient abnormal event such as a short circuit or oscillation in the power grid. This data serves as a "black box" for analyzing the root cause of the accident, evaluating the behavior of relay protection devices, and optimizing power grid operation strategies. These data files are large (often hundreds of MB) and have extremely high sampling rates (above 10 kHz). If maliciously tampered with, they may lead to erroneous accident conclusions and cause serious secondary system security risks.

[0058] This system constructs a complete protection scheme for fault recording data through dynamic partitioning for high-density waveform data, chained hashing to enhance time-series correlation, hierarchical Merkle tree structure, and precise location verification.

[0059] First, dynamic data preprocessing based on waveform characteristics is performed. The system is integrated into the fault information management system of the power grid dispatch center. The data preprocessing module configures parameters to address the high sampling and large file characteristics of fault waveform data: setting the minimum data block size S. min =512KB, maximum data block size S max =10MB, number of baseline partitions N base =200. The weighting factor α is adjusted based on the "density" of the data, which is the product of the sampling rate and the number of channels.

[0060] For waveform recordings with standard density (sampling rate ≤ 10kHz and number of channels ≤ 16), set α = 1.0; for waveform recordings with high density (sampling rate > 10kHz or number of channels > 16), since they contain more information and are more valuable, set α = 1.5 to appropriately reduce the block size and improve the granularity of verification.

[0061] For example, the total size L of the waveform recording file for a short-circuit fault on a 500kV line. total =350MB (367001600 bytes), sampling rate 20kHz, number of channels 24, belonging to high-density data, therefore α = 1.5. The data preprocessing module uses the following formula for dynamic partitioning:

[0062]

[0063] Calculation yields: L total / N base =1835008, multiplied by α=1.5, becomes 2752512. This value is in S min (524288 bytes) and S max Between (10,485,760 bytes), therefore S is determined. block= 2,752,512 bytes (approximately 2.62 MB). The system then divides the 350 MB waveform file into approximately 134 data blocks, strictly aligning the sampling point periods during the division to ensure that each data block contains an integer number of complete power frequency cycle waveforms.

[0064] The hash generation module employs an enhanced hash calculation strategy for this embodiment. Considering the requirements of fault analysis for timing and waveform continuity, an additional key metadata is introduced for each data block, based on the standard chained hash input: the starting sample number (Seq) of the waveform data contained in that data block. i This sequence number precisely identifies the absolute position of the data block on the timeline of the entire waveform file. For the i-th data block, its hash value H... i The calculation formula is enhanced as follows:

[0065] H i =Hash(H i-1 ||D i ||T i ||R i ||Seq i )

[0066] Where, when i = 1, H0 is a predefined initial vector; Seq i Represents data block D i The included waveform data is numbered as the starting sampling point in the entire file.

[0067] Any tampering with waveform data will not only disrupt the hash chain, but also affect the Seq. i It directly links to the specific interval of the tampered data on the fault timeline (e.g., "A-phase current data in the 5th to 6th cycles after the fault occurred"), enabling traceability from cryptographic evidence to physical events.

[0068] A hierarchical Merkle tree and secure storage are implemented. For the hash values ​​of 134 data blocks generated by a single failure event, the blockchain storage module constructs a standard Merkle tree and sets its root hash as RootHash. 事件 Calculate and store:

[0069] RootHash 事件 =MerkleTree({H1,H2,...,H) n To further manage the hundreds or thousands of fault events that may occur across the network every day, the system adopts a hierarchical Merkle tree structure. The root hash of all fault events within a day is used to... 事件 As leaf nodes, construct a "daily index Merkle tree", whose root hash is RootHash. 日 It is uploaded to the blockchain once a day.

[0070] The two-tier architecture significantly reduces the amount of data stored on-chain while maintaining complete control over all fault recording data. Smart contracts automate the upload process and incorporate digital certificate-based access control logic to ensure that only authorized fault analysts or diagnostic systems can trigger the verification process, effectively protecting the security of critical power grid data.

[0071] When there is a dispute regarding the conclusions of an analysis of a fault, the auditing party or expert panel can use the verification processing module to perform judicial-level verification. The system supports full verification and precise location verification. If it is suspected that data in a specific range of the waveform file (such as the time when the relay protection device should have operated) has been modified, the system can use the characteristics of Merkle trees and chained hashes for efficient investigation.

[0072] The verification process first retrieves the relevant root hash from the blockchain, then requests the data custodian to provide the data block to be verified and its complete Merkle proof path. Through local computation and path verification, the system can confirm the integrity of the data block in O(logn) time complexity. If a mismatch is found, it is combined with the Seq... i The information can clearly report the tampered data block number and its corresponding specific sampling point time range, for example, "Report: Data block H..." 78 "Hash verification failed (corresponding to waveform data from 102ms to 108ms after the fault)." This verification report, which includes blockchain evidence and precise time positioning, serves as technical evidence for determining responsibility.

[0073] The implementation of this embodiment deeply integrates the technology of the present invention with the power grid fault analysis scenario, which not only ensures the immutability of the "black box" data itself, but also greatly improves the accuracy, fairness and efficiency of power grid accident analysis through precise positioning capabilities.

[0074] Finally, it should be noted that the above embodiments are merely illustrative and explanatory of the present invention, and are not intended to limit the present invention to the scope of the described embodiments. Furthermore, those skilled in the art will understand that the present invention is not limited to the above embodiments, and many more variations and modifications can be made based on the teachings of the present invention, all of which fall within the scope of protection claimed by the present invention.

Claims

1. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain, characterized in that, The system includes a data preprocessing module, a hash generation module, a blockchain storage module, and a verification processing module; The data preprocessing module is used to receive the raw data to be verified and divide the raw data into multiple data blocks. The size of each data block is dynamically adjusted according to the data type and storage requirements, with the adjustment range between 1KB and 10MB. The hash generation module is connected to the data preprocessing module and is used to calculate the hash value for each data block and generate an integrity hash digest corresponding to the entire original data. The hash generation module adopts an iterative hash algorithm to calculate the hash value for each data block in sequence and incorporates the hash value of the previous data block as part of the input into the hash calculation process of the next data block to form a chain hash structure. The blockchain storage module is connected to the hash generation module and is used to upload the integrity hash digest and the hash value of each data block as transaction data to the blockchain network and store the corresponding blockchain transaction records on the blockchain. The blockchain storage module automatically executes data upload and storage operations through a smart contract, and the smart contract defines the data upload format and verification conditions. The verification processing module is connected to the blockchain storage module and the data preprocessing module. It is used to obtain the blockchain transaction records from the blockchain network during the data verification phase, and output the data integrity verification result by recalculating the hash value of the data to be verified and comparing it with the hash value stored in the blockchain based on the integrity hash digest and the hash value of each data block.

2. The power system data integrity verification system based on dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, When dividing data into blocks, the data preprocessing module dynamically adjusts the size of the data blocks based on their type and application scenario. This dynamic adjustment is based on the content characteristics of the data blocks, including their length, data type, and access frequency, and is automatically configured using a predefined rule set. This rule set includes constraints on minimum and maximum data block sizes, with the minimum size set to 1KB and the maximum size to 10MB. The target size of the data blocks is calculated using the following formula: Among them, S block S represents the target size of the data block. min S represents the minimum data block size. max L represents the maximum data block size. total N represents the total length of the original data. base The number of baseline partitions is represented by α, which represents a weighting factor that is dynamically adjusted based on data type and access frequency.

3. The power system data integrity verification system based on dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, The hash generation module employs a variant of the SHA-256 algorithm when calculating hash values. This variant incorporates a timestamp and a random number as additional inputs during the hash calculation process to enhance the uniqueness and collision resistance of the hash value. The timestamp and random number are uploaded to the blockchain network via the blockchain storage module. For the i-th data block, its hash value H... i Calculated using the following formula: H i =Hash(H i-1 ||D i ||T i ||R i ) Where Hash() represents a hash function, H i-1 H represents the hash value of the previous data block, when i=1. i-1 Let D be a predefined initial vector, || denotes the data concatenation operation, and D i T represents the content of the i-th data block. i R represents the timestamp associated with the i-th data block. i This represents the random number generated for the i-th data block.

4. The power system data integrity verification system based on dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, When uploading hash values, the blockchain storage module also implements a batch upload function through the smart contract. The batch upload function aggregates the hash values ​​of multiple data blocks into a transaction data unit and organizes the transaction data unit through a Merkle tree structure to optimize blockchain storage space and transaction processing efficiency.

5. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 4, characterized in that, The Merkle tree structure is constructed using a binary tree format when organizing transaction data units. Each leaf node corresponds to the hash value of a data block, and non-leaf nodes are generated by calculating the hash values ​​of their child nodes. The root hash of the Merkle tree is stored on the blockchain as part of the integrity hash digest. The root hash RootHash of the Merkle tree is generated using the following formula: RootHash=MerkTree(H1,H2,H3...,H n ) MerkleTree() represents the algorithm for constructing a Merkle tree and calculating the root hash, where H1, H2, ..., H n This represents the set of hash values ​​for all n data blocks.

6. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, When outputting data integrity verification results, the verification processing module also supports incremental verification mode. In incremental verification mode, the hash value is recalculated only for the data blocks that have changed in the data, and the verification result is locally updated by comparing it with the corresponding hash value stored in the blockchain, without having to reprocess the entire original data.

7. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, The system also includes a log recording module connected to the verification processing module and the blockchain storage module, which is used to record operation events and verification results during the data integrity verification process, and store the operation events on the blockchain in an immutable form, wherein the log recording module automatically triggers the log storage operation through the smart contract.

8. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, The data preprocessing module also supports data compression when dividing data into blocks. The data compression function applies a lossless compression algorithm to the original data before division to reduce the actual size of the data blocks, and the compressed data blocks are used as input to the hash generation module.

9. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, The verification processing module also introduces a fault tolerance mechanism when comparing hash values. This fault tolerance mechanism allows for hash value mismatches to be accepted within a preset error range, which is set to 1% to 5% of the hash value length. The final verification result is determined through multiple repeated calculations and a voting strategy.

10. A power system data integrity verification system based on a dynamic data block partitioning mechanism and blockchain as described in claim 1, characterized in that, The system integrates with external data sources through an application programming interface (API), which provides standardized data input and output interfaces for receiving raw data and returning verification results, and seamlessly connects with the data preprocessing module and the verification processing module.

Citation Information

Cited By

  • Data monitoring processing system and method based on block chain hash pointer verification

    CN122174128A

  • A full-function supervisory reporting integrated processing system

    CN122195657A